# 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: _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('_port', [dirname(__file__)])
        except ImportError:
            import _port
            return _port
        if fp is not None:
            try:
                _mod = imp.load_module('_port', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _port = swig_import_helper()
    del swig_import_helper
else:
    import _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.port_info_list
TRUE = _port.TRUE
FALSE = _port.FALSE
GP_PORT_SERIAL_PARITY_OFF = _port.GP_PORT_SERIAL_PARITY_OFF
GP_PORT_SERIAL_PARITY_EVEN = _port.GP_PORT_SERIAL_PARITY_EVEN
GP_PORT_SERIAL_PARITY_ODD = _port.GP_PORT_SERIAL_PARITY_ODD
GP_PORT_MAX_BUF_LEN = _port.GP_PORT_MAX_BUF_LEN
class GPPortSettingsDisk(object):
    """Proxy of C _GPPortSettingsDisk struct"""
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    mountpoint = _swig_property(_port.GPPortSettingsDisk_mountpoint_get, _port.GPPortSettingsDisk_mountpoint_set)
    __swig_destroy__ = _port.delete_GPPortSettingsDisk
GPPortSettingsDisk_swigregister = _port.GPPortSettingsDisk_swigregister
GPPortSettingsDisk_swigregister(GPPortSettingsDisk)

GP_PORT_USB_ENDPOINT_IN = _port.GP_PORT_USB_ENDPOINT_IN
GP_PORT_USB_ENDPOINT_OUT = _port.GP_PORT_USB_ENDPOINT_OUT
GP_PORT_USB_ENDPOINT_INT = _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"""
        _port.GPPort_swiginit(self,_port.new_GPPort())
    __swig_destroy__ = _port.delete_GPPort
GPPort_swigregister = _port.GPPort_swigregister
GPPort_swigregister(GPPort)


def gp_port_new():
  """gp_port_new() -> int"""
  return _port.gp_port_new()

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

    Parameters:
        port: GPPort *
        info: GPPortInfo

    """
  return _port.gp_port_set_info(*args)

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

    Parameters:
        port: GPPort *

    """
  return _port.gp_port_get_info(*args)

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

    Parameters:
        port: GPPort *

    """
  return _port.gp_port_open(*args)

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

    Parameters:
        port: GPPort *

    """
  return _port.gp_port_close(*args)

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

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

    """
  return _port.gp_port_write(*args)

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

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

    """
  return _port.gp_port_read(*args)

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

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

    """
  return _port.gp_port_check_int(*args)

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

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

    """
  return _port.gp_port_check_int_fast(*args)

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

    Parameters:
        port: GPPort *
        timeout: int *

    """
  return _port.gp_port_get_timeout(*args)

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

    Parameters:
        port: GPPort *
        timeout: int

    """
  return _port.gp_port_set_timeout(*args)

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

    Parameters:
        port: GPPort *
        settings: GPPortSettings

    """
  return _port.gp_port_set_settings(*args)

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

    Parameters:
        port: GPPort *
        settings: GPPortSettings *

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

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

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

    """
  return _port.gp_port_get_pin(*args)

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

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

    """
  return _port.gp_port_set_pin(*args)

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

    Parameters:
        port: GPPort *
        duration: int

    """
  return _port.gp_port_send_break(*args)

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

    Parameters:
        port: GPPort *
        direction: int

    """
  return _port.gp_port_flush(*args)

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

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

    """
  return _port.gp_port_usb_find_device(*args)

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

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

    """
  return _port.gp_port_usb_find_device_by_class(*args)

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

    Parameters:
        port: GPPort *
        ep: int

    """
  return _port.gp_port_usb_clear_halt(*args)

def gp_port_usb_msg_write(*args):
  """
    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 _port.gp_port_usb_msg_write(*args)

def gp_port_usb_msg_read(*args):
  """
    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 _port.gp_port_usb_msg_read(*args)

def gp_port_usb_msg_interface_write(*args):
  """
    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 _port.gp_port_usb_msg_interface_write(*args)

def gp_port_usb_msg_interface_read(*args):
  """
    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 _port.gp_port_usb_msg_interface_read(*args)

def gp_port_usb_msg_class_write(*args):
  """
    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 _port.gp_port_usb_msg_class_write(*args)

def gp_port_usb_msg_class_read(*args):
  """
    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 _port.gp_port_usb_msg_class_read(*args)

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

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

    """
  return _port.gp_port_seek(*args)

def gp_port_send_scsi_cmd(*args):
  """
    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 _port.gp_port_send_scsi_cmd(*args)

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

    Parameters:
        port: GPPort *
        format: char const *

    """
  return _port.gp_port_set_error(*args)

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

    Parameters:
        port: GPPort *

    """
  return _port.gp_port_get_error(*args)


