eeze: add a dummy implementation for when libmount is not available.

This implementation doesn't replace libmount, it just provide an empty
piece of code that will always fail to do anything. It does simplify
Eeze building and use by third party by always providing the API.
This commit is contained in:
Cedric Bail 2013-03-10 14:35:41 +09:00
parent ae08c6e721
commit 12ceb717ea
4 changed files with 93 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2013-03-10 Cedric Bail
* Eeze: add a dummy implementation of libmount when it is not available.
2013-03-08 Igor Murzov
* Add WebP image saver.

1
NEWS
View File

@ -71,6 +71,7 @@ Additions:
* Edje textblock: Added support for size_range.
* Ecore_x: Add atom related with indicator type.
* Ecore_x: Add manual render code before deiconify
* Eeze: Add a dummy libmount replacement for when libmount is not there.
Deprecations:
* ecore_x:

View File

@ -9,7 +9,8 @@ installed_eezemainheadersdir = $(includedir)/eeze-@VMAJ@
dist_installed_eezemainheaders_DATA = \
lib/eeze/Eeze.h \
lib/eeze/Eeze_Net.h \
lib/eeze/Eeze_Sensor.h
lib/eeze/Eeze_Sensor.h \
lib/eeze/Eeze_Disk.h
# libeeze.la
lib_eeze_libeeze_la_SOURCES = \
@ -23,15 +24,13 @@ lib/eeze/eeze_udev_private.c \
lib/eeze/eeze_udev_private.h \
lib/eeze/eeze_udev_syspath.c \
lib/eeze/eeze_udev_walk.c \
lib/eeze/eeze_udev_watch.c
if HAVE_EEZE_MOUNT
lib_eeze_libeeze_la_SOURCES += \
lib/eeze/eeze_udev_watch.c \
lib/eeze/eeze_disk.c \
lib/eeze/eeze_disk_udev.c \
lib/eeze/eeze_disk_mount.c \
lib/eeze/eeze_disk_private.h
dist_installed_eezemainheaders_DATA += lib/eeze/Eeze_Disk.h
if HAVE_EEZE_MOUNT
if EEZE_LIBMOUNT_BEFORE_219
lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_libmount_old.c
else
@ -41,6 +40,8 @@ else
lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_libmount.c
endif
endif
else
lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_dummy.c
endif
lib_eeze_libeeze_la_CPPFLAGS = \

View File

@ -0,0 +1,81 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <Eeze.h>
#include <Eeze_Disk.h>
#include "eeze_udev_private.h"
#include "eeze_disk_private.h"
Eina_Bool
eeze_libmount_init(void)
{
return EINA_TRUE;
}
void
eeze_libmount_shutdown(void)
{
}
unsigned long
eeze_disk_libmount_opts_get(Eeze_Disk *disk EINA_UNUSED)
{
return 0;
}
Eina_Bool
eeze_disk_libmount_mounted_get(Eeze_Disk *disk EINA_UNUSED)
{
return EINA_FALSE;
}
const char *
eeze_disk_libmount_mp_find_source(const char *mount_point EINA_UNUSED)
{
return NULL;
}
const char *
eeze_disk_libmount_mp_lookup_by_uuid(const char *uuid EINA_UNUSED)
{
return NULL;
}
const char *
eeze_disk_libmount_mp_lookup_by_label(const char *label EINA_UNUSED)
{
return NULL;
}
const char *
eeze_disk_libmount_mp_lookup_by_devpath(const char *devpath EINA_UNUSED)
{
return NULL;
}
EAPI Eina_Bool
eeze_mount_tabs_watch(void)
{
ERR("Dummy backend no watching code provided !");
return EINA_FALSE;
}
EAPI void
eeze_mount_tabs_unwatch(void)
{
}
EAPI Eina_Bool
eeze_mount_mtab_scan(void)
{
return EINA_FALSE;
}
EAPI Eina_Bool
eeze_mount_fstab_scan(void)
{
return EINA_FALSE;
}