efl: merge eeze.

Changes also in this commit:
 * fix missing EAPI in symbols used by modules
 * removed old libudev and libmount support as agreed by discomfitor/zmike
 * replaced __UNUSED__ with EINA_UNUSED
 * fixed docs hierarchy



SVN revision: 82100
devs/devilhorns/wayland_egl
Gustavo Sverzut Barbieri 10 years ago
parent f7cc32f78b
commit 68188ac0c8
  1. 9
      AUTHORS
  2. 1
      ChangeLog
  3. 7
      Makefile.am
  4. 1
      NEWS
  5. 96
      configure.ac
  6. 3
      doc/Doxyfile.in
  7. 10
      doc/main.dox
  8. 13
      m4/efl.m4
  9. 0
      old/ChangeLog.eeze
  10. 0
      old/NEWS.eeze
  11. 0
      old/README.eeze
  12. 3
      pc/eeze.pc.in
  13. 5
      src/Makefile.am
  14. 166
      src/Makefile_Eeze.am
  15. 0
      src/bin/eeze/eeze_disk_ls.c
  16. 0
      src/bin/eeze/eeze_mount.c
  17. 14
      src/bin/eeze/eeze_scanner.c
  18. 0
      src/bin/eeze/eeze_scanner.h
  19. 0
      src/bin/eeze/eeze_sensor_test.c
  20. 0
      src/bin/eeze/eeze_udev_test.c
  21. 0
      src/bin/eeze/eeze_umount.c
  22. 142
      src/lib/eeze/Eeze.h
  23. 6
      src/lib/eeze/Eeze_Disk.h
  24. 5
      src/lib/eeze/Eeze_Net.h
  25. 9
      src/lib/eeze/Eeze_Sensor.h
  26. 13
      src/lib/eeze/eeze_disk.c
  27. 6
      src/lib/eeze/eeze_disk_libmount.c
  28. 8
      src/lib/eeze/eeze_disk_libmount_new.c
  29. 8
      src/lib/eeze/eeze_disk_mount.c
  30. 0
      src/lib/eeze/eeze_disk_private.h
  31. 0
      src/lib/eeze/eeze_disk_udev.c
  32. 2
      src/lib/eeze/eeze_main.c
  33. 4
      src/lib/eeze/eeze_net.c
  34. 0
      src/lib/eeze/eeze_net_private.h
  35. 2
      src/lib/eeze/eeze_sensor.c
  36. 4
      src/lib/eeze/eeze_sensor_private.h
  37. 0
      src/lib/eeze/eeze_udev_find.c
  38. 0
      src/lib/eeze/eeze_udev_private.c
  39. 0
      src/lib/eeze/eeze_udev_private.h
  40. 0
      src/lib/eeze/eeze_udev_syspath.c
  41. 0
      src/lib/eeze/eeze_udev_walk.c
  42. 0
      src/lib/eeze/eeze_udev_watch.c
  43. 0
      src/modules/eeze/eeze_sensor_fake.c
  44. 0
      src/modules/eeze/eeze_sensor_tizen.c
  45. 4
      src/tests/eeze/eeze_suite.c

@ -226,3 +226,12 @@ Nathan 'RbdPngn' Ingersoll
Nicholas 'Mekius' Hughart
Albin "Lutin" Tonnerre <albin.tonnerre@gmail.com>
Mathieu Taillefumier <mathieu.taillefumier@free.fr>
Eeze
----
Mike Blumenkrantz (zmike/discomfitor) <michael.blumenkrantz@gmail.com>
Cedric Bail <cedric@efl.so>
Mikael Sans <sans.mikael@gmail.com>
Christophe Dumez <christophe.dumez@intel.com>
Stefan Schmidt <stefan@datenfreihafen.org>

@ -1,6 +1,7 @@
2013-01-03 Gustavo Sverzut Barbieri (k-s)
* Add eina_alloc.h to Eina.h to define alloca()
* Eeze: deprecated support for udev<148 and libmount<2.18
2013-01-03 Cedric Bail

@ -98,7 +98,8 @@ pc/eio.pc \
pc/edbus2.pc \
pc/efreet.pc \
pc/efreet-mime.pc \
pc/efreet-trash.pc
pc/efreet-trash.pc \
pc/eeze.pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
@ -208,6 +209,10 @@ if HAVE_ECORE_X
pkgconfig_DATA += pc/ecore-x.pc
endif
if HAVE_EEZE
pkgconfig_DATA += pc/eeze.pc
endif
# D-Bus services:

@ -58,6 +58,7 @@ Deprecations:
ecore_x_e_window_profile_list_set()
ecore_x_e_window_profile_list_get()
* ecore_evas: deprecate DirectFB, XRender, WinCE, X11-16 and X11-8.
* eeze: deprecate libudev<148 and libmount<2.18
Removed:
* directfb support: ecore_directfb and evas directfb engine.

@ -3125,6 +3125,99 @@ EFL_INTERNAL_DEPEND_PKG([EFREET], [eina])
EFL_LIB_END([Efreet])
#### End of Efreet
#### Eeze
EFL_LIB_START_OPTIONAL([Eeze], [test "${have_linux}" = "yes"])
### Additional options to configure
AC_ARG_ENABLE([tizen],
[AC_HELP_STRING([--enable-tizen],
[enable tizen support. @<:@default=disabled@:>@])],
[
if test "x${enableval}" = "xyes" ; then
want_tizen="yes"
else
want_tizen="no"
fi
],
[want_tizen="no"])
AC_ARG_ENABLE([mount],
[AC_HELP_STRING([--disable-mount],
[disable mount support (libmount). @<:@default=enabled@:>@])],
[
if test "x${enableval}" = "xyes" ; then
want_mount="yes"
else
want_mount="no"
fi
],
[want_mount="yes"])
AC_ARG_WITH([mount],
[AS_HELP_STRING([--with-mount], [specify mount bin @<:@default=detect@:>@])],
[with_eeze_mount=$withval], [with_eeze_mount="detect"])
AC_ARG_WITH([umount],
[AS_HELP_STRING([--with-umount], [specify umount bin @<:@default=detect@:>@])],
[with_eeze_umount=$withval], [with_eeze_umount="detect"])
AC_ARG_WITH([eject],
[AS_HELP_STRING([--with-eject], [specify eject bin @<:@default=detect@:>@])],
[with_eeze_eject=$withval], [with_eeze_eject="detect"])
### Default values
### Checks for programs
### Checks for libraries
EFL_INTERNAL_DEPEND_PKG([EEZE], [eina])
EFL_INTERNAL_DEPEND_PKG([EEZE], [ecore])
EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EEZE], [${want_mount}], [ecore-file])
EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EEZE], [${want_mount}], [ecore-con])
EFL_OPTIONAL_INTERNAL_DEPEND_PKG([EEZE], [${wantx_mount}], [eet])
EFL_DEPEND_PKG([EEZE], [UDEV], [libudev >= 148])
EFL_OPTIONAL_DEPEND_PKG([EEZE], [${want_mount}], [EEZE_MOUNT], [mount >= 2.19.0])
## modules
if test "${want_tizen}" = "yes"; then
PKG_CHECK_MODULES([TIZEN_SENSOR], [capi-system-sensor])
fi
EFL_EVAL_PKGS([EEZE])
AM_CONDITIONAL([HAVE_EEZE_MOUNT], [test "${want_mount}" = "yes"])
AM_CONDITIONAL([HAVE_EEZE_TIZEN], [test "${want_tizen}" = "yes"])
### Checks for header files
### Checks for types
### Checks for structures
### Checks for compiler characteristics
### Checks for linker characteristics
### Checks for library functions
### Checks for binaries
if test "x$with_eeze_mount" = "xdetect"; then
AC_PATH_PROG([with_eeze_mount], [mount], [])
fi
AC_DEFINE_UNQUOTED([EEZE_MOUNT_BIN], ["$with_eeze_mount"], [mount bin to use])
if test "x$with_eeze_umount" = "xdetect";then
AC_PATH_PROG([with_eeze_umount], [umount], [])
fi
AC_DEFINE_UNQUOTED([EEZE_UNMOUNT_BIN], ["$with_eeze_umount"], [umount bin to use])
if test "x$with_eeze_eject" = "xdetect";then
AC_PATH_PROG([with_eeze_eject], [eject], [])
fi
AC_DEFINE_UNQUOTED([EEZE_EJECT_BIN], ["$with_eeze_eject"], [eject bin to use])
EFL_LIB_END_OPTIONAL([Eeze])
#### End of Eeze
AC_CONFIG_FILES([
Makefile
data/Makefile
@ -3187,6 +3280,7 @@ pc/edbus2.pc
pc/efreet.pc
pc/efreet-mime.pc
pc/efreet-trash.pc
pc/eeze.pc
dbus-services/org.enlightenment.Efreet.service
$po_makefile_in
])
@ -3390,6 +3484,8 @@ echo " Ecore_Evas...................: $have_ecore_evas"
echo " Extn (Plug/socket Extn)....: $have_ecore_evas_extn"
#fi
echo
echo "Eeze...................: ${efl_lib_optional_eeze} (tizen: ${want_tizen})"
echo "Tests..................: ${build_tests}"
echo "Examples...............: make examples"

@ -807,7 +807,8 @@ eet_ _eet_ Eet_ _Eet_ EET_ _EET_ \
ecore_ _ecore_ Ecore_ _Ecore_ ECORE_ _ECORE_ \
eio_ _eio_ Eio_ _Eio_ EIO_ _EIO_ \
edbus_ _edbus_ EDBus_ _EDBus_ EDBUS_ _EDBUS_ \
efreet_ _efreet_ Efreet_ _Efreet_ EFREET_ _EFREET_
efreet_ _efreet_ Efreet_ _Efreet_ EFREET_ _EFREET_ \
eeze_ _eeze_ Eeze_ _Eeze_ EEZE_ _EEZE_
#---------------------------------------------------------------------------

@ -18,6 +18,7 @@
* @li @ref eio_main asynchronous input/output
* @li @ref edbus_main d-bus integration.
* @li @ref efreet_main freedesktop.org (xdg) menu and desktop integration.
* @li @ref eeze_main hardware device manipulation and notification.
*
*/
@ -39,6 +40,7 @@
* @author Cedric Bail <cedric.bail@@free.fr>
* @author Chidambar Zinnoury <illogict@@online.fr>
* @author Chris Ross <chris@@darkrock.co.uk>
* @author Christophe Dumez <christophe.dumez@@intel.com>
* @author Christopher 'devilhorns' Michael <cpmichael1@comcast.net>
* @author ChunEon Park <hermet@@hermet.pe.kr>
* @author Corey "atmos" Donohoe <atmos@@atmos.org>
@ -74,6 +76,7 @@
* @author Mathieu Taillefumier <mathieu.taillefumier@@free.fr>
* @author Matt Barclay <mbarclay@@gmail.com>
* @author Michael 'Mickey' Lauer <mickey@@tm.informatik.uni-frankfurt.de>
* @author Mikael Sans <sans.mikael@@gmail.com>
* @author Mike Blumenkrantz <michael.blumenkrantz@@gmail.com>
* @author Mike McCormack <mj.mccormack@@samsung.com>
* @author Myoungwoon Roy Kim(roy_kim) <myoungwoon.kim@@samsung.com> <myoungwoon@@gmail.com>
@ -183,3 +186,10 @@
*
* @brief FreeDesktop.Org (XDG) menu and desktop integration.
*/
/**
* @defgroup Eeze
*
* @brief Hardware device manipulation and notification, wraps UDev and similar.
*/

@ -105,6 +105,19 @@ m4_pushdef([DOWN], m4_translit([$3], [-A-Z], [_a-z]))dnl
m4_popdef([DOWN])
])
dnl EFL_OPTIONAL_INTERNAL_DEPEND_PKG(EFL, VARIABLE, NAME)
AC_DEFUN([EFL_OPTIONAL_INTERNAL_DEPEND_PKG],
[
m4_pushdef([DOWN], m4_translit([$3], [-A-Z], [_a-z]))dnl
have_[]m4_defn([DOWN])="no"
if test "x$2" = "xyes"; then
EFL_INTERNAL_DEPEND_PKG([$1], [$3])
fi
m4_popdef([DOWN])
])
dnl EFL_ADD_LIBS(PKG, LIBS)
dnl Add libraries that the EFL library will depend on
dnl See EFL_DEPEND_PKG() for pkg-config version.

@ -5,7 +5,8 @@ includedir=@includedir@
Name: eeze
Description: device convenience library for efl
@pkgconfig_requires_private@: @requirement_eeze@
Requires.private: @requirements_pc_eeze@
Version: @VERSION@
Libs: -L${libdir} -leeze
Cflags: -I${includedir}/eeze-@VMAJ@
Libs: -L${libdir} -leet

@ -61,6 +61,9 @@ include Makefile_Embryo.am
include Makefile_Eio.am
include Makefile_EDBus.am
include Makefile_Efreet.am
if HAVE_EEZE
include Makefile_Eeze.am
endif
.PHONY: benchmark examples
@ -78,6 +81,7 @@ install-examples:
clean-local:
rm -rf bin/eet/*.gcno
rm -rf bin/efreet/*.gcno
rm -rf bin/eeze/*.gcno
rm -rf lib/evil/*.gcno
rm -rf lib/eina/*.gcno
rm -rf lib/eo/*.gcno
@ -94,6 +98,7 @@ clean-local:
rm -rf lib/embryo/*.gcno
rm -rf lib/edbus/*.gcno
rm -rf lib/efreet/*.gcno
rm -rf lib/eeze/*.gcno
rm -rf modules/eina/mp/pass_through/*.gcno
rm -rf modules/eina/mp/one_big/*.gcno
rm -rf modules/eina/mp/chained_pool/*.gcno

@ -0,0 +1,166 @@
### Library
lib_LTLIBRARIES += \
lib/eeze/libeeze.la
EEZE_COMMON_CPPFLAGS = \
-I$(top_srcdir)/src/lib/eina \
-I$(top_builddir)/src/lib/eina \
-I$(top_srcdir)/src/lib/eco \
-I$(top_builddir)/src/lib/eo \
-I$(top_srcdir)/src/lib/ecore \
-I$(top_builddir)/src/lib/ecore \
-I$(top_srcdir)/src/lib/ecore_file \
-I$(top_builddir)/src/lib/ecore_file \
-I$(top_srcdir)/src/lib/ecore_con \
-I$(top_builddir)/src/lib/ecore_con \
-I$(top_srcdir)/src/lib/eet \
-I$(top_builddir)/src/lib/eet \
-I$(top_srcdir)/src/lib/eeze \
-I$(top_builddir)/src/lib/eeze \
@EFL_COV_CFLAGS@ \
@EEZE_CFLAGS@
EEZE_COMMON_LDADD = \
lib/eina/libeina.la \
lib/eo/libeo.la \
lib/ecore/libecore.la \
@EFL_COV_LIBS@
installed_eezemainheadersdir = $(includedir)/eeze-@VMAJ@
dist_installed_eezemainheaders_DATA = \
lib/eeze/Eeze.h \
lib/eeze/Eeze_Net.h \
lib/eeze/Eeze_Sensor.h
# libeeze.la
lib_eeze_libeeze_la_SOURCES = \
lib/eeze/eeze_main.c \
lib/eeze/eeze_net.c \
lib/eeze/eeze_net_private.h \
lib/eeze/eeze_udev_find.c \
lib/eeze/eeze_udev_private.h \
lib/eeze/eeze_udev_private.c \
lib/eeze/eeze_udev_syspath.c \
lib/eeze/eeze_udev_walk.c \
lib/eeze/eeze_udev_watch.c \
lib/eeze/eeze_sensor_private.h \
lib/eeze/eeze_sensor.c
if HAVE_EEZE_MOUNT
dist_installed_eezemainheaders_DATA += lib/eeze/Eeze_Disk.h
lib_eeze_libeeze_la_SOURCES += \
lib/eeze/eeze_disk.c \
lib/eeze/eeze_disk_udev.c \
lib/eeze/eeze_disk_mount.c \
lib/eeze/eeze_disk_private.h \
lib/eeze/eeze_disk_libmount_new.c
EEZE_COMMON_LDADD += \
lib/ecore_file/libecore_file.la \
lib/ecore_con/libecore_con.la \
lib/eet/libeet.la
endif
EEZE_COMMON_LIBADD = $(EEZE_COMMON_LDADD) @EEZE_LIBS@
EEZE_COMMON_LDADD += @EEZE_LDFLAGS@
EEZE_COMMON_USER_LIBADD = $(EEZE_COMMON_LIBADD) lib/eeze/libeeze.la
EEZE_COMMON_USER_LDADD = $(EEZE_COMMON_LDADD) lib/eeze/libeeze.la
lib_eeze_libeeze_la_CPPFLAGS = \
$(EEZE_COMMON_CPPFLAGS) \
-DPACKAGE_BUILD_DIR=\"`pwd`/$(top_builddir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DEFL_EEZE_BUILD
lib_eeze_libeeze_la_LIBADD = $(EEZE_COMMON_LIBADD)
lib_eeze_libeeze_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
eezemodulesensordir = $(libdir)/eeze/sensor
eezemodulesensor_LTLIBRARIES =
if HAVE_EEZE_TIZEN
eezemodulesensor_LTLIBRARIES += \
modules/eeze/eeze-sensor-tizen.la
modules_eeze_eeze_sensor_tizen_la_SOURCES = \
modules/eeze/eeze_sensor_tizen.c
modules_eeze_eeze_sensor_tizen_la_CPPFLAGS = \
$(EEZE_COMMON_CPPFLAGS) \
@TIZEN_SENSOR_CFLAGS@
modules_eeze_eeze_sensor_tizen_la_LIBADD = \
$(EEZE_COMMON_USER_LIBADD) \
@TIZEN_SENSOR_LIBS@
modules_eeze_eeze_sensor_tizen_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_eeze_eeze_sensor_tizen_la_LIBTOOLFLAGS = --tag=disable-static
else
eezemodulesensor_LTLIBRARIES += \
modules/eeze/eeze-sensor-fake.la
modules_eeze_eeze_sensor_fake_la_SOURCES = \
modules/eeze/eeze_sensor_fake.c
modules_eeze_eeze_sensor_fake_la_CPPFLAGS = $(EEZE_COMMON_CPPFLAGS)
modules_eeze_eeze_sensor_fake_la_LIBADD = $(EEZE_COMMON_USER_LIBADD)
modules_eeze_eeze_sensor_fake_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
modules_eeze_eeze_sensor_fake_la_LIBTOOLFLAGS = --tag=disable-static
endif
### Binary
noinst_PROGRAMS += \
bin/eeze/eeze_udev_test \
bin/eeze/eeze_sensor_test
bin_eeze_eeze_udev_test_SOURCES = bin/eeze/eeze_udev_test.c
bin_eeze_eeze_udev_test_CPPFLAGS = $(EEZE_COMMON_CPPFLAGS)
bin_eeze_eeze_udev_test_LDADD = $(EEZE_COMMON_USER_LDADD)
bin_eeze_eeze_sensor_test_SOURCES = bin/eeze/eeze_sensor_test.c
bin_eeze_eeze_sensor_test_CPPFLAGS = $(EEZE_COMMON_CPPFLAGS)
bin_eeze_eeze_sensor_test_LDADD = $(EEZE_COMMON_USER_LDADD)
if HAVE_EEZE_MOUNT
bin_PROGRAMS += \
bin/eeze/eeze_mount \
bin/eeze/eeze_umount \
bin/eeze/eeze_disk_ls \
bin/eeze/eeze_scanner
bin_eeze_eeze_mount_SOURCES = bin/eeze/eeze_mount.c
bin_eeze_eeze_mount_CPPFLAGS = $(EEZE_COMMON_CPPFLAGS)
bin_eeze_eeze_mount_LDADD = $(EEZE_COMMON_USER_LDADD)
bin_eeze_eeze_umount_SOURCES = bin/eeze/eeze_umount.c
bin_eeze_eeze_umount_CPPFLAGS = $(EEZE_COMMON_CPPFLAGS)
bin_eeze_eeze_umount_LDADD = $(EEZE_COMMON_USER_LDADD)
bin_eeze_eeze_disk_ls_SOURCES = bin/eeze/eeze_disk_ls.c
bin_eeze_eeze_disk_ls_CPPFLAGS = $(EEZE_COMMON_CPPFLAGS)
bin_eeze_eeze_disk_ls_LDADD = $(EEZE_COMMON_USER_LDADD)
bin_eeze_eeze_scanner_SOURCES = \
bin/eeze/eeze_scanner.c \
bin/eeze/eeze_scanner.h
bin_eeze_eeze_scanner_CPPFLAGS = $(EEZE_COMMON_CPPFLAGS)
bin_eeze_eeze_scanner_LDADD = $(EEZE_COMMON_USER_LDADD)
endif
setuid_root_mode = a=rx,u+xs
install-data-hook::
@chmod $(setuid_root_mode) $(DESTDIR)$(bindir)/eeze_scanner$(EXEEXT) || true
### Unit tests
if EFL_ENABLE_TESTS
check_PROGRAMS += tests/eeze/eeze_suite
tests_eeze_eeze_suite_SOURCES = tests/eeze/eeze_suite.c
tests_eeze_eeze_suite_CPPFLAGS = \
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/eeze\" \
$(EEZE_COMMON_CPPFLAGS) \
@CHECK_CFLAGS@
tests_eeze_eeze_suite_LDADD = $(EEZE_COMMON_USER_LDADD) @CHECK_LIBS@
endif

@ -61,7 +61,7 @@ event_write(const void *data, size_t size, Ecore_Con_Client *cl)
}
static Eina_Bool
disk_mount(void *data __UNUSED__, int type __UNUSED__, Eeze_Disk *disk)
disk_mount(void *data EINA_UNUSED, int type EINA_UNUSED, Eeze_Disk *disk)
{
Eina_List *l;
Eeze_Scanner_Device *d;
@ -79,7 +79,7 @@ disk_mount(void *data __UNUSED__, int type __UNUSED__, Eeze_Disk *disk)
}
static void
cl_setup(Ecore_Con_Client *cl __UNUSED__, Eet_Connection *ec)
cl_setup(Ecore_Con_Client *cl EINA_UNUSED, Eet_Connection *ec)
{
Eina_List *l;
Eeze_Scanner_Device *dev;
@ -118,13 +118,13 @@ cl_setup(Ecore_Con_Client *cl __UNUSED__, Eet_Connection *ec)
}
static Eina_Bool
es_read(const void *eet_data __UNUSED__, size_t size __UNUSED__, void *user_data __UNUSED__)
es_read(const void *eet_data EINA_UNUSED, size_t size EINA_UNUSED, void *user_data EINA_UNUSED)
{
return EINA_TRUE;
}
static Eina_Bool
cl_add(void *data __UNUSED__, int type __UNUSED__, Ecore_Con_Event_Client_Add *ev)
cl_add(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Client_Add *ev)
{
Eet_Connection *ec;
INF("Added client");
@ -143,7 +143,7 @@ cl_add(void *data __UNUSED__, int type __UNUSED__, Ecore_Con_Event_Client_Add *e
}
static Eina_Bool
cl_del(void *data __UNUSED__, int type __UNUSED__, Ecore_Con_Event_Client_Del *ev)
cl_del(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Con_Event_Client_Del *ev)
{
Eet_Connection *ec;
Eina_Bool d;
@ -288,7 +288,7 @@ storage_setup(void)
}
static void
cb_vol_chg(const char *device, Eeze_Udev_Event ev, void *data __UNUSED__, Eeze_Udev_Watch *watch __UNUSED__)
cb_vol_chg(const char *device, Eeze_Udev_Event ev, void *data EINA_UNUSED, Eeze_Udev_Watch *watch EINA_UNUSED)
{
Eina_List *l;
Eeze_Scanner_Device *dev;
@ -331,7 +331,7 @@ cb_vol_chg(const char *device, Eeze_Udev_Event ev, void *data __UNUSED__, Eeze_U
}
static void
cb_stor_chg(const char *device, Eeze_Udev_Event ev, void *data __UNUSED__, Eeze_Udev_Watch *watch __UNUSED__)
cb_stor_chg(const char *device, Eeze_Udev_Event ev, void *data EINA_UNUSED, Eeze_Udev_Watch *watch EINA_UNUSED)
{
Eina_List *l;
Eeze_Scanner_Device *dev = NULL;

@ -1,39 +1,73 @@
/**
@brief Eeze Device Library
*
@mainpage Eeze
@image html eeze.png
@version 1.7.0
@author Mike Blumenkrantz (zmike/discomfitor) <michael.blumenkrantz@@gmail.com>
@date 2010-2012
@section intro What is Eeze?
Eeze is a library for manipulating devices through udev with a simple and fast
api. It interfaces directly with libudev, avoiding such middleman daemons as
udisks/upower or hal, to immediately gather device information the instant it
becomes known to the system. This can be used to determine such things as:
@li If a cdrom has a disk inserted
@li The temperature of a cpu core
@li The remaining power left in a battery
@li The current power consumption of various parts
@li Monitor in realtime the status of peripheral devices
Each of the above examples can be performed by using only a single eeze
function, as one of the primary focuses of the library is to reduce the
complexity of managing devices.
@li @link Eeze.h Eeze functions @endlink
@li @ref udev UDEV functions
@li @ref watch Functions that watch for events
@li @ref syspath Functions that accept a device /sys/ path
@li @ref find Functions which find types of devices
@li @ref disk Disk functions
@li @ref net Net functions
@li @ref sensor Sensor functions
@verbatim
Pants
@endverbatim
@brief Eeze Device Library
@page eeze_main Eeze
@date 2010 (created)
@section toc Table of Contents
@li @ref eeze_main_intro
@li @ref eeze_main_compiling
@li @ref eeze_main_next_steps
@section eeze_main_intro Introduction
Eeze is a library for manipulating devices through udev with a
simple and fast api. It interfaces directly with libudev, avoiding
such middleman daemons as udisks/upower or hal, to immediately
gather device information the instant it becomes known to the
system. This can be used to determine such things as:
@li If a cdrom has a disk inserted
@li The temperature of a cpu core
@li The remaining power left in a battery
@li The current power consumption of various parts
@li Monitor in realtime the status of peripheral devices
Each of the above examples can be performed by using only a single eeze
function, as one of the primary focuses of the library is to reduce the
complexity of managing devices.
@section eeze_main_compiling How to compile
Eeze is a library your application links to. The procedure for this is very
simple. You simply have to compile your application with the appropriate
compiler flags that the @p pkg-config script outputs. For example:
Compiling C or C++ files into object files:
@verbatim
gcc -c -o main.o main.c `pkg-config --cflags eeze`
@endverbatim
Linking object files into a binary executable:
@verbatim
gcc -o my_application main.o `pkg-config --libs eeze`
@endverbatim
See @ref pkgconfig
@section eeze_main_next_steps Next Steps
After you understood what Eeze is and installed it in your system
you should proceed understanding the programming interface. We'd
recommend you to take a while to learn @ref Eina and @ref Ecore as
they convenient and Eeze provides integration with it.
Recommended reading:
@li @link Eeze.h Eeze functions @endlink
@li @ref Eeze_Udev UDEV functions
@li @ref Eeze_Watch Functions that watch for events
@li @ref Eeze_Syspath Functions that accept a device /sys/ path
@li @ref Eeze_Find Functions which find types of devices
@li @ref Eeze_Disk Disk functions
@li @ref Eeze_Net Net functions
@li @ref Eeze_Sensor Sensor functions
*/
#ifndef EEZE_UDEV_H
#define EEZE_UDEV_H
@ -76,19 +110,21 @@
*/
/**
* @defgroup main main
* @defgroup Eeze_Main main
* @ingroup Eeze
*
* These are general eeze functions which include init and shutdown.
*/
/**
* @defgroup udev udev
* @defgroup Eeze_Udev udev
* @ingroup Eeze_Main
*
* These are functions which interact directly with udev.
*/
/**
* @addtogroup udev
* @addtogroup Eeze_Udev
*
* These are the device subsystems of udev:
* @li ac97
@ -150,7 +186,7 @@ extern "C" {
#endif
/**
* @addtogroup udev
* @addtogroup Eeze_Udev
* @typedef Eeze_Udev_Event
* @enum Eeze_Udev_Event
* @brief Flags for watch events
@ -177,7 +213,7 @@ typedef enum
/** @} */
/**
* @addtogroup udev udev
* @addtogroup Eeze_Udev udev
* @typedef Eeze_Udev_Type Eeze_Udev_Type
* @enum Eeze_Udev_Type
* @brief Convenience types to simplify udev access.
@ -228,7 +264,7 @@ typedef enum
struct Eeze_Udev_Watch;
/**
* @addtogroup watch
* @addtogroup Eeze_Watch
* @typedef Eeze_Udev_Watch Eeze_Udev_Watch
* @brief Opaque structure to hold data for a udev watch
*/
@ -248,7 +284,7 @@ typedef struct Eeze_Udev_Watch Eeze_Udev_Watch;
EAPI extern Eeze_Version *eeze_version;
/**
* @addtogroup watch
* @addtogroup Eeze_Watch
* @typedef Eeze_Udev_Watch_Cb Eeze_Udev_Watch_Cb
* @brief Callback type for use with #Eeze_Udev_Watch
*/
@ -262,7 +298,7 @@ typedef void(*Eeze_Udev_Watch_Cb)(const char *, Eeze_Udev_Event, void *, Eeze_Ud
* This function should be called prior to using any eeze functions, and MUST
* be called prior to using any udev functions to avoid a segv.
*
* @ingroup main
* @ingroup Eeze_Main
*/
EAPI int eeze_init(void);
@ -273,16 +309,16 @@ EAPI int eeze_init(void);
*
* This function should be called when no further eeze functions will be called.
*
* @ingroup main
* @ingroup Eeze_Main
*/
EAPI int eeze_shutdown(void);
/**
* @addtogroup find Find
* @addtogroup Eeze_Find Find
*
* These are functions which find/supplement lists of devices.
*
* @ingroup udev
* @ingroup Eeze_Udev
*
* @{
*/
@ -319,7 +355,7 @@ EAPI Eina_List *eeze_udev_find_unlisted_similar(Eina_List *list);
*
* @return A stringshared list of the devices found with the attribute
*
* @ingroup find
* @ingroup Eeze_Find
*/
EAPI Eina_List *eeze_udev_find_by_sysattr(const char *sysattr, const char *value);
@ -351,12 +387,12 @@ EAPI Eina_List *eeze_udev_find_by_filter(const char *subsystem, const char
*/
/**
* @addtogroup syspath Syspath
* @addtogroup Eeze_Syspath Syspath
*
* These are functions which interact with the syspath (/sys/$PATH) of
* a device.
*
* @ingroup udev
* @ingroup Eeze_Udev
*
* @{
*/
@ -475,11 +511,11 @@ EAPI Eina_Bool eeze_udev_syspath_is_joystick(const char *syspath);
*/
/**
* @addtogroup walks Walks
* @addtogroup Eeze_Walks Walks
*
* These are functions which walk up the device chain.
*
* @ingroup udev
* @ingroup Eeze_Udev
*
* @{
*/
@ -511,7 +547,7 @@ EAPI const char *eeze_udev_walk_get_sysattr(const char *syspath, const char
*/
/**
* @addtogroup watch Watch
* @addtogroup Eeze_Watch Watch
*
* @brief These are functions which monitor udev for events.
*
@ -520,7 +556,7 @@ EAPI const char *eeze_udev_walk_get_sysattr(const char *syspath, const char
* syspath of the triggering device and the event that happened to the device, along with the data you associated with the watch and
* the watch object itself in case you want to stop the watch easily in a callback.
*
* @ingroup udev
* @ingroup Eeze_Udev
*
* @{
*/

@ -26,7 +26,11 @@
* Eeze disk functions allow you to quickly and efficiently manipulate disks
* through simple function calls.
*
* @addtogroup disk Disk
* @defgroup Eeze_Disk Disk
* Scan and query information about disks. Manipulate them with moun,
* unmount and eject.
*
* @ingroup Eeze
* @{
*/

@ -24,7 +24,10 @@
*
* Eeze net functions allow you to gather information about network objects
*
* @addtogroup net Net
* @defgroup Eeze_Net Net
* Gather information about network devices.
*
* @ingroup Eeze
* @{
*/

@ -43,7 +43,11 @@
*
* @since 1.8
*
* @addtogroup sensor Sensor
* @addtogroup Eeze_Sensor Sensor
* Gather sensor information from different sources. Works based on plugins,
* with a Tizen plugin being available.
*
* @ingroup Eeze
* @{
*/
@ -78,8 +82,9 @@ typedef enum
} Eeze_Sensor_Type;
/**
* @defgroup Sensor_Events Available eeze sensor events
* @defgroup Eeze_Sensor_Events Available eeze sensor events
* @brief Sensor events that are emitted from the library as ecore events
* @ingroup Eeze
*
* Event types used to register ecore_event_handler on. These events are used
* for #eeze_sensor_async_read to deliver read out data. It is also used for

@ -5,6 +5,7 @@
#include <Ecore.h>
#include <Eeze.h>
#include <Eeze_Disk.h>
#include <unistd.h>
#include "eeze_udev_private.h"
#include "eeze_disk_private.h"
@ -460,17 +461,23 @@ eeze_disk_removable_get(Eeze_Disk *disk)
EAPI Eina_Bool
eeze_disk_can_mount(void)
{
return MOUNTABLE;
if (sizeof(EEZE_MOUNT_BIN) == sizeof(""))
return EINA_FALSE;
return access(EEZE_MOUNT_BIN, X_OK | R_OK) == 0;
}
EAPI Eina_Bool
eeze_disk_can_unmount(void)
{
return UNMOUNTABLE;
if (sizeof(EEZE_UNMOUNT_BIN) == sizeof(""))
return EINA_FALSE;
return access(EEZE_UNMOUNT_BIN, X_OK | R_OK) == 0;
}
EAPI Eina_Bool
eeze_disk_can_eject(void)
{
return EJECTABLE;
if (sizeof(EEZE_EJECT_BIN) == sizeof(""))
return EINA_FALSE;
return access(EEZE_EJECT_BIN, X_OK | R_OK) == 0;
}

@ -50,7 +50,7 @@ static libmnt_lock *_eeze_mtab_lock = NULL;
extern Eina_List *_eeze_disks;
static libmnt_table *_eeze_mount_tab_parse(const char *filename);
static void _eeze_mount_tab_watcher(void *data, Ecore_File_Monitor *mon __UNUSED__, Ecore_File_Event event __UNUSED__, const char *path);
static void _eeze_mount_tab_watcher(void *data, Ecore_File_Monitor *mon EINA_UNUSED, Ecore_File_Event event EINA_UNUSED, const char *path);
static Eina_Bool
_eeze_mount_lock_mtab(void)
@ -80,7 +80,7 @@ _eeze_mount_unlock_mtab(void)
static int
_eeze_mount_tab_parse_errcb(libmnt_table *tab __UNUSED__, const char *filename, int line)
_eeze_mount_tab_parse_errcb(libmnt_table *tab EINA_UNUSED, const char *filename, int line)
{
ERR("%s:%d: could not parse line!", filename, line); /* most worthless error reporting ever. */
return -1;
@ -111,7 +111,7 @@ _eeze_mount_tab_parse(const char *filename)
}
static void
_eeze_mount_tab_watcher(void *data, Ecore_File_Monitor *mon __UNUSED__, Ecore_File_Event event __UNUSED__, const char *path)
_eeze_mount_tab_watcher(void *data, Ecore_File_Monitor *mon EINA_UNUSED, Ecore_File_Event event EINA_UNUSED, const char *path)
{
libmnt_table *bak;

@ -51,10 +51,10 @@ static Ecore_Fd_Handler *_mountinfo_fdh = NULL;
static int _mountinfo = -1;
static libmnt_table *_eeze_mount_tab_parse(const char *filename);
static void _eeze_mount_tab_watcher(void *data, Ecore_File_Monitor *mon __UNUSED__, Ecore_File_Event event __UNUSED__, const char *path);
static void _eeze_mount_tab_watcher(void *data, Ecore_File_Monitor *mon EINA_UNUSED, Ecore_File_Event event EINA_UNUSED, const char *path);
static int
_eeze_mount_tab_parse_errcb(libmnt_table *tab __UNUSED__, const char *filename, int line)
_eeze_mount_tab_parse_errcb(libmnt_table *tab EINA_UNUSED, const char *filename, int line)
{
ERR("%s:%d: could not parse line!", filename, line); /* most worthless error reporting ever. */
return -1;
@ -85,7 +85,7 @@ _eeze_mount_tab_parse(const char *filename)
}
static void
_eeze_mount_tab_watcher(void *data, Ecore_File_Monitor *mon __UNUSED__, Ecore_File_Event event __UNUSED__, const char *path)
_eeze_mount_tab_watcher(void *data, Ecore_File_Monitor *mon EINA_UNUSED, Ecore_File_Event event EINA_UNUSED, const char *path)
{
libmnt_table *bak;
@ -125,7 +125,7 @@ error:
* based on code from findmnt
*/
static Eina_Bool
_eeze_mount_fdh(void *d __UNUSED__, Ecore_Fd_Handler *fdh __UNUSED__)
_eeze_mount_fdh(void *d EINA_UNUSED, Ecore_Fd_Handler *fdh EINA_UNUSED)
{
libmnt_table *tb_new;
libmnt_fs *old, *new;

@ -30,7 +30,7 @@ Eina_List *eeze_events = NULL;
*/
static void
_eeze_disk_mount_error_free(void *data __UNUSED__, Eeze_Event_Disk_Error *de)
_eeze_disk_mount_error_free(void *data EINA_UNUSED, Eeze_Event_Disk_Error *de)
{
if (!de)
return;
@ -55,7 +55,7 @@ _eeze_disk_mount_error_handler(Eeze_Disk *disk, const char *error)
}
static Eina_Bool
_eeze_disk_mount_result_handler(void *data __UNUSED__, int type __UNUSED__, Ecore_Exe_Event_Del *ev)
_eeze_disk_mount_result_handler(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_Exe_Event_Del *ev)
{
Eeze_Disk *disk;
Eina_List *l;
@ -221,10 +221,6 @@ EAPI unsigned long
eeze_disk_mountopts_get(Eeze_Disk *disk)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(disk, 0);
#ifndef OLD_LIBMOUNT
if (!disk->mount_opts)
disk->mount_opts = eeze_disk_libmount_opts_get(disk);
#endif
return disk->mount_opts;
}

@ -14,7 +14,7 @@ _udev *udev;
int _eeze_udev_log_dom = -1;
int _eeze_net_log_dom = -1;
int _eeze_sensor_log_dom = -1;
EAPI int _eeze_sensor_log_dom = -1;
int _eeze_init_count = 0;
static Eeze_Version _version = { VMAJ, VMIN, VMIC, VREV };

@ -27,7 +27,9 @@ eeze_net_shutdown(void)
eeze_nets = NULL;
}
/** @addtogroup net Net
/**
* @addtogroup Eeze_Net Net
* @ingroup Eeze
* @{
*/

@ -80,7 +80,7 @@ eeze_sensor_modules_load(void)
if (getenv("EEZE_USE_IN_TREE_MODULES"))
g_handle->modules_array = eina_module_list_get(NULL, PACKAGE_BUILD_DIR "/src/modules/.libs/", 0, NULL, NULL);
else
g_handle->modules_array = eina_module_list_get(NULL, PACKAGE_LIB_DIR "/eeze-sensor/", 0, NULL, NULL);
g_handle->modules_array = eina_module_list_get(NULL, PACKAGE_LIB_DIR "/eeze/sensor/", 0, NULL, NULL);
if (!g_handle->modules_array)
{

@ -74,7 +74,7 @@ typedef struct _Eeze_Sensor_Module
*
* @since 1.8
*/
Eina_Bool eeze_sensor_module_register(const char *name, Eeze_Sensor_Module *mod);
EAPI Eina_Bool eeze_sensor_module_register(const char *name, Eeze_Sensor_Module *mod);
/**
* @brief Unregister a module from eeze_sensor core.
@ -85,5 +85,5 @@ Eina_Bool eeze_sensor_module_register(const char *name, Eeze_Sensor_Module *mod)
*
* @since 1.8
*/
Eina_Bool eeze_sensor_module_unregister(const char *name);
EAPI Eina_Bool eeze_sensor_module_unregister(const char *name);
#endif // EEZE_SENSOR_PRIVATE_H

@ -628,7 +628,7 @@ eeze_suite(void)
TCase *tc;
s = suite_create("Eeze");
#if 0
tc = tcase_create("Eeze_Init");
tcase_add_test(tc, eeze_test_init);
suite_add_tcase(s, tc);
@ -651,7 +651,7 @@ eeze_suite(void)
//tcase_add_test(tc, eeze_test_net_attr_ipv6);
#endif
suite_add_tcase(s, tc);
#endif
tc = tcase_create("Eeze Sensor");
tcase_add_test(tc, eeze_test_sensor_read);
tcase_add_test(tc, eeze_test_sensor_async_read);
Loading…
Cancel
Save