Class: KeyControl::System
- Inherits:
-
Object
- Object
- KeyControl::System
- Defined in:
- lib/key_control/system.rb
Instance Method Summary collapse
-
#add ⇒ Object
Public: Get a proc representing the add_key system call.
-
#read ⇒ Object
Public: Get a proc representing the keyctl_read system call.
-
#search ⇒ Object
Public: Get a proc representing the request_key system call.
Instance Method Details
#add ⇒ Object
Public: Get a proc representing the add_key system call.
Returns a Fiddle::Function.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/key_control/system.rb', line 10 def add @add ||= Fiddle::Function.new( keyutils["add_key"], [ Fiddle::ALIGN_CHAR, Fiddle::ALIGN_CHAR, Fiddle::TYPE_VOIDP, Fiddle::TYPE_SIZE_T, Fiddle::TYPE_INT ], Fiddle::TYPE_INT ) end |
#read ⇒ Object
Public: Get a proc representing the keyctl_read system call.
Returns a Fiddle::Function.
37 38 39 40 41 42 43 44 |
# File 'lib/key_control/system.rb', line 37 def read @read ||= Fiddle::Function.new( keyutils["keyctl_read"], [ Fiddle::TYPE_INT, Fiddle::ALIGN_CHAR, Fiddle::TYPE_SIZE_T ], Fiddle::TYPE_LONG ) end |
#search ⇒ Object
Public: Get a proc representing the request_key system call.
Returns a Fiddle::Function.
24 25 26 27 28 29 30 31 32 |
# File 'lib/key_control/system.rb', line 24 def search @search ||= Fiddle::Function.new( keyutils["request_key"], [ Fiddle::ALIGN_CHAR, Fiddle::ALIGN_CHAR, Fiddle::ALIGN_CHAR, Fiddle::TYPE_INT ], Fiddle::TYPE_INT ) end |