Class: GPGME::ImportResult

Inherits:
Object
  • Object
show all
Defined in:
lib/gpgme/misc.rb,
lib/gpgme/ffi/import_result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#consideredObject (readonly)

Returns the value of attribute considered.



61
62
63
# File 'lib/gpgme/misc.rb', line 61

def considered
  @considered
end

#importedObject (readonly)

Returns the value of attribute imported.



61
62
63
# File 'lib/gpgme/misc.rb', line 61

def imported
  @imported
end

#imported_rsaObject (readonly)

Returns the value of attribute imported_rsa.



61
62
63
# File 'lib/gpgme/misc.rb', line 61

def imported_rsa
  @imported_rsa
end

#importsObject (readonly)

Returns the value of attribute imports.



64
65
66
# File 'lib/gpgme/misc.rb', line 64

def imports
  @imports
end

#new_revocationsObject (readonly)

Returns the value of attribute new_revocations.



62
63
64
# File 'lib/gpgme/misc.rb', line 62

def new_revocations
  @new_revocations
end

#new_signaturesObject (readonly)

Returns the value of attribute new_signatures.



62
63
64
# File 'lib/gpgme/misc.rb', line 62

def new_signatures
  @new_signatures
end

#new_sub_keysObject (readonly)

Returns the value of attribute new_sub_keys.



62
63
64
# File 'lib/gpgme/misc.rb', line 62

def new_sub_keys
  @new_sub_keys
end

#new_user_idsObject (readonly)

Returns the value of attribute new_user_ids.



62
63
64
# File 'lib/gpgme/misc.rb', line 62

def new_user_ids
  @new_user_ids
end

#no_user_idObject (readonly)

Returns the value of attribute no_user_id.



61
62
63
# File 'lib/gpgme/misc.rb', line 61

def no_user_id
  @no_user_id
end

#not_importedObject (readonly)

Returns the value of attribute not_imported.



64
65
66
# File 'lib/gpgme/misc.rb', line 64

def not_imported
  @not_imported
end

#secret_importedObject (readonly)

Returns the value of attribute secret_imported.



63
64
65
# File 'lib/gpgme/misc.rb', line 63

def secret_imported
  @secret_imported
end

#secret_readObject (readonly)

Returns the value of attribute secret_read.



63
64
65
# File 'lib/gpgme/misc.rb', line 63

def secret_read
  @secret_read
end

#secret_unchangedObject (readonly)

Returns the value of attribute secret_unchanged.



63
64
65
# File 'lib/gpgme/misc.rb', line 63

def secret_unchanged
  @secret_unchanged
end

#unchangedObject (readonly)

Returns the value of attribute unchanged.



61
62
63
# File 'lib/gpgme/misc.rb', line 61

def unchanged
  @unchanged
end

Class Method Details

.new_from_struct(struct) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/gpgme/ffi/import_result.rb', line 3

def self.new_from_struct(struct)
  instance = allocate

  instance.instance_exec do
    @considered       = struct[:considered]
    @no_user_id       = struct[:no_user_id]
    @imported         = struct[:imported]
    @imported_rsa     = struct[:imported_rsa]
    @unchanged        = struct[:unchanged]
    @new_user_ids     = struct[:new_user_ids]
    @new_sub_keys     = struct[:new_sub_keys]
    @new_signatures   = struct[:new_signatures]
    @new_revocations  = struct[:new_revocations]
    @secret_read      = struct[:secret_read]
    @secret_imported  = struct[:secret_imported]
    @secret_unchanged = struct[:secret_unchanged]
    @not_imported     = struct[:not_imported]

    @imports = []
    pointer = struct[:imports]
    until pointer.null?
      status = Library::ImportStatus.new pointer

      @imports << ImportStatus.new_from_struct(status)

      pointer = status[:next]
    end
  end

  instance
end