# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.





from sys import version_info
if version_info >= (3,0,0):
    new_instancemethod = lambda func, inst, cls: _gphoto2_port.SWIG_PyInstanceMethod_New(func)
else:
    from new import instancemethod as new_instancemethod
if version_info >= (2,6,0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_gphoto2_port', [dirname(__file__)])
        except ImportError:
            import _gphoto2_port
            return _gphoto2_port
        if fp is not None:
            try:
                _mod = imp.load_module('_gphoto2_port', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _gphoto2_port = swig_import_helper()
    del swig_import_helper
else:
    import _gphoto2_port
del version_info
try:
    _swig_property = property
except NameError:
    pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
    if (name == "thisown"): return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name,None)
    if method: return method(self,value)
    if (not static):
        self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)

def _swig_setattr(self,class_type,name,value):
    return _swig_setattr_nondynamic(self,class_type,name,value,0)

def _swig_getattr(self,class_type,name):
    if (name == "thisown"): return self.this.own()
    method = class_type.__swig_getmethods__.get(name,None)
    if method: return method(self)
    raise AttributeError(name)

def _swig_repr(self):
    try: strthis = "proxy of " + self.this.__repr__()
    except: strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object : pass
    _newclass = 0


def _swig_setattr_nondynamic_method(set):
    def set_attr(self,name,value):
        if (name == "thisown"): return self.this.own(value)
        if hasattr(self,name) or (name == "this"):
            set(self,name,value)
        else:
            raise AttributeError("You cannot add attributes to %s" % self)
    return set_attr


import gphoto2.gphoto2_port_info_list
TRUE = _gphoto2_port.TRUE
FALSE = _gphoto2_port.FALSE
GP_PORT_SERIAL_PARITY_OFF = _gphoto2_port.GP_PORT_SERIAL_PARITY_OFF
GP_PORT_SERIAL_PARITY_EVEN = _gphoto2_port.GP_PORT_SERIAL_PARITY_EVEN
GP_PORT_SERIAL_PARITY_ODD = _gphoto2_port.GP_PORT_SERIAL_PARITY_ODD
GP_PORT_MAX_BUF_LEN = _gphoto2_port.GP_PORT_MAX_BUF_LEN
GP_PORT_USB_ENDPOINT_IN = _gphoto2_port.GP_PORT_USB_ENDPOINT_IN
GP_PORT_USB_ENDPOINT_OUT = _gphoto2_port.GP_PORT_USB_ENDPOINT_OUT
GP_PORT_USB_ENDPOINT_INT = _gphoto2_port.GP_PORT_USB_ENDPOINT_INT
class GPPort(object):
    """Proxy of C _GPPort struct"""
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    __repr__ = _swig_repr
    def __init__(self): 
        """__init__(self) -> GPPort"""
        _gphoto2_port.GPPort_swiginit(self,_gphoto2_port.new_GPPort())
    __swig_destroy__ = _gphoto2_port.delete_GPPort
GPPort_swigregister = _gphoto2_port.GPPort_swigregister
GPPort_swigregister(GPPort)


def gp_port_new() -> "GPPort **" :
  """gp_port_new() -> int"""
  return _gphoto2_port.gp_port_new()

def gp_port_free(*args) -> "int" :
  """
    gp_port_free(port) -> int

    Parameters:
        port: GPPort *

    """
  return _gphoto2_port.gp_port_free(*args)

def gp_port_set_info(*args) -> "int" :
  """
    gp_port_set_info(port, info) -> int

    Parameters:
        port: GPPort *
        info: GPPortInfo

    """
  return _gphoto2_port.gp_port_set_info(*args)

def gp_port_get_info(*args) -> "GPPortInfo *" :
  """
    gp_port_get_info(port) -> int

    Parameters:
        port: GPPort *

    """
  return _gphoto2_port.gp_port_get_info(*args)

def gp_port_open(*args) -> "int" :
  """
    gp_port_open(port) -> int

    Parameters:
        port: GPPort *

    """
  return _gphoto2_port.gp_port_open(*args)

def gp_port_close(*args) -> "int" :
  """
    gp_port_close(port) -> int

    Parameters:
        port: GPPort *

    """
  return _gphoto2_port.gp_port_close(*args)

def gp_port_reset(*args) -> "int" :
  """
    gp_port_reset(port) -> int

    Parameters:
        port: GPPort *

    """
  return _gphoto2_port.gp_port_reset(*args)

def gp_port_write(*args) -> "int" :
  """
    gp_port_write(port, data, size) -> int

    Parameters:
        port: GPPort *
        data: char const *
        size: int

    """
  return _gphoto2_port.gp_port_write(*args)

def gp_port_read(*args) -> "int" :
  """
    gp_port_read(port, data, size) -> int

    Parameters:
        port: GPPort *
        data: char *
        size: int

    """
  return _gphoto2_port.gp_port_read(*args)

def gp_port_check_int(*args) -> "int" :
  """
    gp_port_check_int(port, data, size) -> int

    Parameters:
        port: GPPort *
        data: char *
        size: int

    """
  return _gphoto2_port.gp_port_check_int(*args)

def gp_port_check_int_fast(*args) -> "int" :
  """
    gp_port_check_int_fast(port, data, size) -> int

    Parameters:
        port: GPPort *
        data: char *
        size: int

    """
  return _gphoto2_port.gp_port_check_int_fast(*args)

def gp_port_get_timeout(*args) -> "int" :
  """
    gp_port_get_timeout(port, timeout) -> int

    Parameters:
        port: GPPort *
        timeout: int *

    """
  return _gphoto2_port.gp_port_get_timeout(*args)

def gp_port_set_timeout(*args) -> "int" :
  """
    gp_port_set_timeout(port, timeout) -> int

    Parameters:
        port: GPPort *
        timeout: int

    """
  return _gphoto2_port.gp_port_set_timeout(*args)

def gp_port_set_settings(*args) -> "int" :
  """
    gp_port_set_settings(port, settings) -> int

    Parameters:
        port: GPPort *
        settings: GPPortSettings

    """
  return _gphoto2_port.gp_port_set_settings(*args)

def gp_port_get_settings(*args) -> "int" :
  """
    gp_port_get_settings(port, settings) -> int

    Parameters:
        port: GPPort *
        settings: GPPortSettings *

    """
  return _gphoto2_port.gp_port_get_settings(*args)
GP_PIN_RTS = _gphoto2_port.GP_PIN_RTS
GP_PIN_DTR = _gphoto2_port.GP_PIN_DTR
GP_PIN_CTS = _gphoto2_port.GP_PIN_CTS
GP_PIN_DSR = _gphoto2_port.GP_PIN_DSR
GP_PIN_CD = _gphoto2_port.GP_PIN_CD
GP_PIN_RING = _gphoto2_port.GP_PIN_RING
GP_LEVEL_LOW = _gphoto2_port.GP_LEVEL_LOW
GP_LEVEL_HIGH = _gphoto2_port.GP_LEVEL_HIGH

def gp_port_get_pin(*args) -> "int" :
  """
    gp_port_get_pin(port, pin, level) -> int

    Parameters:
        port: GPPort *
        pin: enum GPPin
        level: GPLevel *

    """
  return _gphoto2_port.gp_port_get_pin(*args)

def gp_port_set_pin(*args) -> "int" :
  """
    gp_port_set_pin(port, pin, level) -> int

    Parameters:
        port: GPPort *
        pin: enum GPPin
        level: enum GPLevel

    """
  return _gphoto2_port.gp_port_set_pin(*args)

def gp_port_send_break(*args) -> "int" :
  """
    gp_port_send_break(port, duration) -> int

    Parameters:
        port: GPPort *
        duration: int

    """
  return _gphoto2_port.gp_port_send_break(*args)

def gp_port_flush(*args) -> "int" :
  """
    gp_port_flush(port, direction) -> int

    Parameters:
        port: GPPort *
        direction: int

    """
  return _gphoto2_port.gp_port_flush(*args)

def gp_port_usb_find_device(*args) -> "int" :
  """
    gp_port_usb_find_device(port, idvendor, idproduct) -> int

    Parameters:
        port: GPPort *
        idvendor: int
        idproduct: int

    """
  return _gphoto2_port.gp_port_usb_find_device(*args)

def gp_port_usb_find_device_by_class(*args) -> "int" :
  """
    gp_port_usb_find_device_by_class(port, mainclass, subclass, protocol) -> int

    Parameters:
        port: GPPort *
        mainclass: int
        subclass: int
        protocol: int

    """
  return _gphoto2_port.gp_port_usb_find_device_by_class(*args)

def gp_port_usb_clear_halt(*args) -> "int" :
  """
    gp_port_usb_clear_halt(port, ep) -> int

    Parameters:
        port: GPPort *
        ep: int

    """
  return _gphoto2_port.gp_port_usb_clear_halt(*args)

def gp_port_usb_msg_write(*args) -> "int" :
  """
    gp_port_usb_msg_write(port, request, value, index, bytes, size) -> int

    Parameters:
        port: GPPort *
        request: int
        value: int
        index: int
        bytes: char *
        size: int

    """
  return _gphoto2_port.gp_port_usb_msg_write(*args)

def gp_port_usb_msg_read(*args) -> "int" :
  """
    gp_port_usb_msg_read(port, request, value, index, bytes, size) -> int

    Parameters:
        port: GPPort *
        request: int
        value: int
        index: int
        bytes: char *
        size: int

    """
  return _gphoto2_port.gp_port_usb_msg_read(*args)

def gp_port_usb_msg_interface_write(*args) -> "int" :
  """
    gp_port_usb_msg_interface_write(port, request, value, index, bytes, size) -> int

    Parameters:
        port: GPPort *
        request: int
        value: int
        index: int
        bytes: char *
        size: int

    """
  return _gphoto2_port.gp_port_usb_msg_interface_write(*args)

def gp_port_usb_msg_interface_read(*args) -> "int" :
  """
    gp_port_usb_msg_interface_read(port, request, value, index, bytes, size) -> int

    Parameters:
        port: GPPort *
        request: int
        value: int
        index: int
        bytes: char *
        size: int

    """
  return _gphoto2_port.gp_port_usb_msg_interface_read(*args)

def gp_port_usb_msg_class_write(*args) -> "int" :
  """
    gp_port_usb_msg_class_write(port, request, value, index, bytes, size) -> int

    Parameters:
        port: GPPort *
        request: int
        value: int
        index: int
        bytes: char *
        size: int

    """
  return _gphoto2_port.gp_port_usb_msg_class_write(*args)

def gp_port_usb_msg_class_read(*args) -> "int" :
  """
    gp_port_usb_msg_class_read(port, request, value, index, bytes, size) -> int

    Parameters:
        port: GPPort *
        request: int
        value: int
        index: int
        bytes: char *
        size: int

    """
  return _gphoto2_port.gp_port_usb_msg_class_read(*args)

def gp_port_seek(*args) -> "int" :
  """
    gp_port_seek(port, offset, whence) -> int

    Parameters:
        port: GPPort *
        offset: int
        whence: int

    """
  return _gphoto2_port.gp_port_seek(*args)

def gp_port_send_scsi_cmd(*args) -> "int" :
  """
    gp_port_send_scsi_cmd(port, to_dev, cmd, cmd_size, sense, sense_size, data, data_size) -> int

    Parameters:
        port: GPPort *
        to_dev: int
        cmd: char *
        cmd_size: int
        sense: char *
        sense_size: int
        data: char *
        data_size: int

    """
  return _gphoto2_port.gp_port_send_scsi_cmd(*args)

def gp_port_set_error(*args) -> "int" :
  """
    gp_port_set_error(port, format) -> int

    Parameters:
        port: GPPort *
        format: char const *

    """
  return _gphoto2_port.gp_port_set_error(*args)

def gp_port_get_error(*args) -> "char const *" :
  """
    gp_port_get_error(port) -> char const *

    Parameters:
        port: GPPort *

    """
  return _gphoto2_port.gp_port_get_error(*args)


