Module: GnomeKeyring

Defined in:
lib/gir_ffi-gnome_keyring.rb,
lib/gir_ffi-gnome_keyring/found.rb,
lib/gir_ffi-gnome_keyring/attribute.rb,
lib/gir_ffi-gnome_keyring/attribute_list.rb

Overview

Overrides for GnomeKeyring singleton methods

Defined Under Namespace

Classes: Attribute, AttributeList, Found

Class Method Summary collapse

Class Method Details

.find_items_sync(type, attributes) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/gir_ffi-gnome_keyring.rb', line 25

def self.find_items_sync(type, attributes)
  v2 = GnomeKeyring::AttributeList.from(attributes)
  v3 = FFI::MemoryPointer.new :pointer
  v4 = GnomeKeyring::Lib.gnome_keyring_find_items_sync(type, v2, v3)
  v5 = GLib::List.wrap(GnomeKeyring::Found, v3.get_pointer(0))
  [v4, v5]
end

.item_create_sync(keyring, type, display_name, attributes, secret, update_if_exists) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/gir_ffi-gnome_keyring.rb', line 33

def self.item_create_sync(keyring, type, display_name, attributes, secret,
                          update_if_exists)
  v1 = GirFFI::InPointer.from_utf8(keyring)
  v3 = GirFFI::InPointer.from_utf8(display_name)
  v4 = GnomeKeyring::AttributeList.from(attributes)
  v5 = GirFFI::InPointer.from_utf8(secret)
  v7 = FFI::MemoryPointer.new :uint32
  v8 = GnomeKeyring::Lib.gnome_keyring_item_create_sync(v1, type, v3, v4, v5,
                                                        update_if_exists, v7)
  v9 = v7.get_uint32(0)
  [v8, v9]
end

.item_get_attributes_sync(keyring, id) ⇒ Object



46
47
48
49
50
51
52
# File 'lib/gir_ffi-gnome_keyring.rb', line 46

def self.item_get_attributes_sync(keyring, id)
  v1 = GirFFI::InPointer.from_utf8(keyring)
  v3 = FFI::MemoryPointer.new :pointer
  v4 = GnomeKeyring::Lib.gnome_keyring_item_get_attributes_sync(v1, id, v3)
  attributes = GnomeKeyring::AttributeList.wrap(v3.get_pointer(0))
  [v4, attributes]
end

.item_set_attributes_sync(keyring, id, attributes) ⇒ Object



54
55
56
57
58
# File 'lib/gir_ffi-gnome_keyring.rb', line 54

def self.item_set_attributes_sync(keyring, id, attributes)
  v1 = GirFFI::InPointer.from_utf8(keyring)
  v3 = GnomeKeyring::AttributeList.from(attributes)
  GnomeKeyring::Lib.gnome_keyring_item_set_attributes_sync(v1, id, v3)
end