Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

const char* gp_port_result_as_string ( int  result  ) 

gp_port_result_as_string:

Returns:
: a gphoto2 error code
Returns a string representation of a gphoto2 error code. Those are static error descriptions. You can get dynamic ones that explain the error more in depth using gp_port_get_error.

Return value: a string representation of a gphoto2 error code

Definition at line 54 of file gphoto2-port-result.c.

References GP_ERROR, GP_ERROR_BAD_PARAMETERS, GP_ERROR_FIXED_LIMIT_EXCEEDED, GP_ERROR_HAL, GP_ERROR_IO, GP_ERROR_IO_INIT, GP_ERROR_IO_LOCK, GP_ERROR_IO_READ, GP_ERROR_IO_SERIAL_SPEED, GP_ERROR_IO_SUPPORTED_SERIAL, GP_ERROR_IO_SUPPORTED_USB, GP_ERROR_IO_UPDATE, GP_ERROR_IO_USB_CLAIM, GP_ERROR_IO_USB_CLEAR_HALT, GP_ERROR_IO_USB_FIND, GP_ERROR_IO_WRITE, GP_ERROR_LIBRARY, GP_ERROR_NO_MEMORY, GP_ERROR_NOT_SUPPORTED, GP_ERROR_TIMEOUT, GP_ERROR_UNKNOWN_PORT, and GP_OK.

Referenced by gp_result_as_string().

{
      switch (result) {
      case GP_OK:
            return _("No error");
      case GP_ERROR:
            return _("Unspecified error");
      case GP_ERROR_IO:
            return _("I/O problem");
      case GP_ERROR_BAD_PARAMETERS:
            return _("Bad parameters");
      case GP_ERROR_NOT_SUPPORTED:
            return _("Unsupported operation");
      case  GP_ERROR_FIXED_LIMIT_EXCEEDED:
            return _("Fixed limit exceeded");
      case GP_ERROR_TIMEOUT:
            return _("Timeout reading from or writing to the port");
      case GP_ERROR_IO_SUPPORTED_SERIAL:
            return _("Serial port not supported");
      case GP_ERROR_IO_SUPPORTED_USB:
            return _("USB port not supported");
      case GP_ERROR_UNKNOWN_PORT:
            return _("Unknown port");
      case GP_ERROR_NO_MEMORY:
            return _("Out of memory");
      case GP_ERROR_LIBRARY:
            return _("Error loading a library");
      case GP_ERROR_IO_INIT:
            return _("Error initializing the port");
      case GP_ERROR_IO_READ:
            return _("Error reading from the port");
      case GP_ERROR_IO_WRITE:
            return _("Error writing to the port");
      case GP_ERROR_IO_UPDATE:
            return _("Error updating the port settings");
      case GP_ERROR_IO_SERIAL_SPEED:
            return _("Error setting the serial port speed");
      case GP_ERROR_IO_USB_CLEAR_HALT:
            return _("Error clearing a halt condition on the USB port");
      case GP_ERROR_IO_USB_FIND:
            return _("Could not find the requested device on the USB port");
      case GP_ERROR_IO_USB_CLAIM:
            return _("Could not claim the USB device");
      case GP_ERROR_IO_LOCK:
            return _("Could not lock the device");
      case GP_ERROR_HAL:
            return _("libhal error");
      default:
            return _("Unknown error");
      }
}


Generated by  Doxygen 1.6.0   Back to index