Class: GPhoto2::PortInfoList

Inherits:
Object
  • Object
show all
Includes:
FFI::GPhoto2Port, Struct
Defined in:
lib/gphoto2/port_info_list.rb

Constant Summary

Constants included from FFI::GPhoto2Port

FFI::GPhoto2Port::GPPortSerialParity, FFI::GPhoto2Port::GPPortType, FFI::GPhoto2Port::GP_ERROR, FFI::GPhoto2Port::GP_ERROR_BAD_PARAMETERS, FFI::GPhoto2Port::GP_ERROR_FIXED_LIMIT_EXCEEDED, FFI::GPhoto2Port::GP_ERROR_HAL, FFI::GPhoto2Port::GP_ERROR_IO, FFI::GPhoto2Port::GP_ERROR_IO_INIT, FFI::GPhoto2Port::GP_ERROR_IO_LOCK, FFI::GPhoto2Port::GP_ERROR_IO_READ, FFI::GPhoto2Port::GP_ERROR_IO_SERIAL_SPEED, FFI::GPhoto2Port::GP_ERROR_IO_SUPPORTED_SERIAL, FFI::GPhoto2Port::GP_ERROR_IO_SUPPORTED_USB, FFI::GPhoto2Port::GP_ERROR_IO_UPDATE, FFI::GPhoto2Port::GP_ERROR_IO_USB_CLAIM, FFI::GPhoto2Port::GP_ERROR_IO_USB_CLEAR_HALT, FFI::GPhoto2Port::GP_ERROR_IO_USB_FIND, FFI::GPhoto2Port::GP_ERROR_IO_WRITE, FFI::GPhoto2Port::GP_ERROR_LIBRARY, FFI::GPhoto2Port::GP_ERROR_NOT_SUPPORTED, FFI::GPhoto2Port::GP_ERROR_NO_MEMORY, FFI::GPhoto2Port::GP_ERROR_TIMEOUT, FFI::GPhoto2Port::GP_ERROR_UNKNOWN_PORT, FFI::GPhoto2Port::GP_OK

Instance Attribute Summary

Attributes included from Struct

#ptr

Instance Method Summary collapse

Methods included from Struct

#to_ptr

Constructor Details

#initializePortInfoList

Returns a new instance of PortInfoList.



6
7
8
9
# File 'lib/gphoto2/port_info_list.rb', line 6

def initialize
  new
  load
end

Instance Method Details

#at(index) ⇒ GPhoto2::PortInfo Also known as: []

Parameters:

  • index (Integer)

Returns:



20
21
22
# File 'lib/gphoto2/port_info_list.rb', line 20

def at(index)
  PortInfo.new(self, index)
end

#lookup_path(port) ⇒ Integer Also known as: index

Parameters:

  • port (String)

Returns:

  • (Integer)


13
14
15
# File 'lib/gphoto2/port_info_list.rb', line 13

def lookup_path(port)
  _lookup_path(port)
end