diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2013-01-04 17:05:36 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2013-01-04 17:05:36 +0100 |
commit | b6f8457cbbe9d3790f6e8c434a6701e76fdff7c3 (patch) | |
tree | 3914434b96fcf244100dd08e40df4f1e04fac2fc /lib/efl/native/eeze_net.rb | |
parent | e56d5f280463e5ef6775b4b6d1414809f0e9de36 (diff) | |
download | ffi-efl-b6f8457cbbe9d3790f6e8c434a6701e76fdff7c3.zip ffi-efl-b6f8457cbbe9d3790f6e8c434a6701e76fdff7c3.tar.gz |
generate eeze,eeze_disk,eeze_net bindings
Diffstat (limited to 'lib/efl/native/eeze_net.rb')
-rw-r--r-- | lib/efl/native/eeze_net.rb | 60 |
1 files changed, 60 insertions, 0 deletions
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 |