summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-03 20:44:40 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-03 20:44:40 +0000
commitab672bf12bcb74ac26cedf27d5e2e19bc2cf7aa3 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent7c5f5b8b769f430bed0901c12cde65b3a53c2678 (diff)
moved eeze into eflmaster
SVN revision: 82103
-rw-r--r--.gitignore35
-rw-r--r--AUTHORS5
-rw-r--r--COPYING25
-rw-r--r--ChangeLog130
-rw-r--r--INSTALL365
-rw-r--r--Makefile.am81
-rw-r--r--NEWS39
-rw-r--r--README46
-rw-r--r--TODO9
-rwxr-xr-xautogen.sh39
-rw-r--r--configure.ac319
-rw-r--r--doc/Doxyfile.in138
-rw-r--r--doc/Makefile.am33
-rw-r--r--doc/e.css273
-rw-r--r--doc/eeze.dox.in0
-rw-r--r--doc/foot.html18
-rw-r--r--doc/head.html68
-rw-r--r--doc/img/edoxy.css486
-rw-r--r--doc/img/eeze.pngbin209833 -> 0 bytes
-rw-r--r--doc/img/foot_bg.pngbin173 -> 0 bytes
-rw-r--r--doc/img/head_bg.pngbin214 -> 0 bytes
-rw-r--r--doc/img/header_menu_background.pngbin192 -> 0 bytes
-rw-r--r--doc/img/header_menu_background_last.pngbin637 -> 0 bytes
-rw-r--r--doc/img/header_menu_current_background.pngbin1200 -> 0 bytes
-rw-r--r--doc/img/header_menu_unselected_background.pngbin1596 -> 0 bytes
-rw-r--r--doc/img/logo.pngbin3825 -> 0 bytes
-rw-r--r--eeze.pc.in11
-rw-r--r--eeze.spec.in80
-rw-r--r--m4/ac_attribute.m447
-rw-r--r--m4/efl_binary.m478
-rw-r--r--m4/efl_compiler_flag.m457
-rw-r--r--m4/efl_doxygen.m499
-rw-r--r--m4/efl_tests.m465
-rw-r--r--src/Makefile.am2
-rw-r--r--src/bin/Makefile.am54
-rw-r--r--src/bin/eeze_disk_ls.c53
-rw-r--r--src/bin/eeze_mount.c130
-rw-r--r--src/bin/eeze_scanner.c453
-rw-r--r--src/bin/eeze_scanner.h33
-rw-r--r--src/bin/eeze_sensor_test.c173
-rw-r--r--src/bin/eeze_udev_test.c238
-rw-r--r--src/bin/eeze_umount.c113
-rw-r--r--src/lib/Eeze.h561
-rw-r--r--src/lib/Eeze_Disk.h567
-rw-r--r--src/lib/Eeze_Net.h62
-rw-r--r--src/lib/Eeze_Sensor.h320
-rw-r--r--src/lib/Makefile.am49
-rw-r--r--src/lib/eeze_disk.c476
-rw-r--r--src/lib/eeze_disk_libmount.c495
-rw-r--r--src/lib/eeze_disk_libmount_new.c525
-rw-r--r--src/lib/eeze_disk_libmount_old.c401
-rw-r--r--src/lib/eeze_disk_mount.c465
-rw-r--r--src/lib/eeze_disk_private.h93
-rw-r--r--src/lib/eeze_disk_udev.c90
-rw-r--r--src/lib/eeze_main.c123
-rw-r--r--src/lib/eeze_net.c321
-rw-r--r--src/lib/eeze_net_private.h53
-rw-r--r--src/lib/eeze_sensor.c320
-rw-r--r--src/lib/eeze_sensor_private.h89
-rw-r--r--src/lib/eeze_udev_find.c384
-rw-r--r--src/lib/eeze_udev_private.c200
-rw-r--r--src/lib/eeze_udev_private.h46
-rw-r--r--src/lib/eeze_udev_syspath.c292
-rw-r--r--src/lib/eeze_udev_walk.c65
-rw-r--r--src/lib/eeze_udev_watch.c449
-rw-r--r--src/modules/Makefile.am26
-rw-r--r--src/modules/eeze_sensor_fake.c191
-rw-r--r--src/modules/eeze_sensor_tizen.c869
-rw-r--r--src/tests/Makefile.am16
-rw-r--r--src/tests/eeze_suite.c679
70 files changed, 0 insertions, 12022 deletions
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 11fc519..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,35 +0,0 @@
1*.o
2*.lo
3*.la
4.deps
5.libs
6Makefile
7Makefile.in
8config.*
9/aclocal.m4
10/autom4te.cache
11/compile
12/configure
13/depcomp
14/eeze.pc
15/eeze.spec
16/install-sh
17/libtool
18/ltmain.sh
19/missing
20/stamp-h1
21/doc/eeze.dox
22/ABOUT-NLS
23/m4/libtool.m4
24/m4/ltoptions.m4
25/m4/ltsugar.m4
26/m4/ltversion.m4
27/m4/lt~obsolete.m4
28/src/bin/eeze_udev_test
29/doc/Doxyfile
30src/bin/eeze_disk_ls
31src/bin/eeze_mount
32src/bin/eeze_scanner
33src/bin/eeze_sensor_test
34src/bin/eeze_umount
35
diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644
index 2824055..0000000
--- a/AUTHORS
+++ /dev/null
@@ -1,5 +0,0 @@
1Mike Blumenkrantz (zmike/discomfitor) <michael.blumenkrantz@gmail.com>
2Cedric Bail <cedric@efl.so>
3Mikael Sans <sans.mikael@gmail.com>
4Christophe Dumez <christophe.dumez@intel.com>
5Stefan Schmidt <stefan@datenfreihafen.org>
diff --git a/COPYING b/COPYING
deleted file mode 100644
index 15bae3b..0000000
--- a/COPYING
+++ /dev/null
@@ -1,25 +0,0 @@
1Copyright notice for Eeze:
2
3Copyright (C) 2011 Mike Blumenkrantz and various contributors (see AUTHORS)
4
5All rights reserved.
6
7Redistribution and use in source and binary forms, with or without
8modification, are permitted provided that the following conditions are met:
9
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15
16THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
17INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
18FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
22OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
25EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index ba3d7c9..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,130 +0,0 @@
12011-01-29 Carsten Haitzler (The Rasterman)
2
3 1.0.0 release
4
52011-01-29 Mike Blumenkrantz (discomfitor/zmike)
6
7 * added disk manipulation functions
8 (eeze_disk_function, eeze_disk_new, eeze_disk_new_from_mount, eeze_disk_free, eeze_disk_scan,
9 eeze_disk_data_set, eeze_disk_data_get, eeze_disk_syspath_get, eeze_disk_devpath_get,
10 eeze_disk_fstype_get, eeze_disk_vendor_get, eeze_disk_model_get, eeze_disk_serial_get,
11 eeze_disk_uuid_get, eeze_disk_label_get, eeze_disk_type_get, eeze_disk_removable_get,
12 eeze_disk_mounted_get, eeze_disk_mount, eeze_disk_unmount, eeze_disk_mount_point_get,
13 eeze_disk_mount_point_set, eeze_mount_tabs_watch, eeze_mount_tabs_unwatch,
14 eeze_mount_mtab_scan, eeze_mount_fstab_scan)
15
162011-02-09 Mike Blumenkrantz (discomfitor/zmike)
17
18 * added handling of mountopts
19 * iso automounting in eeze_mount
20 (EEZE_DISK_MOUNTOPT_UTF8, EEZE_DISK_MOUNTOPT_NOEXEC, EEZE_DISK_MOUNTOPT_NOSUID,
21 EEZE_DISK_MOUNTOPT_REMOUNT, eeze_disk_mountopts_set, eeze_disk_mountopts_get)
22
232011-03-03 Mike Blumenkrantz (discomfitor/zmike)
24
25 * fixed bug with watches involving filtering being too aggressive for removed/offlined devices
26
272011-03-12 Mike Blumenkrantz (discomfitor/zmike)
28
29 * added EEZE_UDEV_TYPE_NET
30
312011-03-12 Mike Blumenkrantz (discomfitor/zmike)
32
33 * added eeze_udev_syspath_get_devname
34
352011-05-15 Mike Blumenkrantz (discomfitor/zmike)
36
37 * added eeze_disk_cancel, to cancel the current pending mount/umount operation on a disk
38 * added a uid=%i mount option using getuid (NOT geteuid)
39 * added wrapper for mount command exes (such as sudo) with eeze_disk_mount_wrapper_set
40 and eeze_disk_mount_wrapper_get
41 * added functions to perform udev lookups directly on disk devices without wasting
42 unnecessary function calls (eeze_disk_udev_get_parent, eeze_disk_udev_get_property,
43 eeze_disk_udev_get_sysattr, eeze_disk_udev_walk_check_sysattr,
44 eeze_disk_udev_walk_get_sysattr)
45
462011-05-16 Mike Blumenkrantz (discomfitor/zmike)
47
48 * fixed bug with EEZE_UDEV_TYPE_DRIVE_* detection
49 * fixed eeze_udev_find_unlisted_similar to be less permissive
50 * added EEZE_EVENT_DISK_EJECT and eeze_disk_eject, functions for ejecting a disk
51
522011-06-29 Mike Blumenkrantz (discomfitor/zmike)
53
54 * fixed bug where EEZE_UDEV_EVENT_NONE would not match all events for watches
55 * fixed segv when detecting removable drives
56 * added eeze_scanner utility daemon
57 * fixed bug where watches would not properly detect disk events
58
592011-07-15 Cedric Bail
60
61 * added EEZE_UDEV_TYPE_V4L
62
632011-08-01 Mike Blumenkrantz (discomfitor/zmike)
64
65 * added fix for battery/ac detection with very recent versions of udev
66
672011-11-17 Mike Blumenkrantz (discomfitor/zmike)
68
69 * added eeze_disk_can_{mount,unmount,eject} to determine at runtime whether eeze
70 is capable of performing disk operations
71
722011-12-02 Carsten Haitzler (The Rasterman)
73
74 1.1.0 release
75
762011-12-02 Mike Blumenkrantz (discomfitor/zmike)
77
78 * added network device api (eeze_net_*) and Eeze_Net.h header
79
802012-01-09 Mikael Sans
81
82 * added EEZE_UDEV_TYPE_BLUETOOTH
83
842012-04-26 Carsten Haitzler (The Rasterman)
85
86 1.2.0 release
87
882012-06-11 Mike Blumenkrantz
89
90 * eeze_scanner socket is now readable by anyone
91
922012-06-12 Mike Blumenkrantz
93
94 * Add fallback mount using device name if a disk has no uuid
95
962012-06-29 Mike Blumenkrantz
97
98 * Fix crash in eeze_net_free()
99
1002012-06-29 Christophe Dumez (christophe.dumez@intel.com)
101
102 * Added joystick detection
103
1042012-07-10 Mike Blumenkrantz
105
106 * Add a check in event monitoring for disks which ensures that
107 device changes for loopback devices are picked up
108
1092012-07-23 Mike Blumenkrantz
110
111 * Add yet another libmount backend for eeze_disk to handle current
112 setups which do not have mtab and instead use /proc/self/mountinfo
113
1142012-07-30 Mike Blumenkrantz
115
116 * Add EEZE_DISK_MOUNTOPT_NODEV option for disabling device nodes on mount
117
1182012-07-31 Mike Blumenkrantz
119
120 * Prevent mount operations from retrying infinitely on failure
121
1222012-08-30 Carsten Haitzler (The Rasterman)
123
124 1.7.0 release
125
1262012-09-18 Stefan Schmidt
127
128 * Added sensor subsystem to read out data from various sensor frameworks
129 * Added sensor modules for Tizen and a fake module for testing
130 * Added unit tests for various parts of eeze
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index 7d1c323..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,365 +0,0 @@
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 Copying and distribution of this file, with or without modification,
8are permitted in any medium without royalty provided the copyright
9notice and this notice are preserved. This file is offered as-is,
10without warranty of any kind.
11
12Basic Installation
13==================
14
15 Briefly, the shell commands `./configure; make; make install' should
16configure, build, and install this package. The following
17more-detailed instructions are generic; see the `README' file for
18instructions specific to this package. Some packages provide this
19`INSTALL' file but do not implement all of the features documented
20below. The lack of an optional feature in a given package is not
21necessarily a bug. More recommendations for GNU packages can be found
22in *note Makefile Conventions: (standards)Makefile Conventions.
23
24 The `configure' shell script attempts to guess correct values for
25various system-dependent variables used during compilation. It uses
26those values to create a `Makefile' in each directory of the package.
27It may also create one or more `.h' files containing system-dependent
28definitions. Finally, it creates a shell script `config.status' that
29you can run in the future to recreate the current configuration, and a
30file `config.log' containing compiler output (useful mainly for
31debugging `configure').
32
33 It can also use an optional file (typically called `config.cache'
34and enabled with `--cache-file=config.cache' or simply `-C') that saves
35the results of its tests to speed up reconfiguring. Caching is
36disabled by default to prevent problems with accidental use of stale
37cache files.
38
39 If you need to do unusual things to compile the package, please try
40to figure out how `configure' could check whether to do them, and mail
41diffs or instructions to the address given in the `README' so they can
42be considered for the next release. If you are using the cache, and at
43some point `config.cache' contains results you don't want to keep, you
44may remove or edit it.
45
46 The file `configure.ac' (or `configure.in') is used to create
47`configure' by a program called `autoconf'. You need `configure.ac' if
48you want to change it or regenerate `configure' using a newer version
49of `autoconf'.
50
51 The simplest way to compile this package is:
52
53 1. `cd' to the directory containing the package's source code and type
54 `./configure' to configure the package for your system.
55
56 Running `configure' might take a while. While running, it prints
57 some messages telling which features it is checking for.
58
59 2. Type `make' to compile the package.
60
61 3. Optionally, type `make check' to run any self-tests that come with
62 the package, generally using the just-built uninstalled binaries.
63
64 4. Type `make install' to install the programs and any data files and
65 documentation. When installing into a prefix owned by root, it is
66 recommended that the package be configured and built as a regular
67 user, and only the `make install' phase executed with root
68 privileges.
69
70 5. Optionally, type `make installcheck' to repeat any self-tests, but
71 this time using the binaries in their final installed location.
72 This target does not install anything. Running this target as a
73 regular user, particularly if the prior `make install' required
74 root privileges, verifies that the installation completed
75 correctly.
76
77 6. You can remove the program binaries and object files from the
78 source code directory by typing `make clean'. To also remove the
79 files that `configure' created (so you can compile the package for
80 a different kind of computer), type `make distclean'. There is
81 also a `make maintainer-clean' target, but that is intended mainly
82 for the package's developers. If you use it, you may have to get
83 all sorts of other programs in order to regenerate files that came
84 with the distribution.
85
86 7. Often, you can also type `make uninstall' to remove the installed
87 files again. In practice, not all packages have tested that
88 uninstallation works correctly, even though it is required by the
89 GNU Coding Standards.
90
91 8. Some packages, particularly those that use Automake, provide `make
92 distcheck', which can by used by developers to test that all other
93 targets like `make install' and `make uninstall' work correctly.
94 This target is generally not run by end users.
95
96Compilers and Options
97=====================
98
99 Some systems require unusual options for compilation or linking that
100the `configure' script does not know about. Run `./configure --help'
101for details on some of the pertinent environment variables.
102
103 You can give `configure' initial values for configuration parameters
104by setting variables in the command line or in the environment. Here
105is an example:
106
107 ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108
109 *Note Defining Variables::, for more details.
110
111Compiling For Multiple Architectures
112====================================
113
114 You can compile the package for more than one kind of computer at the
115same time, by placing the object files for each architecture in their
116own directory. To do this, you can use GNU `make'. `cd' to the
117directory where you want the object files and executables to go and run
118the `configure' script. `configure' automatically checks for the
119source code in the directory that `configure' is in and in `..'. This
120is known as a "VPATH" build.
121
122 With a non-GNU `make', it is safer to compile the package for one
123architecture at a time in the source code directory. After you have
124installed the package for one architecture, use `make distclean' before
125reconfiguring for another architecture.
126
127 On MacOS X 10.5 and later systems, you can create libraries and
128executables that work on multiple system types--known as "fat" or
129"universal" binaries--by specifying multiple `-arch' options to the
130compiler but only a single `-arch' option to the preprocessor. Like
131this:
132
133 ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135 CPP="gcc -E" CXXCPP="g++ -E"
136
137 This is not guaranteed to produce working output in all cases, you
138may have to build one architecture at a time and combine the results
139using the `lipo' tool if you have problems.
140
141Installation Names
142==================
143
144 By default, `make install' installs the package's commands under
145`/usr/local/bin', include files under `/usr/local/include', etc. You
146can specify an installation prefix other than `/usr/local' by giving
147`configure' the option `--prefix=PREFIX', where PREFIX must be an
148absolute file name.
149
150 You can specify separate installation prefixes for
151architecture-specific files and architecture-independent files. If you
152pass the option `--exec-prefix=PREFIX' to `configure', the package uses
153PREFIX as the prefix for installing programs and libraries.
154Documentation and other data files still use the regular prefix.
155
156 In addition, if you use an unusual directory layout you can give
157options like `--bindir=DIR' to specify different values for particular
158kinds of files. Run `configure --help' for a list of the directories
159you can set and what kinds of files go in them. In general, the
160default for these options is expressed in terms of `${prefix}', so that
161specifying just `--prefix' will affect all of the other directory
162specifications that were not explicitly provided.
163
164 The most portable way to affect installation locations is to pass the
165correct locations to `configure'; however, many packages provide one or
166both of the following shortcuts of passing variable assignments to the
167`make install' command line to change installation locations without
168having to reconfigure or recompile.
169
170 The first method involves providing an override variable for each
171affected directory. For example, `make install
172prefix=/alternate/directory' will choose an alternate location for all
173directory configuration variables that were expressed in terms of
174`${prefix}'. Any directories that were specified during `configure',
175but not in terms of `${prefix}', must each be overridden at install
176time for the entire installation to be relocated. The approach of
177makefile variable overrides for each directory variable is required by
178the GNU Coding Standards, and ideally causes no recompilation.
179However, some platforms have known limitations with the semantics of
180shared libraries that end up requiring recompilation when using this
181method, particularly noticeable in packages that use GNU Libtool.
182
183 The second method involves providing the `DESTDIR' variable. For
184example, `make install DESTDIR=/alternate/directory' will prepend
185`/alternate/directory' before all installation names. The approach of
186`DESTDIR' overrides is not required by the GNU Coding Standards, and
187does not work on platforms that have drive letters. On the other hand,
188it does better at avoiding recompilation issues, and works well even
189when some directory options were not specified in terms of `${prefix}'
190at `configure' time.
191
192Optional Features
193=================
194
195 If the package supports it, you can cause programs to be installed
196with an extra prefix or suffix on their names by giving `configure' the
197option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198
199 Some packages pay attention to `--enable-FEATURE' options to
200`configure', where FEATURE indicates an optional part of the package.
201They may also pay attention to `--with-PACKAGE' options, where PACKAGE
202is something like `gnu-as' or `x' (for the X Window System). The
203`README' should mention any `--enable-' and `--with-' options that the
204package recognizes.
205
206 For packages that use the X Window System, `configure' can usually
207find the X include and library files automatically, but if it doesn't,
208you can use the `configure' options `--x-includes=DIR' and
209`--x-libraries=DIR' to specify their locations.
210
211 Some packages offer the ability to configure how verbose the
212execution of `make' will be. For these packages, running `./configure
213--enable-silent-rules' sets the default to minimal output, which can be
214overridden with `make V=1'; while running `./configure
215--disable-silent-rules' sets the default to verbose, which can be
216overridden with `make V=0'.
217
218Particular systems
219==================
220
221 On HP-UX, the default C compiler is not ANSI C compatible. If GNU
222CC is not installed, it is recommended to use the following options in
223order to use an ANSI C compiler:
224
225 ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226
227and if that doesn't work, install pre-built binaries of GCC for HP-UX.
228
229 On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
230parse its `<wchar.h>' header file. The option `-nodtk' can be used as
231a workaround. If GNU CC is not installed, it is therefore recommended
232to try
233
234 ./configure CC="cc"
235
236and if that doesn't work, try
237
238 ./configure CC="cc -nodtk"
239
240 On Solaris, don't put `/usr/ucb' early in your `PATH'. This
241directory contains several dysfunctional programs; working variants of
242these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
243in your `PATH', put it _after_ `/usr/bin'.
244
245 On Haiku, software installed for all users goes in `/boot/common',
246not `/usr/local'. It is recommended to use the following options:
247
248 ./configure --prefix=/boot/common
249
250Specifying the System Type
251==========================
252
253 There may be some features `configure' cannot figure out
254automatically, but needs to determine by the type of machine the package
255will run on. Usually, assuming the package is built to be run on the
256_same_ architectures, `configure' can figure that out, but if it prints
257a message saying it cannot guess the machine type, give it the
258`--build=TYPE' option. TYPE can either be a short name for the system
259type, such as `sun4', or a canonical name which has the form:
260
261 CPU-COMPANY-SYSTEM
262
263where SYSTEM can have one of these forms:
264
265 OS
266 KERNEL-OS
267
268 See the file `config.sub' for the possible values of each field. If
269`config.sub' isn't included in this package, then this package doesn't
270need to know the machine type.
271
272 If you are _building_ compiler tools for cross-compiling, you should
273use the option `--target=TYPE' to select the type of system they will
274produce code for.
275
276 If you want to _use_ a cross compiler, that generates code for a
277platform different from the build platform, you should specify the
278"host" platform (i.e., that on which the generated programs will
279eventually be run) with `--host=TYPE'.
280
281Sharing Defaults
282================
283
284 If you want to set default values for `configure' scripts to share,
285you can create a site shell script called `config.site' that gives
286default values for variables like `CC', `cache_file', and `prefix'.
287`configure' looks for `PREFIX/share/config.site' if it exists, then
288`PREFIX/etc/config.site' if it exists. Or, you can set the
289`CONFIG_SITE' environment variable to the location of the site script.
290A warning: not all `configure' scripts look for a site script.
291
292Defining Variables
293==================
294
295 Variables not defined in a site shell script can be set in the
296environment passed to `configure'. However, some packages may run
297configure again during the build, and the customized values of these
298variables may be lost. In order to avoid this problem, you should set
299them in the `configure' command line, using `VAR=value'. For example:
300
301 ./configure CC=/usr/local2/bin/gcc
302
303causes the specified `gcc' to be used as the C compiler (unless it is
304overridden in the site shell script).
305
306Unfortunately, this technique does not work for `CONFIG_SHELL' due to
307an Autoconf bug. Until the bug is fixed you can use this workaround:
308
309 CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
310
311`configure' Invocation
312======================
313
314 `configure' recognizes the following options to control how it
315operates.
316
317`--help'
318`-h'
319 Print a summary of all of the options to `configure', and exit.
320
321`--help=short'
322`--help=recursive'
323 Print a summary of the options unique to this package's
324 `configure', and exit. The `short' variant lists options used
325 only in the top level, while the `recursive' variant lists options
326 also present in any nested packages.
327
328`--version'
329`-V'
330 Print the version of Autoconf used to generate the `configure'
331 script, and exit.
332
333`--cache-file=FILE'
334 Enable the cache: use and save the results of the tests in FILE,
335 traditionally `config.cache'. FILE defaults to `/dev/null' to
336 disable caching.
337
338`--config-cache'
339`-C'
340 Alias for `--cache-file=config.cache'.
341
342`--quiet'
343`--silent'
344`-q'
345 Do not print messages saying which checks are being made. To
346 suppress all normal output, redirect it to `/dev/null' (any error
347 messages will still be shown).
348
349`--srcdir=DIR'
350 Look for the package's source code in directory DIR. Usually
351 `configure' can determine that directory automatically.
352
353`--prefix=DIR'
354 Use DIR as the installation prefix. *note Installation Names::
355 for more details, including other options available for fine-tuning
356 the installation locations.
357
358`--no-create'
359`-n'
360 Run the configure checks, but stop before creating any output
361 files.
362
363`configure' also accepts some other, not widely useful, options. Run
364`configure --help' for more details.
365
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 8af59fd..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,81 +0,0 @@
1ACLOCAL_AMFLAGS = -I m4
2
3SUBDIRS = src doc
4
5MAINTAINERCLEANFILES = \
6Makefile.in \
7aclocal.m4 \
8compile \
9config.guess \
10config.h.in \
11config.h.in~ \
12config.sub \
13configure \
14depcomp \
15install-sh \
16ltconfig \
17ltmain.sh \
18missing \
19eeze*doc*tar* \
20eeze.pc \
21eeze.spec \
22m4/l*
23
24pkgconfigdir = $(libdir)/pkgconfig
25pkgconfig_DATA = eeze.pc
26
27EXTRA_DIST = \
28AUTHORS \
29COPYING \
30README \
31$(pkgconfig_DATA) \
32autogen.sh \
33eeze.pc.in \
34eeze.spec.in \
35eeze.spec \
36m4/efl_doxygen.m4
37
38.PHONY: doc
39
40# Documentation
41
42doc: all
43 @echo "entering doc/"
44 $(MAKE) -C doc doc
45
46# Unit tests
47
48if EFL_ENABLE_TESTS
49
50lcov-reset:
51 @rm -rf $(top_builddir)/coverage
52 @find $(top_builddir) -name "*.gcda" -delete
53 @lcov --zerocounters --directory $(top_builddir)
54
55lcov-report:
56 @mkdir $(top_builddir)/coverage
57 lcov --capture --compat-libtool --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir)
58 lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info
59 genhtml -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned.info
60 @echo "Coverage Report at $(top_builddir)/coverage/html"
61
62check-local:
63 @$(MAKE) $(AM_MAKEFLAGS) lcov-reset
64 @EEZE_USE_IN_TREE_MODULES=1 ./src/tests/eeze_suite
65 @$(MAKE) $(AM_MAKEFLAGS) lcov-report
66
67else
68
69lcov-reset:
70 @echo "reconfigure with --enable-tests"
71
72lcov-report:
73 @echo "reconfigure with --enable-tests"
74
75check-local:
76 @echo "reconfigure with --enable-tests"
77
78endif
79
80clean-local:
81 @rm -rf coverage
diff --git a/NEWS b/NEWS
deleted file mode 100644
index cd23b8c..0000000
--- a/NEWS
+++ /dev/null
@@ -1,39 +0,0 @@
1Eeze 1.7.0
2
3Changes since Eeze 1.7.0:
4-------------------------
5
6Additions:
7
8 * Sensor subsystem
9 * Unit tests
10
11Changes since Eeze 1.2.0:
12-------------------------
13
14Additions:
15
16 * Joystick support
17 * Support for mtab-less systems
18
19Changes since Eeze 1.1.0:
20-------------------------
21
22Additions:
23
24 * Detect bluetooth devices.
25 * Network device API (eeze_net_*).
26
27Changes since Eeze 1.0.0:
28-------------------------
29
30Additions:
31
32 * more disk-related detection/info functions
33 * disk mounting API
34 * eeze_scanner utility for applications to hook for drive detection
35
36Fixes:
37
38 * bugs with device detection related to newer kernel versions
39 * device filtering to be more accurate in some cases
diff --git a/README b/README
deleted file mode 100644
index 8245859..0000000
--- a/README
+++ /dev/null
@@ -1,46 +0,0 @@
1Eeze 1.7.99
2
3******************************************************************************
4
5 FOR ANY ISSUES PLEASE EMAIL:
6 enlightenment-devel@lists.sourceforge.net
7
8******************************************************************************
9
10
11Requirements:
12-------------
13
14Must:
15 libc
16 ecore (at least 1.0.0)
17 libudev
18
19Suggested:
20 libmount
21
22Eeze is a library for manipulating devices with an extremely simple api.
23It interfaces directly with device subsystems, avoiding such middleman daemons as
24udisks/upower or hal to immediately gather device information the instant it
25becomes known to the OS. This can be used to determine such things as:
26 * If a cdrom has a disk inserted
27 * The temperature of a cpu core
28 * The remaining power left in a battery
29 * The current power consumption of various parts
30 * Monitor in realtime the status of peripheral devices
31
32Each of the above examples can be performed by using only a single eeze
33function, as one of the primary focuses of the library is to reduce the
34complexity of managing devices.
35
36Eeze 1.1 adds more detailed disk detection as well as filesystem mount point manipulation.
37Using a combination of udev and mount, it is possible to easily write disk-based mount services
38which do not rely on any external processes or libraries aside from Eeze.
39------------------------------------------------------------------------------
40COMPILING AND INSTALLING:
41
42 ./configure
43 make
44(as root unless you are installing in your users directories):
45 make install
46
diff --git a/TODO b/TODO
deleted file mode 100644
index a31b4aa..0000000
--- a/TODO
+++ /dev/null
@@ -1,9 +0,0 @@
1udev: switch enum to bitmasks with categories probably
2 documentation for all types
3 more functions or something?
4
5TO BE ADDED
6automounter
7libdevinfo for solaris
8???
9Profit
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 00116ea..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,39 +0,0 @@
1#!/bin/sh
2
3rm -rf autom4te.cache
4rm -f aclocal.m4 ltmain.sh
5
6touch README
7touch ABOUT-NLS
8
9echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
10echo "Running autoheader..." ; autoheader || exit 1
11echo "Running autoconf..." ; autoconf || exit 1
12echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
13echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
14
15W=0
16
17rm -f config.cache-env.tmp
18echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp
19echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp
20echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp
21echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp
22echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp
23
24cmp config.cache-env.tmp config.cache-env >> /dev/null
25if [ $? -ne 0 ]; then
26 W=1;
27fi
28
29if [ $W -ne 0 ]; then
30 echo "Cleaning configure cache...";
31 rm -f config.cache config.cache-env
32 mv config.cache-env.tmp config.cache-env
33else
34 rm -f config.cache-env.tmp
35fi
36
37if [ -z "$NOCONFIGURE" ]; then
38 ./configure -C "$@"
39fi
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 90da70f..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,319 +0,0 @@
1##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3m4_define([v_maj], [1])
4m4_define([v_min], [7])
5m4_define([v_mic], [99])
6m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
7m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
8##-- When released, remove the dnl on the below line
9dnl m4_undefine([v_rev])
10##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
11m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
12m4_define([lt_cur], m4_eval(v_maj + v_min))
13m4_define([lt_rev], v_mic)
14m4_define([lt_age], v_min)
15##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
16##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
17
18AC_INIT([eeze], [v_ver], [enlightenment-devel@lists.sourceforge.net])
19AC_PREREQ([2.52])
20AC_CONFIG_SRCDIR([configure.ac])
21AC_CONFIG_MACRO_DIR([m4])
22
23AC_CONFIG_HEADERS([config.h])
24AH_TOP([
25#ifndef EFL_CONFIG_H__
26#define EFL_CONFIG_H__
27])
28AH_BOTTOM([
29#endif /* EFL_CONFIG_H__ */
30])
31
32AM_INIT_AUTOMAKE([1.6 dist-bzip2])
33m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
34
35define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
36define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
37AC_PROG_LIBTOOL
38
39##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
40##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
41m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
42m4_ifdef([v_rel], , [m4_define([v_rel], [])])
43AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
44AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
45AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
46AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
47version_info="lt_cur:lt_rev:lt_age"
48release_info="v_rel"
49AC_SUBST(version_info)
50AC_SUBST(release_info)
51##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
52##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
53VMAJ=v_maj
54AC_SUBST(VMAJ)
55
56### Needed information
57
58AC_CANONICAL_BUILD
59AC_CANONICAL_HOST
60
61requirement_eeze="ecore >= 1.6.99 eina >= 1.6.99 libudev"
62
63
64### Checks for programs
65AC_PROG_CC
66AM_PROG_CC_C_O
67AC_C___ATTRIBUTE__
68
69# pkg-config
70PKG_PROG_PKG_CONFIG
71
72# Check whether pkg-config supports Requires.private
73AS_IF(
74 [$PKG_CONFIG --atleast-pkgconfig-version 0.22],
75 [pkgconfig_requires_private="Requires.private"],
76 [pkgconfig_requires_private="Requires"]
77)
78AC_SUBST(pkgconfig_requires_private)
79
80# doxygen program for documentation building
81
82EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
83
84
85### Checks for libraries
86
87PKG_CHECK_MODULES([EEZE], [${requirement_eeze}])
88
89udev_version=$(pkg-config libudev --modversion)
90
91if test $udev_version -lt 143;then
92 AC_MSG_ERROR([udev version is too old!])
93elif test $udev_version -lt 148;then
94 AC_MSG_WARN([Old udev version detected, enabling compat code])
95 AC_DEFINE([OLD_UDEV_RRRRRRRRRRRRRR],[1],[compat functionality for udev < 148])
96fi
97
98eeze_mount=
99PKG_CHECK_EXISTS([mount >= 2.18.0],
100 [
101 AC_DEFINE([HAVE_EEZE_MOUNT], [1], [Eeze is mount-capable])
102 AM_CONDITIONAL([HAVE_EEZE_MOUNT], [true])
103 eeze_mount="yes"
104 ],
105 AM_CONDITIONAL([HAVE_EEZE_MOUNT], [false])
106)
107
108if test "x$eeze_mount" = "xyes";then
109 AC_ARG_WITH([mount], [AS_HELP_STRING([--with-mount], [specify mount bin @<:@default=detect@:>@])], [with_mount=$withval], [with_mount="detect"])
110 AC_ARG_WITH([umount], [AS_HELP_STRING([--with-umount], [specify umount bin @<:@default=detect@:>@])], [with_umount=$withval], [with_umount="detect"])
111 AC_ARG_WITH([eject], [AS_HELP_STRING([--with-eject], [specify eject bin @<:@default=detect@:>@])], [with_eject=$withval], [with_eject="detect"])
112 PKG_CHECK_MODULES([LIBMOUNT], [mount >= 2.18.0])
113 mount_v=$(pkg-config --modversion mount)
114 PKG_CHECK_MODULES([ECORE_FILE], [ecore-file >= 1.6.99])
115 PKG_CHECK_MODULES([EET], [eet >= 1.6.99])
116 PKG_CHECK_MODULES([ECORE_CON], [ecore-con >= 1.6.99])
117
118 if test "x$with_mount" = "xdetect";then
119 AC_PATH_PROG([with_mount], [mount], [])
120 fi
121 if test -z "$with_mount" ; then
122 AC_DEFINE_UNQUOTED([MOUNTABLE], [0], [whether mount is available])
123 else
124 AC_DEFINE_UNQUOTED([MOUNTABLE], [1], [whether mount is available])
125 fi
126 AC_DEFINE_UNQUOTED([EEZE_MOUNT_BIN], ["$with_mount"], [mount bin to use])
127
128 if test "x$with_umount" = "xdetect";then
129 AC_PATH_PROG([with_umount], [umount], [])
130 fi
131 if test -z "$with_umount" ; then
132 AC_DEFINE_UNQUOTED([UNMOUNTABLE], [0], [whether umount is available])
133 else
134 AC_DEFINE_UNQUOTED([UNMOUNTABLE], [1], [whether umount is available])
135 fi
136 AC_DEFINE_UNQUOTED([EEZE_UNMOUNT_BIN], ["$with_umount"], [umount bin to use])
137
138 if test "x$with_eject" = "xdetect";then
139 AC_PATH_PROG([with_eject], [eject], [])
140 fi
141 if test -z "$with_eject" ; then
142 AC_DEFINE_UNQUOTED([EJECTABLE], [0], [whether eject is available])
143 else
144 AC_DEFINE_UNQUOTED([EJECTABLE], [1], [whether eject is available])
145 fi
146 AC_DEFINE_UNQUOTED([EEZE_EJECT_BIN], ["$with_eject"], [eject bin to use])
147fi
148
149want_mtab=
150AC_ARG_ENABLE([mtab],
151 [AC_HELP_STRING([--enable-mtab],
152 [force use of mtab for mount info @<:@default=detect@:>@])],
153 [
154 if test "x${enableval}" = "xyes" ; then
155 want_mtab="yes"
156 else
157 want_mtab="no"
158 fi],
159 [want_mtab="auto"])
160
161
162if test "x${want_mtab}" = "xyes" ; then
163 AM_CONDITIONAL([OLD_LIBMOUNT], [false])
164 AM_CONDITIONAL([NEW_LIBMOUNT], [false])
165else
166 if test -n "$mount_v";then
167 AM_CONDITIONAL([OLD_LIBMOUNT], [test "$(echo $mount_v | cut -d'.' -f2)" -lt 19])
168 AM_CONDITIONAL([NEW_LIBMOUNT], [test "$(echo $mount_v | cut -d'.' -f2)" -gt 19])
169 else
170 AM_CONDITIONAL([OLD_LIBMOUNT], [false])
171 AM_CONDITIONAL([NEW_LIBMOUNT], [false])
172 fi
173fi
174AM_COND_IF([OLD_LIBMOUNT], [
175 AC_DEFINE_UNQUOTED([OLD_LIBMOUNT], [1], [using first version of libmount])
176 ],[])
177
178AC_CHECK_HEADERS([netinet/in.h])
179want_ipv6="yes"
180have_ipv6="no"
181
182AC_ARG_ENABLE([ipv6],
183 [AC_HELP_STRING([--disable-ipv6],
184 [disable ipv6 functionality @<:@default=detect@:>@])],
185 [
186 if test "x${enableval}" = "xyes" ; then
187 want_ipv6="yes"
188 else
189 want_ipv6="no"
190 fi],
191 [want_ipv6="auto"])
192
193# Verify IPV6 availability in headers
194if test "x${want_ipv6}" != "xno" ; then
195 AC_CHECK_TYPES([struct ipv6_mreq],
196 [have_ipv6="yes"],
197 [have_ipv6="no"],
198 [[
199#ifdef HAVE_NETINET_IN_H
200# include <netinet/in.h>
201#endif
202 ]])
203fi
204
205if test "x${have_ipv6}" = "xyes" ; then
206 AC_DEFINE(HAVE_IPV6, 1, [Define if IPV6 is supported])
207fi
208
209eeze_sensor_tizen="no"
210PKG_CHECK_EXISTS([capi-system-sensor],
211 [
212 AC_DEFINE([HAVE_EEZE_TIZEN], [1], [Eeze has Tizen sensor support enabled])
213 AM_CONDITIONAL([HAVE_EEZE_TIZEN], [true])
214 eeze_sensor_tizen="yes"
215 ],
216 AM_CONDITIONAL([HAVE_EEZE_TIZEN], [false])
217)
218if test "x$eeze_sensor_tizen" = "xyes";then
219 PKG_CHECK_MODULES([TIZEN_SENSOR], [capi-system-sensor])
220fi
221
222### Checks for header files
223
224
225### Checks for types
226
227
228### Checks for structures
229
230
231### Checks for compiler characteristics
232
233AC_HEADER_STDC
234
235if ! test "x${VMIC}" = "x" ; then
236 EFL_COMPILER_FLAG([-Wall])
237 EFL_COMPILER_FLAG([-W])
238fi
239
240EFL_COMPILER_FLAG([-Wshadow])
241
242
243### Unit tests, coverage and benchmarking
244
245EFL_CHECK_TESTS([eeze], [enable_tests="yes"], [enable_tests="no"])
246
247### Binary
248
249EFL_ENABLE_BIN([eeze-udev-test], ["yes"])
250EFL_ENABLE_BIN([eeze_sensor_test], ["yes"])
251EFL_ENABLE_BIN([eeze-mount], ["yes"])
252EFL_ENABLE_BIN([eeze-disk-ls], ["yes"])
253EFL_ENABLE_BIN([eeze-umount], ["yes"])
254EFL_ENABLE_BIN([eeze-scanner], ["yes"])
255
256AC_SUBST(requirement_eeze)
257
258
259AC_OUTPUT([
260Makefile
261doc/eeze.dox
262doc/Makefile
263doc/Doxyfile
264src/Makefile
265src/lib/Makefile
266src/bin/Makefile
267src/tests/Makefile
268src/modules/Makefile
269eeze.pc
270eeze.spec
271])
272
273
274#####################################################################
275## Info
276
277echo
278echo
279echo
280echo "------------------------------------------------------------------------"
281echo "$PACKAGE $VERSION"
282echo "------------------------------------------------------------------------"
283echo
284echo "Configuration Options Summary:"
285if test "x$eeze_mount" = "xyes";then
286 echo
287 echo "Mount..................: ${with_mount}"
288 echo "Umount.................: ${with_umount}"
289 echo "Eject..................: ${with_eject}"
290 echo
291fi
292echo "Udev Tests.............: ${have_eeze_udev_test}"
293echo
294echo "Tests..............: ${enable_tests} (Coverage: ${efl_enable_coverage})"
295echo
296echo "Demos..................:"
297echo " eeze_mount...........: ${have_eeze_mount}"
298echo " eeze_umount..........: ${have_eeze_umount}"
299echo " eeze_disk_ls.........: ${have_eeze_disk_ls}"
300echo
301echo "Utilities..............:"
302echo " eeze_scanner.........: ${have_eeze_scanner}"
303echo
304echo "IPv6...................: ${have_ipv6}"
305echo
306echo "Sensor.................:"
307echo " Tizen................: ${eeze_sensor_tizen}"
308echo
309echo "Documentation..........: ${build_doc}"
310echo
311echo "Compilation............: make (or gmake)"
312echo " CPPFLAGS.............: $CPPFLAGS"
313echo " CFLAGS...............: $CFLAGS"
314echo " LDFLAGS..............: $LDFLAGS"
315echo
316echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
317echo " prefix...............: $prefix"
318echo
319
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
deleted file mode 100644
index fdbe0e4..0000000
--- a/doc/Doxyfile.in
+++ /dev/null
@@ -1,138 +0,0 @@
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
15DISABLE_INDEX = YES
16DISTRIBUTE_GROUP_DOC = NO
17DOT_CLEANUP = YES
18DOTFILE_DIRS =
19DOT_GRAPH_MAX_NODES = 50
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_FILE_EXTENSION = .html
66HTML_FOOTER = @srcdir@/foot.html
67HTML_HEADER = @srcdir@/head.html
68HTML_OUTPUT = html
69HTML_STYLESHEET = @srcdir@/e.css
70IGNORE_PREFIX =
71IMAGE_PATH = img
72INCLUDED_BY_GRAPH = NO
73INCLUDE_FILE_PATTERNS =
74INCLUDE_GRAPH = NO
75INCLUDE_PATH =
76INHERIT_DOCS = YES
77INLINE_INFO = YES
78INLINE_INHERITED_MEMB = NO
79INLINE_SOURCES = NO
80INPUT = @srcdir@/eeze.dox @top_srcdir@/src/lib
81INPUT_FILTER =
82INTERNAL_DOCS = NO
83JAVADOC_AUTOBRIEF = YES
84LATEX_BATCHMODE = NO
85LATEX_CMD_NAME = latex
86LATEX_HEADER =
87LATEX_OUTPUT = latex
88MACRO_EXPANSION = NO
89MAKEINDEX_CMD_NAME = makeindex
90MAN_EXTENSION = .3
91MAN_LINKS = YES
92MAN_OUTPUT = man
93MAX_INITIALIZER_LINES = 30
94MULTILINE_CPP_IS_BRIEF = NO
95OPTIMIZE_OUTPUT_FOR_C = YES
96OPTIMIZE_OUTPUT_JAVA = NO
97OUTPUT_DIRECTORY = .
98OUTPUT_LANGUAGE = English
99PAPER_TYPE = a4wide
100PDF_HYPERLINKS = YES
101PERL_PATH = /usr/bin/perl
102PREDEFINED =
103PROJECT_NAME = Eeze
104PROJECT_NUMBER =
105QUIET = NO
106RECURSIVE = YES
107REFERENCES_LINK_SOURCE = YES
108REFERENCED_BY_RELATION = YES
109REFERENCES_RELATION = YES
110REPEAT_BRIEF = YES
111RTF_EXTENSIONS_FILE =
112RTF_HYPERLINKS = NO
113RTF_OUTPUT = rtf
114RTF_STYLESHEET_FILE =
115SEARCHENGINE = NO
116SEARCH_INCLUDES = YES
117SHORT_NAMES = NO
118SHOW_INCLUDE_FILES = NO
119SHOW_USED_FILES = NO
120SKIP_FUNCTION_MACROS = YES
121SORT_MEMBER_DOCS = YES
122SOURCE_BROWSER = NO
123STRIP_CODE_COMMENTS = YES
124STRIP_FROM_PATH = src/
125SUBGROUPING = YES
126TAB_SIZE = 2
127TAGFILES =
128TEMPLATE_RELATIONS = NO
129TOC_EXPAND = NO
130TREEVIEW_WIDTH = 250
131USE_PDFLATEX = NO
132VERBATIM_HEADERS = NO
133WARN_FORMAT = "$file:$line: $text"
134WARN_IF_UNDOCUMENTED = YES
135WARNINGS = YES
136WARN_LOGFILE =
137XML_DTD =
138XML_SCHEMA =
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index aed7b5f..0000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
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/ $(top_builddir)/$(PACKAGE_DOCNAME).tar*
11
12doc: all doc-clean
13 $(efl_doxygen)
14 cp $(srcdir)/img/* html/
15 cp $(srcdir)/img/* latex/
16 rm -rf $(PACKAGE_DOCNAME).tar*
17 mkdir -p $(PACKAGE_DOCNAME)/doc
18 cp -R html/ latex/ man/ $(PACKAGE_DOCNAME)/doc
19 tar cf $(PACKAGE_DOCNAME).tar $(PACKAGE_DOCNAME)/
20 bzip2 -9 $(PACKAGE_DOCNAME).tar
21 rm -rf $(PACKAGE_DOCNAME)/
22 mv $(PACKAGE_DOCNAME).tar.bz2 $(top_builddir)
23
24clean-local: doc-clean
25
26else
27
28doc:
29 @echo "Documentation not built. Run ./configure --help"
30
31endif
32
33EXTRA_DIST = Doxyfile.in $(wildcard img/*.*) e.css head.html foot.html eeze.dox.in
diff --git a/doc/e.css b/doc/e.css
deleted file mode 100644
index 2dd6b44..0000000
--- a/doc/e.css
+++ /dev/null
@@ -1,273 +0,0 @@
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/doc/eeze.dox.in b/doc/eeze.dox.in
deleted file mode 100644
index e69de29..0000000
--- a/doc/eeze.dox.in
+++ /dev/null
diff --git a/doc/foot.html b/doc/foot.html
deleted file mode 100644
index d43cf8f..0000000
--- a/doc/foot.html
+++ /dev/null
@@ -1,18 +0,0 @@
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/doc/head.html b/doc/head.html
deleted file mode 100644
index 2d9ea92..0000000
--- a/doc/head.html
+++ /dev/null
@@ -1,68 +0,0 @@
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/doc/img/edoxy.css b/doc/img/edoxy.css
deleted file mode 100644
index 311ca23..0000000
--- a/doc/img/edoxy.css
+++ /dev/null
@@ -1,486 +0,0 @@
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/doc/img/eeze.png b/doc/img/eeze.png
deleted file mode 100644
index 1aeb5b1..0000000
--- a/doc/img/eeze.png
+++ /dev/null
Binary files differ
diff --git a/doc/img/foot_bg.png b/doc/img/foot_bg.png
deleted file mode 100644
index b24f3a4..0000000
--- a/doc/img/foot_bg.png
+++ /dev/null
Binary files differ
diff --git a/doc/img/head_bg.png b/doc/img/head_bg.png
deleted file mode 100644
index 081dc13..0000000
--- a/doc/img/head_bg.png
+++ /dev/null
Binary files differ
diff --git a/doc/img/header_menu_background.png b/doc/img/header_menu_background.png
deleted file mode 100644
index e978743..0000000
--- a/doc/img/header_menu_background.png
+++ /dev/null
Binary files differ
diff --git a/doc/img/header_menu_background_last.png b/doc/img/header_menu_background_last.png
deleted file mode 100644
index 88c116c..0000000
--- a/doc/img/header_menu_background_last.png
+++ /dev/null
Binary files differ
diff --git a/doc/img/header_menu_current_background.png b/doc/img/header_menu_current_background.png
deleted file mode 100644
index de97c92..0000000
--- a/doc/img/header_menu_current_background.png
+++ /dev/null
Binary files differ
diff --git a/doc/img/header_menu_unselected_background.png b/doc/img/header_menu_unselected_background.png
deleted file mode 100644
index 50e5fd8..0000000
--- a/doc/img/header_menu_unselected_background.png
+++ /dev/null
Binary files differ
diff --git a/doc/img/logo.png b/doc/img/logo.png
deleted file mode 100644
index b3884a5..0000000
--- a/doc/img/logo.png
+++ /dev/null
Binary files differ
diff --git a/eeze.pc.in b/eeze.pc.in
deleted file mode 100644
index 606b789..0000000
--- a/eeze.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
1prefix=@prefix@
2exec_prefix=@exec_prefix@
3libdir=@libdir@
4includedir=@includedir@
5
6Name: eeze
7Description: device convenience library for efl
8@pkgconfig_requires_private@: @requirement_eeze@
9Version: @VERSION@
10Libs: -L${libdir} -leeze
11Cflags: -I${includedir}/eeze-@VMAJ@
diff --git a/eeze.spec.in b/eeze.spec.in
deleted file mode 100644
index 68a2167..0000000
--- a/eeze.spec.in
+++ /dev/null
@@ -1,80 +0,0 @@
1%{!?_rel:%{expand:%%global _rel 0.enl%{?dist}}}
2%define _missing_doc_files_terminate_build 0
3
4Summary: Device Convenience Library
5Name: @PACKAGE@
6Version: @VERSION@
7Release: %{_rel}
8License: BSD
9Group: System Environment/Libraries
10Source: http://download.enlightenment.org/releases/%{name}-%{version}.tar.gz
11Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
12Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
13Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
14Requires: libudev, eject
15BuildRequires: libudev-devel
16URL: http://www.enlightenment.org/
17BuildRoot: %{_tmppath}/%{name}-%{version}-root
18
19%description
20Eeze is a library for manipulating devices through udev with a simple
21and fast api. It interfaces directly with libudev, avoiding such
22middleman daemons as udisks/upower or hal, to immediately gather
23device information the instant it becomes known to the system. This
24can be used to determine such things as:
25 * If a cdrom has a disk inserted
26 * The temperature of a cpu core
27 * The remaining power left in a battery
28 * The current power consumption of various parts
29 * Monitor in realtime the status of peripheral devices
30
31Each of the above examples can be performed by using only a single
32eeze function, as one of the primary focuses of the library is to
33reduce the complexity of managing devices.
34
35%package devel
36Summary: Development files for Eeze
37Group: System Environment/Libraries
38Requires: %{name} = %{version}
39Requires: libudev-devel
40
41%description devel
42Headers, static libraries, test programs and documentation for Eeze
43
44%prep
45%setup -q
46
47%build
48%{configure} --prefix=%{_prefix}
49%{__make} %{?_smp_mflags} %{?mflags}
50
51%install
52%{__make} %{?mflags_install} DESTDIR=$RPM_BUILD_ROOT install
53
54%clean
55test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
56
57%post
58/sbin/ldconfig
59
60%postun
61/sbin/ldconfig
62
63%files
64%defattr(-, root, root)
65%doc AUTHORS COPYING README
66%{_libdir}/*.so.*
67#%{_libdir}/enlightenment/utils/eeze_scanner
68%{_bindir}/*
69
70%files devel
71%defattr(-, root, root)
72%{_includedir}/*
73%{_libdir}/*.a
74%{_libdir}/*.so
75%{_libdir}/*.la
76%{_libdir}/*/*.so
77%{_libdir}/*/*.la
78%{_libdir}/pkgconfig/*
79
80%changelog
diff --git a/m4/ac_attribute.m4 b/m4/ac_attribute.m4
deleted file mode 100644
index 23479a9..0000000
--- a/m4/ac_attribute.m4
+++ /dev/null
@@ -1,47 +0,0 @@
1dnl Copyright (C) 2004-2008 Kim Woelders
2dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
3dnl That code is public domain and can be freely used or copied.
4dnl Originally snatched from somewhere...
5
6dnl Macro for checking if the compiler supports __attribute__
7
8dnl Usage: AC_C___ATTRIBUTE__
9dnl call AC_DEFINE for HAVE___ATTRIBUTE__ and __UNUSED__
10dnl if the compiler supports __attribute__, HAVE___ATTRIBUTE__ is
11dnl defined to 1 and __UNUSED__ is defined to __attribute__((unused))
12dnl otherwise, HAVE___ATTRIBUTE__ is not defined and __UNUSED__ is
13dnl defined to nothing.
14
15AC_DEFUN([AC_C___ATTRIBUTE__],
16[
17
18AC_MSG_CHECKING([for __attribute__])
19
20AC_CACHE_VAL([ac_cv___attribute__],
21 [AC_TRY_COMPILE(
22 [
23#include <stdlib.h>
24
25int func(int x);
26int foo(int x __attribute__ ((unused)))
27{
28 exit(1);
29}
30 ],
31 [],
32 [ac_cv___attribute__="yes"],
33 [ac_cv___attribute__="no"]
34 )])
35
36AC_MSG_RESULT($ac_cv___attribute__)
37
38if test "x${ac_cv___attribute__}" = "xyes" ; then
39 AC_DEFINE([HAVE___ATTRIBUTE__], [1], [Define to 1 if your compiler has __attribute__])
40 AC_DEFINE([__UNUSED__], [__attribute__((unused))], [Macro declaring a function argument to be unused])
41 else
42 AC_DEFINE([__UNUSED__], [], [Macro declaring a function argument to be unused])
43fi
44
45])
46
47dnl End of ac_attribute.m4
diff --git a/m4/efl_binary.m4 b/m4/efl_binary.m4
deleted file mode 100644
index 0ad38ce..0000000
--- a/m4/efl_binary.m4
+++ /dev/null
@@ -1,78 +0,0 @@
1dnl Copyright (C) 2010 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 checks if a binary is built or not
5
6dnl Usage: EFL_ENABLE_BIN(binary, dep[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
8dnl Define have_binary (- is transformed into _)
9dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being transformed into _)
10
11AC_DEFUN([EFL_ENABLE_BIN],
12[
13
14m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
15m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
16
17dnl configure option
18
19AC_ARG_ENABLE([$1],
20 [AC_HELP_STRING([--disable-$1], [disable building of ]DOWN)],
21 [
22 if test "x${enableval}" = "xyes" ; then
23 have_[]m4_defn([DOWN])="yes"
24 else
25 have_[]m4_defn([DOWN])="no"
26 fi
27 ],
28 [have_[]m4_defn([DOWN])=$2])
29
30AC_MSG_CHECKING([whether to build ]DOWN[ binary])
31AC_MSG_RESULT([$have_[]m4_defn([DOWN])])
32
33if test "x$have_[]m4_defn([DOWN])" = "xyes"; then
34 UP[]_PRG=DOWN[${EXEEXT}]
35fi
36
37AC_SUBST(UP[]_PRG)
38
39AM_CONDITIONAL(BUILD_[]UP, test "x$have_[]m4_defn([DOWN])" = "xyes")
40
41AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$3], [$4])
42
43])
44
45dnl Macro that specifies the binary to be used
46
47dnl Usage: EFL_WITH_BIN(binary, package, msg)
48dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
49dnl Define with_binary (- is transformed into _)
50dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being transformed into _)
51
52AC_DEFUN([EFL_WITH_BIN],
53[
54
55m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
56m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
57
58AC_REQUIRE([PKG_PROG_PKG_CONFIG])
59AC_MSG_NOTICE([$PKG_CONFIG])
60
61with_[]m4_defn([DOWN])=m4_esyscmd($PKG_CONFIG --variable=prefix $2)/bin/m4_defn([DOWN])
62
63dnl configure option
64
65AC_ARG_WITH([$1],
66 [AC_HELP_STRING([--with-$1-bin=PATH], [specify a specific path to ]DOWN)],
67 [
68 with_[]m4_defn([DOWN])=$withval
69 _efl_msg="( explicitely set)"
70 ])
71
72AC_MSG_NOTICE([$msg: ]m4_defn([DOWN])[$_efl_msg])
73
74AC_SUBST(with_[]m4_defn([DOWN]))
75
76AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$4], [$5])
77
78])
diff --git a/m4/efl_compiler_flag.m4 b/m4/efl_compiler_flag.m4
deleted file mode 100644
index 618c6a6..0000000
--- a/m4/efl_compiler_flag.m4
+++ /dev/null
@@ -1,57 +0,0 @@
1dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
2dnl and Albin Tonnerre <albin dot tonnerre at gmail dot com>
3dnl That code is public domain and can be freely used or copied.
4
5dnl Macro that checks if a compiler flag is supported by the compiler.
6
7dnl Usage: EFL_COMPILER_FLAG(flag)
8dnl flag is added to CFLAGS if supported.
9
10AC_DEFUN([EFL_COMPILER_FLAG],
11[
12
13CFLAGS_save="${CFLAGS}"
14CFLAGS="${CFLAGS} $1"
15
16AC_LANG_PUSH([C])
17AC_MSG_CHECKING([whether the compiler supports $1])
18
19AC_COMPILE_IFELSE(
20 [AC_LANG_PROGRAM([[]])],
21 [have_flag="yes"],
22 [have_flag="no"])
23AC_MSG_RESULT([${have_flag}])
24
25if test "x${have_flag}" = "xno" ; then
26 CFLAGS="${CFLAGS_save}"
27fi
28AC_LANG_POP([C])
29
30])
31
32dnl Macro that checks if a linker flag is supported by the compiler.
33
34dnl Usage: EFL_LINKER_FLAG(flag)
35dnl flag is added to CFLAGS if supported (will be passed to ld anyway).
36
37AC_DEFUN([EFL_LINKER_FLAG],
38[
39
40CFLAGS_save="${CFLAGS}"
41CFLAGS="${CFLAGS} $1"
42
43AC_LANG_PUSH([C])
44AC_MSG_CHECKING([whether the compiler supports $1])
45
46AC_LINK_IFELSE(
47 [AC_LANG_PROGRAM([[]])],
48 [have_flag="yes"],
49 [have_flag="no"])
50AC_MSG_RESULT([${have_flag}])
51
52if test "x${have_flag}" = "xno" ; then
53 CFLAGS="${CFLAGS_save}"
54fi
55AC_LANG_POP([C])
56
57])
diff --git a/m4/efl_doxygen.m4 b/m4/efl_doxygen.m4
deleted file mode 100644
index dd6bc3e..0000000
--- a/m4/efl_doxygen.m4
+++ /dev/null
@@ -1,99 +0,0 @@
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/m4/efl_tests.m4 b/m4/efl_tests.m4
deleted file mode 100644
index d8554e1..0000000
--- a/m4/efl_tests.m4
+++ /dev/null
@@ -1,65 +0,0 @@
1dnl Copyright (C) 2008-2012 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 tests programs are wanted and if yes, if
5dnl the Check library is available.
6dnl the lcov program is available.
7
8dnl Usage: EFL_CHECK_TESTS(EFL[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
9dnl Define the automake conditionnal EFL_ENABLE_TESTS
10
11AC_DEFUN([EFL_CHECK_TESTS],
12[
13m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
14
15dnl configure option
16
17AC_ARG_ENABLE([tests],
18 [AC_HELP_STRING([--enable-tests], [enable tests @<:@default=disabled@:>@])],
19 [
20 if test "x${enableval}" = "xyes" ; then
21 _efl_enable_tests="yes"
22 else
23 _efl_enable_tests="no"
24 fi
25 ],
26 [_efl_enable_tests="no"])
27
28AC_MSG_CHECKING([whether tests are built])
29AC_MSG_RESULT([${_efl_enable_tests}])
30
31AC_REQUIRE([PKG_PROG_PKG_CONFIG])
32
33if test "x${_efl_enable_tests}" = "xyes" ; then
34 PKG_CHECK_MODULES([CHECK],
35 [check >= 0.9.5],
36 [dummy="yes"],
37 [_efl_enable_tests="no"])
38fi
39
40efl_enable_coverage="no"
41if test "x${_efl_enable_tests}" = "xyes" ; then
42 AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
43 if test "x$have_lcov" = "xyes" ; then
44 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -fprofile-arcs -ftest-coverage"
45 m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -lgcov"
46# remove any optimisation flag and force debug symbols
47 if test "x${prefer_assert}" = "xno"; then
48 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -DNDEBUG"
49 else
50 m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -g -O0 -DDEBUG"
51 fi
52 efl_enable_coverage="yes"
53 else
54 AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
55 fi
56fi
57
58AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes")
59
60AS_IF([test "x$_efl_enable_tests" = "xyes"], [$2], [$3])
61
62m4_popdef([UPEFL])
63])
64
65dnl End of efl_tests.m4
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index f8338e1..0000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
1MAINTAINERCLEANFILES = Makefile.in
2SUBDIRS = lib bin tests modules
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
deleted file mode 100644
index 1e69a4f..0000000
--- a/src/bin/Makefile.am
+++ /dev/null
@@ -1,54 +0,0 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EEZE_CFLAGS = \
4-I$(top_srcdir)/src/lib \
5@EEZE_CFLAGS@
6
7noinst_PROGRAMS = @EEZE_UDEV_TEST_PRG@
8EXTRA_PROGRAMS = eeze_udev_test eeze_mount eeze_umount eeze_disk_ls eeze_scanner eeze_sensor_test
9
10if HAVE_EEZE_MOUNT
11 DISK_PROGS = @EEZE_MOUNT_PRG@ @EEZE_UMOUNT_PRG@ @EEZE_DISK_LS_PRG@
12 SCAN_PROGS = @EEZE_SCANNER_PRG@
13else
14 DISK_PROGS =
15 SCAN_PROGS =
16endif
17
18bin_PROGRAMS = $(DISK_PROGS)
19util_PROGRAMS = $(SCAN_PROGS)
20utildir = $(bindir)
21
22eeze_udev_test_SOURCES = eeze_udev_test.c
23eeze_udev_test_CPPFLAGS = -I$(top_srcdir)/src/lib @EEZE_CFLAGS@
24eeze_udev_test_LDADD = $(top_builddir)/src/lib/libeeze.la @EEZE_LIBS@
25
26bin_PROGRAMS += @EEZE_SENSOR_TEST_PRG@
27eeze_sensor_test_SOURCES = eeze_sensor_test.c
28eeze_sensor_test_CPPFLAGS = -I$(top_srcdir)/src/lib @EEZE_CFLAGS@
29eeze_sensor_test_LDADD = $(top_builddir)/src/lib/libeeze.la @EEZE_LIBS@
30
31if HAVE_EEZE_MOUNT
32 eeze_mount_SOURCES = eeze_mount.c
33 eeze_mount_CFLAGS = -I$(top_srcdir)/src/lib $(EEZE_CFLAGS) @LIBMOUNT_CFLAGS@ @ECORE_FILE_CFLAGS@
34 eeze_mount_LDADD = $(top_builddir)/src/lib/libeeze.la @LIBMOUNT_LIBS@ @ECORE_FILE_LIBS@ @EEZE_LIBS@
35
36 eeze_umount_SOURCES = eeze_umount.c
37 eeze_umount_CFLAGS = -I$(top_srcdir)/src/lib $(EEZE_CFLAGS) @LIBMOUNT_CFLAGS@ @ECORE_FILE_CFLAGS@
38 eeze_umount_LDADD = $(top_builddir)/src/lib/libeeze.la @LIBMOUNT_LIBS@ @ECORE_FILE_LIBS@ @EEZE_LIBS@
39
40 eeze_disk_ls_SOURCES = eeze_disk_ls.c
41 eeze_disk_ls_CFLAGS = -I$(top_srcdir)/src/lib $(EEZE_CFLAGS) @LIBMOUNT_CFLAGS@ @ECORE_FILE_CFLAGS@
42 eeze_disk_ls_LDADD = $(top_builddir)/src/lib/libeeze.la @LIBMOUNT_LIBS@ @ECORE_FILE_LIBS@ @EEZE_LIBS@
43
44 eeze_scanner_SOURCES = eeze_scanner.c
45 eeze_scanner_CFLAGS = -I$(top_srcdir)/src/lib $(EEZE_CFLAGS) @LIBMOUNT_CFLAGS@ @ECORE_FILE_CFLAGS@ @ECORE_CON_CFLAGS@ @EET_CFLAGS@
46 eeze_scanner_LDADD = $(top_builddir)/src/lib/libeeze.la @LIBMOUNT_LIBS@ @ECORE_FILE_LIBS@ @ECORE_CON_LIBS@ @EET_LIBS@ @EEZE_LIBS@
47 includesdir = $(includedir)/eeze-@VMAJ@
48 includes_HEADERS = eeze_scanner.h
49
50setuid_root_mode = a=rx,u+xs
51install-data-hook:
52 @chmod $(setuid_root_mode) $(DESTDIR)$(bindir)/eeze_scanner$(EXEEXT) || true
53
54endif
diff --git a/src/bin/eeze_disk_ls.c b/src/bin/eeze_disk_ls.c
deleted file mode 100644
index 46c4006..0000000
--- a/src/bin/eeze_disk_ls.c
+++ /dev/null
@@ -1,53 +0,0 @@
1#include <stdio.h>
2#include <Ecore.h>
3#include <Eeze.h>
4#include <Eeze_Disk.h>
5
6/* simple app to print disks and their mount points */
7
8int
9main(void)
10{
11 Eina_List *disks;
12 const char *syspath;
13
14 eeze_init();
15 eeze_disk_function();
16
17 disks = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_MOUNTABLE, NULL);
18 printf("Found the following mountable disks:\n");
19 EINA_LIST_FREE(disks, syspath)
20 {
21 Eeze_Disk *disk;
22
23 disk = eeze_disk_new(syspath);
24 printf("\t%s - %s:%s\n", syspath, eeze_disk_devpath_get(disk), eeze_disk_mount_point_get(disk));
25 eeze_disk_free(disk);
26 eina_stringshare_del(syspath);
27 }
28
29 disks = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_REMOVABLE, NULL);
30 printf("Found the following removable drives:\n");
31 EINA_LIST_FREE(disks, syspath)
32 {
33 Eeze_Disk *disk;
34
35 disk = eeze_disk_new(syspath);
36 printf("\t%s - %s:%s\n", syspath, eeze_disk_devpath_get(disk), eeze_disk_mount_point_get(disk));
37 eeze_disk_free(disk);
38 eina_stringshare_del(syspath);
39 }
40
41 disks = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_INTERNAL, NULL);
42 printf("Found the following internal drives:\n");
43 EINA_LIST_FREE(disks, syspath)
44 {
45 Eeze_Disk *disk;
46
47 disk = eeze_disk_new(syspath);
48 printf("\t%s - %s\n", syspath, eeze_disk_devpath_get(disk));
49 eeze_disk_free(disk);
50 eina_stringshare_del(syspath);
51 }
52 return 0;
53}
diff --git a/src/bin/eeze_mount.c b/src/bin/eeze_mount.c
deleted file mode 100644
index 1f1c561..0000000
--- a/src/bin/eeze_mount.c
+++ /dev/null
@@ -1,130 +0,0 @@
1#include <Eeze.h>
2#include <Eeze_Disk.h>
3#include <Ecore.h>
4#include <Ecore_File.h>
5#include <Ecore_Getopt.h>
6#include <stdio.h>
7
8/** This app can be used as a "dumb" replacement for mount. Just don't try anything fancy yet! */
9static const Ecore_Getopt opts =
10{
11 "eeze_mount",
12 "eeze_mount /dev/sdb1 /media/disk",
13 "1.0",
14 "(C) 2010 Mike Blumenkrantz",
15 "LGPL",
16 "Mount a disk using either its /sys/ path or its /dev/ path\n\n",
17 1,
18 {
19 ECORE_GETOPT_STORE_TRUE('v', "verbose", "Enable debug output"),
20 ECORE_GETOPT_VERSION('V', "version"),
21 ECORE_GETOPT_COPYRIGHT('R', "copyright"),
22 ECORE_GETOPT_LICENSE('L', "license"),
23 ECORE_GETOPT_HELP('h', "help"),
24 ECORE_GETOPT_SENTINEL
25 }
26};
27
28void
29_mount_cb(void *data, int type, Eeze_Event_Disk_Mount *e)
30{
31 (void)data;
32 (void)type;
33 printf("Success!\n");
34 eeze_disk_free(e->disk);
35 ecore_main_loop_quit();
36}
37
38void
39_error_cb(void *data, int type, Eeze_Event_Disk_Error *de)
40{
41 (void)data;
42 (void)type;
43 printf("Could not mount disk with /dev/ path: %s!\n", eeze_disk_devpath_get(de->disk));
44 eeze_disk_free(de->disk);
45 ecore_main_loop_quit();
46}
47
48int
49main(int argc, char *argv[])
50{
51 int args;
52 const char *dev, *mount_point = NULL;
53 Eina_Bool verbose = EINA_FALSE, exit_option = EINA_FALSE;
54 Eeze_Disk *disk;
55
56 Ecore_Getopt_Value values[] =
57 {
58 ECORE_GETOPT_VALUE_BOOL(verbose),
59 ECORE_GETOPT_VALUE_BOOL(exit_option),
60 ECORE_GETOPT_VALUE_BOOL(exit_option),
61 ECORE_GETOPT_VALUE_BOOL(exit_option),
62 ECORE_GETOPT_VALUE_BOOL(exit_option)
63 };
64
65 if (argc < 2)
66 {
67 printf("Insufficient args specified!\n");
68 ecore_getopt_help(stderr, &opts);
69 exit(1);
70 }
71
72 ecore_init();
73 eeze_init();
74 ecore_app_args_set(argc, (const char **)argv);
75 args = ecore_getopt_parse(&opts, values, argc, argv);
76
77 if (exit_option)
78 return 0;
79
80 if (args < 0)
81 {
82 printf("No args specified!\n");
83 ecore_getopt_help(stderr, &opts);
84 exit(1);
85 }
86 if (verbose) eina_log_domain_level_set("eeze_disk", EINA_LOG_LEVEL_DBG);
87 dev = argv[args];
88 if (args + 1 < argc)
89 mount_point = argv[args + 1];
90 if ((!strncmp(dev, "/sys/", 5)) || (!strncmp(dev, "/dev/", 5)))
91 disk = eeze_disk_new(dev);
92 else if ((args == argc - 1) && (ecore_file_is_dir(dev)))
93 disk = eeze_disk_new_from_mount(dev);
94 else
95 {
96 printf("[Device] must be either a /dev/ path or a /sys/ path!\n");
97 ecore_getopt_help(stderr, &opts);
98 exit(1);
99 }
100 if (eeze_disk_mounted_get(disk))
101 {
102 printf("[%s] is already mounted!", dev);
103 exit(1);
104 }
105 if (argc - args > 1)
106 {
107 eeze_disk_mount_point_set(disk, mount_point);
108 if (eina_str_has_extension(dev, "iso"))
109 {
110 int f;
111 f = eeze_disk_mountopts_get(disk);
112 eeze_disk_mountopts_set(disk, f | EEZE_DISK_MOUNTOPT_LOOP);
113 }
114 }
115 ecore_event_handler_add(EEZE_EVENT_DISK_MOUNT, (Ecore_Event_Handler_Cb)_mount_cb, NULL);
116 ecore_event_handler_add(EEZE_EVENT_DISK_ERROR, (Ecore_Event_Handler_Cb)_error_cb, NULL);
117 eeze_disk_mountopts_get(disk);
118 if (!eeze_disk_mount(disk))
119 {
120 const char *mp;
121
122 mp = eeze_disk_mount_point_get(disk);
123 if (!mp) fprintf(stderr, "No mount point passed!\n");
124 else fprintf(stderr, "Mount operation could not be started!\n");
125 exit(1);
126 }
127 ecore_main_loop_begin();
128
129 return 0;
130}
diff --git a/src/bin/eeze_scanner.c b/src/bin/eeze_scanner.c
deleted file mode 100644
index 2acd736..0000000
--- a/src/bin/eeze_scanner.c
+++ /dev/null
@@ -1,453 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include <Eet.h>
6#include <Eeze.h>
7#include <Ecore_Con.h>
8#include <Eeze_Disk.h>
9#include <sys/stat.h>
10#include <sys/types.h>
11#include <errno.h>
12#include <unistd.h>
13#include <fcntl.h>
14
15#include "eeze_scanner.h"
16
17#define DBG(...) EINA_LOG_DOM_DBG(es_log_dom, __VA_ARGS__)
18#define INF(...) EINA_LOG_DOM_INFO(es_log_dom, __VA_ARGS__)
19#define WRN(...) EINA_LOG_DOM_WARN(es_log_dom, __VA_ARGS__)
20#define ERR(...) EINA_LOG_DOM_ERR(es_log_dom, __VA_ARGS__)
21#define CRI(...) EINA_LOG_DOM_CRIT(es_log_dom, __VA_ARGS__)
22
23static int es_log_dom = -1;
24static Ecore_Con_Server *svr = NULL;
25static Eet_Data_Descriptor *es_edd = NULL;
26static Eina_Hash *clients = NULL;
27
28static Eina_List *storage_devices = NULL;
29static Eina_List *storage_cdrom = NULL;
30
31static Eina_List *volume_cdrom = NULL;
32static Eina_List *volume_devices = NULL;
33
34static void
35event_send(const char *device, Eeze_Scanner_Event_Type type, Eina_Bool volume)
36{
37 Eeze_Scanner_Event ev;
38 const Eina_List *l;
39 Ecore_Con_Client *cl;
40
41 ev.device = device;
42 ev.type = type;
43 ev.volume = volume;
44 EINA_LIST_FOREACH(ecore_con_server_clients_get(svr), l, cl)
45 {
46 Eet_Connection *ec;
47
48 ec = eina_hash_find(clients, cl);
49 if (!ec) continue;
50 INF("Serializing event...");
51 eet_connection_send(ec, es_edd, &ev, NULL);
52 }
53}
54
55static Eina_Bool
56event_write(const void *data, size_t size, Ecore_Con_Client *cl)
57{
58 INF("Event sent!");
59 ecore_con_client_send(cl, data, size);
60 return EINA_TRUE;
61}
62
63static Eina_Bool
64disk_mount(void *data __UNUSED__, int type __UNUSED__, Eeze_Disk *disk)
65{
66 Eina_List *l;
67 Eeze_Scanner_Device *d;
68 if (eeze_disk_type_get(disk) != EEZE_DISK_TYPE_CDROM) return ECORE_CALLBACK_RENEW;
69
70 EINA_LIST_FOREACH(storage_cdrom, l, d)
71 {
72 if (d->device == eeze_disk_syspath_get(disk))
73 {
74 d->mounted = !d->mounted;
75 break;
76 }
77 }
78 return ECORE_CALLBACK_RENEW;
79}
80
81static void
82cl_setup(Ecore_Con_Client *cl __UNUSED__, Eet_Connection *ec)
83{
84 Eina_List *l;
85 Eeze_Scanner_Device *dev;
86 Eeze_Scanner_Event ev;
87 const char *sys;
88
89 INF("Sending initial events to new client");
90 EINA_LIST_FOREACH(storage_devices, l, sys)
91 {
92 ev.device = sys;
93 ev.type = EEZE_SCANNER_EVENT_TYPE_ADD;
94 ev.volume = EINA_FALSE;
95 eet_connection_send(ec, es_edd, &ev, NULL);
96 }
97 EINA_LIST_FOREACH(storage_cdrom, l, dev)
98 {
99 ev.device = dev->device;
100 ev.type = EEZE_SCANNER_EVENT_TYPE_ADD;
101 ev.volume = EINA_FALSE;
102 eet_connection_send(ec, es_edd, &ev, NULL);
103 }
104 EINA_LIST_FOREACH(volume_devices, l, sys)
105 {
106 ev.device = sys;
107 ev.type = EEZE_SCANNER_EVENT_TYPE_ADD;
108 ev.volume = EINA_TRUE;
109 eet_connection_send(ec, es_edd, &ev, NULL);
110 }
111 EINA_LIST_FOREACH(volume_cdrom, l, dev)
112 {
113 ev.device = dev->device;
114 ev.type = EEZE_SCANNER_EVENT_TYPE_ADD;
115 ev.volume = EINA_TRUE;
116 eet_connection_send(ec, es_edd, &ev, NULL);
117 }
118}
119
120static Eina_Bool
121es_read(const void *eet_data __UNUSED__, size_t size __UNUSED__, void *user_data __UNUSED__)
122{
123 return EINA_TRUE;
124}
125
126static Eina_Bool
127cl_add(void *data __UNUSED__, int type __UNUSED__, Ecore_Con_Event_Client_Add *ev)
128{
129 Eet_Connection *ec;
130 INF("Added client");
131
132 ec = eet_connection_new(es_read, (Eet_Write_Cb*)event_write, ev->client);
133 if (!ec)
134 {
135 ERR("Could not create eet serializer! Lost client!");
136 ecore_con_client_del(ev->client);
137 return ECORE_CALLBACK_RENEW;
138 }
139
140 eina_hash_direct_add(clients, ev->client, ec);
141 cl_setup(ev->client, ec);
142 return ECORE_CALLBACK_RENEW;
143}
144
145static Eina_Bool
146cl_del(void *data __UNUSED__, int type __UNUSED__, Ecore_Con_Event_Client_Del *ev)
147{
148 Eet_Connection *ec;
149 Eina_Bool d;
150 INF("Removed client");
151 ec = eina_hash_find(clients, ev->client);
152 if (ec)
153 {
154 eet_connection_close(ec, &d);
155 eina_hash_del_by_data(clients, ec);
156 }
157
158 return ECORE_CALLBACK_RENEW;
159}
160
161static void
162eet_setup(void)
163{
164 Eet_Data_Descriptor_Class eddc;
165
166 if (!eet_eina_stream_data_descriptor_class_set(&eddc, sizeof(eddc), "eeze_scanner_event", sizeof(Eeze_Scanner_Event)))
167 {
168 CRI("Could not create eet data descriptor!");
169 exit(1);
170 }
171
172 es_edd = eet_data_descriptor_stream_new(&eddc);
173#define DAT(MEMBER, TYPE) EET_DATA_DESCRIPTOR_ADD_BASIC(es_edd, Eeze_Scanner_Event, #MEMBER, MEMBER, EET_T_##TYPE)
174 DAT(device, INLINED_STRING);
175 DAT(type, UINT);
176 DAT(volume, UCHAR);
177#undef DAT
178}
179
180static Eina_Bool
181cdrom_timer(Eeze_Scanner_Device *dev)
182{
183 const char *devpath;
184 int fd;
185
186 /* cdrom already mounted, no need to poll */
187 if (dev->mounted) return EINA_TRUE;
188 devpath = eeze_udev_syspath_get_devpath(dev->device);
189 fd = open(devpath, O_RDONLY);
190 if (fd < 0)
191 {
192 Eina_List *l;
193
194 l = eina_list_data_find_list(volume_cdrom, dev);
195 if (l)
196 {
197 /* disc removed, delete volume */
198 INF("Removed cdrom '%s'", dev->device);
199 volume_cdrom = eina_list_remove_list(volume_cdrom, l);
200 event_send(dev->device, EEZE_SCANNER_EVENT_TYPE_CHANGE, EINA_TRUE);
201 }
202 /* just in case */
203 dev->mounted = EINA_FALSE;
204 }
205 else
206 {
207 if (!eina_list_data_find(volume_cdrom, dev))
208 {
209 INF("Added cdrom '%s'", dev->device);
210 volume_cdrom = eina_list_append(volume_cdrom, dev);
211 event_send(dev->device, EEZE_SCANNER_EVENT_TYPE_CHANGE, EINA_TRUE);
212 }
213 close(fd);
214 }
215 eina_stringshare_del(devpath);
216 return EINA_TRUE;
217}
218
219static void
220storage_setup(void)
221{
222 Eina_List *l, *ll;
223 const char *sys;
224
225 storage_devices = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_INTERNAL, NULL);
226 if (!storage_devices)
227 {
228 ERR("No storage devices found! This is not supposed to happen!");
229 exit(1);
230 }
231 EINA_LIST_FOREACH(storage_devices, l, sys)
232 event_send(sys, EEZE_SCANNER_EVENT_TYPE_ADD, EINA_FALSE);
233
234 ll = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_REMOVABLE, NULL);
235 EINA_LIST_FREE(ll, sys)
236 {
237 event_send(sys, EEZE_SCANNER_EVENT_TYPE_ADD, EINA_FALSE);
238 storage_devices = eina_list_append(storage_devices, sys);
239 }
240
241 l = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_CDROM, NULL);
242 EINA_LIST_FREE(l, sys)
243 {
244 Eeze_Scanner_Device *dev;
245 Eeze_Disk *disk;
246
247 dev = calloc(1, sizeof(Eeze_Scanner_Device));
248 if (!dev)
249 {
250 ERR("Lost cdrom device '%s'!", sys);
251 eina_stringshare_del(sys);
252 continue;
253 }
254 disk = eeze_disk_new(sys);
255 if (!disk)
256 {
257 ERR("Lost cdrom device '%s'!", sys);
258 eina_stringshare_del(sys);
259 free(dev);
260 continue;
261 }
262 dev->device = sys;
263 dev->mounted = eeze_disk_mounted_get(disk);
264 eeze_disk_free(disk);
265 event_send(sys, EEZE_SCANNER_EVENT_TYPE_ADD, EINA_FALSE);
266 dev->poller = ecore_poller_add(ECORE_POLLER_CORE, 32, (Ecore_Task_Cb)cdrom_timer, dev);
267 storage_cdrom = eina_list_append(storage_cdrom, dev);
268 }
269 volume_devices = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_MOUNTABLE, NULL);
270 EINA_LIST_FOREACH_SAFE(volume_devices, l, ll, sys)
271 {
272 Eina_List *c;
273 Eeze_Scanner_Device *dev;
274
275 EINA_LIST_FOREACH(storage_cdrom, c, dev)
276 if (sys == dev->device)
277 {
278 eina_stringshare_del(sys);
279 volume_devices = eina_list_remove_list(volume_devices, l);
280 volume_cdrom = eina_list_append(volume_cdrom, dev);
281 event_send(sys, EEZE_SCANNER_EVENT_TYPE_ADD, EINA_TRUE);
282 l = NULL;
283 break;
284 }
285 if (!l) continue;
286 event_send(sys, EEZE_SCANNER_EVENT_TYPE_ADD, EINA_TRUE);
287 }
288}
289
290static void
291cb_vol_chg(const char *device, Eeze_Udev_Event ev, void *data __UNUSED__, Eeze_Udev_Watch *watch __UNUSED__)
292{
293 Eina_List *l;
294 Eeze_Scanner_Device *dev;
295
296 DBG("device='%s'", device);
297
298 if (ev == EEZE_UDEV_EVENT_ONLINE) ev = EEZE_SCANNER_EVENT_TYPE_ADD;
299 else if (ev == EEZE_UDEV_EVENT_OFFLINE) ev = EEZE_SCANNER_EVENT_TYPE_REMOVE;
300
301 event_send(device, ev, EINA_TRUE);
302 switch (ev)
303 {
304 case EEZE_UDEV_EVENT_ADD:
305 case EEZE_UDEV_EVENT_ONLINE:
306 INF("Added volume '%s'", device);
307 EINA_LIST_FOREACH(storage_cdrom, l, dev)
308 if (device == dev->device)
309 {
310 volume_cdrom = eina_list_append(volume_cdrom, dev);
311 return;
312 }
313 volume_devices = eina_list_append(volume_devices, eina_stringshare_add(device));
314 break;
315 case EEZE_UDEV_EVENT_REMOVE:
316 case EEZE_UDEV_EVENT_OFFLINE:
317 INF("Removed volume '%s'", device);
318 EINA_LIST_FOREACH(volume_cdrom, l, dev)
319 if (device == dev->device)
320 {
321 volume_cdrom = eina_list_remove_list(volume_cdrom, l);
322 return;
323 }
324 volume_devices = eina_list_remove(volume_devices, device);
325 eina_stringshare_del(device);
326 break;
327 default:
328 INF("Changed volume '%s'", device);
329 break;
330 }
331}
332
333static void
334cb_stor_chg(const char *device, Eeze_Udev_Event ev, void *data __UNUSED__, Eeze_Udev_Watch *watch __UNUSED__)
335{
336 Eina_List *l;
337 Eeze_Scanner_Device *dev = NULL;
338 const char *str;
339
340
341 DBG("device='%s'", device);
342 switch (ev)
343 {
344 case EEZE_UDEV_EVENT_ADD:
345 case EEZE_UDEV_EVENT_ONLINE:
346 INF("Added device '%s'", device);
347 event_send(device, ev, EINA_FALSE);
348 str = eeze_udev_syspath_get_property(device, "ID_CDROM");
349 if (!str)
350 {
351 storage_devices = eina_list_append(storage_devices, eina_stringshare_add(device));
352 return;
353 }
354 eina_stringshare_del(str);
355 dev = calloc(1, sizeof(Eeze_Scanner_Device));
356 dev->device = eina_stringshare_add(device);
357 dev->poller = ecore_poller_add(ECORE_POLLER_CORE, 32,
358 (Ecore_Task_Cb)cdrom_timer, dev);
359 storage_cdrom = eina_list_append(storage_cdrom, dev);
360 break;
361 case EEZE_UDEV_EVENT_REMOVE:
362 case EEZE_UDEV_EVENT_OFFLINE:
363 if (!eina_list_data_find(storage_devices, device))
364 {
365 EINA_LIST_FOREACH(storage_cdrom, l, dev)
366 if (dev->device == device) break;
367 if ((!dev) || (dev->device != device)) return;
368 }
369 INF("Removed device '%s'", device);
370 event_send(device, ev, EINA_FALSE);
371 EINA_LIST_FOREACH(storage_cdrom, l, dev)
372 if (device == dev->device)
373 {
374 if (dev->poller) ecore_poller_del(dev->poller);
375 storage_cdrom = eina_list_remove_list(storage_cdrom, l);
376 eina_stringshare_del(dev->device);
377 free(dev);
378 return;
379 }
380 storage_devices = eina_list_remove(storage_devices, device);
381 eina_stringshare_del(device);
382 break;
383 default:
384 INF("Changed device '%s'", device);
385 break;
386 }
387}
388
389static void
390es_exit(int sig)
391{
392 ecore_con_server_del(svr);
393 exit(sig);
394}
395
396static void
397sigs_setup(void)
398{
399 sigset_t sigs = {{0}};
400 struct sigaction s;
401
402 sigfillset(&sigs);
403 sigdelset(&sigs, SIGSEGV);
404 sigdelset(&sigs, SIGTERM);
405 sigdelset(&sigs, SIGINT);
406 sigdelset(&sigs, SIGQUIT);
407
408 s.sa_handler = es_exit;
409 s.sa_flags = 0;
410 sigaction(SIGTERM, &s, NULL);
411 sigaction(SIGSEGV, &s, NULL);
412 sigaction(SIGINT, &s, NULL);
413}
414
415int
416main(void)
417{
418 eina_init();
419 ecore_init();
420 ecore_con_init();
421 eeze_init();
422 eeze_disk_function();
423 eeze_mount_tabs_watch();
424
425 sigs_setup();
426 es_log_dom = eina_log_domain_register("eeze_scanner", EINA_COLOR_CYAN);
427
428 eet_setup();
429 clients = eina_hash_pointer_new(NULL);
430 EINA_SAFETY_ON_NULL_GOTO(clients, error);
431
432 ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_ADD, (Ecore_Event_Handler_Cb)cl_add, NULL);
433 ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DEL, (Ecore_Event_Handler_Cb)cl_del, NULL);
434 ecore_event_handler_add(EEZE_EVENT_DISK_UNMOUNT, (Ecore_Event_Handler_Cb)disk_mount, NULL);
435 ecore_event_handler_add(EEZE_EVENT_DISK_MOUNT, (Ecore_Event_Handler_Cb)disk_mount, NULL);
436
437 eeze_udev_watch_add(EEZE_UDEV_TYPE_DRIVE_INTERNAL, EEZE_UDEV_EVENT_NONE, cb_stor_chg, NULL);
438 eeze_udev_watch_add(EEZE_UDEV_TYPE_DRIVE_REMOVABLE, EEZE_UDEV_EVENT_NONE, cb_stor_chg, NULL);
439 eeze_udev_watch_add(EEZE_UDEV_TYPE_DRIVE_CDROM, EEZE_UDEV_EVENT_NONE, cb_stor_chg, NULL);
440 eeze_udev_watch_add(EEZE_UDEV_TYPE_DRIVE_MOUNTABLE, EEZE_UDEV_EVENT_NONE, cb_vol_chg, NULL);
441
442 svr = ecore_con_server_add(ECORE_CON_LOCAL_SYSTEM, "eeze_scanner", 0, NULL);
443 EINA_SAFETY_ON_NULL_GOTO(svr, error);
444
445 storage_setup();
446 ecore_main_loop_begin();
447
448 ecore_con_server_del(svr);
449 return 0;
450error:
451 ERR("Could not start up!");
452 exit(1);
453}
diff --git a/src/bin/eeze_scanner.h b/src/bin/eeze_scanner.h
deleted file mode 100644
index a975793..0000000
--- a/src/bin/eeze_scanner.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef EEZE_SCANNER_H
2#define EEZE_SCANNER_H
3
4#include <Eeze.h>
5
6#define EEZE_SCANNER_EDD_SETUP(edd) \
7 EET_DATA_DESCRIPTOR_ADD_BASIC((edd), Eeze_Scanner_Event, "device", device, EET_T_INLINED_STRING); \
8 EET_DATA_DESCRIPTOR_ADD_BASIC((edd), Eeze_Scanner_Event, "type", type, EET_T_UINT); \
9 EET_DATA_DESCRIPTOR_ADD_BASIC((edd), Eeze_Scanner_Event, "volume", volume, EET_T_UCHAR)
10
11typedef enum
12{
13 EEZE_SCANNER_EVENT_TYPE_NONE,
14 EEZE_SCANNER_EVENT_TYPE_ADD = EEZE_UDEV_EVENT_ADD,
15 EEZE_SCANNER_EVENT_TYPE_REMOVE = EEZE_UDEV_EVENT_REMOVE,
16 EEZE_SCANNER_EVENT_TYPE_CHANGE = EEZE_UDEV_EVENT_CHANGE
17} Eeze_Scanner_Event_Type;
18
19typedef struct
20{
21 const char *device;
22 Eeze_Scanner_Event_Type type;
23 Eina_Bool volume;
24} Eeze_Scanner_Event;
25
26typedef struct
27{
28 Ecore_Poller *poller;
29 const char *device;
30 Eina_Bool mounted;
31} Eeze_Scanner_Device;
32
33#endif
diff --git a/src/bin/eeze_sensor_test.c b/src/bin/eeze_sensor_test.c
deleted file mode 100644
index 2c73876..0000000
--- a/src/bin/eeze_sensor_test.c
+++ /dev/null
@@ -1,173 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif /* ifdef HAVE_CONFIG_H */
4
5#include <Eeze.h>
6#include <Ecore.h>
7#include <stdio.h>
8#include <unistd.h>
9
10#include <Eeze_Sensor.h>
11
12/*
13 TODO
14 if you want a continual flow maybe eeze_sensor_flow_set(sens, EINA_TRUE); (by
15 default they are alll EINA_FALSE - ie dont provide a flow of events).
16*/
17
18static Eina_Bool
19event_cb(void *data EINA_UNUSED, int ev_type, void *event)
20{
21 Eeze_Sensor_Obj *sens = NULL;
22 float x, y, z;
23 int acc;
24 unsigned long long timestamp;
25
26 sens = event;
27 if (!sens) printf("can't find sensor!\n");
28 if (!eeze_sensor_accuracy_get(sens, &acc)) printf("fail get accuracy\n");
29 if (!eeze_sensor_timestamp_get(sens, &timestamp)) printf("fail get timestamp\n");
30
31 if (ev_type == EEZE_SENSOR_EVENT_ACCELEROMETER)
32 {
33 if (!eeze_sensor_xyz_get(sens, &x, &y, &z)) printf("fail get xyz\n");
34 printf("Accelerometer callback: accuracy %i, x %f, y %f, z %f at time: %lli\n", acc, x, y, z, timestamp);
35 }
36 else if (ev_type == EEZE_SENSOR_EVENT_FACEDOWN)
37 printf("Facedown callback at time: %lli\n", timestamp);
38 else if (ev_type == EEZE_SENSOR_EVENT_DOUBLETAP)
39 printf("Doubletap callback at time: %lli\n", timestamp);
40 else if (ev_type == EEZE_SENSOR_EVENT_SHAKE)
41 {
42 if (!eeze_sensor_x_get(sens, &x)) printf("fail get x\n");
43 printf("Shake callback: accuracy %i, x %f at time: %lli\n", acc, x, timestamp);
44 }
45
46 return ECORE_CALLBACK_PASS_ON;
47}
48
49int
50main(void)
51{
52 Eeze_Sensor_Obj *sens;
53 float x, y, z;
54 int acc;
55 unsigned long long timestamp;
56
57 /* Init the subsystems we use to make sure they are ready to use. */
58 ecore_init();
59 eeze_init();
60
61 printf("=== Test sync reads: ===\n");
62 /* Create a new sensor object from the type MAGNETIC. We will operate on this
63 * object to get data out of the sensor */
64 sens = eeze_sensor_new(EEZE_SENSOR_TYPE_MAGNETIC);
65 if (sens)
66 {
67 /* Request the actual sensor data from the object. A magnetic sensor
68 * has three data points so we have to use the xyz function. The data
69 * could be cached from the last read so better also get the timestamp
70 * when the data got read form the physical sensor. */
71 if (!eeze_sensor_xyz_get(sens, &x, &y, &z)) printf("fail get xyz\n");
72 /* Get the accurancy of the reading. Not all sensors support this. */
73 if (!eeze_sensor_accuracy_get(sens, &acc)) printf("fail get accuracy\n");
74 /* Here we read the timestamp the data was read out from the physical
75 * sensor. Can be used to detect how old the readout it.*/
76 if (!eeze_sensor_timestamp_get(sens, &timestamp)) printf("fail get timestamp\n");
77 printf("Magnetic output: accuracy %i, x %f, y %f, z %f at time: %lli\n", acc, x, y, z, timestamp);
78 /* Free the sensor when we do not longer use it. */
79 eeze_sensor_free(sens);
80 }
81 else
82 printf("Could not find a magnetic sensor!\n");
83
84 sens = eeze_sensor_new(EEZE_SENSOR_TYPE_ACCELEROMETER);
85 if (sens)
86 {
87 if (!eeze_sensor_xyz_get(sens, &x, &y, &z)) printf("fail get xyz\n");
88 if (!eeze_sensor_accuracy_get(sens, &acc)) printf("fail get accuracy\n");
89 if (!eeze_sensor_timestamp_get(sens, &timestamp)) printf("fail get timestamp\n");
90 printf("Acceleromter output: accuracy %i, x %f, y %f, z %f at time: %lli\n", acc, x, y, z, timestamp);
91 eeze_sensor_free(sens);
92 }
93 else
94 printf("Could not find an accelerometer sensor!\n");
95
96 sens = eeze_sensor_new(EEZE_SENSOR_TYPE_ORIENTATION);
97 if (sens)
98 {
99 if (!eeze_sensor_xyz_get(sens, &x, &y, &z)) printf("fail get xyz\n");
100 if (!eeze_sensor_accuracy_get(sens, &acc)) printf("fail get accuracy\n");
101 if (!eeze_sensor_timestamp_get(sens, &timestamp)) printf("fail get timestamp\n");
102 printf("Orientation output: accuracy %i, x %f, y %f, z %f at time: %lli\n", acc, x, y, z, timestamp);
103 eeze_sensor_free(sens);
104 }
105 else
106 printf("Could not find an orientation sensor!\n");
107
108 sens = eeze_sensor_new(EEZE_SENSOR_TYPE_GYROSCOPE);
109 if (sens)
110 {
111 if (!eeze_sensor_xyz_get(sens, &x, &y, &z)) printf("fail get xyz\n");
112 if (!eeze_sensor_accuracy_get(sens, &acc)) printf("fail get accuracy\n");
113 if (!eeze_sensor_timestamp_get(sens, &timestamp)) printf("fail get timestamp\n");
114 printf("Gyroscope output: accuracy %i, x %f, y %f, z %f at time: %lli\n", acc, x, y, z, timestamp);
115 eeze_sensor_free(sens);
116 }
117 else
118 printf("Could not find a gyroscope sensor!\n");
119
120 sens = eeze_sensor_new(EEZE_SENSOR_TYPE_PROXIMITY);
121 if (sens)
122 {
123 if (!eeze_sensor_xyz_get(sens, &x, &y, &z)) printf("fail get xyz\n");
124 if (!eeze_sensor_accuracy_get(sens, &acc)) printf("fail get accuracy\n");
125 if (!eeze_sensor_timestamp_get(sens, &timestamp)) printf("fail get timestamp\n");
126 printf("Proximity output: accuracy %i, distance %f at time: %lli\n", acc, x, timestamp);
127 eeze_sensor_free(sens);
128 }
129 else
130 printf("Could not find a proximity sensor!\n");
131
132 sens = eeze_sensor_new(EEZE_SENSOR_TYPE_LIGHT);
133 if (sens)
134 {
135 if (!eeze_sensor_xyz_get(sens, &x, &y, &z)) printf("fail get xyz\n");
136 if (!eeze_sensor_accuracy_get(sens, &acc)) printf("fail get accuracy\n");
137 if (!eeze_sensor_timestamp_get(sens, &timestamp)) printf("fail get timestamp\n");
138 printf("Light output: accuracy %i, lux %f at time: %lli\n", acc, x, timestamp);
139 }
140 else
141 printf("Could not find a light sensor!\n");
142
143 /* Get updated values on a sensor. This readout is synchronous. This way we
144 * can force a read out of the physical sensor instead of using the cached
145 * values. Depending on the hardware this can take a long time. If you don't have special
146 * requirements the cached values should be used. */
147 eeze_sensor_read(sens);
148 if (!sens) printf("can't find an light sensor!\n");
149 if (!eeze_sensor_x_get(sens, &x)) printf("fail get x\n");
150 if (!eeze_sensor_accuracy_get(sens, &acc)) printf("fail get accuracy\n");
151 if (!eeze_sensor_timestamp_get(sens, &timestamp)) printf("fail get timestamp\n");
152 printf("Light output: accuracy %i, lux %f at time: %lli\n", acc, x, timestamp);
153 eeze_sensor_free(sens);
154
155 printf("=== Test async reads / events: ===\n");
156 /* Async read request for sensors. You have to register an event handler for
157 * it first and then request the readout */
158 ecore_event_handler_add(EEZE_SENSOR_EVENT_ACCELEROMETER, event_cb, NULL);
159 sens = eeze_sensor_new(EEZE_SENSOR_TYPE_ACCELEROMETER);
160 eeze_sensor_async_read(sens, NULL);
161
162 /* Set callbacks for motion events coming in */
163 ecore_event_handler_add(EEZE_SENSOR_EVENT_FACEDOWN, event_cb, NULL);
164 ecore_event_handler_add(EEZE_SENSOR_EVENT_DOUBLETAP, event_cb, NULL);
165
166 ecore_main_loop_begin();
167
168 eeze_sensor_free(sens);
169 eeze_shutdown();
170 ecore_shutdown();
171
172 return 0;
173}
diff --git a/src/bin/eeze_udev_test.c b/src/bin/eeze_udev_test.c
deleted file mode 100644
index 130771a..0000000
--- a/src/bin/eeze_udev_test.c
+++ /dev/null
@@ -1,238 +0,0 @@
1#include <Eeze.h>
2#include <Ecore.h>
3#include <stdio.h>
4
5/**
6 * This demo program shows how to use some eeze_udev functions. It roughly
7 * 1kb as of now, TODO is to fix this but I'm too lazy now and it's only
8 * a demo.
9 */
10
11typedef struct kbdmouse
12{
13 Eina_List *kbds;
14 Eina_List *mice;
15 Eina_Hash *hash;
16} kbdmouse;
17
18static void
19/* event will always be a syspath starting with /sys */
20catch_events(const char *device,
21 Eeze_Udev_Event event,
22 void *data,
23 Eeze_Udev_Watch *watch)
24{
25 kbdmouse *akbdmouse = data;
26 Eina_List *l;
27 const char *name, *dev, *type;
28
29 /* the device that comes through will be prefixed by "/sys"
30 * but the saved name will not, so we check for the saved name
31 * inside the device name
32 */
33 EINA_LIST_FOREACH(akbdmouse->kbds, l, name)
34 if (!strncmp(device + 5, name, strlen(device + 5) - 8)) goto end;
35 EINA_LIST_FOREACH(akbdmouse->mice, l, name)
36 if (!strncmp(device + 5, name, strlen(device + 5) - 8)) goto end;
37
38 /* check to see if the device was just plugged in */
39 if (eeze_udev_syspath_is_kbd(device) || eeze_udev_syspath_is_mouse(device))
40 goto end;
41 /* if we reach here, the device is neither a keyboard nor a mouse that we saw
42 * previously, so we print a moderately amusing message and bail
43 */
44 printf("Sneaky sneaky! But %s is not a keyboard or a mouse!!\n", device);
45 return;
46
47end:
48 /* we stored the devpaths for all the syspaths previously so that
49 * we can retrieve them now even though the device has been removed and
50 * is inaccessible to udev
51 */
52 if ((event & EEZE_UDEV_EVENT_ADD) == EEZE_UDEV_EVENT_ADD)
53 {
54 dev = eeze_udev_syspath_get_devpath(device);
55 type = "plugged in";
56 }
57 else
58 {
59 dev = eina_hash_find(akbdmouse->hash, name);
60 type = "unplugged";
61 }
62 printf("You %s %s!\n", type, dev);
63 printf("All tests completed, exiting successfully!\n");
64 /* and the hash */
65 eina_hash_free(akbdmouse->hash);
66 /* now we free the lists */
67 eina_list_free(akbdmouse->kbds);
68 eina_list_free(akbdmouse->mice);
69 /* and the random storage struct */
70 free(akbdmouse);
71 /* and delete the watch */
72 eeze_udev_watch_del(watch);
73 /* and shut down eudev */
74 eeze_shutdown();
75 /* and quit the main loop */
76 ecore_main_loop_quit();
77}
78
79static void
80hash_free(void *data)
81{
82 eina_stringshare_del(data);
83}
84
85int
86main()
87{
88 Eina_List *type, *l;
89 const char *name, *check, *check2;
90 kbdmouse *akbdmouse;
91 Eina_Hash *hash;
92
93 ecore_init();
94 eeze_init();
95
96 hash = eina_hash_stringshared_new(hash_free);
97 akbdmouse = malloc(sizeof(kbdmouse));
98 akbdmouse->hash = hash;
99
100 printf("For my first trick, I will find all of your keyboards and return their syspaths.\n");
101 /* find all keyboards using type EEZE_UDEV_TYPE_KEYBOARD */
102 type = eeze_udev_find_by_type(EEZE_UDEV_TYPE_KEYBOARD, NULL);
103 /* add all "link" devices that aren't explicitly found, but are still
104 * part of the device chain
105 */
106 type = eeze_udev_find_unlisted_similar(type);
107 EINA_LIST_FOREACH(type, l, name)
108 {
109 /* add the devpath to the hash for use in the cb later */
110 if ((check = eeze_udev_syspath_get_devpath(name)))
111 eina_hash_direct_add(hash, name, check);
112 printf("Found keyboard: %s\n", name);
113 }
114 /* we save this list for later, because once a device is unplugged it can
115 * no longer be detected by udev, and any related properties are unusable unless
116 * they have been previously stored
117 */
118 akbdmouse->kbds = type;
119
120 printf("\nNext, I will find all of your mice and print the corresponding manufacturer.\n");
121 /* find all mice using type EEZE_UDEV_TYPE_MOUSE */
122 type = eeze_udev_find_by_type(EEZE_UDEV_TYPE_MOUSE, NULL);
123 type = eeze_udev_find_unlisted_similar(type);
124 EINA_LIST_FOREACH(type, l, name)
125 { /* add the devpath to the hash for use in the cb later */
126 if ((check = eeze_udev_syspath_get_devpath(name)))
127 eina_hash_direct_add(hash, name, check); /* get a property using the device's syspath */
128 printf("Found mouse %s with vendor: %s\n", name, eeze_udev_walk_get_sysattr(name, "manufacturer"));
129 }
130 /* we save this list for later, because once a device is unplugged it can
131 * no longer be detected by udev, and any related properties are unusable unless
132 * they have been previously stored
133 */
134 akbdmouse->mice = type;
135
136 printf("\nNow let's try something a little more difficult. Mountable filesystems!\n");
137 /* find all mountable drives using type EEZE_UDEV_TYPE_DRIVE_MOUNTABLE */
138 type = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_MOUNTABLE, NULL);
139 type = eeze_udev_find_unlisted_similar(type);
140 EINA_LIST_FREE(type, name)
141 {
142 printf("Found device: %s\n", name); /* get a property using the device's syspath */
143 if ((check = eeze_udev_syspath_get_property(name, "DEVNAME")))
144 {
145 printf("\tYou probably know it better as %s\n", check);
146 eina_stringshare_del(check);
147 }
148 if ((check = eeze_udev_syspath_get_property(name, "ID_FS_TYPE")))
149 {
150 printf("\tIt's formatted as %s", check);
151 eina_stringshare_del(check);
152 check = eeze_udev_syspath_get_property(name, "FSTAB_DIR");
153 if (check)
154 {
155 printf(", and gets mounted at %s", check);
156 eina_stringshare_del(check);
157 }
158 printf("!\n");
159 }
160 eina_stringshare_del(name);
161 }
162
163 printf("\nNetwork devices!\n");
164 type = eeze_udev_find_by_type(EEZE_UDEV_TYPE_NET, NULL);
165 type = eeze_udev_find_unlisted_similar(type);
166 EINA_LIST_FREE(type, name)
167 {
168 printf("Found device: %s\n", name); /* get a property using the device's syspath */
169 if ((check = eeze_udev_syspath_get_property(name, "INTERFACE")))
170 {
171 printf("\tYou probably know it better as %s\n", check);
172 eina_stringshare_del(check);
173 }
174 eina_stringshare_del(name);
175 }
176
177 printf("\nInternal drives, anyone? With serial numbers?\n");
178 /* find all internal drives using type EEZE_UDEV_TYPE_DRIVE_INTERNAL */
179 type = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_INTERNAL, NULL);
180 type = eeze_udev_find_unlisted_similar(type);
181 EINA_LIST_FREE(type, name) /* get a property using the device's syspath */
182 {
183 if ((check = eeze_udev_syspath_get_property(name, "ID_SERIAL")))
184 {
185 printf("%s: %s\n", name, check);
186 eina_stringshare_del(check);
187 }
188 eina_stringshare_del(name);
189 }
190
191 printf("\nGot any removables? I'm gonna find em!\n");
192 /* find all removable media using type EEZE_UDEV_TYPE_DRIVE_REMOVABLE */
193 type = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_REMOVABLE, NULL);
194 type = eeze_udev_find_unlisted_similar(type);
195 EINA_LIST_FREE(type, name) /* get a property using the device's syspath */
196 {
197 if ((check = eeze_udev_syspath_get_sysattr(name, "model")))
198 {
199 check2 = eeze_udev_syspath_get_subsystem(name);
200 printf("\tOoh, a %s attached to the %s subsytem!\n", check, check2);
201 eina_stringshare_del(check);
202 eina_stringshare_del(check2);
203 }
204 eina_stringshare_del(name);
205 }
206
207 printf("\nGot any v4l device ?\n");
208 /* find all V4L device, may be a webcam or anything that can get a video
209 * stream from the real worl in a numerical form */
210 type = eeze_udev_find_by_type(EEZE_UDEV_TYPE_V4L, NULL);
211 type = eeze_udev_find_unlisted_similar(type);
212 EINA_LIST_FREE(type, name) /* get a device name using the device's syspath */
213 {
214 if ((check = eeze_udev_syspath_get_property(name, "DEVNAME")))
215 {
216 if ((check2 = eeze_udev_syspath_get_sysattr(name, "name")))
217 {
218 printf("%s: '%s' [%s]\n", name, check2, check);
219 eina_stringshare_del(check2);
220 }
221 eina_stringshare_del(check);
222 }
223 eina_stringshare_del(name);
224 }
225
226 /* set a udev watch, grab all events because no EEZE_UDEV_TYPE filter is specified,
227 * set the events to be sent to callback function catch_events(), and attach
228 * kbdmouse to the watch as associated data
229 */
230 eeze_udev_watch_add(EEZE_UDEV_TYPE_NONE, (EEZE_UDEV_EVENT_ADD | EEZE_UDEV_EVENT_REMOVE), catch_events, akbdmouse);
231 printf("\nAnd now for something more complicated. Plug or unplug your keyboard or mouse for me.\n");
232
233 /* main loop must be started to use ecore fd polling */
234 ecore_main_loop_begin();
235
236 return 0;
237}
238
diff --git a/src/bin/eeze_umount.c b/src/bin/eeze_umount.c
deleted file mode 100644
index 75d5ebb..0000000
--- a/src/bin/eeze_umount.c
+++ /dev/null
@@ -1,113 +0,0 @@
1#include <Eeze.h>
2#include <Eeze_Disk.h>
3#include <Ecore.h>
4#include <Ecore_File.h>
5#include <Ecore_Getopt.h>
6#include <stdio.h>
7
8/** This app can be used as a "dumb" replacement for unmount. Just don't try anything fancy yet! */
9static const Ecore_Getopt opts =
10{
11 "eeze_unmount",
12 "eeze_unmount /dev/sdb1 /media/disk",
13 "1.0",
14 "(C) 2010 Mike Blumenkrantz",
15 "LGPL",
16 "unmount a disk using either its /sys/ path or its /dev/ path\n\n",
17 1,
18 {
19 ECORE_GETOPT_STORE_TRUE('v', "verbose", "Enable debug output"),
20 ECORE_GETOPT_VERSION('V', "version"),
21 ECORE_GETOPT_COPYRIGHT('R', "copyright"),
22 ECORE_GETOPT_LICENSE('L', "license"),
23 ECORE_GETOPT_HELP('h', "help"),
24 ECORE_GETOPT_SENTINEL
25 }
26};
27
28void
29_unmount_cb(void *data, int type, Eeze_Event_Disk_Unmount *e)
30{
31 (void)data;
32 (void)type;
33 printf("Success!\n");
34 eeze_disk_free(e->disk);
35 ecore_main_loop_quit();
36}
37
38void
39_error_cb(void *data, int type, Eeze_Event_Disk_Error *de)
40{
41 (void)data;
42 (void)type;
43 printf("Could not unmount disk with /dev/ path: %s!\n", eeze_disk_devpath_get(de->disk));
44 eeze_disk_free(de->disk);
45 ecore_main_loop_quit();
46}
47
48int
49main(int argc, char *argv[])
50{
51 int args;
52 const char *dev;
53 Eina_Bool verbose = EINA_FALSE, exit_option = EINA_FALSE;
54 Eeze_Disk *disk;
55
56 Ecore_Getopt_Value values[] =
57 {
58 ECORE_GETOPT_VALUE_BOOL(verbose),
59 ECORE_GETOPT_VALUE_BOOL(exit_option),
60 ECORE_GETOPT_VALUE_BOOL(exit_option),
61 ECORE_GETOPT_VALUE_BOOL(exit_option),
62 ECORE_GETOPT_VALUE_BOOL(exit_option)
63 };
64
65 if (argc < 2)
66 {
67 printf("Insufficient args specified!\n");
68 ecore_getopt_help(stderr, &opts);
69 exit(1);
70 }
71
72 ecore_init();
73 eeze_init();
74 ecore_app_args_set(argc, (const char **)argv);
75 args = ecore_getopt_parse(&opts, values, argc, argv);
76
77 if (exit_option)
78 return 0;
79
80 if (args < 0)
81 {
82 printf("No args specified!\n");
83 ecore_getopt_help(stderr, &opts);
84 exit(1);
85 }
86 if (verbose) eina_log_domain_level_set("eeze_disk", EINA_LOG_LEVEL_DBG);
87 dev = argv[args];
88 if ((!strncmp(dev, "/sys/", 5)) || (!strncmp(dev, "/dev/", 5)))
89 disk = eeze_disk_new(dev);
90 else if ((args == argc - 1) && (ecore_file_is_dir(dev)))
91 disk = eeze_disk_new_from_mount(dev);
92 else
93 {
94 printf("[Device] must be either a /dev/ path or a /sys/ path!\n");
95 ecore_getopt_help(stderr, &opts);
96 exit(1);
97 }
98 if (!eeze_disk_mounted_get(disk))
99 {
100 printf("[%s] is already unmounted!", dev);
101 exit(1);
102 }
103 ecore_event_handler_add(EEZE_EVENT_DISK_UNMOUNT, (Ecore_Event_Handler_Cb)_unmount_cb, NULL);
104 ecore_event_handler_add(EEZE_EVENT_DISK_ERROR, (Ecore_Event_Handler_Cb)_error_cb, NULL);
105 if (!eeze_disk_unmount(disk))
106 {
107 printf("unmount operation could not be started!\n");
108 exit(1);
109 }
110 ecore_main_loop_begin();
111
112 return 0;
113}
diff --git a/src/lib/Eeze.h b/src/lib/Eeze.h
deleted file mode 100644
index 9103493..0000000
--- a/src/lib/Eeze.h
+++ /dev/null
@@ -1,561 +0,0 @@
1/**
2 @brief Eeze Device Library
3 *
4 @mainpage Eeze
5 @image html eeze.png
6 @version 1.7.0
7 @author Mike Blumenkrantz (zmike/discomfitor) <michael.blumenkrantz@@gmail.com>
8 @date 2010-2012
9
10 @section intro What is Eeze?
11
12 Eeze is a library for manipulating devices through udev with a simple and fast
13 api. It interfaces directly with libudev, avoiding such middleman daemons as
14 udisks/upower or hal, to immediately gather device information the instant it
15 becomes known to the system. This can be used to determine such things as:
16 @li If a cdrom has a disk inserted
17 @li The temperature of a cpu core
18 @li The remaining power left in a battery
19 @li The current power consumption of various parts
20 @li Monitor in realtime the status of peripheral devices
21
22 Each of the above examples can be performed by using only a single eeze
23 function, as one of the primary focuses of the library is to reduce the
24 complexity of managing devices.
25
26 @li @link Eeze.h Eeze functions @endlink
27 @li @ref udev UDEV functions
28 @li @ref watch Functions that watch for events
29 @li @ref syspath Functions that accept a device /sys/ path
30 @li @ref find Functions which find types of devices
31 @li @ref disk Disk functions
32 @li @ref net Net functions
33 @li @ref sensor Sensor functions
34 @verbatim
35 Pants
36 @endverbatim
37 */
38#ifndef EEZE_UDEV_H
39#define EEZE_UDEV_H
40
41#include <Eina.h>
42
43#ifdef EAPI
44# undef EAPI
45#endif
46
47#ifdef __GNUC__
48# if __GNUC__ >= 4
49# define EAPI __attribute__ ((visibility("default")))
50# else
51# define EAPI
52# endif
53#else
54# define EAPI
55#endif
56
57/**
58 * @file Eeze.h
59 * @brief Easy device manipulation.
60 *
61 * Eeze is a library for manipulating devices through udev with a simple and fast
62 * api. It interfaces directly with libudev, avoiding such middleman daemons as
63 * udisks/upower or hal, to immediately gather device information the instant it
64 * becomes known to the system. This can be used to determine such things as:
65 * @li If a cdrom has a disk inserted
66 * @li The temperature of a cpu core
67 * @li The remaining power left in a battery
68 * @li The current power consumption of various parts
69 * @li Monitor in realtime the status of peripheral devices
70 * Each of the above examples can be performed by using only a single eeze
71 * function, as one of the primary focuses of the library is to reduce the
72 * complexity of managing devices.
73 *
74 *
75 * For udev functions, see @ref udev.
76 */
77
78/**
79 * @defgroup main main
80 *
81 * These are general eeze functions which include init and shutdown.
82 */
83
84/**
85 * @defgroup udev udev
86 *
87 * These are functions which interact directly with udev.
88 */
89
90/**
91 * @addtogroup udev
92 *
93 * These are the device subsystems of udev:
94 * @li ac97
95 * @li acpi
96 * @li bdi
97 * @li block
98 * @li bsg
99 * @li dmi
100 * @li graphics
101 * @li hid
102 * @li hwmon
103 * @li i2c
104 * @li input
105 * @li mem
106 * @li misc
107 * @li net
108 * @li pci
109 * @li pci_bus
110 * @li pci_express
111 * @li platform
112 * @li pnp
113 * @li rtc
114 * @li scsi
115 * @li scsi_device
116 * @li scsi_disk
117 * @li scsi_generic
118 * @li scsi_host
119 * @li serio
120 * @li sound
121 * @li thermal
122 * @li tty
123 * @li usb
124 * @li usb_device
125 * @li vc
126 * @li vtconsole
127 *
128 * These are the devtypes of udev.
129 * @li atapi
130 * @li audio
131 * @li block
132 * @li cd
133 * @li char
134 * @li disk
135 * @li floppy
136 * @li generic
137 * @li hid
138 * @li hub
139 * @li media
140 * @li optical
141 * @li printer
142 * @li rbc
143 * @li scsi
144 * @li storage
145 * @li tape
146 * @li video
147 */
148#ifdef __cplusplus
149extern "C" {
150#endif
151
152/**
153 * @addtogroup udev
154 * @typedef Eeze_Udev_Event
155 * @enum Eeze_Udev_Event
156 * @brief Flags for watch events
157 *
158 * These events are used to specify the events to watch in a
159 * #Eeze_Udev_Watch. They can be ORed together.
160 *@{
161 */
162typedef enum
163{
164 /** - No event specified */
165 EEZE_UDEV_EVENT_NONE = 0xf0,
166 /** - Device added */
167 EEZE_UDEV_EVENT_ADD = (1 << 1),
168 /** - Device removed */
169 EEZE_UDEV_EVENT_REMOVE = (1 << 2),
170 /** - Device changed */
171 EEZE_UDEV_EVENT_CHANGE = (1 << 3),
172 /** - Device has come online */
173 EEZE_UDEV_EVENT_ONLINE = (1 << 4),
174 /** - Device has gone offline */
175 EEZE_UDEV_EVENT_OFFLINE = (1 << 5)
176} Eeze_Udev_Event;
177/** @} */
178
179/**
180 * @addtogroup udev udev
181 * @typedef Eeze_Udev_Type Eeze_Udev_Type
182 * @enum Eeze_Udev_Type
183 * @brief Convenience types to simplify udev access.
184 *
185 * These types allow easy access to certain udev device types. They
186 * may only be used in specified functions.
187 *
188 * @{
189 */
190/*FIXME: these probably need to be bitmasks with categories*/
191typedef enum
192{
193 /** - No type */
194 EEZE_UDEV_TYPE_NONE,
195 /** - Keyboard device */
196 EEZE_UDEV_TYPE_KEYBOARD,
197 /** - Mouse device */
198 EEZE_UDEV_TYPE_MOUSE,
199 /** - Touchpad device */
200 EEZE_UDEV_TYPE_TOUCHPAD,
201 /** - Mountable drive */
202 EEZE_UDEV_TYPE_DRIVE_MOUNTABLE,
203 /** - Internal drive */
204 EEZE_UDEV_TYPE_DRIVE_INTERNAL,
205 /** - Removable drive */
206 EEZE_UDEV_TYPE_DRIVE_REMOVABLE,
207 /** - cd drive */
208 EEZE_UDEV_TYPE_DRIVE_CDROM,
209 /** - AC adapter */
210 EEZE_UDEV_TYPE_POWER_AC,
211 /** - Battery */
212 EEZE_UDEV_TYPE_POWER_BAT,
213 /** - Temperature sensor */
214 EEZE_UDEV_TYPE_IS_IT_HOT_OR_IS_IT_COLD_SENSOR,
215 /** - Network devices */
216 EEZE_UDEV_TYPE_NET,
217 /** - WebCam */
218 EEZE_UDEV_TYPE_V4L,
219 /** - Bluetooth */
220 EEZE_UDEV_TYPE_BLUETOOTH,
221 /** - Joystick
222 * @since 1.7
223 */
224 EEZE_UDEV_TYPE_JOYSTICK
225} Eeze_Udev_Type;
226/**@}*/
227
228struct Eeze_Udev_Watch;
229
230/**
231 * @addtogroup watch
232 * @typedef Eeze_Udev_Watch Eeze_Udev_Watch
233 * @brief Opaque structure to hold data for a udev watch
234 */
235typedef struct Eeze_Udev_Watch Eeze_Udev_Watch;
236
237#define EEZE_VERSION_MAJOR 1
238#define EEZE_VERSION_MINOR 8
239
240 typedef struct _Eeze_Version
241 {
242 int major;
243 int minor;
244 int micro;
245 int revision;
246 } Eeze_Version;
247
248 EAPI extern Eeze_Version *eeze_version;
249
250/**
251 * @addtogroup watch
252 * @typedef Eeze_Udev_Watch_Cb Eeze_Udev_Watch_Cb
253 * @brief Callback type for use with #Eeze_Udev_Watch
254 */
255typedef void(*Eeze_Udev_Watch_Cb)(const char *, Eeze_Udev_Event, void *, Eeze_Udev_Watch *);
256
257
258/**
259 * Initialize the eeze library.
260 * @return The number of times the function has been called, or -1 on failure.
261 *
262 * This function should be called prior to using any eeze functions, and MUST
263 * be called prior to using any udev functions to avoid a segv.
264 *
265 * @ingroup main
266 */
267EAPI int eeze_init(void);
268
269/**
270 * Shut down the eeze library.
271 * @return The number of times the eeze_init has been called, or -1 when
272 * all occurrences of eeze have been shut down.
273 *
274 * This function should be called when no further eeze functions will be called.
275 *
276 * @ingroup main
277 */
278EAPI int eeze_shutdown(void);
279
280 /**
281 * @addtogroup find Find
282 *
283 * These are functions which find/supplement lists of devices.
284 *
285 * @ingroup udev
286 *
287 * @{
288 */
289
290/**
291 * Returns a stringshared list of all syspaths that are (or should be) the same
292 * device as the device pointed at by @p syspath.
293 *
294 * @param syspath The syspath of the device to find matches for
295 * @return All devices which are the same as the one passed
296 */
297EAPI Eina_List *eeze_udev_find_similar_from_syspath(const char *syspath);
298
299/**
300 * Updates a list of all syspaths that are (or should be) the same
301 * device.
302 *
303 * @param list The list of devices to update
304 * @return The updated list
305 *
306 * This function will update @p list to include all devices matching
307 * devices with syspaths currently stored in @p list. All strings are
308 * stringshared.
309 *
310 * @note This is an expensive call, do not use it unless you must.
311 */
312EAPI Eina_List *eeze_udev_find_unlisted_similar(Eina_List *list);
313
314/**
315 * Find a list of devices by a sysattr (and, optionally, a value of that sysattr).
316 *
317 * @param sysattr The attribute to find
318 * @param value Optional: the value that the attribute should have
319 *
320 * @return A stringshared list of the devices found with the attribute
321 *
322 * @ingroup find
323 */
324EAPI Eina_List *eeze_udev_find_by_sysattr(const char *sysattr, const char *value);
325
326/**
327 * Find devices using an #Eeze_Udev_Type and/or a name.
328 *
329 * @param type An #Eeze_Udev_Type or 0
330 * @param name A filter for the device name or @c NULL
331 * @return A stringshared Eina_List of matched devices or @c NULL on failure
332 *
333 * Return a list of syspaths (/sys/$syspath) for matching udev devices.
334 */
335EAPI Eina_List *eeze_udev_find_by_type(Eeze_Udev_Type type, const char *name);
336
337/**
338 * A more advanced find, allows finds using udev properties.
339 *
340 * @param subsystem The udev subsystem to filter by, or @c NULL
341 * @param type "ID_INPUT_KEY", "ID_INPUT_MOUSE", "ID_INPUT_TOUCHPAD", @c NULL, etc
342 * @param name A filter for the device name, or @c NULL
343 * @return A stringshared Eina_List* of matched devices or @c NULL on failure
344 *
345 * Return a list of syspaths (/sys/$syspath) for matching udev devices.
346 * Requires at least one filter.
347 */
348EAPI Eina_List *eeze_udev_find_by_filter(const char *subsystem, const char *type, const char *name);
349 /**
350 * @}
351 */
352
353 /**
354 * @addtogroup syspath Syspath
355 *
356 * These are functions which interact with the syspath (/sys/$PATH) of
357 * a device.
358 *
359 * @ingroup udev
360 *
361 * @{
362 */
363
364/**
365 * Get the syspath of a device from the /dev/ path.
366 *
367 * @param devpath The /dev/ path of the device
368 * @return A stringshared char* which corresponds to the /sys/ path of the device or @c NULL on failure
369 *
370 * Takes "/dev/path" and returns the corresponding /sys/ path (without the "/sys/")
371 */
372EAPI const char *eeze_udev_devpath_get_syspath(const char *devpath);
373
374/**
375 * Find the root device of a device from its syspath.
376 *
377 * @param syspath The syspath of a device, with or without "/sys/"
378 * @return The syspath of the parent device
379 *
380 * Return a stringshared syspath (/sys/$syspath) for the parent device.
381 */
382EAPI const char *eeze_udev_syspath_get_parent(const char *syspath);
383
384/**
385 * Returns a list of all parent device syspaths for @p syspath.
386 *
387 * @param syspath The device to find parents of
388 * @return A stringshared list of the parent devices of @p syspath
389 */
390EAPI Eina_List *eeze_udev_syspath_get_parents(const char *syspath);
391