summaryrefslogtreecommitdiffstats
path: root/lib/efl
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-01-04 17:05:36 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-01-04 17:05:36 +0100
commitb6f8457cbbe9d3790f6e8c434a6701e76fdff7c3 (patch)
tree3914434b96fcf244100dd08e40df4f1e04fac2fc /lib/efl
parente56d5f280463e5ef6775b4b6d1414809f0e9de36 (diff)
downloadffi-efl-b6f8457cbbe9d3790f6e8c434a6701e76fdff7c3.zip
ffi-efl-b6f8457cbbe9d3790f6e8c434a6701e76fdff7c3.tar.gz
generate eeze,eeze_disk,eeze_net bindings
Diffstat (limited to 'lib/efl')
-rw-r--r--lib/efl/native/eeze.rb103
-rw-r--r--lib/efl/native/eeze_disk.rb142
-rw-r--r--lib/efl/native/eeze_net.rb60
3 files changed, 305 insertions, 0 deletions
diff --git a/lib/efl/native/eeze.rb b/lib/efl/native/eeze.rb
new file mode 100644
index 0000000..5431de4
--- /dev/null
+++ b/lib/efl/native/eeze.rb
@@ -0,0 +1,103 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+require 'efl/native/eina_list'
+#
+module Efl
+ #
+ module Eeze
+ #
+ FCT_PREFIX = 'eeze_' unless const_defined? :FCT_PREFIX
+ #
+ def self.method_missing meth, *args, &block
+ sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX
+ self.send sym, *args, &block
+ end
+ #
+ end
+ #
+ module Native
+ #
+ ffi_lib 'eeze'
+ #
+ # ENUMS
+ # typedef enum {...} Eeze_Udev_Event;
+ enum :eeze_udev_event, [ :eeze_udev_event_none, 0xf0, :eeze_udev_event_add, (1<<1), :eeze_udev_event_remove, (1<<2), :eeze_udev_event_change,
+ (1<<3), :eeze_udev_event_online, (1<<4), :eeze_udev_event_offline, (1<<5) ]
+ # typedef enum {...} Eeze_Udev_Type;
+ enum :eeze_udev_type, [ :eeze_udev_type_none, :eeze_udev_type_keyboard, :eeze_udev_type_mouse, :eeze_udev_type_touchpad,
+ :eeze_udev_type_drive_mountable, :eeze_udev_type_drive_internal, :eeze_udev_type_drive_removable, :eeze_udev_type_drive_cdrom,
+ :eeze_udev_type_power_ac, :eeze_udev_type_power_bat, :eeze_udev_type_is_it_hot_or_is_it_cold_sensor, :eeze_udev_type_net, :eeze_udev_type_v4l,
+ :eeze_udev_type_bluetooth, :eeze_udev_type_joystick ]
+ #
+ # TYPEDEFS
+ # typedef struct Eeze_Udev_Watch Eeze_Udev_Watch;
+ typedef :pointer, :eeze_udev_watch
+ # typedef struct _Eeze_Version Eeze_Version;
+ typedef :pointer, :eeze_version
+ #
+ # CALLBACKS
+ # typedef void(*Eeze_Udev_Watch_Cb) (const char *, Eeze_Udev_Event, void *, Eeze_Udev_Watch *);
+ callback :eeze_udev_watch_cb, [ :string, :eeze_udev_event, :pointer, :eeze_udev_watch ], :void
+ #
+ # VARIABLES
+ # EAPI extern Eeze_Version *eeze_version;
+ attach_variable :eeze_version, :eeze_version
+ #
+ # FUNCTIONS
+ fcts = [
+ # EAPI int eeze_init(void);
+ [ :eeze_init, [ ], :int ],
+ # EAPI int eeze_shutdown(void);
+ [ :eeze_shutdown, [ ], :int ],
+ # EAPI Eina_List *eeze_udev_find_similar_from_syspath(const char *syspath);
+ [ :eeze_udev_find_similar_from_syspath, [ :string ], :eina_list ],
+ # EAPI Eina_List *eeze_udev_find_unlisted_similar(Eina_List *list);
+ [ :eeze_udev_find_unlisted_similar, [ :eina_list ], :eina_list ],
+ # EAPI Eina_List *eeze_udev_find_by_sysattr(const char *sysattr, const char *value);
+ [ :eeze_udev_find_by_sysattr, [ :string, :string ], :eina_list ],
+ # EAPI Eina_List *eeze_udev_find_by_type(Eeze_Udev_Type type, const char *name);
+ [ :eeze_udev_find_by_type, [ :eeze_udev_type, :string ], :eina_list ],
+ # EAPI Eina_List *eeze_udev_find_by_filter(const char *subsystem, const char *type, const char *name);
+ [ :eeze_udev_find_by_filter, [ :string, :string, :string ], :eina_list ],
+ # EAPI const char *eeze_udev_devpath_get_syspath(const char *devpath);
+ [ :eeze_udev_devpath_get_syspath, [ :string ], :string ],
+ # EAPI const char *eeze_udev_syspath_get_parent(const char *syspath);
+ [ :eeze_udev_syspath_get_parent, [ :string ], :string ],
+ # EAPI Eina_List *eeze_udev_syspath_get_parents(const char *syspath);
+ [ :eeze_udev_syspath_get_parents, [ :string ], :eina_list ],
+ # EAPI const char *eeze_udev_syspath_get_devpath(const char *syspath);
+ [ :eeze_udev_syspath_get_devpath, [ :string ], :string ],
+ # EAPI const char *eeze_udev_syspath_get_devname(const char *syspath);
+ [ :eeze_udev_syspath_get_devname, [ :string ], :string ],
+ # EAPI const char *eeze_udev_syspath_get_subsystem(const char *syspath);
+ [ :eeze_udev_syspath_get_subsystem, [ :string ], :string ],
+ # EAPI const char *eeze_udev_syspath_get_property(const char *syspath, const char *property);
+ [ :eeze_udev_syspath_get_property, [ :string, :string ], :string ],
+ # EAPI const char *eeze_udev_syspath_get_sysattr(const char *syspath, const char *sysattr);
+ [ :eeze_udev_syspath_get_sysattr, [ :string, :string ], :string ],
+ # EAPI Eina_Bool eeze_udev_syspath_is_mouse(const char *syspath);
+ [ :eeze_udev_syspath_is_mouse, [ :string ], :bool ],
+ # EAPI Eina_Bool eeze_udev_syspath_is_kbd(const char *syspath);
+ [ :eeze_udev_syspath_is_kbd, [ :string ], :bool ],
+ # EAPI Eina_Bool eeze_udev_syspath_is_touchpad(const char *syspath);
+ [ :eeze_udev_syspath_is_touchpad, [ :string ], :bool ],
+ # EAPI Eina_Bool eeze_udev_syspath_is_joystick(const char *syspath);
+ [ :eeze_udev_syspath_is_joystick, [ :string ], :bool ],
+ # EAPI Eina_Bool eeze_udev_walk_check_sysattr(const char *syspath, const char *sysattr, const char *value);
+ [ :eeze_udev_walk_check_sysattr, [ :string, :string, :string ], :bool ],
+ # EAPI const char *eeze_udev_walk_get_sysattr(const char *syspath, const char *sysattr);
+ [ :eeze_udev_walk_get_sysattr, [ :string, :string ], :string ],
+ # EAPI Eeze_Udev_Watch *eeze_udev_watch_add(Eeze_Udev_Type type, int event, Eeze_Udev_Watch_Cb cb, void *user_data);
+ [ :eeze_udev_watch_add, [ :eeze_udev_type, :int, :eeze_udev_watch_cb, :pointer ], :eeze_udev_watch ],
+ # EAPI void *eeze_udev_watch_del(Eeze_Udev_Watch *watch);
+ [ :eeze_udev_watch_del, [ :eeze_udev_watch ], :pointer ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/native/eeze_disk.rb b/lib/efl/native/eeze_disk.rb
new file mode 100644
index 0000000..64d8b01
--- /dev/null
+++ b/lib/efl/native/eeze_disk.rb
@@ -0,0 +1,142 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+#
+module Efl
+ #
+ module EezeDisk
+ #
+ FCT_PREFIX = 'eeze_disk_' unless const_defined? :FCT_PREFIX
+ #
+ def self.method_missing meth, *args, &block
+ sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX
+ self.send sym, *args, &block
+ end
+ #
+ end
+ #
+ module Native
+ #
+ ffi_lib 'eeze'
+ #
+ # ENUMS
+ # typedef enum {...} Eeze_Disk_Type;
+ enum :eeze_disk_type, [ :eeze_disk_type_unknown, 0, :eeze_disk_type_internal, (1<<0), :eeze_disk_type_cdrom, (1<<1), :eeze_disk_type_usb,
+ (1<<2), :eeze_disk_type_flash, (1<<3) ]
+ # typedef enum {...} Eeze_Mount_Opts;
+ enum :eeze_mount_opts, [ :eeze_disk_mountopt_loop, (1<<1), :eeze_disk_mountopt_utf8, (1<<2), :eeze_disk_mountopt_noexec, (1<<3),
+ :eeze_disk_mountopt_nosuid, (1<<4), :eeze_disk_mountopt_remount, (1<<5), :eeze_disk_mountopt_uid, (1<<6), :eeze_disk_mountopt_nodev, (1<<7) ]
+ #
+ # TYPEDEFS
+ # typedef struct _Eeze_Event_Disk Eeze_Event_Disk_Mount;
+ typedef :pointer, :eeze_event_disk_mount
+ # typedef struct _Eeze_Event_Disk Eeze_Event_Disk_Unmount;
+ typedef :pointer, :eeze_event_disk_unmount
+ # typedef struct _Eeze_Event_Disk Eeze_Event_Disk_Eject;
+ typedef :pointer, :eeze_event_disk_eject
+ # typedef struct _Eeze_Disk Eeze_Disk;
+ typedef :pointer, :eeze_disk
+ # typedef struct _Eeze_Event_Disk_Error Eeze_Event_Disk_Error;
+ typedef :pointer, :eeze_event_disk_error
+ #
+ # VARIABLES
+ # EAPI extern int EEZE_EVENT_DISK_MOUNT;
+ attach_variable :EEZE_EVENT_DISK_MOUNT, :int
+ # EAPI extern int EEZE_EVENT_DISK_UNMOUNT;
+ attach_variable :EEZE_EVENT_DISK_UNMOUNT, :int
+ # EAPI extern int EEZE_EVENT_DISK_EJECT;
+ attach_variable :EEZE_EVENT_DISK_EJECT, :int
+ # EAPI extern int EEZE_EVENT_DISK_ERROR;
+ attach_variable :EEZE_EVENT_DISK_ERROR, :int
+ #
+ # FUNCTIONS
+ fcts = [
+ # EAPI void eeze_disk_function(void);
+ [ :eeze_disk_function, [ ], :void ],
+ # EAPI Eina_Bool eeze_disk_can_mount(void);
+ [ :eeze_disk_can_mount, [ ], :bool ],
+ # EAPI Eina_Bool eeze_disk_can_unmount(void);
+ [ :eeze_disk_can_unmount, [ ], :bool ],
+ # EAPI Eina_Bool eeze_disk_can_eject(void);
+ [ :eeze_disk_can_eject, [ ], :bool ],
+ # EAPI Eeze_Disk *eeze_disk_new(const char *path);
+ [ :eeze_disk_new, [ :string ], :eeze_disk ],
+ # EAPI Eeze_Disk *eeze_disk_new_from_mount(const char *mount_point);
+ [ :eeze_disk_new_from_mount, [ :string ], :eeze_disk ],
+ # EAPI void eeze_disk_free(Eeze_Disk *disk);
+ [ :eeze_disk_free, [ :eeze_disk ], :void ],
+ # EAPI void eeze_disk_scan(Eeze_Disk *disk);
+ [ :eeze_disk_scan, [ :eeze_disk ], :void ],
+ # EAPI void eeze_disk_data_set(Eeze_Disk *disk, void *data);
+ [ :eeze_disk_data_set, [ :eeze_disk, :pointer ], :void ],
+ # EAPI void *eeze_disk_data_get(Eeze_Disk *disk);
+ [ :eeze_disk_data_get, [ :eeze_disk ], :pointer ],
+ # EAPI const char *eeze_disk_syspath_get(Eeze_Disk *disk);
+ [ :eeze_disk_syspath_get, [ :eeze_disk ], :string ],
+ # EAPI const char *eeze_disk_devpath_get(Eeze_Disk *disk);
+ [ :eeze_disk_devpath_get, [ :eeze_disk ], :string ],
+ # EAPI const char *eeze_disk_fstype_get(Eeze_Disk *disk);
+ [ :eeze_disk_fstype_get, [ :eeze_disk ], :string ],
+ # EAPI const char *eeze_disk_vendor_get(Eeze_Disk *disk);
+ [ :eeze_disk_vendor_get, [ :eeze_disk ], :string ],
+ # EAPI const char *eeze_disk_model_get(Eeze_Disk *disk);
+ [ :eeze_disk_model_get, [ :eeze_disk ], :string ],
+ # EAPI const char *eeze_disk_serial_get(Eeze_Disk *disk);
+ [ :eeze_disk_serial_get, [ :eeze_disk ], :string ],
+ # EAPI const char *eeze_disk_uuid_get(Eeze_Disk *disk);
+ [ :eeze_disk_uuid_get, [ :eeze_disk ], :string ],
+ # EAPI const char *eeze_disk_label_get(Eeze_Disk *disk);
+ [ :eeze_disk_label_get, [ :eeze_disk ], :string ],
+ # EAPI Eeze_Disk_Type eeze_disk_type_get(Eeze_Disk *disk);
+ [ :eeze_disk_type_get, [ :eeze_disk ], :eeze_disk_type ],
+ # EAPI Eina_Bool eeze_disk_removable_get(Eeze_Disk *disk);
+ [ :eeze_disk_removable_get, [ :eeze_disk ], :bool ],
+ # EAPI Eina_Bool eeze_disk_mounted_get(Eeze_Disk *disk);
+ [ :eeze_disk_mounted_get, [ :eeze_disk ], :bool ],
+ # EAPI const char *eeze_disk_mount_wrapper_get(Eeze_Disk *disk);
+ [ :eeze_disk_mount_wrapper_get, [ :eeze_disk ], :string ],
+ # EAPI Eina_Bool eeze_disk_mount_wrapper_set(Eeze_Disk *disk, const char *wrapper);
+ [ :eeze_disk_mount_wrapper_set, [ :eeze_disk, :string ], :bool ],
+ # EAPI Eina_Bool eeze_disk_mount(Eeze_Disk *disk);
+ [ :eeze_disk_mount, [ :eeze_disk ], :bool ],
+ # EAPI Eina_Bool eeze_disk_unmount(Eeze_Disk *disk);
+ [ :eeze_disk_unmount, [ :eeze_disk ], :bool ],
+ # EAPI Eina_Bool eeze_disk_eject(Eeze_Disk *disk);
+ [ :eeze_disk_eject, [ :eeze_disk ], :bool ],
+ # EAPI void eeze_disk_cancel(Eeze_Disk *disk);
+ [ :eeze_disk_cancel, [ :eeze_disk ], :void ],
+ # EAPI const char *eeze_disk_mount_point_get(Eeze_Disk *disk);
+ [ :eeze_disk_mount_point_get, [ :eeze_disk ], :string ],
+ # EAPI Eina_Bool eeze_disk_mount_point_set(Eeze_Disk *disk, const char *mount_point);
+ [ :eeze_disk_mount_point_set, [ :eeze_disk, :string ], :bool ],
+ # EAPI Eina_Bool eeze_disk_mountopts_set(Eeze_Disk *disk, unsigned long opts);
+ [ :eeze_disk_mountopts_set, [ :eeze_disk, :ulong ], :bool ],
+ # EAPI unsigned long eeze_disk_mountopts_get(Eeze_Disk *disk);
+ [ :eeze_disk_mountopts_get, [ :eeze_disk ], :ulong ],
+ # EAPI Eina_Bool eeze_mount_tabs_watch(void);
+ [ :eeze_mount_tabs_watch, [ ], :bool ],
+ # EAPI void eeze_mount_tabs_unwatch(void);
+ [ :eeze_mount_tabs_unwatch, [ ], :void ],
+ # EAPI Eina_Bool eeze_mount_mtab_scan(void);
+ [ :eeze_mount_mtab_scan, [ ], :bool ],
+ # EAPI Eina_Bool eeze_mount_fstab_scan(void);
+ [ :eeze_mount_fstab_scan, [ ], :bool ],
+ # EAPI const char *eeze_disk_udev_get_property(Eeze_Disk *disk, const char *property);
+ [ :eeze_disk_udev_get_property, [ :eeze_disk, :string ], :string ],
+ # EAPI const char *eeze_disk_udev_get_sysattr(Eeze_Disk *disk, const char *sysattr);
+ [ :eeze_disk_udev_get_sysattr, [ :eeze_disk, :string ], :string ],
+ # EAPI const char *eeze_disk_udev_get_parent(Eeze_Disk *disk);
+ [ :eeze_disk_udev_get_parent, [ :eeze_disk ], :string ],
+ # EAPI Eina_Bool eeze_disk_udev_walk_check_sysattr(Eeze_Disk *disk, const char *sysattr, const char *value);
+ [ :eeze_disk_udev_walk_check_sysattr, [ :eeze_disk, :string, :string ], :bool ],
+ # EAPI const char *eeze_disk_udev_walk_get_sysattr(Eeze_Disk *disk, const char *sysattr);
+ [ :eeze_disk_udev_walk_get_sysattr, [ :eeze_disk, :string ], :string ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/native/eeze_net.rb b/lib/efl/native/eeze_net.rb
new file mode 100644
index 0000000..0684198
--- /dev/null
+++ b/lib/efl/native/eeze_net.rb
@@ -0,0 +1,60 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+require 'efl/native/eina_list'
+#
+module Efl
+ #
+ module EezeNet
+ #
+ FCT_PREFIX = 'eeze_net_' unless const_defined? :FCT_PREFIX
+ #
+ def self.method_missing meth, *args, &block
+ sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX
+ self.send sym, *args, &block
+ end
+ #
+ end
+ #
+ module Native
+ #
+ ffi_lib 'eeze'
+ #
+ # ENUMS
+ # typedef enum {...} Eeze_Net_Addr_Type;
+ enum :eeze_net_addr_type, [ :eeze_net_addr_type_ip, :eeze_net_addr_type_ip6, :eeze_net_addr_type_broadcast, :eeze_net_addr_type_broadcast6,
+ :eeze_net_addr_type_netmask, :eeze_net_addr_type_netmask6 ]
+ #
+ # TYPEDEFS
+ # typedef struct Eeze_Net Eeze_Net;
+ typedef :pointer, :eeze_net
+ #
+ # FUNCTIONS
+ fcts = [
+ # EAPI Eeze_Net *eeze_net_new(const char *name);
+ [ :eeze_net_new, [ :string ], :eeze_net ],
+ # EAPI void eeze_net_free(Eeze_Net *net);
+ [ :eeze_net_free, [ :eeze_net ], :void ],
+ # EAPI const char *eeze_net_mac_get(Eeze_Net *net);
+ [ :eeze_net_mac_get, [ :eeze_net ], :string ],
+ # EAPI int eeze_net_idx_get(Eeze_Net *net);
+ [ :eeze_net_idx_get, [ :eeze_net ], :int ],
+ # EAPI Eina_Bool eeze_net_scan(Eeze_Net *net);
+ [ :eeze_net_scan, [ :eeze_net ], :bool ],
+ # EAPI const char *eeze_net_addr_get(Eeze_Net *net, Eeze_Net_Addr_Type type);
+ [ :eeze_net_addr_get, [ :eeze_net, :eeze_net_addr_type ], :string ],
+ # EAPI const char *eeze_net_attribute_get(Eeze_Net *net, const char *attr);
+ [ :eeze_net_attribute_get, [ :eeze_net, :string ], :string ],
+ # EAPI const char *eeze_net_syspath_get(Eeze_Net *net);
+ [ :eeze_net_syspath_get, [ :eeze_net ], :string ],
+ # EAPI Eina_List *eeze_net_list(void);
+ [ :eeze_net_list, [ ], :eina_list ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF