* add the (empty) structure for a future eeze support

SVN revision: 67513
This commit is contained in:
Davide Andreoli 2012-01-24 20:59:11 +00:00
parent 6ef3bd8307
commit 58d52b9d24
5 changed files with 98 additions and 4 deletions

View File

@ -60,7 +60,7 @@ AC_MSG_CHECKING([Which edje_cc to use])
AC_MSG_RESULT(${EDJE_CC})
# check for udisks
# check for udisks (default enabled)
PKG_CHECK_MODULES([E_UDISKS], [dbus-1 edbus eukit >= 1.0.999],
[have_udisks="yes"], [have_udisks="no"])
want_udisks=yes
@ -74,6 +74,20 @@ fi
AM_CONDITIONAL([HAVE_UDISKS], [test "x$have_udisks" = "xyes"])
test "x$have_udisks" = "xyes" && AC_DEFINE_UNQUOTED([HAVE_UDISKS], [1], [enable Udisks support])
# check for eeze (default disabled)
PKG_CHECK_MODULES([EEZE], [eeze >= 1.1.99],
[have_eeze="yes"], [have_eeze="no"])
want_eeze=no
AC_ARG_ENABLE([eeze],
AS_HELP_STRING([--enable-eeze],[enable eeze support @<:@default=disabled@:>@]),
[want_eeze=$enableval])
if test "x$want_eeze" != "xyes";then
have_eeze=no
fi
AM_CONDITIONAL([HAVE_EEZE], [test "x$have_eeze" = "xyes"])
test "x$have_eeze" = "xyes" && AC_DEFINE_UNQUOTED([HAVE_EEZE], [1], [enable eeze support])
# homedir install
datadir=$(pkg-config --variable=modules enlightenment)/${PACKAGE}
@ -110,5 +124,6 @@ echo
cat << DEVICE_EOF
Device Backends:
* build udisks....: $have_udisks
* build eeze......: $have_eeze (TO BE DONE)
DEVICE_EOF
echo

View File

@ -3,7 +3,7 @@ MAINTAINERCLEANFILES = Makefile.in
INCLUDES = -I. \
-I$(top_srcdir) \
-I$(includedir) \
@E_CFLAGS@ @E_UDISKS_CFLAGS@ -Wall
@E_CFLAGS@ @E_UDISKS_CFLAGS@ @EEZE_CFLAGS@ -Wall
pkgdir = $(datadir)/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la
@ -13,9 +13,11 @@ module_la_SOURCES = e_mod_main.h \
e_mod_places.h \
e_mod_places.c \
e_mod_udisks.h \
e_mod_udisks.c
e_mod_udisks.c \
e_mod_eeze.h \
e_mod_eeze.c
module_la_LIBADD = @E_LIBS@ @E_UDISKS_LIBS@
module_la_LIBADD = @E_LIBS@ @E_UDISKS_LIBS@ @EEZE_LIBS@
module_la_LDFLAGS = -module -avoid-version -Wall
module_la_DEPENDENCIES = $(top_builddir)/config.h

60
src/e_mod_eeze.c Normal file
View File

@ -0,0 +1,60 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_EEZE
#include <e.h>
#include "e_mod_places.h"
#include <Eeze.h>
// #include <Eeze_Disk.h>
/* Local Function Prototypes */
/* Local Variables */
/* Implementation */
Eina_Bool
places_eeze_init(void)
{
printf("PLACES: eeze: init()\n");
if (!eeze_init() /*|| !eeze_disk_function()*/)
{
printf("Impossible to setup eeze.\n");
return EINA_FALSE;
}
/*
Eina_List *disks;
const char *syspath;
disks = eeze_udev_find_by_type(EEZE_UDEV_TYPE_DRIVE_MOUNTABLE, NULL);
printf("Found the following mountable disks:\n");
EINA_LIST_FREE(disks, syspath)
{
Eeze_Disk *disk;
disk = eeze_disk_new(syspath);
printf("\t%s - %s:%s\n", syspath, eeze_disk_devpath_get(disk), eeze_disk_mount_point_get(disk));
eeze_disk_free(disk);
eina_stringshare_del(syspath);
}
*/
return EINA_TRUE;
}
void
places_eeze_shutdown(void)
{
eeze_shutdown();
}
/* Internals */
#endif

8
src/e_mod_eeze.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef E_MOD_PLACES_EEZE_H
#define E_MOD_PLACES_EEZE_H
void places_eeze_init(void);
void places_eeze_shutdown(void);
#endif

View File

@ -8,6 +8,9 @@
#ifdef HAVE_UDISKS
# include "e_mod_udisks.h"
#endif
#ifdef HAVE_EEZE
# include "e_mod_eeze.h"
#endif
/* Local Function Prototypes */
static Eina_Bool _places_poller(void *data);
@ -38,6 +41,9 @@ places_init(void)
#ifdef HAVE_UDISKS
places_udisks_init();
#endif
#ifdef HAVE_EEZE
places_eeze_init();
#endif
snprintf(theme_file, PATH_MAX, "%s/e-module-places.edj",
places_conf->module->dir);
@ -52,6 +58,9 @@ places_shutdown(void)
#ifdef HAVE_UDISKS
places_udisks_shutdown();
#endif
#ifdef HAVE_EEZE
places_eeze_shutdown();
#endif
while (volumes)
places_volume_del((Volume*)volumes->data);