# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.7
#
# 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: _file.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('_file', [dirname(__file__)])
        except ImportError:
            import _file
            return _file
        if fp is not None:
            try:
                _mod = imp.load_module('_file', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _file = swig_import_helper()
    del swig_import_helper
else:
    import _file
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):
        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_nondynamic(self, class_type, name, static=1):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    if (not static):
        return object.__getattr__(self, name)
    else:
        raise AttributeError(name)

def _swig_getattr(self, class_type, name):
    return _swig_getattr_nondynamic(self, class_type, name, 0)


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


class CameraFile(object):
    """Proxy of C _CameraFile 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) -> CameraFile"""
        _file.CameraFile_swiginit(self, _file.new_CameraFile())
    __swig_destroy__ = _file.delete_CameraFile

    def set_name(self, name):
        """
        set_name(self, name)

        Parameters:
            name: char const *


        See also: gphoto2.gp_file_set_name
        """
        return _file.CameraFile_set_name(self, name)


    def get_name(self, name):
        """
        get_name(self, name)

        Parameters:
            name: char const **


        See also: gphoto2.gp_file_get_name
        """
        return _file.CameraFile_get_name(self, name)


    def set_mime_type(self, mime_type):
        """
        set_mime_type(self, mime_type)

        Parameters:
            mime_type: char const *


        See also: gphoto2.gp_file_set_mime_type
        """
        return _file.CameraFile_set_mime_type(self, mime_type)


    def get_mime_type(self, mime_type):
        """
        get_mime_type(self, mime_type)

        Parameters:
            mime_type: char const **


        See also: gphoto2.gp_file_get_mime_type
        """
        return _file.CameraFile_get_mime_type(self, mime_type)


    def set_mtime(self, mtime):
        """
        set_mtime(self, mtime)

        Parameters:
            mtime: time_t


        See also: gphoto2.gp_file_set_mtime
        """
        return _file.CameraFile_set_mtime(self, mtime)


    def get_mtime(self, mtime):
        """
        get_mtime(self, mtime)

        Parameters:
            mtime: time_t *


        See also: gphoto2.gp_file_get_mtime
        """
        return _file.CameraFile_get_mtime(self, mtime)


    def detect_mime_type(self):
        """
        detect_mime_type(self)

        Parameters:
            self: struct _CameraFile *


        See also: gphoto2.gp_file_detect_mime_type
        """
        return _file.CameraFile_detect_mime_type(self)


    def adjust_name_for_mime_type(self):
        """
        adjust_name_for_mime_type(self)

        Parameters:
            self: struct _CameraFile *


        See also: gphoto2.gp_file_adjust_name_for_mime_type
        """
        return _file.CameraFile_adjust_name_for_mime_type(self)


    def get_name_by_type(self, basename, type, newname):
        """
        get_name_by_type(self, basename, type, newname)

        Parameters:
            basename: char const *
            type: enum CameraFileType
            newname: char **


        See also: gphoto2.gp_file_get_name_by_type
        """
        return _file.CameraFile_get_name_by_type(self, basename, type, newname)


    def set_data_and_size(self, data, size):
        """
        set_data_and_size(self, data, size)

        Parameters:
            data: char *
            size: unsigned long


        See also: gphoto2.gp_file_set_data_and_size
        """
        return _file.CameraFile_set_data_and_size(self, data, size)


    def get_data_and_size(self):
        """
        get_data_and_size(self)

        Parameters:
            self: struct _CameraFile *


        See also: gphoto2.gp_file_get_data_and_size
        """
        return _file.CameraFile_get_data_and_size(self)


    def open(self, filename):
        """
        open(self, filename)

        Parameters:
            filename: char const *


        See also: gphoto2.gp_file_open
        """
        return _file.CameraFile_open(self, filename)


    def save(self, filename):
        """
        save(self, filename)

        Parameters:
            filename: char const *


        See also: gphoto2.gp_file_save
        """
        return _file.CameraFile_save(self, filename)


    def clean(self):
        """
        clean(self)

        Parameters:
            self: struct _CameraFile *


        See also: gphoto2.gp_file_clean
        """
        return _file.CameraFile_clean(self)


    def copy(self, source):
        """
        copy(self, source)

        Parameters:
            source: CameraFile *


        See also: gphoto2.gp_file_copy
        """
        return _file.CameraFile_copy(self, source)


    def append(self, data, size):
        """
        append(self, data, size)

        Parameters:
            data: char const *
            size: unsigned long


        See also: gphoto2.gp_file_append
        """
        return _file.CameraFile_append(self, data, size)


    def slurp(self, data):
        """
        slurp(self, data)

        Parameters:
            data: writable buffer


        See also: gphoto2.gp_file_slurp
        """
        return _file.CameraFile_slurp(self, data)

CameraFile.set_name = new_instancemethod(_file.CameraFile_set_name, None, CameraFile)
CameraFile.get_name = new_instancemethod(_file.CameraFile_get_name, None, CameraFile)
CameraFile.set_mime_type = new_instancemethod(_file.CameraFile_set_mime_type, None, CameraFile)
CameraFile.get_mime_type = new_instancemethod(_file.CameraFile_get_mime_type, None, CameraFile)
CameraFile.set_mtime = new_instancemethod(_file.CameraFile_set_mtime, None, CameraFile)
CameraFile.get_mtime = new_instancemethod(_file.CameraFile_get_mtime, None, CameraFile)
CameraFile.detect_mime_type = new_instancemethod(_file.CameraFile_detect_mime_type, None, CameraFile)
CameraFile.adjust_name_for_mime_type = new_instancemethod(_file.CameraFile_adjust_name_for_mime_type, None, CameraFile)
CameraFile.get_name_by_type = new_instancemethod(_file.CameraFile_get_name_by_type, None, CameraFile)
CameraFile.set_data_and_size = new_instancemethod(_file.CameraFile_set_data_and_size, None, CameraFile)
CameraFile.get_data_and_size = new_instancemethod(_file.CameraFile_get_data_and_size, None, CameraFile)
CameraFile.open = new_instancemethod(_file.CameraFile_open, None, CameraFile)
CameraFile.save = new_instancemethod(_file.CameraFile_save, None, CameraFile)
CameraFile.clean = new_instancemethod(_file.CameraFile_clean, None, CameraFile)
CameraFile.copy = new_instancemethod(_file.CameraFile_copy, None, CameraFile)
CameraFile.append = new_instancemethod(_file.CameraFile_append, None, CameraFile)
CameraFile.slurp = new_instancemethod(_file.CameraFile_slurp, None, CameraFile)
CameraFile_swigregister = _file.CameraFile_swigregister
CameraFile_swigregister(CameraFile)


_file.GP_MIME_TXT_swigconstant(_file)
GP_MIME_TXT = _file.GP_MIME_TXT

_file.GP_MIME_WAV_swigconstant(_file)
GP_MIME_WAV = _file.GP_MIME_WAV

_file.GP_MIME_RAW_swigconstant(_file)
GP_MIME_RAW = _file.GP_MIME_RAW

_file.GP_MIME_PNG_swigconstant(_file)
GP_MIME_PNG = _file.GP_MIME_PNG

_file.GP_MIME_PGM_swigconstant(_file)
GP_MIME_PGM = _file.GP_MIME_PGM

_file.GP_MIME_PPM_swigconstant(_file)
GP_MIME_PPM = _file.GP_MIME_PPM

_file.GP_MIME_PNM_swigconstant(_file)
GP_MIME_PNM = _file.GP_MIME_PNM

_file.GP_MIME_JPEG_swigconstant(_file)
GP_MIME_JPEG = _file.GP_MIME_JPEG

_file.GP_MIME_TIFF_swigconstant(_file)
GP_MIME_TIFF = _file.GP_MIME_TIFF

_file.GP_MIME_BMP_swigconstant(_file)
GP_MIME_BMP = _file.GP_MIME_BMP

_file.GP_MIME_QUICKTIME_swigconstant(_file)
GP_MIME_QUICKTIME = _file.GP_MIME_QUICKTIME

_file.GP_MIME_AVI_swigconstant(_file)
GP_MIME_AVI = _file.GP_MIME_AVI

_file.GP_MIME_CRW_swigconstant(_file)
GP_MIME_CRW = _file.GP_MIME_CRW

_file.GP_MIME_CR2_swigconstant(_file)
GP_MIME_CR2 = _file.GP_MIME_CR2

_file.GP_MIME_UNKNOWN_swigconstant(_file)
GP_MIME_UNKNOWN = _file.GP_MIME_UNKNOWN

_file.GP_MIME_EXIF_swigconstant(_file)
GP_MIME_EXIF = _file.GP_MIME_EXIF

_file.GP_MIME_MP3_swigconstant(_file)
GP_MIME_MP3 = _file.GP_MIME_MP3

_file.GP_MIME_OGG_swigconstant(_file)
GP_MIME_OGG = _file.GP_MIME_OGG

_file.GP_MIME_WMA_swigconstant(_file)
GP_MIME_WMA = _file.GP_MIME_WMA

_file.GP_MIME_ASF_swigconstant(_file)
GP_MIME_ASF = _file.GP_MIME_ASF

_file.GP_MIME_MPEG_swigconstant(_file)
GP_MIME_MPEG = _file.GP_MIME_MPEG

_file.GP_MIME_AVCHD_swigconstant(_file)
GP_MIME_AVCHD = _file.GP_MIME_AVCHD

_file.GP_MIME_RW2_swigconstant(_file)
GP_MIME_RW2 = _file.GP_MIME_RW2

_file.GP_MIME_ARW_swigconstant(_file)
GP_MIME_ARW = _file.GP_MIME_ARW

_file.GP_FILE_TYPE_PREVIEW_swigconstant(_file)
GP_FILE_TYPE_PREVIEW = _file.GP_FILE_TYPE_PREVIEW

_file.GP_FILE_TYPE_NORMAL_swigconstant(_file)
GP_FILE_TYPE_NORMAL = _file.GP_FILE_TYPE_NORMAL

_file.GP_FILE_TYPE_RAW_swigconstant(_file)
GP_FILE_TYPE_RAW = _file.GP_FILE_TYPE_RAW

_file.GP_FILE_TYPE_AUDIO_swigconstant(_file)
GP_FILE_TYPE_AUDIO = _file.GP_FILE_TYPE_AUDIO

_file.GP_FILE_TYPE_EXIF_swigconstant(_file)
GP_FILE_TYPE_EXIF = _file.GP_FILE_TYPE_EXIF

_file.GP_FILE_TYPE_METADATA_swigconstant(_file)
GP_FILE_TYPE_METADATA = _file.GP_FILE_TYPE_METADATA

_file.GP_FILE_ACCESSTYPE_MEMORY_swigconstant(_file)
GP_FILE_ACCESSTYPE_MEMORY = _file.GP_FILE_ACCESSTYPE_MEMORY

_file.GP_FILE_ACCESSTYPE_FD_swigconstant(_file)
GP_FILE_ACCESSTYPE_FD = _file.GP_FILE_ACCESSTYPE_FD

_file.GP_FILE_ACCESSTYPE_HANDLER_swigconstant(_file)
GP_FILE_ACCESSTYPE_HANDLER = _file.GP_FILE_ACCESSTYPE_HANDLER

def gp_file_new():
    """
    gp_file_new() -> int

    See also: gphoto2.CameraFile
    """
    return _file.gp_file_new()

def gp_file_new_from_fd(fd):
    """
    gp_file_new_from_fd(fd) -> int

    Parameters:
        fd: int

    """
    return _file.gp_file_new_from_fd(fd)

def gp_file_new_from_handler(handler, priv):
    """
    gp_file_new_from_handler(handler, priv) -> int

    Parameters:
        handler: CameraFileHandler *
        priv: void *

    """
    return _file.gp_file_new_from_handler(handler, priv)

def gp_file_set_name(file, name):
    """
    gp_file_set_name(file, name) -> int

    Parameters:
        file: CameraFile *
        name: char const *


    See also: gphoto2.CameraFile.set_name
    """
    return _file.gp_file_set_name(file, name)

def gp_file_get_name(file, name):
    """
    gp_file_get_name(file, name) -> int

    Parameters:
        file: CameraFile *
        name: char const **


    See also: gphoto2.CameraFile.get_name
    """
    return _file.gp_file_get_name(file, name)

def gp_file_set_mime_type(file, mime_type):
    """
    gp_file_set_mime_type(file, mime_type) -> int

    Parameters:
        file: CameraFile *
        mime_type: char const *


    See also: gphoto2.CameraFile.set_mime_type
    """
    return _file.gp_file_set_mime_type(file, mime_type)

def gp_file_get_mime_type(file, mime_type):
    """
    gp_file_get_mime_type(file, mime_type) -> int

    Parameters:
        file: CameraFile *
        mime_type: char const **


    See also: gphoto2.CameraFile.get_mime_type
    """
    return _file.gp_file_get_mime_type(file, mime_type)

def gp_file_set_mtime(file, mtime):
    """
    gp_file_set_mtime(file, mtime) -> int

    Parameters:
        file: CameraFile *
        mtime: time_t


    See also: gphoto2.CameraFile.set_mtime
    """
    return _file.gp_file_set_mtime(file, mtime)

def gp_file_get_mtime(file, mtime):
    """
    gp_file_get_mtime(file, mtime) -> int

    Parameters:
        file: CameraFile *
        mtime: time_t *


    See also: gphoto2.CameraFile.get_mtime
    """
    return _file.gp_file_get_mtime(file, mtime)

def gp_file_detect_mime_type(file):
    """
    gp_file_detect_mime_type(file) -> int

    Parameters:
        file: CameraFile *


    See also: gphoto2.CameraFile.detect_mime_type
    """
    return _file.gp_file_detect_mime_type(file)

def gp_file_adjust_name_for_mime_type(file):
    """
    gp_file_adjust_name_for_mime_type(file) -> int

    Parameters:
        file: CameraFile *


    See also: gphoto2.CameraFile.adjust_name_for_mime_type
    """
    return _file.gp_file_adjust_name_for_mime_type(file)

def gp_file_get_name_by_type(file, basename, type, newname):
    """
    gp_file_get_name_by_type(file, basename, type, newname) -> int

    Parameters:
        file: CameraFile *
        basename: char const *
        type: enum CameraFileType
        newname: char **


    See also: gphoto2.CameraFile.get_name_by_type
    """
    return _file.gp_file_get_name_by_type(file, basename, type, newname)

def gp_file_set_data_and_size(arg1, data, size):
    """
    gp_file_set_data_and_size(arg1, data, size) -> int

    Parameters:
        arg1: CameraFile *
        data: char *
        size: unsigned long


    See also: gphoto2.CameraFile.set_data_and_size
    """
    return _file.gp_file_set_data_and_size(arg1, data, size)

def gp_file_get_data_and_size(arg1):
    """
    gp_file_get_data_and_size(arg1) -> int

    Parameters:
        arg1: CameraFile *


    See also: gphoto2.CameraFile.get_data_and_size
    """
    return _file.gp_file_get_data_and_size(arg1)

def gp_file_open(file, filename):
    """
    gp_file_open(file, filename) -> int

    Parameters:
        file: CameraFile *
        filename: char const *


    See also: gphoto2.CameraFile.open
    """
    return _file.gp_file_open(file, filename)

def gp_file_save(file, filename):
    """
    gp_file_save(file, filename) -> int

    Parameters:
        file: CameraFile *
        filename: char const *


    See also: gphoto2.CameraFile.save
    """
    return _file.gp_file_save(file, filename)

def gp_file_clean(file):
    """
    gp_file_clean(file) -> int

    Parameters:
        file: CameraFile *


    See also: gphoto2.CameraFile.clean
    """
    return _file.gp_file_clean(file)

def gp_file_copy(destination, source):
    """
    gp_file_copy(destination, source) -> int

    Parameters:
        destination: CameraFile *
        source: CameraFile *


    See also: gphoto2.CameraFile.copy
    """
    return _file.gp_file_copy(destination, source)

def gp_file_append(arg1, data, size):
    """
    gp_file_append(arg1, data, size) -> int

    Parameters:
        arg1: CameraFile *
        data: char const *
        size: unsigned long


    See also: gphoto2.CameraFile.append
    """
    return _file.gp_file_append(arg1, data, size)

def gp_file_slurp(arg1, data):
    """
    gp_file_slurp(arg1, data) -> int

    Parameters:
        arg1: CameraFile *
        data: writable buffer


    See also: gphoto2.CameraFile.slurp
    """
    return _file.gp_file_slurp(arg1, data)


