Class: GnomeKeyring::AttributeList
- Inherits:
-
GLib::Array
- Object
- GLib::Array
- GnomeKeyring::AttributeList
- Defined in:
- lib/gir_ffi-gnome_keyring/attribute_list.rb
Overview
GLib::Array alias used when returning lists of GnomeKeyringAttribute.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from(object) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/gir_ffi-gnome_keyring/attribute_list.rb', line 17 def self.from(object) case object when self then object when FFI::Pointer then wrap object else new.tap { |arr| arr.append_vals object } end end |
.new ⇒ Object
8 9 10 11 |
# File 'lib/gir_ffi-gnome_keyring/attribute_list.rb', line 8 def self.new ptr = GnomeKeyring::Lib.gnome_keyring_attribute_list_new wrap(ptr) end |
.wrap(ptr) ⇒ Object
13 14 15 |
# File 'lib/gir_ffi-gnome_keyring/attribute_list.rb', line 13 def self.wrap(ptr) super GnomeKeyring::Attribute, ptr end |
Instance Method Details
#append_string(name, value) ⇒ Object
25 26 27 28 29 |
# File 'lib/gir_ffi-gnome_keyring/attribute_list.rb', line 25 def append_string(name, value) v2 = GirFFI::InPointer.from(:utf8, name) v3 = GirFFI::InPointer.from(:utf8, value) GnomeKeyring::Lib.gnome_keyring_attribute_list_append_string self, v2, v3 end |
#append_uint32(name, value) ⇒ Object
31 32 33 34 |
# File 'lib/gir_ffi-gnome_keyring/attribute_list.rb', line 31 def append_uint32(name, value) v2 = GirFFI::InPointer.from(:utf8, name) GnomeKeyring::Lib.gnome_keyring_attribute_list_append_uint32 self, v2, value end |