# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# 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 as _swig_python_version_info
if _swig_python_version_info >= (3, 0, 0):
    new_instancemethod = lambda func, inst, cls: _abilities_list.SWIG_PyInstanceMethod_New(func)
else:
    from new import instancemethod as new_instancemethod
if _swig_python_version_info >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_abilities_list')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_abilities_list')
    _abilities_list = swig_import_helper()
    del swig_import_helper
elif _swig_python_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('_abilities_list', [dirname(__file__)])
        except ImportError:
            import _abilities_list
            return _abilities_list
        try:
            _mod = imp.load_module('_abilities_list', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _abilities_list = swig_import_helper()
    del swig_import_helper
else:
    import _abilities_list
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

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):
        object.__setattr__(self, 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("'%s' object has no attribute '%s'" % (class_type.__name__, name))


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


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.camera
import gphoto2.context
import gphoto2.file
import gphoto2.filesys
import gphoto2.list
import gphoto2.port_info_list
import gphoto2.port_log
import gphoto2.result
import gphoto2.version
import gphoto2.widget
class CameraAbilitiesList(object):
    """Proxy of C _CameraAbilitiesList 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) -> CameraAbilitiesList"""
        _abilities_list.CameraAbilitiesList_swiginit(self, _abilities_list.new_CameraAbilitiesList())
    __swig_destroy__ = _abilities_list.delete_CameraAbilitiesList

    def __len__(self) -> "int":
        """
        __len__(self) -> int

        Parameters
        ----------
        self: struct _CameraAbilitiesList *

        """
        return _abilities_list.CameraAbilitiesList___len__(self)


    def __getitem__(self, idx: 'int') -> "void":
        """
        __getitem__(self, idx)

        Parameters
        ----------
        idx: int

        """
        return _abilities_list.CameraAbilitiesList___getitem__(self, idx)


    def load(self, *args) -> "void":
        """
        load(self, context)

        Parameters
        ----------
        context: gphoto2.Context (default=None)


        Scans the system for camera drivers.  

        Parameters
        ----------
        * `list` :  
            a CameraAbilitiesList  
        * `context` :  
            a GPContext  

        Returns
        -------
        a gphoto2 error code  

        All supported camera models will then be added to the list.

        See also gphoto2.gp_abilities_list_load
        """
        return _abilities_list.CameraAbilitiesList_load(self, *args)


    def load_dir(self, *args) -> "void":
        """
        load_dir(self, dir, context)

        Parameters
        ----------
        dir: str
        context: gphoto2.Context (default=None)

        """
        return _abilities_list.CameraAbilitiesList_load_dir(self, *args)


    def reset(self) -> "void":
        """
        reset(self)

        Parameters
        ----------
        self: struct _CameraAbilitiesList *


        Reset the list.  

        Parameters
        ----------
        * `list` :  
            a CameraAbilitiesList  

        Returns
        -------
        a gphoto2 error code

        See also gphoto2.gp_abilities_list_reset
        """
        return _abilities_list.CameraAbilitiesList_reset(self)


    def detect(self, *args) -> "void":
        """
        detect(self, info_list, context)

        Parameters
        ----------
        info_list: gphoto2.GPPortInfoList
        context: gphoto2.Context (default=None)


        Parameters
        ----------
        * `list` :  
            a CameraAbilitiesList  
        * `info_list` :  
            the GPPortInfoList of ports to use for detection  
        * `l` :  
            a CameraList that contains the autodetected cameras after the call  
        * `context` :  
            a GPContext  

        Tries to detect any camera connected to the computer using the supplied
        list of supported cameras and the supplied info_list of ports.  

        Returns
        -------
        a gphoto2 error code

        See also gphoto2.gp_abilities_list_detect
        """
        return _abilities_list.CameraAbilitiesList_detect(self, *args)


    def append(self, abilities: 'CameraAbilities') -> "void":
        """
        append(self, abilities)

        Parameters
        ----------
        abilities: gphoto2.CameraAbilities


        Append the abilities to the list.  

        Parameters
        ----------
        * `list` :  
            CameraAbilitiesList  
        * `abilities` :  
            CameraAbilities  

        Returns
        -------
        a gphoto2 error code  

        This function is called by a camera library on camera_abilities() in
        order to inform libgphoto2 about a supported camera model.

        See also gphoto2.gp_abilities_list_append
        """
        return _abilities_list.CameraAbilitiesList_append(self, abilities)


    def count(self) -> "int":
        """
        count(self) -> int

        Parameters
        ----------
        self: struct _CameraAbilitiesList *


        Count the entries in the supplied list.  

        Parameters
        ----------
        * `list` :  
            a CameraAbilitiesList  

        Returns
        -------
        The number of entries or a gphoto2 error code

        See also gphoto2.gp_abilities_list_count
        """
        return _abilities_list.CameraAbilitiesList_count(self)


    def lookup_model(self, model: 'char const *') -> "int":
        """
        lookup_model(self, model) -> int

        Parameters
        ----------
        model: str


        Search the list for an entry of given model name.  

        Parameters
        ----------
        * `list` :  
            a CameraAbilitiesList  
        * `model` :  
            a camera model name  

        Returns
        -------
        Index of entry or gphoto2 error code

        See also gphoto2.gp_abilities_list_lookup_model
        """
        return _abilities_list.CameraAbilitiesList_lookup_model(self, model)


    def get_abilities(self, index: 'int') -> "void":
        """
        get_abilities(self, index)

        Parameters
        ----------
        index: int


        Retrieve the camera abilities of entry with supplied index number.  

        Parameters
        ----------
        * `list` :  
            a CameraAbilitiesList  
        * `index` :  
            index  
        * `abilities` :  
            pointer to CameraAbilities for returned data.  

        Returns
        -------
        a gphoto2 error code  

        Retrieves the camera abilities of entry with supplied index number.
        Typically, you would call gp_camera_set_abilities() afterwards in order
        to prepare the initialization of a camera.

        See also gphoto2.gp_abilities_list_get_abilities
        """
        return _abilities_list.CameraAbilitiesList_get_abilities(self, index)

CameraAbilitiesList.__len__ = new_instancemethod(_abilities_list.CameraAbilitiesList___len__, None, CameraAbilitiesList)
CameraAbilitiesList.__getitem__ = new_instancemethod(_abilities_list.CameraAbilitiesList___getitem__, None, CameraAbilitiesList)
CameraAbilitiesList.load = new_instancemethod(_abilities_list.CameraAbilitiesList_load, None, CameraAbilitiesList)
CameraAbilitiesList.load_dir = new_instancemethod(_abilities_list.CameraAbilitiesList_load_dir, None, CameraAbilitiesList)
CameraAbilitiesList.reset = new_instancemethod(_abilities_list.CameraAbilitiesList_reset, None, CameraAbilitiesList)
CameraAbilitiesList.detect = new_instancemethod(_abilities_list.CameraAbilitiesList_detect, None, CameraAbilitiesList)
CameraAbilitiesList.append = new_instancemethod(_abilities_list.CameraAbilitiesList_append, None, CameraAbilitiesList)
CameraAbilitiesList.count = new_instancemethod(_abilities_list.CameraAbilitiesList_count, None, CameraAbilitiesList)
CameraAbilitiesList.lookup_model = new_instancemethod(_abilities_list.CameraAbilitiesList_lookup_model, None, CameraAbilitiesList)
CameraAbilitiesList.get_abilities = new_instancemethod(_abilities_list.CameraAbilitiesList_get_abilities, None, CameraAbilitiesList)
CameraAbilitiesList_swigregister = _abilities_list.CameraAbilitiesList_swigregister
CameraAbilitiesList_swigregister(CameraAbilitiesList)

GP_DRIVER_STATUS_PRODUCTION = _abilities_list.GP_DRIVER_STATUS_PRODUCTION
GP_DRIVER_STATUS_TESTING = _abilities_list.GP_DRIVER_STATUS_TESTING
GP_DRIVER_STATUS_EXPERIMENTAL = _abilities_list.GP_DRIVER_STATUS_EXPERIMENTAL
GP_DRIVER_STATUS_DEPRECATED = _abilities_list.GP_DRIVER_STATUS_DEPRECATED
GP_DEVICE_STILL_CAMERA = _abilities_list.GP_DEVICE_STILL_CAMERA
GP_DEVICE_AUDIO_PLAYER = _abilities_list.GP_DEVICE_AUDIO_PLAYER
GP_OPERATION_NONE = _abilities_list.GP_OPERATION_NONE
GP_OPERATION_CAPTURE_IMAGE = _abilities_list.GP_OPERATION_CAPTURE_IMAGE
GP_OPERATION_CAPTURE_VIDEO = _abilities_list.GP_OPERATION_CAPTURE_VIDEO
GP_OPERATION_CAPTURE_AUDIO = _abilities_list.GP_OPERATION_CAPTURE_AUDIO
GP_OPERATION_CAPTURE_PREVIEW = _abilities_list.GP_OPERATION_CAPTURE_PREVIEW
GP_OPERATION_CONFIG = _abilities_list.GP_OPERATION_CONFIG
GP_OPERATION_TRIGGER_CAPTURE = _abilities_list.GP_OPERATION_TRIGGER_CAPTURE
GP_FILE_OPERATION_NONE = _abilities_list.GP_FILE_OPERATION_NONE
GP_FILE_OPERATION_DELETE = _abilities_list.GP_FILE_OPERATION_DELETE
GP_FILE_OPERATION_PREVIEW = _abilities_list.GP_FILE_OPERATION_PREVIEW
GP_FILE_OPERATION_RAW = _abilities_list.GP_FILE_OPERATION_RAW
GP_FILE_OPERATION_AUDIO = _abilities_list.GP_FILE_OPERATION_AUDIO
GP_FILE_OPERATION_EXIF = _abilities_list.GP_FILE_OPERATION_EXIF
GP_FOLDER_OPERATION_NONE = _abilities_list.GP_FOLDER_OPERATION_NONE
GP_FOLDER_OPERATION_DELETE_ALL = _abilities_list.GP_FOLDER_OPERATION_DELETE_ALL
GP_FOLDER_OPERATION_PUT_FILE = _abilities_list.GP_FOLDER_OPERATION_PUT_FILE
GP_FOLDER_OPERATION_MAKE_DIR = _abilities_list.GP_FOLDER_OPERATION_MAKE_DIR
GP_FOLDER_OPERATION_REMOVE_DIR = _abilities_list.GP_FOLDER_OPERATION_REMOVE_DIR
class CameraAbilities(object):
    """
    Describes the properties of a specific camera.  

    The internals of this structures are used extensively by the camlibs,
    but the status regarding use by frontends is questionable.  

    C++ includes: gphoto2-abilities-list.h
    """

    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
    model = _swig_property(_abilities_list.CameraAbilities_model_get)
    status = _swig_property(_abilities_list.CameraAbilities_status_get)
    port = _swig_property(_abilities_list.CameraAbilities_port_get)
    speed = _swig_property(_abilities_list.CameraAbilities_speed_get)
    operations = _swig_property(_abilities_list.CameraAbilities_operations_get)
    file_operations = _swig_property(_abilities_list.CameraAbilities_file_operations_get)
    folder_operations = _swig_property(_abilities_list.CameraAbilities_folder_operations_get)
    usb_vendor = _swig_property(_abilities_list.CameraAbilities_usb_vendor_get)
    usb_product = _swig_property(_abilities_list.CameraAbilities_usb_product_get)
    usb_class = _swig_property(_abilities_list.CameraAbilities_usb_class_get)
    usb_subclass = _swig_property(_abilities_list.CameraAbilities_usb_subclass_get)
    usb_protocol = _swig_property(_abilities_list.CameraAbilities_usb_protocol_get)
    library = _swig_property(_abilities_list.CameraAbilities_library_get)
    id = _swig_property(_abilities_list.CameraAbilities_id_get)
    device_type = _swig_property(_abilities_list.CameraAbilities_device_type_get)
    reserved2 = _swig_property(_abilities_list.CameraAbilities_reserved2_get)
    reserved3 = _swig_property(_abilities_list.CameraAbilities_reserved3_get)
    reserved4 = _swig_property(_abilities_list.CameraAbilities_reserved4_get)
    reserved5 = _swig_property(_abilities_list.CameraAbilities_reserved5_get)
    reserved6 = _swig_property(_abilities_list.CameraAbilities_reserved6_get)
    reserved7 = _swig_property(_abilities_list.CameraAbilities_reserved7_get)
    reserved8 = _swig_property(_abilities_list.CameraAbilities_reserved8_get)
    __swig_destroy__ = _abilities_list.delete_CameraAbilities
CameraAbilities_swigregister = _abilities_list.CameraAbilities_swigregister
CameraAbilities_swigregister(CameraAbilities)


def gp_abilities_list_new() -> "CameraAbilitiesList **":
    """
    gp_abilities_list_new() -> int

    Allocate the memory for a new abilities list.  

    Function to allocate the memory for a new abilities list.  

    Parameters
    ----------
    * `list` :  
        CameraAbilitiesList object to initialize  

    Returns
    -------
    gphoto2 error code  

    You would then call gp_abilities_list_load() in order to populate it.

    See also gphoto2.CameraAbilitiesList
    """
    return _abilities_list.gp_abilities_list_new()

def gp_abilities_list_load(*args) -> "int":
    """
    gp_abilities_list_load(list, context) -> int

    Parameters
    ----------
    list: gphoto2.CameraAbilitiesList
    context: gphoto2.Context (default=None)


    Scans the system for camera drivers.  

    Parameters
    ----------
    * `list` :  
        a CameraAbilitiesList  
    * `context` :  
        a GPContext  

    Returns
    -------
    a gphoto2 error code  

    All supported camera models will then be added to the list.

    See also gphoto2.CameraAbilitiesList.load
    """
    return _abilities_list.gp_abilities_list_load(*args)

def gp_abilities_list_load_dir(*args) -> "int":
    """
    gp_abilities_list_load_dir(list, dir, context) -> int

    Parameters
    ----------
    list: gphoto2.CameraAbilitiesList
    dir: str
    context: gphoto2.Context (default=None)

    """
    return _abilities_list.gp_abilities_list_load_dir(*args)

def gp_abilities_list_reset(list: 'CameraAbilitiesList') -> "int":
    """
    gp_abilities_list_reset(list) -> int

    Parameters
    ----------
    list: gphoto2.CameraAbilitiesList


    Reset the list.  

    Parameters
    ----------
    * `list` :  
        a CameraAbilitiesList  

    Returns
    -------
    a gphoto2 error code

    See also gphoto2.CameraAbilitiesList.reset
    """
    return _abilities_list.gp_abilities_list_reset(list)

def gp_abilities_list_detect(*args) -> "CameraList *":
    """
    gp_abilities_list_detect(list, info_list, context) -> int

    Parameters
    ----------
    list: gphoto2.CameraAbilitiesList
    info_list: gphoto2.GPPortInfoList
    context: gphoto2.Context (default=None)


    Parameters
    ----------
    * `list` :  
        a CameraAbilitiesList  
    * `info_list` :  
        the GPPortInfoList of ports to use for detection  
    * `l` :  
        a CameraList that contains the autodetected cameras after the call  
    * `context` :  
        a GPContext  

    Tries to detect any camera connected to the computer using the supplied
    list of supported cameras and the supplied info_list of ports.  

    Returns
    -------
    a gphoto2 error code

    See also gphoto2.CameraAbilitiesList.detect
    """
    return _abilities_list.gp_abilities_list_detect(*args)

def gp_abilities_list_append(list: 'CameraAbilitiesList', abilities: 'CameraAbilities') -> "int":
    """
    gp_abilities_list_append(list, abilities) -> int

    Parameters
    ----------
    list: gphoto2.CameraAbilitiesList
    abilities: gphoto2.CameraAbilities


    Append the abilities to the list.  

    Parameters
    ----------
    * `list` :  
        CameraAbilitiesList  
    * `abilities` :  
        CameraAbilities  

    Returns
    -------
    a gphoto2 error code  

    This function is called by a camera library on camera_abilities() in
    order to inform libgphoto2 about a supported camera model.

    See also gphoto2.CameraAbilitiesList.append
    """
    return _abilities_list.gp_abilities_list_append(list, abilities)

def gp_abilities_list_count(list: 'CameraAbilitiesList') -> "int":
    """
    gp_abilities_list_count(list) -> int

    Parameters
    ----------
    list: gphoto2.CameraAbilitiesList


    Count the entries in the supplied list.  

    Parameters
    ----------
    * `list` :  
        a CameraAbilitiesList  

    Returns
    -------
    The number of entries or a gphoto2 error code

    See also gphoto2.CameraAbilitiesList.count
    """
    return _abilities_list.gp_abilities_list_count(list)

def gp_abilities_list_lookup_model(list: 'CameraAbilitiesList', model: 'char const *') -> "int":
    """
    gp_abilities_list_lookup_model(list, model) -> int

    Parameters
    ----------
    list: gphoto2.CameraAbilitiesList
    model: str


    Search the list for an entry of given model name.  

    Parameters
    ----------
    * `list` :  
        a CameraAbilitiesList  
    * `model` :  
        a camera model name  

    Returns
    -------
    Index of entry or gphoto2 error code

    See also gphoto2.CameraAbilitiesList.lookup_model
    """
    return _abilities_list.gp_abilities_list_lookup_model(list, model)

def gp_abilities_list_get_abilities(list: 'CameraAbilitiesList', index: 'int') -> "CameraAbilities *":
    """
    gp_abilities_list_get_abilities(list, index) -> int

    Parameters
    ----------
    list: gphoto2.CameraAbilitiesList
    index: int


    Retrieve the camera abilities of entry with supplied index number.  

    Parameters
    ----------
    * `list` :  
        a CameraAbilitiesList  
    * `index` :  
        index  
    * `abilities` :  
        pointer to CameraAbilities for returned data.  

    Returns
    -------
    a gphoto2 error code  

    Retrieves the camera abilities of entry with supplied index number.
    Typically, you would call gp_camera_set_abilities() afterwards in order
    to prepare the initialization of a camera.

    See also gphoto2.CameraAbilitiesList.get_abilities
    """
    return _abilities_list.gp_abilities_list_get_abilities(list, index)

def gp_message_codeset(arg1: 'char const *') -> "char const *":
    """
    gp_message_codeset(arg1) -> char const *

    Parameters
    ----------
    arg1: str


    Set the current character codeset libgphoto2 is operating in.  

    Set the codeset for all messages returned by libgphoto2.  

    Parameters
    ----------
    * `codeset` :  
        New codeset for the messages. For instance "utf-8".  

    Returns
    -------
    old codeset as returned from bind_textdomain_codeset().  

    You would then call gp_abilities_list_load() in order to populate it.
    """
    return _abilities_list.gp_message_codeset(arg1)


