# 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 >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_pyupm_wt5001')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_pyupm_wt5001')
    _pyupm_wt5001 = 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('_pyupm_wt5001', [dirname(__file__)])
        except ImportError:
            import _pyupm_wt5001
            return _pyupm_wt5001
        try:
            _mod = imp.load_module('_pyupm_wt5001', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _pyupm_wt5001 = swig_import_helper()
    del swig_import_helper
else:
    import _pyupm_wt5001
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):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            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("'%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,)

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0


def getVersion():
    return _pyupm_wt5001.getVersion()
getVersion = _pyupm_wt5001.getVersion
class uint8Array(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, uint8Array, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, uint8Array, name)
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _pyupm_wt5001.new_uint8Array(nelements)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_wt5001.delete_uint8Array
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _pyupm_wt5001.uint8Array___getitem__(self, index)

    def __setitem__(self, index, value):
        return _pyupm_wt5001.uint8Array___setitem__(self, index, value)

    def cast(self):
        return _pyupm_wt5001.uint8Array_cast(self)
    if _newclass:
        frompointer = staticmethod(_pyupm_wt5001.uint8Array_frompointer)
    else:
        frompointer = _pyupm_wt5001.uint8Array_frompointer
uint8Array_swigregister = _pyupm_wt5001.uint8Array_swigregister
uint8Array_swigregister(uint8Array)

def uint8Array_frompointer(t):
    return _pyupm_wt5001.uint8Array_frompointer(t)
uint8Array_frompointer = _pyupm_wt5001.uint8Array_frompointer

class uint16Array(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, uint16Array, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, uint16Array, name)
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _pyupm_wt5001.new_uint16Array(nelements)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_wt5001.delete_uint16Array
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _pyupm_wt5001.uint16Array___getitem__(self, index)

    def __setitem__(self, index, value):
        return _pyupm_wt5001.uint16Array___setitem__(self, index, value)

    def cast(self):
        return _pyupm_wt5001.uint16Array_cast(self)
    if _newclass:
        frompointer = staticmethod(_pyupm_wt5001.uint16Array_frompointer)
    else:
        frompointer = _pyupm_wt5001.uint16Array_frompointer
uint16Array_swigregister = _pyupm_wt5001.uint16Array_swigregister
uint16Array_swigregister(uint16Array)

def uint16Array_frompointer(t):
    return _pyupm_wt5001.uint16Array_frompointer(t)
uint16Array_frompointer = _pyupm_wt5001.uint16Array_frompointer

class WT5001(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, WT5001, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, WT5001, name)
    __repr__ = _swig_repr
    NONE = _pyupm_wt5001.WT5001_NONE
    PLAY_SD = _pyupm_wt5001.WT5001_PLAY_SD
    PLAY_SPI = _pyupm_wt5001.WT5001_PLAY_SPI
    PLAY_UDISK = _pyupm_wt5001.WT5001_PLAY_UDISK
    PAUSE = _pyupm_wt5001.WT5001_PAUSE
    STOP = _pyupm_wt5001.WT5001_STOP
    NEXT = _pyupm_wt5001.WT5001_NEXT
    PREVIOUS = _pyupm_wt5001.WT5001_PREVIOUS
    SET_VOLUME = _pyupm_wt5001.WT5001_SET_VOLUME
    QUEUE = _pyupm_wt5001.WT5001_QUEUE
    PLAY_MODE = _pyupm_wt5001.WT5001_PLAY_MODE
    COPY_SD2FLASH = _pyupm_wt5001.WT5001_COPY_SD2FLASH
    COPY_UDISK2FLASH = _pyupm_wt5001.WT5001_COPY_UDISK2FLASH
    INSERT_SONG = _pyupm_wt5001.WT5001_INSERT_SONG
    SET_DATE = _pyupm_wt5001.WT5001_SET_DATE
    SET_TIME = _pyupm_wt5001.WT5001_SET_TIME
    SET_ALARM = _pyupm_wt5001.WT5001_SET_ALARM
    SET_ALARM_DUR = _pyupm_wt5001.WT5001_SET_ALARM_DUR
    CLEAR_ALARM = _pyupm_wt5001.WT5001_CLEAR_ALARM
    CLEAR_ALARM_DUR = _pyupm_wt5001.WT5001_CLEAR_ALARM_DUR
    READ_VOLUME = _pyupm_wt5001.WT5001_READ_VOLUME
    READ_PLAY_STATE = _pyupm_wt5001.WT5001_READ_PLAY_STATE
    READ_SPI_NUMF = _pyupm_wt5001.WT5001_READ_SPI_NUMF
    READ_SD_NUMF = _pyupm_wt5001.WT5001_READ_SD_NUMF
    READ_UDISK_NUMF = _pyupm_wt5001.WT5001_READ_UDISK_NUMF
    READ_CUR_FNAME = _pyupm_wt5001.WT5001_READ_CUR_FNAME
    READ_CF_CHAR = _pyupm_wt5001.WT5001_READ_CF_CHAR
    READ_DATE = _pyupm_wt5001.WT5001_READ_DATE
    READ_TIME = _pyupm_wt5001.WT5001_READ_TIME
    NORMAL = _pyupm_wt5001.WT5001_NORMAL
    SINGLE_REPEAT = _pyupm_wt5001.WT5001_SINGLE_REPEAT
    ALL_REPEAT = _pyupm_wt5001.WT5001_ALL_REPEAT
    RANDOM = _pyupm_wt5001.WT5001_RANDOM
    SD = _pyupm_wt5001.WT5001_SD
    SPI = _pyupm_wt5001.WT5001_SPI
    UDISK = _pyupm_wt5001.WT5001_UDISK

    def __init__(self, uart):
        this = _pyupm_wt5001.new_WT5001(uart)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_wt5001.delete_WT5001
    __del__ = lambda self: None

    def dataAvailable(self, millis):
        return _pyupm_wt5001.WT5001_dataAvailable(self, millis)

    def readData(self, buffer, len):
        return _pyupm_wt5001.WT5001_readData(self, buffer, len)

    def writeData(self, buffer, len):
        return _pyupm_wt5001.WT5001_writeData(self, buffer, len)

    def setupTty(self, *args):
        return _pyupm_wt5001.WT5001_setupTty(self, *args)

    def checkResponse(self, opcode):
        return _pyupm_wt5001.WT5001_checkResponse(self, opcode)

    def play(self, psrc, index):
        return _pyupm_wt5001.WT5001_play(self, psrc, index)

    def stop(self):
        return _pyupm_wt5001.WT5001_stop(self)

    def pause(self):
        return _pyupm_wt5001.WT5001_pause(self)

    def next(self):
        return _pyupm_wt5001.WT5001_next(self)

    def previous(self):
        return _pyupm_wt5001.WT5001_previous(self)

    def setVolume(self, vol):
        return _pyupm_wt5001.WT5001_setVolume(self, vol)

    def queue(self, index):
        return _pyupm_wt5001.WT5001_queue(self, index)

    def setPlayMode(self, pm):
        return _pyupm_wt5001.WT5001_setPlayMode(self, pm)

    def insert(self, index):
        return _pyupm_wt5001.WT5001_insert(self, index)

    def setDate(self, year, month, day):
        return _pyupm_wt5001.WT5001_setDate(self, year, month, day)

    def setTime(self, hour, minute, second):
        return _pyupm_wt5001.WT5001_setTime(self, hour, minute, second)

    def setAlarm(self, hour, minute, second):
        return _pyupm_wt5001.WT5001_setAlarm(self, hour, minute, second)

    def clearAlarm(self):
        return _pyupm_wt5001.WT5001_clearAlarm(self)

    def getVolume(self, vol):
        return _pyupm_wt5001.WT5001_getVolume(self, vol)

    def getVolumeNoParam(self):
        return _pyupm_wt5001.WT5001_getVolumeNoParam(self)

    def getPlayState(self, ps):
        return _pyupm_wt5001.WT5001_getPlayState(self, ps)

    def getPlayStateNoParam(self):
        return _pyupm_wt5001.WT5001_getPlayStateNoParam(self)

    def getNumFiles(self, psrc, numf):
        return _pyupm_wt5001.WT5001_getNumFiles(self, psrc, numf)

    def getNumFilesOneParam(self, psrc):
        return _pyupm_wt5001.WT5001_getNumFilesOneParam(self, psrc)

    def getCurrentFile(self, curf):
        return _pyupm_wt5001.WT5001_getCurrentFile(self, curf)

    def getCurrentFileNoParam(self):
        return _pyupm_wt5001.WT5001_getCurrentFileNoParam(self)

    def getDate(self, year, month, day):
        return _pyupm_wt5001.WT5001_getDate(self, year, month, day)

    def getTime(self, hour, minute, second):
        return _pyupm_wt5001.WT5001_getTime(self, hour, minute, second)
WT5001_swigregister = _pyupm_wt5001.WT5001_swigregister
WT5001_swigregister(WT5001)
cvar = _pyupm_wt5001.cvar
WT5001_DEFAULT_UART = cvar.WT5001_DEFAULT_UART
WT5001_MAX_VOLUME = cvar.WT5001_MAX_VOLUME
WT5001_START = cvar.WT5001_START
WT5001_END = cvar.WT5001_END

# This file is compatible with both classic and new-style classes.


