rubdev 0.0.1 → 0.0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rubdev/c.rb +87 -87
- metadata +39 -54
data/lib/rubdev/c.rb
CHANGED
@@ -21,7 +21,7 @@ require 'ffi'
|
|
21
21
|
|
22
22
|
module FFI
|
23
23
|
module Library
|
24
|
-
def attach_function!
|
24
|
+
def attach_function! (*args, &block)
|
25
25
|
begin
|
26
26
|
attach_function(*args, &block)
|
27
27
|
rescue Exception => e
|
@@ -42,107 +42,107 @@ module RubDev
|
|
42
42
|
callback :logger, [:pointer, :int, :string, :int, :string, :string, :pointer], :void
|
43
43
|
|
44
44
|
# context {{{
|
45
|
-
attach_function :udev_ref, [:pointer], :pointer
|
46
|
-
attach_function :udev_unref, [:pointer], :void
|
47
|
-
attach_function :udev_new, [], :pointer
|
48
|
-
attach_function :udev_set_log_fn, [:pointer, :logger], :void
|
49
|
-
attach_function :udev_get_log_priority, [:pointer], :int
|
50
|
-
attach_function :udev_set_log_priority, [:pointer, :int], :void
|
51
|
-
attach_function :udev_get_sys_path, [:pointer], :string
|
52
|
-
attach_function :udev_get_dev_path, [:pointer], :string
|
53
|
-
attach_function
|
54
|
-
attach_function :udev_get_userdata, [:pointer], :pointer
|
55
|
-
attach_function :udev_set_userdata, [:pointer, :pointer], :void
|
45
|
+
attach_function! :udev_ref, [:pointer], :pointer
|
46
|
+
attach_function! :udev_unref, [:pointer], :void
|
47
|
+
attach_function! :udev_new, [], :pointer
|
48
|
+
attach_function! :udev_set_log_fn, [:pointer, :logger], :void
|
49
|
+
attach_function! :udev_get_log_priority, [:pointer], :int
|
50
|
+
attach_function! :udev_set_log_priority, [:pointer, :int], :void
|
51
|
+
attach_function! :udev_get_sys_path, [:pointer], :string
|
52
|
+
attach_function! :udev_get_dev_path, [:pointer], :string
|
53
|
+
attach_function! :udev_get_run_path, [:pointer], :string
|
54
|
+
attach_function! :udev_get_userdata, [:pointer], :pointer
|
55
|
+
attach_function! :udev_set_userdata, [:pointer, :pointer], :void
|
56
56
|
# }}}
|
57
57
|
|
58
58
|
# list {{{
|
59
|
-
attach_function :udev_list_entry_get_next, [:pointer], :pointer
|
60
|
-
attach_function :udev_list_entry_get_by_name, [:pointer, :string], :pointer
|
61
|
-
attach_function :udev_list_entry_get_name, [:pointer], :string
|
62
|
-
attach_function :udev_list_entry_get_value, [:pointer], :string
|
59
|
+
attach_function! :udev_list_entry_get_next, [:pointer], :pointer
|
60
|
+
attach_function! :udev_list_entry_get_by_name, [:pointer, :string], :pointer
|
61
|
+
attach_function! :udev_list_entry_get_name, [:pointer], :string
|
62
|
+
attach_function! :udev_list_entry_get_value, [:pointer], :string
|
63
63
|
# }}}
|
64
64
|
|
65
65
|
# device {{{
|
66
|
-
attach_function :udev_device_ref, [:pointer], :void
|
67
|
-
attach_function :udev_device_unref, [:pointer], :void
|
68
|
-
attach_function :udev_device_get_udev, [:pointer], :pointer
|
69
|
-
attach_function :udev_device_new_from_syspath, [:pointer, :string], :pointer
|
70
|
-
attach_function :udev_device_new_from_devnum, [:pointer, :char, :dev_t], :pointer
|
71
|
-
attach_function :udev_device_new_from_subsystem_sysname, [:pointer, :string, :string], :pointer
|
72
|
-
attach_function :udev_device_new_from_environment, [:pointer], :pointer
|
73
|
-
attach_function :udev_device_get_parent, [:pointer], :pointer
|
74
|
-
attach_function :udev_device_get_parent_with_subsystem_devtype, [:pointer, :string, :string], :pointer
|
75
|
-
attach_function :udev_device_get_devpath, [:pointer], :string
|
76
|
-
attach_function :udev_device_get_subsystem, [:pointer], :string
|
77
|
-
attach_function :udev_device_get_devtype, [:pointer], :string
|
78
|
-
attach_function :udev_device_get_syspath, [:pointer], :string
|
79
|
-
attach_function :udev_device_get_sysname, [:pointer], :string
|
80
|
-
attach_function :udev_device_get_sysnum, [:pointer], :string
|
81
|
-
attach_function :udev_device_get_devnode, [:pointer], :string
|
82
|
-
attach_function
|
83
|
-
attach_function :udev_device_get_devlinks_list_entry, [:pointer], :pointer
|
84
|
-
attach_function :udev_device_get_properties_list_entry, [:pointer], :pointer
|
85
|
-
attach_function :udev_device_get_tags_list_entry, [:pointer], :pointer
|
86
|
-
attach_function :udev_device_get_property_value, [:pointer, :string], :string
|
87
|
-
attach_function :udev_device_get_driver, [:pointer], :string
|
88
|
-
attach_function :udev_device_get_devnum, [:pointer], :dev_t
|
89
|
-
attach_function :udev_device_get_action, [:pointer], :string
|
90
|
-
attach_function :udev_device_get_sysattr_value, [:pointer, :string], :string
|
91
|
-
attach_function
|
92
|
-
attach_function :udev_device_get_seqnum, [:pointer], :long_long
|
93
|
-
attach_function
|
94
|
-
attach_function
|
66
|
+
attach_function! :udev_device_ref, [:pointer], :void
|
67
|
+
attach_function! :udev_device_unref, [:pointer], :void
|
68
|
+
attach_function! :udev_device_get_udev, [:pointer], :pointer
|
69
|
+
attach_function! :udev_device_new_from_syspath, [:pointer, :string], :pointer
|
70
|
+
attach_function! :udev_device_new_from_devnum, [:pointer, :char, :dev_t], :pointer
|
71
|
+
attach_function! :udev_device_new_from_subsystem_sysname, [:pointer, :string, :string], :pointer
|
72
|
+
attach_function! :udev_device_new_from_environment, [:pointer], :pointer
|
73
|
+
attach_function! :udev_device_get_parent, [:pointer], :pointer
|
74
|
+
attach_function! :udev_device_get_parent_with_subsystem_devtype, [:pointer, :string, :string], :pointer
|
75
|
+
attach_function! :udev_device_get_devpath, [:pointer], :string
|
76
|
+
attach_function! :udev_device_get_subsystem, [:pointer], :string
|
77
|
+
attach_function! :udev_device_get_devtype, [:pointer], :string
|
78
|
+
attach_function! :udev_device_get_syspath, [:pointer], :string
|
79
|
+
attach_function! :udev_device_get_sysname, [:pointer], :string
|
80
|
+
attach_function! :udev_device_get_sysnum, [:pointer], :string
|
81
|
+
attach_function! :udev_device_get_devnode, [:pointer], :string
|
82
|
+
attach_function! :udev_device_get_is_initialized, [:pointer], :int
|
83
|
+
attach_function! :udev_device_get_devlinks_list_entry, [:pointer], :pointer
|
84
|
+
attach_function! :udev_device_get_properties_list_entry, [:pointer], :pointer
|
85
|
+
attach_function! :udev_device_get_tags_list_entry, [:pointer], :pointer
|
86
|
+
attach_function! :udev_device_get_property_value, [:pointer, :string], :string
|
87
|
+
attach_function! :udev_device_get_driver, [:pointer], :string
|
88
|
+
attach_function! :udev_device_get_devnum, [:pointer], :dev_t
|
89
|
+
attach_function! :udev_device_get_action, [:pointer], :string
|
90
|
+
attach_function! :udev_device_get_sysattr_value, [:pointer, :string], :string
|
91
|
+
attach_function! :udev_device_get_sysattr_list_entry, [:pointer], :pointer
|
92
|
+
attach_function! :udev_device_get_seqnum, [:pointer], :long_long
|
93
|
+
attach_function! :udev_device_get_usec_since_initialized, [:pointer], :long_long
|
94
|
+
attach_function! :udev_device_has_tag, [:pointer, :string], :int
|
95
95
|
# }}}
|
96
96
|
|
97
97
|
# monitor {{{
|
98
|
-
attach_function :udev_monitor_ref, [:pointer], :pointer
|
99
|
-
attach_function :udev_monitor_unref, [:pointer], :void
|
100
|
-
attach_function :udev_monitor_get_udev, [:pointer], :pointer
|
101
|
-
attach_function :udev_monitor_new_from_netlink, [:pointer, :string], :pointer
|
102
|
-
attach_function :udev_monitor_new_from_socket, [:pointer, :string], :pointer
|
103
|
-
attach_function :udev_monitor_enable_receiving, [:pointer], :int
|
104
|
-
attach_function :udev_monitor_set_receive_buffer_size, [:pointer, :int], :int
|
105
|
-
attach_function :udev_monitor_get_fd, [:pointer], :int
|
106
|
-
attach_function :udev_monitor_receive_device, [:pointer], :pointer
|
107
|
-
attach_function :udev_monitor_filter_add_match_subsystem_devtype, [:pointer, :string, :string], :int
|
108
|
-
attach_function :udev_monitor_filter_add_match_tag, [:pointer, :string], :int
|
109
|
-
attach_function :udev_monitor_filter_update, [:pointer], :int
|
110
|
-
attach_function :udev_monitor_filter_remove, [:pointer], :int
|
98
|
+
attach_function! :udev_monitor_ref, [:pointer], :pointer
|
99
|
+
attach_function! :udev_monitor_unref, [:pointer], :void
|
100
|
+
attach_function! :udev_monitor_get_udev, [:pointer], :pointer
|
101
|
+
attach_function! :udev_monitor_new_from_netlink, [:pointer, :string], :pointer
|
102
|
+
attach_function! :udev_monitor_new_from_socket, [:pointer, :string], :pointer
|
103
|
+
attach_function! :udev_monitor_enable_receiving, [:pointer], :int
|
104
|
+
attach_function! :udev_monitor_set_receive_buffer_size, [:pointer, :int], :int
|
105
|
+
attach_function! :udev_monitor_get_fd, [:pointer], :int
|
106
|
+
attach_function! :udev_monitor_receive_device, [:pointer], :pointer
|
107
|
+
attach_function! :udev_monitor_filter_add_match_subsystem_devtype, [:pointer, :string, :string], :int
|
108
|
+
attach_function! :udev_monitor_filter_add_match_tag, [:pointer, :string], :int
|
109
|
+
attach_function! :udev_monitor_filter_update, [:pointer], :int
|
110
|
+
attach_function! :udev_monitor_filter_remove, [:pointer], :int
|
111
111
|
# }}}
|
112
112
|
|
113
113
|
# enumerate {{{
|
114
|
-
attach_function :udev_enumerate_ref, [:pointer], :pointer
|
115
|
-
attach_function :udev_enumerate_unref, [:pointer], :void
|
116
|
-
attach_function :udev_enumerate_get_udev, [:pointer], :pointer
|
117
|
-
attach_function :udev_enumerate_new, [:pointer], :pointer
|
118
|
-
attach_function :udev_enumerate_add_match_subsystem, [:pointer, :string], :int
|
119
|
-
attach_function :udev_enumerate_add_nomatch_subsystem, [:pointer, :string], :int
|
120
|
-
attach_function :udev_enumerate_add_match_sysattr, [:pointer, :string, :string], :int
|
121
|
-
attach_function :udev_enumerate_add_nomatch_sysattr, [:pointer, :string, :string], :int
|
122
|
-
attach_function :udev_enumerate_add_match_property, [:pointer, :string, :string], :int
|
123
|
-
attach_function :udev_enumerate_add_match_tag, [:pointer, :string], :int
|
124
|
-
attach_function
|
125
|
-
attach_function
|
126
|
-
attach_function :udev_enumerate_add_match_sysname, [:pointer, :string], :int
|
127
|
-
attach_function :udev_enumerate_add_syspath, [:pointer, :string], :int
|
128
|
-
attach_function :udev_enumerate_scan_devices, [:pointer], :int
|
129
|
-
attach_function :udev_enumerate_scan_subsystems, [:pointer], :int
|
130
|
-
attach_function :udev_enumerate_get_list_entry, [:pointer], :pointer
|
114
|
+
attach_function! :udev_enumerate_ref, [:pointer], :pointer
|
115
|
+
attach_function! :udev_enumerate_unref, [:pointer], :void
|
116
|
+
attach_function! :udev_enumerate_get_udev, [:pointer], :pointer
|
117
|
+
attach_function! :udev_enumerate_new, [:pointer], :pointer
|
118
|
+
attach_function! :udev_enumerate_add_match_subsystem, [:pointer, :string], :int
|
119
|
+
attach_function! :udev_enumerate_add_nomatch_subsystem, [:pointer, :string], :int
|
120
|
+
attach_function! :udev_enumerate_add_match_sysattr, [:pointer, :string, :string], :int
|
121
|
+
attach_function! :udev_enumerate_add_nomatch_sysattr, [:pointer, :string, :string], :int
|
122
|
+
attach_function! :udev_enumerate_add_match_property, [:pointer, :string, :string], :int
|
123
|
+
attach_function! :udev_enumerate_add_match_tag, [:pointer, :string], :int
|
124
|
+
attach_function! :udev_enumerate_add_match_parent, [:pointer, :pointer], :int
|
125
|
+
attach_function! :udev_enumerate_add_match_is_initialized, [:pointer], :int
|
126
|
+
attach_function! :udev_enumerate_add_match_sysname, [:pointer, :string], :int
|
127
|
+
attach_function! :udev_enumerate_add_syspath, [:pointer, :string], :int
|
128
|
+
attach_function! :udev_enumerate_scan_devices, [:pointer], :int
|
129
|
+
attach_function! :udev_enumerate_scan_subsystems, [:pointer], :int
|
130
|
+
attach_function! :udev_enumerate_get_list_entry, [:pointer], :pointer
|
131
131
|
# }}}
|
132
132
|
|
133
133
|
# queue {{{
|
134
|
-
attach_function :udev_queue_ref, [:pointer], :pointer
|
135
|
-
attach_function :udev_queue_unref, [:pointer], :void
|
136
|
-
attach_function :udev_queue_get_udev, [:pointer], :pointer
|
137
|
-
attach_function :udev_queue_new, [:pointer], :pointer
|
138
|
-
attach_function :udev_queue_get_udev_is_active, [:pointer], :int
|
139
|
-
attach_function :udev_queue_get_queue_is_empty, [:pointer], :int
|
140
|
-
attach_function :udev_queue_get_seqnum_is_finished, [:pointer, :ulong_long], :int
|
141
|
-
attach_function :udev_queue_get_seqnum_sequence_is_finished, [:pointer, :ulong_long, :ulong_long], :int
|
142
|
-
attach_function :udev_queue_get_queued_list_entry, [:pointer], :pointer
|
143
|
-
attach_function :udev_queue_get_failed_list_entry, [:pointer], :pointer
|
144
|
-
attach_function :udev_queue_get_kernel_seqnum, [:pointer], :ulong_long
|
145
|
-
attach_function :udev_queue_get_udev_seqnum, [:pointer], :ulong_long
|
134
|
+
attach_function! :udev_queue_ref, [:pointer], :pointer
|
135
|
+
attach_function! :udev_queue_unref, [:pointer], :void
|
136
|
+
attach_function! :udev_queue_get_udev, [:pointer], :pointer
|
137
|
+
attach_function! :udev_queue_new, [:pointer], :pointer
|
138
|
+
attach_function! :udev_queue_get_udev_is_active, [:pointer], :int
|
139
|
+
attach_function! :udev_queue_get_queue_is_empty, [:pointer], :int
|
140
|
+
attach_function! :udev_queue_get_seqnum_is_finished, [:pointer, :ulong_long], :int
|
141
|
+
attach_function! :udev_queue_get_seqnum_sequence_is_finished, [:pointer, :ulong_long, :ulong_long], :int
|
142
|
+
attach_function! :udev_queue_get_queued_list_entry, [:pointer], :pointer
|
143
|
+
attach_function! :udev_queue_get_failed_list_entry, [:pointer], :pointer
|
144
|
+
attach_function! :udev_queue_get_kernel_seqnum, [:pointer], :ulong_long
|
145
|
+
attach_function! :udev_queue_get_udev_seqnum, [:pointer], :ulong_long
|
146
146
|
# }}}
|
147
147
|
end
|
148
148
|
end
|
metadata
CHANGED
@@ -1,83 +1,68 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubdev
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1.1
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- shura
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-10-29 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: ffi
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
- 0
|
30
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
31
22
|
type: :runtime
|
32
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
33
30
|
description: libudev bindings
|
34
31
|
email: shura1991@gmail.com
|
35
32
|
executables: []
|
36
|
-
|
37
33
|
extensions: []
|
38
|
-
|
39
34
|
extra_rdoc_files: []
|
40
|
-
|
41
|
-
|
42
|
-
- lib/rubdev/c.rb
|
43
|
-
- lib/rubdev/list.rb
|
44
|
-
- lib/rubdev/monitor.rb
|
45
|
-
- lib/rubdev/context.rb
|
35
|
+
files:
|
36
|
+
- lib/rubdev.rb
|
46
37
|
- lib/rubdev/enumerate.rb
|
47
|
-
- lib/rubdev/
|
38
|
+
- lib/rubdev/list.rb
|
48
39
|
- lib/rubdev/device.rb
|
49
|
-
- lib/rubdev.rb
|
50
|
-
|
40
|
+
- lib/rubdev/queue.rb
|
41
|
+
- lib/rubdev/context.rb
|
42
|
+
- lib/rubdev/monitor.rb
|
43
|
+
- lib/rubdev/c.rb
|
51
44
|
homepage: http://github.com/shurizzle/rubdev
|
52
45
|
licenses: []
|
53
|
-
|
54
46
|
post_install_message:
|
55
47
|
rdoc_options: []
|
56
|
-
|
57
|
-
require_paths:
|
48
|
+
require_paths:
|
58
49
|
- lib
|
59
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
51
|
none: false
|
61
|
-
requirements:
|
62
|
-
- -
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
|
65
|
-
|
66
|
-
version: "0"
|
67
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
57
|
none: false
|
69
|
-
requirements:
|
70
|
-
- -
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
|
73
|
-
- 0
|
74
|
-
version: "0"
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
75
62
|
requirements: []
|
76
|
-
|
77
63
|
rubyforge_project:
|
78
|
-
rubygems_version: 1.
|
64
|
+
rubygems_version: 1.8.23
|
79
65
|
signing_key:
|
80
66
|
specification_version: 3
|
81
67
|
summary: libudev bindings
|
82
68
|
test_files: []
|
83
|
-
|