/* Generated by Cython 0.15.1 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#else

#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif

#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif

#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif

#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif

#if PY_VERSION_HEX < 0x02040000
  #define METH_COEXIST 0
  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
#endif

#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    PyNumber_Int(o)
  #define PyIndex_Check(o)     PyNumber_Check(o)
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
#endif

#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)

  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;

  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)

#endif

#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#endif

#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif

#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif

#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif

#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif

#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)

#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif

#if PY_VERSION_HEX < 0x03020000
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__xmmsapi
#define __PYX_HAVE_API__xmmsapi
#include "xmmsc/xmmsv.h"
#include "xmmsc/xmmsc_idnumbers.h"
#include "xmmsclient/xmmsclient.h"
#include "xmmsc/xmmsc_util.h"
#include "xmmsc/xmmsc_visualization.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif


/* inline attribute */
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

/* unused attribute */
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || defined(__INTEL_COMPILER)
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif

typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/


/* Type Conversion Predeclarations */

#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))

#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);

#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))


#ifdef __GNUC__
  /* Test for GCC > 2.95 */
  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
    #define likely(x)   __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
  #else /* __GNUC__ > 2 ... */
    #define likely(x)   (x)
    #define unlikely(x) (x)
  #endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "xmmsapi.pxd",
  "xmmsapi.pyx",
  "xmmsutils.pxd",
  "xmmsvalue.pxd",
};

/* "xmmsapi.pxd":52
 * 	cpdef value(self)
 * 
 * ctypedef int VisResultCommand             # <<<<<<<<<<<<<<
 * cdef enum:
 * 	VIS_RESULT_CMD_NONE = 0
 */
typedef int __pyx_t_7xmmsapi_VisResultCommand;

/*--- Type declarations ---*/
struct __pyx_obj_7xmmsapi_XmmsCore;
struct __pyx_obj_7xmmsapi_XmmsApi;
struct __pyx_obj_7xmmsapi_XmmsLoop;
struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated;
struct __pyx_obj_7xmmsapi_XmmsVisChunk;
struct __pyx_obj_9xmmsvalue_CollectionRef;
struct __pyx_obj_9xmmsvalue_CollectionIDList;
struct __pyx_obj_9xmmsvalue_CollectionOperands;
struct __pyx_obj_9xmmsvalue_AttributesIterator;
struct __pyx_obj_9xmmsvalue_XmmsListIter;
struct __pyx_obj_7xmmsapi_XmmsResultTracker;
struct __pyx_obj_9xmmsvalue_XmmsValue;
struct __pyx_obj_7xmmsapi_XmmsResult;
struct __pyx_obj_7xmmsapi_XmmsVisResult;
struct __pyx_obj_7xmmsapi_XmmsSourcePreference;
struct __pyx_obj_9xmmsvalue_CollectionAttributes;
struct __pyx_obj_9xmmsvalue_XmmsDictIter;
struct __pyx_obj_9xmmsvalue_Collection;
struct __pyx_opt_args_9xmmsvalue_9XmmsValue_set_value;

/* "xmmsvalue.pxd":65
 * 	cpdef clear(self)
 * 
 * cdef enum AttributesIterType:             # <<<<<<<<<<<<<<
 * 	ITER_KEYS = 1
 * 	ITER_VALUES = 2
 */
enum __pyx_t_9xmmsvalue_AttributesIterType {
  __pyx_e_9xmmsvalue_ITER_KEYS = 1,
  __pyx_e_9xmmsvalue_ITER_VALUES = 2,
  __pyx_e_9xmmsvalue_ITER_ITEMS = 3
};

/* "xmmsvalue.pxd":14
 * 	cdef int ispropdict
 * 
 * 	cdef  set_value(self, xmmsv_t *value, int ispropdict=*)             # <<<<<<<<<<<<<<
 * 	cpdef set_pyval(self, pyval)
 * 	cpdef get_type(self)
 */
struct __pyx_opt_args_9xmmsvalue_9XmmsValue_set_value {
  int __pyx_n;
  int ispropdict;
};
struct __pyx_opt_args_7xmmsapi_8XmmsCore_connect;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_quit;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_plugin_list;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_start;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_stop;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_tickle;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_pause;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_current_id;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_seek_ms;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_seek_samples;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_status;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_status;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_current_id;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_playtime;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_signal_playback_playtime;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_volume_set;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_volume_get;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_volume_changed;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_loaded;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_load;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_list;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_remove;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_shuffle;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_rinsert;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_url;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_id;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_collection;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_radd;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_url;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_id;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_collection;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_remove_entry;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_clear;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_list_entries;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_sort;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_set_next_rel;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_set_next;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_move;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_create;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_current_pos;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_current_active;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_current_pos;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_changed;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_config_value_changed;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_set_value;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_get_value;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_list_values;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_register_value;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_add_entry;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_remove_entry;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_move_entry;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_get_info;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_rehash;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_get_id;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_import_path;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_property_set;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_property_remove;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_medialib_entry_added;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_medialib_entry_changed;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_collection_changed;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_signal_mediainfo_reader_unindexed;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_mediainfo_reader_status;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_xform_media_browse;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_get;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_list;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_save;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_remove;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_rename;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_idlist_from_playlist_file;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_query_ids;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_query_infos;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_add;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_retrieve;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_remove;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_list;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_stats;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_version;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_init;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_start;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_property_set;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_properties_set;
struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_chunk_get;

/* "xmmsapi.pxd":53
 * 
 * ctypedef int VisResultCommand
 * cdef enum:             # <<<<<<<<<<<<<<
 * 	VIS_RESULT_CMD_NONE = 0
 * 	VIS_RESULT_CMD_INIT = 1
 */
enum  {
  __pyx_e_7xmmsapi_VIS_RESULT_CMD_NONE = 0,
  __pyx_e_7xmmsapi_VIS_RESULT_CMD_INIT = 1,
  __pyx_e_7xmmsapi_VIS_RESULT_CMD_START = 2
};

/* "xmmsapi.pxd":97
 * 	cpdef set_need_out_fun(self, fun)
 * 	cpdef get_fd(self)
 * 	cpdef connect(self, path=*, disconnect_func=*)             # <<<<<<<<<<<<<<
 * 	cdef XmmsResult _create_result(self, cb, xmmsc_result_t *res, Cls)
 * 	cdef XmmsResult create_result(self, cb, xmmsc_result_t *res)
 */
struct __pyx_opt_args_7xmmsapi_8XmmsCore_connect {
  int __pyx_n;
  PyObject *path;
  PyObject *disconnect_func;
};

/* "xmmsapi.pxd":107
 * 
 * cdef class XmmsApi(XmmsCore):
 * 	cpdef XmmsResult quit(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult plugin_list(self, typ, cb=*)
 * 	cpdef XmmsResult playback_start(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_quit {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":108
 * cdef class XmmsApi(XmmsCore):
 * 	cpdef XmmsResult quit(self, cb=*)
 * 	cpdef XmmsResult plugin_list(self, typ, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playback_start(self, cb=*)
 * 	cpdef XmmsResult playback_stop(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_plugin_list {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":109
 * 	cpdef XmmsResult quit(self, cb=*)
 * 	cpdef XmmsResult plugin_list(self, typ, cb=*)
 * 	cpdef XmmsResult playback_start(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playback_stop(self, cb=*)
 * 	cpdef XmmsResult playback_tickle(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_start {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":110
 * 	cpdef XmmsResult plugin_list(self, typ, cb=*)
 * 	cpdef XmmsResult playback_start(self, cb=*)
 * 	cpdef XmmsResult playback_stop(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playback_tickle(self, cb=*)
 * 	cpdef XmmsResult playback_pause(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_stop {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":111
 * 	cpdef XmmsResult playback_start(self, cb=*)
 * 	cpdef XmmsResult playback_stop(self, cb=*)
 * 	cpdef XmmsResult playback_tickle(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playback_pause(self, cb=*)
 * 	cpdef XmmsResult playback_current_id(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_tickle {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":112
 * 	cpdef XmmsResult playback_stop(self, cb=*)
 * 	cpdef XmmsResult playback_tickle(self, cb=*)
 * 	cpdef XmmsResult playback_pause(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playback_current_id(self, cb=*)
 * 	cpdef XmmsResult playback_seek_ms(self, int ms, xmms_playback_seek_mode_t whence=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_pause {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":113
 * 	cpdef XmmsResult playback_tickle(self, cb=*)
 * 	cpdef XmmsResult playback_pause(self, cb=*)
 * 	cpdef XmmsResult playback_current_id(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playback_seek_ms(self, int ms, xmms_playback_seek_mode_t whence=*, cb=*)
 * 	cpdef XmmsResult playback_seek_samples(self, int samples, xmms_playback_seek_mode_t whence=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_current_id {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":114
 * 	cpdef XmmsResult playback_pause(self, cb=*)
 * 	cpdef XmmsResult playback_current_id(self, cb=*)
 * 	cpdef XmmsResult playback_seek_ms(self, int ms, xmms_playback_seek_mode_t whence=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playback_seek_samples(self, int samples, xmms_playback_seek_mode_t whence=*, cb=*)
 * 	cpdef XmmsResult playback_status(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_seek_ms {
  int __pyx_n;
  xmms_playback_seek_mode_t whence;
  PyObject *cb;
};

/* "xmmsapi.pxd":115
 * 	cpdef XmmsResult playback_current_id(self, cb=*)
 * 	cpdef XmmsResult playback_seek_ms(self, int ms, xmms_playback_seek_mode_t whence=*, cb=*)
 * 	cpdef XmmsResult playback_seek_samples(self, int samples, xmms_playback_seek_mode_t whence=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playback_status(self, cb=*)
 * 	cpdef XmmsResult broadcast_playback_status(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_seek_samples {
  int __pyx_n;
  xmms_playback_seek_mode_t whence;
  PyObject *cb;
};

/* "xmmsapi.pxd":116
 * 	cpdef XmmsResult playback_seek_ms(self, int ms, xmms_playback_seek_mode_t whence=*, cb=*)
 * 	cpdef XmmsResult playback_seek_samples(self, int samples, xmms_playback_seek_mode_t whence=*, cb=*)
 * 	cpdef XmmsResult playback_status(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult broadcast_playback_status(self, cb=*)
 * 	cpdef XmmsResult broadcast_playback_current_id(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_status {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":117
 * 	cpdef XmmsResult playback_seek_samples(self, int samples, xmms_playback_seek_mode_t whence=*, cb=*)
 * 	cpdef XmmsResult playback_status(self, cb=*)
 * 	cpdef XmmsResult broadcast_playback_status(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult broadcast_playback_current_id(self, cb=*)
 * 	cpdef XmmsResult playback_playtime(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_status {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":118
 * 	cpdef XmmsResult playback_status(self, cb=*)
 * 	cpdef XmmsResult broadcast_playback_status(self, cb=*)
 * 	cpdef XmmsResult broadcast_playback_current_id(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playback_playtime(self, cb=*)
 * 	cpdef XmmsResult signal_playback_playtime(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_current_id {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":119
 * 	cpdef XmmsResult broadcast_playback_status(self, cb=*)
 * 	cpdef XmmsResult broadcast_playback_current_id(self, cb=*)
 * 	cpdef XmmsResult playback_playtime(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult signal_playback_playtime(self, cb=*)
 * 	cpdef XmmsResult playback_volume_set(self, channel, int volume, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_playtime {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":120
 * 	cpdef XmmsResult broadcast_playback_current_id(self, cb=*)
 * 	cpdef XmmsResult playback_playtime(self, cb=*)
 * 	cpdef XmmsResult signal_playback_playtime(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playback_volume_set(self, channel, int volume, cb=*)
 * 	cpdef XmmsResult playback_volume_get(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_signal_playback_playtime {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":121
 * 	cpdef XmmsResult playback_playtime(self, cb=*)
 * 	cpdef XmmsResult signal_playback_playtime(self, cb=*)
 * 	cpdef XmmsResult playback_volume_set(self, channel, int volume, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playback_volume_get(self, cb=*)
 * 	cpdef XmmsResult broadcast_playback_volume_changed(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_volume_set {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":122
 * 	cpdef XmmsResult signal_playback_playtime(self, cb=*)
 * 	cpdef XmmsResult playback_volume_set(self, channel, int volume, cb=*)
 * 	cpdef XmmsResult playback_volume_get(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult broadcast_playback_volume_changed(self, cb=*)
 * 	cpdef XmmsResult broadcast_playlist_loaded(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_volume_get {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":123
 * 	cpdef XmmsResult playback_volume_set(self, channel, int volume, cb=*)
 * 	cpdef XmmsResult playback_volume_get(self, cb=*)
 * 	cpdef XmmsResult broadcast_playback_volume_changed(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult broadcast_playlist_loaded(self, cb=*)
 * 	cpdef XmmsResult playlist_load(self, playlist, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_volume_changed {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":124
 * 	cpdef XmmsResult playback_volume_get(self, cb=*)
 * 	cpdef XmmsResult broadcast_playback_volume_changed(self, cb=*)
 * 	cpdef XmmsResult broadcast_playlist_loaded(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_load(self, playlist, cb=*)
 * 	cpdef XmmsResult playlist_list(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_loaded {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":125
 * 	cpdef XmmsResult broadcast_playback_volume_changed(self, cb=*)
 * 	cpdef XmmsResult broadcast_playlist_loaded(self, cb=*)
 * 	cpdef XmmsResult playlist_load(self, playlist, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_list(self, cb=*)
 * 	cpdef XmmsResult playlist_remove(self, playlist, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_load {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":126
 * 	cpdef XmmsResult broadcast_playlist_loaded(self, cb=*)
 * 	cpdef XmmsResult playlist_load(self, playlist, cb=*)
 * 	cpdef XmmsResult playlist_list(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_remove(self, playlist, cb=*)
 * 	cpdef XmmsResult playlist_shuffle(self, playlist=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_list {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":127
 * 	cpdef XmmsResult playlist_load(self, playlist, cb=*)
 * 	cpdef XmmsResult playlist_list(self, cb=*)
 * 	cpdef XmmsResult playlist_remove(self, playlist, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_shuffle(self, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_rinsert(self, int pos, url, playlist=*, cb=*, encoded=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_remove {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":128
 * 	cpdef XmmsResult playlist_list(self, cb=*)
 * 	cpdef XmmsResult playlist_remove(self, playlist, cb=*)
 * 	cpdef XmmsResult playlist_shuffle(self, playlist=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_rinsert(self, int pos, url, playlist=*, cb=*, encoded=*)
 * 	cpdef XmmsResult playlist_insert_url(self, int pos, url, playlist=*, cb=*, encoded=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_shuffle {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
};

/* "xmmsapi.pxd":129
 * 	cpdef XmmsResult playlist_remove(self, playlist, cb=*)
 * 	cpdef XmmsResult playlist_shuffle(self, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_rinsert(self, int pos, url, playlist=*, cb=*, encoded=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_insert_url(self, int pos, url, playlist=*, cb=*, encoded=*)
 * 	cpdef XmmsResult playlist_insert_id(self, int pos, int id, playlist=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_rinsert {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
  PyObject *encoded;
};

/* "xmmsapi.pxd":130
 * 	cpdef XmmsResult playlist_shuffle(self, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_rinsert(self, int pos, url, playlist=*, cb=*, encoded=*)
 * 	cpdef XmmsResult playlist_insert_url(self, int pos, url, playlist=*, cb=*, encoded=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_insert_id(self, int pos, int id, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_insert_collection(self, int pos, Collection coll, order=*, playlist=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_url {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
  PyObject *encoded;
};

/* "xmmsapi.pxd":131
 * 	cpdef XmmsResult playlist_rinsert(self, int pos, url, playlist=*, cb=*, encoded=*)
 * 	cpdef XmmsResult playlist_insert_url(self, int pos, url, playlist=*, cb=*, encoded=*)
 * 	cpdef XmmsResult playlist_insert_id(self, int pos, int id, playlist=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_insert_collection(self, int pos, Collection coll, order=*, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_radd(self, url, playlist=*, cb=*, encoded=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_id {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
};

/* "xmmsapi.pxd":132
 * 	cpdef XmmsResult playlist_insert_url(self, int pos, url, playlist=*, cb=*, encoded=*)
 * 	cpdef XmmsResult playlist_insert_id(self, int pos, int id, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_insert_collection(self, int pos, Collection coll, order=*, playlist=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_radd(self, url, playlist=*, cb=*, encoded=*)
 * 	cpdef XmmsResult playlist_add_url(self, url, playlist=*, cb=*, encoded=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_collection {
  int __pyx_n;
  PyObject *order;
  PyObject *playlist;
  PyObject *cb;
};

/* "xmmsapi.pxd":133
 * 	cpdef XmmsResult playlist_insert_id(self, int pos, int id, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_insert_collection(self, int pos, Collection coll, order=*, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_radd(self, url, playlist=*, cb=*, encoded=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_add_url(self, url, playlist=*, cb=*, encoded=*)
 * 	cpdef XmmsResult playlist_add_id(self, int id, playlist=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_radd {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
  PyObject *encoded;
};

/* "xmmsapi.pxd":134
 * 	cpdef XmmsResult playlist_insert_collection(self, int pos, Collection coll, order=*, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_radd(self, url, playlist=*, cb=*, encoded=*)
 * 	cpdef XmmsResult playlist_add_url(self, url, playlist=*, cb=*, encoded=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_add_id(self, int id, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_add_collection(self, Collection coll, order=*, playlist=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_url {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
  PyObject *encoded;
};

/* "xmmsapi.pxd":135
 * 	cpdef XmmsResult playlist_radd(self, url, playlist=*, cb=*, encoded=*)
 * 	cpdef XmmsResult playlist_add_url(self, url, playlist=*, cb=*, encoded=*)
 * 	cpdef XmmsResult playlist_add_id(self, int id, playlist=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_add_collection(self, Collection coll, order=*, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_remove_entry(self, int id, playlist=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_id {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
};

/* "xmmsapi.pxd":136
 * 	cpdef XmmsResult playlist_add_url(self, url, playlist=*, cb=*, encoded=*)
 * 	cpdef XmmsResult playlist_add_id(self, int id, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_add_collection(self, Collection coll, order=*, playlist=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_remove_entry(self, int id, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_clear(self, playlist=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_collection {
  int __pyx_n;
  PyObject *order;
  PyObject *playlist;
  PyObject *cb;
};

/* "xmmsapi.pxd":137
 * 	cpdef XmmsResult playlist_add_id(self, int id, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_add_collection(self, Collection coll, order=*, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_remove_entry(self, int id, playlist=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_clear(self, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_list_entries(self, playlist=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_remove_entry {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
};

/* "xmmsapi.pxd":138
 * 	cpdef XmmsResult playlist_add_collection(self, Collection coll, order=*, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_remove_entry(self, int id, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_clear(self, playlist=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_list_entries(self, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_sort(self, props, playlist=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_clear {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
};

/* "xmmsapi.pxd":139
 * 	cpdef XmmsResult playlist_remove_entry(self, int id, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_clear(self, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_list_entries(self, playlist=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_sort(self, props, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_set_next_rel(self, int position, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_list_entries {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
};

/* "xmmsapi.pxd":140
 * 	cpdef XmmsResult playlist_clear(self, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_list_entries(self, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_sort(self, props, playlist=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_set_next_rel(self, int position, cb=*)
 * 	cpdef XmmsResult playlist_set_next(self, int position, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_sort {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
};

/* "xmmsapi.pxd":141
 * 	cpdef XmmsResult playlist_list_entries(self, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_sort(self, props, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_set_next_rel(self, int position, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_set_next(self, int position, cb=*)
 * 	cpdef XmmsResult playlist_move(self, int cur_pos, int new_pos, playlist=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_set_next_rel {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":142
 * 	cpdef XmmsResult playlist_sort(self, props, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_set_next_rel(self, int position, cb=*)
 * 	cpdef XmmsResult playlist_set_next(self, int position, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_move(self, int cur_pos, int new_pos, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_create(self, playlist, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_set_next {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":143
 * 	cpdef XmmsResult playlist_set_next_rel(self, int position, cb=*)
 * 	cpdef XmmsResult playlist_set_next(self, int position, cb=*)
 * 	cpdef XmmsResult playlist_move(self, int cur_pos, int new_pos, playlist=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_create(self, playlist, cb=*)
 * 	cpdef XmmsResult playlist_current_pos(self, playlist=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_move {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
};

/* "xmmsapi.pxd":144
 * 	cpdef XmmsResult playlist_set_next(self, int position, cb=*)
 * 	cpdef XmmsResult playlist_move(self, int cur_pos, int new_pos, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_create(self, playlist, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_current_pos(self, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_current_active(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_create {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":145
 * 	cpdef XmmsResult playlist_move(self, int cur_pos, int new_pos, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_create(self, playlist, cb=*)
 * 	cpdef XmmsResult playlist_current_pos(self, playlist=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult playlist_current_active(self, cb=*)
 * 	cpdef XmmsResult broadcast_playlist_current_pos(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_current_pos {
  int __pyx_n;
  PyObject *playlist;
  PyObject *cb;
};

/* "xmmsapi.pxd":146
 * 	cpdef XmmsResult playlist_create(self, playlist, cb=*)
 * 	cpdef XmmsResult playlist_current_pos(self, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_current_active(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult broadcast_playlist_current_pos(self, cb=*)
 * 	cpdef XmmsResult broadcast_playlist_changed(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_current_active {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":147
 * 	cpdef XmmsResult playlist_current_pos(self, playlist=*, cb=*)
 * 	cpdef XmmsResult playlist_current_active(self, cb=*)
 * 	cpdef XmmsResult broadcast_playlist_current_pos(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult broadcast_playlist_changed(self, cb=*)
 * 	cpdef XmmsResult broadcast_config_value_changed(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_current_pos {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":148
 * 	cpdef XmmsResult playlist_current_active(self, cb=*)
 * 	cpdef XmmsResult broadcast_playlist_current_pos(self, cb=*)
 * 	cpdef XmmsResult broadcast_playlist_changed(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult broadcast_config_value_changed(self, cb=*)
 * 	cpdef XmmsResult config_set_value(self, key, val, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_changed {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":149
 * 	cpdef XmmsResult broadcast_playlist_current_pos(self, cb=*)
 * 	cpdef XmmsResult broadcast_playlist_changed(self, cb=*)
 * 	cpdef XmmsResult broadcast_config_value_changed(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult config_set_value(self, key, val, cb=*)
 * 	cpdef XmmsResult config_get_value(self, key, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_config_value_changed {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":150
 * 	cpdef XmmsResult broadcast_playlist_changed(self, cb=*)
 * 	cpdef XmmsResult broadcast_config_value_changed(self, cb=*)
 * 	cpdef XmmsResult config_set_value(self, key, val, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult config_get_value(self, key, cb=*)
 * 	cpdef XmmsResult config_list_values(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_set_value {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":151
 * 	cpdef XmmsResult broadcast_config_value_changed(self, cb=*)
 * 	cpdef XmmsResult config_set_value(self, key, val, cb=*)
 * 	cpdef XmmsResult config_get_value(self, key, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult config_list_values(self, cb=*)
 * 	cpdef XmmsResult config_register_value(self, valuename, defaultvalue, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_get_value {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":152
 * 	cpdef XmmsResult config_set_value(self, key, val, cb=*)
 * 	cpdef XmmsResult config_get_value(self, key, cb=*)
 * 	cpdef XmmsResult config_list_values(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult config_register_value(self, valuename, defaultvalue, cb=*)
 * 	cpdef XmmsResult medialib_add_entry(self, path, cb=*, encoded=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_list_values {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":153
 * 	cpdef XmmsResult config_get_value(self, key, cb=*)
 * 	cpdef XmmsResult config_list_values(self, cb=*)
 * 	cpdef XmmsResult config_register_value(self, valuename, defaultvalue, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult medialib_add_entry(self, path, cb=*, encoded=*)
 * 	cpdef XmmsResult medialib_remove_entry(self, int id, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_register_value {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":154
 * 	cpdef XmmsResult config_list_values(self, cb=*)
 * 	cpdef XmmsResult config_register_value(self, valuename, defaultvalue, cb=*)
 * 	cpdef XmmsResult medialib_add_entry(self, path, cb=*, encoded=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult medialib_remove_entry(self, int id, cb=*)
 * 	cpdef XmmsResult medialib_move_entry(self, int id, url, cb=*, encoded=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_add_entry {
  int __pyx_n;
  PyObject *cb;
  PyObject *encoded;
};

/* "xmmsapi.pxd":155
 * 	cpdef XmmsResult config_register_value(self, valuename, defaultvalue, cb=*)
 * 	cpdef XmmsResult medialib_add_entry(self, path, cb=*, encoded=*)
 * 	cpdef XmmsResult medialib_remove_entry(self, int id, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult medialib_move_entry(self, int id, url, cb=*, encoded=*)
 * 	cpdef XmmsResult medialib_get_info(self, int id, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_remove_entry {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":156
 * 	cpdef XmmsResult medialib_add_entry(self, path, cb=*, encoded=*)
 * 	cpdef XmmsResult medialib_remove_entry(self, int id, cb=*)
 * 	cpdef XmmsResult medialib_move_entry(self, int id, url, cb=*, encoded=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult medialib_get_info(self, int id, cb=*)
 * 	cpdef XmmsResult medialib_rehash(self, int id=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_move_entry {
  int __pyx_n;
  PyObject *cb;
  PyObject *encoded;
};

/* "xmmsapi.pxd":157
 * 	cpdef XmmsResult medialib_remove_entry(self, int id, cb=*)
 * 	cpdef XmmsResult medialib_move_entry(self, int id, url, cb=*, encoded=*)
 * 	cpdef XmmsResult medialib_get_info(self, int id, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult medialib_rehash(self, int id=*, cb=*)
 * 	cpdef XmmsResult medialib_get_id(self, url, cb=*, encoded=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_get_info {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":158
 * 	cpdef XmmsResult medialib_move_entry(self, int id, url, cb=*, encoded=*)
 * 	cpdef XmmsResult medialib_get_info(self, int id, cb=*)
 * 	cpdef XmmsResult medialib_rehash(self, int id=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult medialib_get_id(self, url, cb=*, encoded=*)
 * 	cpdef XmmsResult medialib_import_path(self, path, cb=*, encoded=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_rehash {
  int __pyx_n;
  int id;
  PyObject *cb;
};

/* "xmmsapi.pxd":159
 * 	cpdef XmmsResult medialib_get_info(self, int id, cb=*)
 * 	cpdef XmmsResult medialib_rehash(self, int id=*, cb=*)
 * 	cpdef XmmsResult medialib_get_id(self, url, cb=*, encoded=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult medialib_import_path(self, path, cb=*, encoded=*)
 * 	cpdef XmmsResult medialib_property_set(self, int id, key, value, source=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_get_id {
  int __pyx_n;
  PyObject *cb;
  PyObject *encoded;
};

/* "xmmsapi.pxd":160
 * 	cpdef XmmsResult medialib_rehash(self, int id=*, cb=*)
 * 	cpdef XmmsResult medialib_get_id(self, url, cb=*, encoded=*)
 * 	cpdef XmmsResult medialib_import_path(self, path, cb=*, encoded=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult medialib_property_set(self, int id, key, value, source=*, cb=*)
 * 	cpdef XmmsResult medialib_property_remove(self, int id, key, source=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_import_path {
  int __pyx_n;
  PyObject *cb;
  PyObject *encoded;
};

/* "xmmsapi.pxd":161
 * 	cpdef XmmsResult medialib_get_id(self, url, cb=*, encoded=*)
 * 	cpdef XmmsResult medialib_import_path(self, path, cb=*, encoded=*)
 * 	cpdef XmmsResult medialib_property_set(self, int id, key, value, source=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult medialib_property_remove(self, int id, key, source=*, cb=*)
 * 	cpdef XmmsResult broadcast_medialib_entry_added(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_property_set {
  int __pyx_n;
  PyObject *source;
  PyObject *cb;
};

/* "xmmsapi.pxd":162
 * 	cpdef XmmsResult medialib_import_path(self, path, cb=*, encoded=*)
 * 	cpdef XmmsResult medialib_property_set(self, int id, key, value, source=*, cb=*)
 * 	cpdef XmmsResult medialib_property_remove(self, int id, key, source=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult broadcast_medialib_entry_added(self, cb=*)
 * 	cpdef XmmsResult broadcast_medialib_entry_changed(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_property_remove {
  int __pyx_n;
  PyObject *source;
  PyObject *cb;
};

/* "xmmsapi.pxd":163
 * 	cpdef XmmsResult medialib_property_set(self, int id, key, value, source=*, cb=*)
 * 	cpdef XmmsResult medialib_property_remove(self, int id, key, source=*, cb=*)
 * 	cpdef XmmsResult broadcast_medialib_entry_added(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult broadcast_medialib_entry_changed(self, cb=*)
 * 	cpdef XmmsResult broadcast_collection_changed(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_medialib_entry_added {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":164
 * 	cpdef XmmsResult medialib_property_remove(self, int id, key, source=*, cb=*)
 * 	cpdef XmmsResult broadcast_medialib_entry_added(self, cb=*)
 * 	cpdef XmmsResult broadcast_medialib_entry_changed(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult broadcast_collection_changed(self, cb=*)
 * 	cpdef XmmsResult signal_mediainfo_reader_unindexed(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_medialib_entry_changed {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":165
 * 	cpdef XmmsResult broadcast_medialib_entry_added(self, cb=*)
 * 	cpdef XmmsResult broadcast_medialib_entry_changed(self, cb=*)
 * 	cpdef XmmsResult broadcast_collection_changed(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult signal_mediainfo_reader_unindexed(self, cb=*)
 * 	cpdef XmmsResult broadcast_mediainfo_reader_status(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_collection_changed {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":166
 * 	cpdef XmmsResult broadcast_medialib_entry_changed(self, cb=*)
 * 	cpdef XmmsResult broadcast_collection_changed(self, cb=*)
 * 	cpdef XmmsResult signal_mediainfo_reader_unindexed(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult broadcast_mediainfo_reader_status(self, cb=*)
 * 	cpdef XmmsResult xform_media_browse(self, url, cb=*, encoded=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_signal_mediainfo_reader_unindexed {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":167
 * 	cpdef XmmsResult broadcast_collection_changed(self, cb=*)
 * 	cpdef XmmsResult signal_mediainfo_reader_unindexed(self, cb=*)
 * 	cpdef XmmsResult broadcast_mediainfo_reader_status(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult xform_media_browse(self, url, cb=*, encoded=*)
 * 	cpdef XmmsResult coll_get(self, name, ns=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_mediainfo_reader_status {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":168
 * 	cpdef XmmsResult signal_mediainfo_reader_unindexed(self, cb=*)
 * 	cpdef XmmsResult broadcast_mediainfo_reader_status(self, cb=*)
 * 	cpdef XmmsResult xform_media_browse(self, url, cb=*, encoded=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult coll_get(self, name, ns=*, cb=*)
 * 	cpdef XmmsResult coll_list(self, ns=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_xform_media_browse {
  int __pyx_n;
  PyObject *cb;
  PyObject *encoded;
};

/* "xmmsapi.pxd":169
 * 	cpdef XmmsResult broadcast_mediainfo_reader_status(self, cb=*)
 * 	cpdef XmmsResult xform_media_browse(self, url, cb=*, encoded=*)
 * 	cpdef XmmsResult coll_get(self, name, ns=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult coll_list(self, ns=*, cb=*)
 * 	cpdef XmmsResult coll_save(self, Collection coll, name, ns=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_get {
  int __pyx_n;
  PyObject *ns;
  PyObject *cb;
};

/* "xmmsapi.pxd":170
 * 	cpdef XmmsResult xform_media_browse(self, url, cb=*, encoded=*)
 * 	cpdef XmmsResult coll_get(self, name, ns=*, cb=*)
 * 	cpdef XmmsResult coll_list(self, ns=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult coll_save(self, Collection coll, name, ns=*, cb=*)
 * 	cpdef XmmsResult coll_remove(self, name, ns=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_list {
  int __pyx_n;
  PyObject *ns;
  PyObject *cb;
};

/* "xmmsapi.pxd":171
 * 	cpdef XmmsResult coll_get(self, name, ns=*, cb=*)
 * 	cpdef XmmsResult coll_list(self, ns=*, cb=*)
 * 	cpdef XmmsResult coll_save(self, Collection coll, name, ns=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult coll_remove(self, name, ns=*, cb=*)
 * 	cpdef XmmsResult coll_rename(self, oldname, newname, ns=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_save {
  int __pyx_n;
  PyObject *ns;
  PyObject *cb;
};

/* "xmmsapi.pxd":172
 * 	cpdef XmmsResult coll_list(self, ns=*, cb=*)
 * 	cpdef XmmsResult coll_save(self, Collection coll, name, ns=*, cb=*)
 * 	cpdef XmmsResult coll_remove(self, name, ns=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult coll_rename(self, oldname, newname, ns=*, cb=*)
 * 	cpdef XmmsResult coll_idlist_from_playlist_file(self, path, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_remove {
  int __pyx_n;
  PyObject *ns;
  PyObject *cb;
};

/* "xmmsapi.pxd":173
 * 	cpdef XmmsResult coll_save(self, Collection coll, name, ns=*, cb=*)
 * 	cpdef XmmsResult coll_remove(self, name, ns=*, cb=*)
 * 	cpdef XmmsResult coll_rename(self, oldname, newname, ns=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult coll_idlist_from_playlist_file(self, path, cb=*)
 * 	cpdef XmmsResult coll_query_ids(self, Collection coll, start=*, leng=*, order=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_rename {
  int __pyx_n;
  PyObject *ns;
  PyObject *cb;
};

/* "xmmsapi.pxd":174
 * 	cpdef XmmsResult coll_remove(self, name, ns=*, cb=*)
 * 	cpdef XmmsResult coll_rename(self, oldname, newname, ns=*, cb=*)
 * 	cpdef XmmsResult coll_idlist_from_playlist_file(self, path, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult coll_query_ids(self, Collection coll, start=*, leng=*, order=*, cb=*)
 * 	cpdef XmmsResult coll_query_infos(self, Collection coll, fields, start=*, leng=*, order=*, groupby=*, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_idlist_from_playlist_file {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":175
 * 	cpdef XmmsResult coll_rename(self, oldname, newname, ns=*, cb=*)
 * 	cpdef XmmsResult coll_idlist_from_playlist_file(self, path, cb=*)
 * 	cpdef XmmsResult coll_query_ids(self, Collection coll, start=*, leng=*, order=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult coll_query_infos(self, Collection coll, fields, start=*, leng=*, order=*, groupby=*, cb=*)
 * 	cpdef XmmsResult bindata_add(self, data, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_query_ids {
  int __pyx_n;
  PyObject *start;
  PyObject *leng;
  PyObject *order;
  PyObject *cb;
};

/* "xmmsapi.pxd":176
 * 	cpdef XmmsResult coll_idlist_from_playlist_file(self, path, cb=*)
 * 	cpdef XmmsResult coll_query_ids(self, Collection coll, start=*, leng=*, order=*, cb=*)
 * 	cpdef XmmsResult coll_query_infos(self, Collection coll, fields, start=*, leng=*, order=*, groupby=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult bindata_add(self, data, cb=*)
 * 	cpdef XmmsResult bindata_retrieve(self, hash, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_query_infos {
  int __pyx_n;
  PyObject *start;
  PyObject *leng;
  PyObject *order;
  PyObject *groupby;
  PyObject *cb;
};

/* "xmmsapi.pxd":177
 * 	cpdef XmmsResult coll_query_ids(self, Collection coll, start=*, leng=*, order=*, cb=*)
 * 	cpdef XmmsResult coll_query_infos(self, Collection coll, fields, start=*, leng=*, order=*, groupby=*, cb=*)
 * 	cpdef XmmsResult bindata_add(self, data, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult bindata_retrieve(self, hash, cb=*)
 * 	cpdef XmmsResult bindata_remove(self, hash, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_add {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":178
 * 	cpdef XmmsResult coll_query_infos(self, Collection coll, fields, start=*, leng=*, order=*, groupby=*, cb=*)
 * 	cpdef XmmsResult bindata_add(self, data, cb=*)
 * 	cpdef XmmsResult bindata_retrieve(self, hash, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult bindata_remove(self, hash, cb=*)
 * 	cpdef XmmsResult bindata_list(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_retrieve {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":179
 * 	cpdef XmmsResult bindata_add(self, data, cb=*)
 * 	cpdef XmmsResult bindata_retrieve(self, hash, cb=*)
 * 	cpdef XmmsResult bindata_remove(self, hash, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult bindata_list(self, cb=*)
 * 	cpdef XmmsResult stats(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_remove {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":180
 * 	cpdef XmmsResult bindata_retrieve(self, hash, cb=*)
 * 	cpdef XmmsResult bindata_remove(self, hash, cb=*)
 * 	cpdef XmmsResult bindata_list(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult stats(self, cb=*)
 * 	cpdef XmmsResult visualization_version(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_list {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":181
 * 	cpdef XmmsResult bindata_remove(self, hash, cb=*)
 * 	cpdef XmmsResult bindata_list(self, cb=*)
 * 	cpdef XmmsResult stats(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult visualization_version(self, cb=*)
 * 	cpdef XmmsResult visualization_init(self, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_stats {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":182
 * 	cpdef XmmsResult bindata_list(self, cb=*)
 * 	cpdef XmmsResult stats(self, cb=*)
 * 	cpdef XmmsResult visualization_version(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult visualization_init(self, cb=*)
 * 	cpdef XmmsResult visualization_start(self, int handle, cb=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_version {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":183
 * 	cpdef XmmsResult stats(self, cb=*)
 * 	cpdef XmmsResult visualization_version(self, cb=*)
 * 	cpdef XmmsResult visualization_init(self, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult visualization_start(self, int handle, cb=*)
 * 	cpdef bint visualization_started(self, int handle)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_init {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":184
 * 	cpdef XmmsResult visualization_version(self, cb=*)
 * 	cpdef XmmsResult visualization_init(self, cb=*)
 * 	cpdef XmmsResult visualization_start(self, int handle, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef bint visualization_started(self, int handle)
 * 	cpdef bint visualization_errored(self, int handle)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_start {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":187
 * 	cpdef bint visualization_started(self, int handle)
 * 	cpdef bint visualization_errored(self, int handle)
 * 	cpdef XmmsResult visualization_property_set(self, int handle, key, value, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult visualization_properties_set(self, int handle, props=*, cb=*)
 * 	cpdef XmmsVisChunk visualization_chunk_get(self, int handle, int drawtime=*, bint blocking=*)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_property_set {
  int __pyx_n;
  PyObject *cb;
};

/* "xmmsapi.pxd":188
 * 	cpdef bint visualization_errored(self, int handle)
 * 	cpdef XmmsResult visualization_property_set(self, int handle, key, value, cb=*)
 * 	cpdef XmmsResult visualization_properties_set(self, int handle, props=*, cb=*)             # <<<<<<<<<<<<<<
 * 	cpdef XmmsVisChunk visualization_chunk_get(self, int handle, int drawtime=*, bint blocking=*)
 * 	cpdef visualization_shutdown(self, int handle)
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_properties_set {
  int __pyx_n;
  PyObject *props;
  PyObject *cb;
};

/* "xmmsapi.pxd":189
 * 	cpdef XmmsResult visualization_property_set(self, int handle, key, value, cb=*)
 * 	cpdef XmmsResult visualization_properties_set(self, int handle, props=*, cb=*)
 * 	cpdef XmmsVisChunk visualization_chunk_get(self, int handle, int drawtime=*, bint blocking=*)             # <<<<<<<<<<<<<<
 * 	cpdef visualization_shutdown(self, int handle)
 * 
 */
struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_chunk_get {
  int __pyx_n;
  int drawtime;
  int blocking;
};

/* "xmmsapi.pxd":77
 * 	cpdef get_data(self)
 * 
 * cdef class XmmsCore:             # <<<<<<<<<<<<<<
 * 	cdef xmmsc_connection_t *conn
 * 	cdef int isconnected
 */
struct __pyx_obj_7xmmsapi_XmmsCore {
  PyObject_HEAD
  struct __pyx_vtabstruct_7xmmsapi_XmmsCore *__pyx_vtab;
  xmmsc_connection_t *conn;
  int isconnected;
  PyObject *disconnect_fun;
  PyObject *needout_fun;
  struct __pyx_obj_7xmmsapi_XmmsSourcePreference *source_preference;
  struct __pyx_obj_7xmmsapi_XmmsResultTracker *result_tracker;
  PyObject *clientname;
};


/* "xmmsapi.pxd":106
 * cpdef userconfdir_get()
 * 
 * cdef class XmmsApi(XmmsCore):             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult quit(self, cb=*)
 * 	cpdef XmmsResult plugin_list(self, typ, cb=*)
 */
struct __pyx_obj_7xmmsapi_XmmsApi {
  struct __pyx_obj_7xmmsapi_XmmsCore __pyx_base;
};


/* "xmmsapi.pxd":192
 * 	cpdef visualization_shutdown(self, int handle)
 * 
 * cdef class XmmsLoop(XmmsApi):             # <<<<<<<<<<<<<<
 * 	cdef bint do_loop
 * 	cdef object wakeup
 */
struct __pyx_obj_7xmmsapi_XmmsLoop {
  struct __pyx_obj_7xmmsapi_XmmsApi __pyx_base;
  int do_loop;
  PyObject *wakeup;
};


/* "xmmsapi.pyx":61
 * del getenv
 * 
 * def deprecated(f):             # <<<<<<<<<<<<<<
 * 	def deprecated_decorator(*a, **kw):
 * 		if show_deprecated:
 */
struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated {
  PyObject_HEAD
  PyObject *__pyx_v_f;
};


/* "xmmsapi.pxd":69
 * 	cpdef xmmsvalue(self)
 * 
 * cdef class XmmsVisChunk:             # <<<<<<<<<<<<<<
 * 	cdef short *data
 * 	cdef int sample_count
 */
struct __pyx_obj_7xmmsapi_XmmsVisChunk {
  PyObject_HEAD
  struct __pyx_vtabstruct_7xmmsapi_XmmsVisChunk *__pyx_vtab;
  short *data;
  int sample_count;
};


/* "xmmsvalue.pxd":41
 * 	cdef xmmsv_dict_iter_t *it
 * 
 * cdef class CollectionRef:             # <<<<<<<<<<<<<<
 * 	cdef xmmsv_coll_t *coll
 * 
 */
struct __pyx_obj_9xmmsvalue_CollectionRef {
  PyObject_HEAD
  struct __pyx_vtabstruct_9xmmsvalue_CollectionRef *__pyx_vtab;
  xmmsv_coll_t *coll;
};


/* "xmmsvalue.pxd":88
 * 
 * 
 * cdef class CollectionIDList(CollectionRef):             # <<<<<<<<<<<<<<
 * 	cpdef list(self)
 * 	cpdef append(self, int v)
 */
struct __pyx_obj_9xmmsvalue_CollectionIDList {
  struct __pyx_obj_9xmmsvalue_CollectionRef __pyx_base;
};


/* "xmmsvalue.pxd":77
 * 
 * 
 * cdef class CollectionOperands(CollectionRef):             # <<<<<<<<<<<<<<
 * 	cdef object pylist
 * 	cdef init_pylist(self)
 */
struct __pyx_obj_9xmmsvalue_CollectionOperands {
  struct __pyx_obj_9xmmsvalue_CollectionRef __pyx_base;
  PyObject *pylist;
};


/* "xmmsvalue.pxd":69
 * 	ITER_VALUES = 2
 * 	ITER_ITEMS = 3
 * cdef class AttributesIterator:             # <<<<<<<<<<<<<<
 * 	cdef xmmsv_dict_iter_t *diter
 * 	cdef int itertype
 */
struct __pyx_obj_9xmmsvalue_AttributesIterator {
  PyObject_HEAD
  struct __pyx_vtabstruct_9xmmsvalue_AttributesIterator *__pyx_vtab;
  xmmsv_dict_iter_t *diter;
  int itertype;
  struct __pyx_obj_9xmmsvalue_CollectionAttributes *attr;
};


/* "xmmsvalue.pxd":31
 * 	cpdef value(self)
 * 
 * cdef class XmmsListIter:             # <<<<<<<<<<<<<<
 * 	cdef object sourcepref
 * 	cdef xmmsv_t *val
 */
struct __pyx_obj_9xmmsvalue_XmmsListIter {
  PyObject_HEAD
  PyObject *sourcepref;
  xmmsv_t *val;
  xmmsv_list_iter_t *it;
};


/* "xmmsapi.pxd":24
 * 
 * cdef class XmmsResult
 * cdef class XmmsResultTracker:             # <<<<<<<<<<<<<<
 * 	cdef object results
 * 
 */
struct __pyx_obj_7xmmsapi_XmmsResultTracker {
  PyObject_HEAD
  struct __pyx_vtabstruct_7xmmsapi_XmmsResultTracker *__pyx_vtab;
  PyObject *results;
};


/* "xmmsvalue.pxd":9
 * 	ctypedef struct xmmsv_list_iter_t
 * 
 * cdef class XmmsValue:             # <<<<<<<<<<<<<<
 * 	cdef object sourcepref
 * 	cdef xmmsv_t *val
 */
struct __pyx_obj_9xmmsvalue_XmmsValue {
  PyObject_HEAD
  struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *__pyx_vtab;
  PyObject *sourcepref;
  xmmsv_t *val;
  int ispropdict;
};


/* "xmmsapi.pxd":23
 * 	cdef object sources
 * 
 * cdef class XmmsResult             # <<<<<<<<<<<<<<
 * cdef class XmmsResultTracker:
 * 	cdef object results
 */
struct __pyx_obj_7xmmsapi_XmmsResult {
  PyObject_HEAD
  struct __pyx_vtabstruct_7xmmsapi_XmmsResult *__pyx_vtab;
  xmmsc_result_t *res;
  PyObject *_cb;
  int _cb_issetup;
  PyObject *_exc;
  struct __pyx_obj_7xmmsapi_XmmsSourcePreference *source_pref;
  int ispropdict;
  struct __pyx_obj_7xmmsapi_XmmsResultTracker *result_tracker;
};


/* "xmmsapi.pxd":58
 * 	VIS_RESULT_CMD_START = 2
 * 
 * cdef class XmmsVisResult(XmmsResult):             # <<<<<<<<<<<<<<
 * 	cdef XmmsValue _val
 * 	cdef VisResultCommand command
 */
struct __pyx_obj_7xmmsapi_XmmsVisResult {
  struct __pyx_obj_7xmmsapi_XmmsResult __pyx_base;
  struct __pyx_obj_9xmmsvalue_XmmsValue *_val;
  __pyx_t_7xmmsapi_VisResultCommand command;
  xmmsc_connection_t *conn;
};


/* "xmmsapi.pxd":20
 * 	return n
 * 
 * cdef class XmmsSourcePreference:             # <<<<<<<<<<<<<<
 * 	cdef object sources
 * 
 */
struct __pyx_obj_7xmmsapi_XmmsSourcePreference {
  PyObject_HEAD
  PyObject *sources;
};


/* "xmmsvalue.pxd":55
 * 	cdef init_operands(self)
 * 
 * cdef class CollectionAttributes(CollectionRef):             # <<<<<<<<<<<<<<
 * 	cpdef get_dict(self)
 * 	cpdef iterkeys(self)
 */
struct __pyx_obj_9xmmsvalue_CollectionAttributes {
  struct __pyx_obj_9xmmsvalue_CollectionRef __pyx_base;
};


/* "xmmsvalue.pxd":36
 * 	cdef xmmsv_list_iter_t *it
 * 
 * cdef class XmmsDictIter:             # <<<<<<<<<<<<<<
 * 	cdef object sourcepref
 * 	cdef xmmsv_t *val
 */
struct __pyx_obj_9xmmsvalue_XmmsDictIter {
  PyObject_HEAD
  PyObject *sourcepref;
  xmmsv_t *val;
  xmmsv_dict_iter_t *it;
};


/* "xmmsvalue.pxd":46
 * 	cdef set_collection(self, xmmsv_coll_t *coll)
 * 
 * cdef class Collection(CollectionRef):             # <<<<<<<<<<<<<<
 * 	cdef object _attributes
 * 	cdef object _operands
 */
struct __pyx_obj_9xmmsvalue_Collection {
  struct __pyx_obj_9xmmsvalue_CollectionRef __pyx_base;
  PyObject *_attributes;
  PyObject *_operands;
  PyObject *_idlist;
};



/* "xmmsvalue.pxd":41
 * 	cdef xmmsv_dict_iter_t *it
 * 
 * cdef class CollectionRef:             # <<<<<<<<<<<<<<
 * 	cdef xmmsv_coll_t *coll
 * 
 */

struct __pyx_vtabstruct_9xmmsvalue_CollectionRef {
  PyObject *(*set_collection)(struct __pyx_obj_9xmmsvalue_CollectionRef *, xmmsv_coll_t *);
};
static struct __pyx_vtabstruct_9xmmsvalue_CollectionRef *__pyx_vtabptr_9xmmsvalue_CollectionRef;


/* "xmmsvalue.pxd":55
 * 	cdef init_operands(self)
 * 
 * cdef class CollectionAttributes(CollectionRef):             # <<<<<<<<<<<<<<
 * 	cpdef get_dict(self)
 * 	cpdef iterkeys(self)
 */

struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes {
  struct __pyx_vtabstruct_9xmmsvalue_CollectionRef __pyx_base;
  PyObject *(*get_dict)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*iterkeys)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*keys)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*itervalues)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*values)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*iteritems)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*items)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*clear)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *__pyx_vtabptr_9xmmsvalue_CollectionAttributes;


/* "xmmsapi.pyx":136
 * 				r.res = NULL
 * 
 * cdef class XmmsResult:             # <<<<<<<<<<<<<<
 * 	"""
 * 	Class containing the results of some operation
 */

struct __pyx_vtabstruct_7xmmsapi_XmmsResult {
  PyObject *(*set_sourcepref)(struct __pyx_obj_7xmmsapi_XmmsResult *, struct __pyx_obj_7xmmsapi_XmmsSourcePreference *);
  PyObject *(*set_result)(struct __pyx_obj_7xmmsapi_XmmsResult *, xmmsc_result_t *);
  PyObject *(*set_callback)(struct __pyx_obj_7xmmsapi_XmmsResult *, struct __pyx_obj_7xmmsapi_XmmsResultTracker *, PyObject *);
  PyObject *(*disconnect)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch);
  PyObject *(*wait)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch);
  PyObject *(*is_error)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch);
  PyObject *(*iserror)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch);
  PyObject *(*xmmsvalue)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch);
  PyObject *(*_value)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch);
  PyObject *(*value)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsResult *__pyx_vtabptr_7xmmsapi_XmmsResult;


/* "xmmsapi.pyx":249
 * 
 * 
 * cdef class XmmsVisResult(XmmsResult):             # <<<<<<<<<<<<<<
 * 	#cdef XmmsValue _val
 * 	#cdef VisResultCommand command
 */

struct __pyx_vtabstruct_7xmmsapi_XmmsVisResult {
  struct __pyx_vtabstruct_7xmmsapi_XmmsResult __pyx_base;
  PyObject *(*set_command)(struct __pyx_obj_7xmmsapi_XmmsVisResult *, __pyx_t_7xmmsapi_VisResultCommand, xmmsc_connection_t *);
  PyObject *(*retrieve_error)(struct __pyx_obj_7xmmsapi_XmmsVisResult *);
  PyObject *(*_init_xmmsvalue)(struct __pyx_obj_7xmmsapi_XmmsVisResult *);
  PyObject *(*_start_xmmsvalue)(struct __pyx_obj_7xmmsapi_XmmsVisResult *);
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsVisResult *__pyx_vtabptr_7xmmsapi_XmmsVisResult;


/* "xmmsapi.pyx":407
 * 	return from_unicode(pls or ACTIVE_PLAYLIST)
 * 
 * cdef class XmmsCore:             # <<<<<<<<<<<<<<
 * 	"""
 * 	This is the class representing the XMMS2 client itself. The methods in
 */

struct __pyx_vtabstruct_7xmmsapi_XmmsCore {
  PyObject *(*new_connection)(struct __pyx_obj_7xmmsapi_XmmsCore *);
  PyObject *(*get_source_preference)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch);
  PyObject *(*set_source_preference)(struct __pyx_obj_7xmmsapi_XmmsCore *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_needout_cb)(struct __pyx_obj_7xmmsapi_XmmsCore *, int, int __pyx_skip_dispatch);
  PyObject *(*_disconnect_cb)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch);
  PyObject *(*disconnect)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch);
  PyObject *(*ioin)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch);
  PyObject *(*ioout)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch);
  PyObject *(*want_ioout)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch);
  PyObject *(*set_need_out_fun)(struct __pyx_obj_7xmmsapi_XmmsCore *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*get_fd)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch);
  PyObject *(*connect)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_8XmmsCore_connect *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*_create_result)(struct __pyx_obj_7xmmsapi_XmmsCore *, PyObject *, xmmsc_result_t *, PyObject *);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*create_result)(struct __pyx_obj_7xmmsapi_XmmsCore *, PyObject *, xmmsc_result_t *);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*create_vis_result)(struct __pyx_obj_7xmmsapi_XmmsCore *, PyObject *, xmmsc_result_t *, __pyx_t_7xmmsapi_VisResultCommand);
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsCore *__pyx_vtabptr_7xmmsapi_XmmsCore;


/* "xmmsapi.pyx":113
 * 			self.sources = map(enforce_unicode, [s for s in sources])
 * 
 * cdef class XmmsResultTracker:             # <<<<<<<<<<<<<<
 * 	"""
 * 	Class used by XmmsCore to track results that set a notifier.
 */

struct __pyx_vtabstruct_7xmmsapi_XmmsResultTracker {
  PyObject *(*track_result)(struct __pyx_obj_7xmmsapi_XmmsResultTracker *, struct __pyx_obj_7xmmsapi_XmmsResult *);
  PyObject *(*release_result)(struct __pyx_obj_7xmmsapi_XmmsResultTracker *, struct __pyx_obj_7xmmsapi_XmmsResult *);
  PyObject *(*disconnect_all)(struct __pyx_obj_7xmmsapi_XmmsResultTracker *, int);
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsResultTracker *__pyx_vtabptr_7xmmsapi_XmmsResultTracker;


/* "xmmsvalue.pxd":9
 * 	ctypedef struct xmmsv_list_iter_t
 * 
 * cdef class XmmsValue:             # <<<<<<<<<<<<<<
 * 	cdef object sourcepref
 * 	cdef xmmsv_t *val
 */

struct __pyx_vtabstruct_9xmmsvalue_XmmsValue {
  PyObject *(*set_value)(struct __pyx_obj_9xmmsvalue_XmmsValue *, xmmsv_t *, struct __pyx_opt_args_9xmmsvalue_9XmmsValue_set_value *__pyx_optional_args);
  PyObject *(*set_pyval)(struct __pyx_obj_9xmmsvalue_XmmsValue *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*get_type)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*iserror)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*is_error)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_error)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_int)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_string)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_bin)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_coll)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_dict)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_dict_iter)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_propdict)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_list)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_list_iter)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*value)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *__pyx_vtabptr_9xmmsvalue_XmmsValue;


/* "xmmsvalue.pxd":69
 * 	ITER_VALUES = 2
 * 	ITER_ITEMS = 3
 * cdef class AttributesIterator:             # <<<<<<<<<<<<<<
 * 	cdef xmmsv_dict_iter_t *diter
 * 	cdef int itertype
 */

struct __pyx_vtabstruct_9xmmsvalue_AttributesIterator {
  PyObject *(*reset)(struct __pyx_obj_9xmmsvalue_AttributesIterator *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9xmmsvalue_AttributesIterator *__pyx_vtabptr_9xmmsvalue_AttributesIterator;


/* "xmmsapi.pyx":576
 * 
 * 
 * cdef class XmmsApi(XmmsCore):             # <<<<<<<<<<<<<<
 * 	cpdef XmmsResult quit(self, cb=None):
 * 		"""
 */

struct __pyx_vtabstruct_7xmmsapi_XmmsApi {
  struct __pyx_vtabstruct_7xmmsapi_XmmsCore __pyx_base;
  struct __pyx_obj_7xmmsapi_XmmsResult *(*quit)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_quit *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*plugin_list)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_plugin_list *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playback_start)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_start *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playback_stop)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_stop *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playback_tickle)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_tickle *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playback_pause)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_pause *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playback_current_id)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_current_id *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playback_seek_ms)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_seek_ms *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playback_seek_samples)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_seek_samples *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playback_status)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_status *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*broadcast_playback_status)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_status *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*broadcast_playback_current_id)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_current_id *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playback_playtime)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_playtime *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*signal_playback_playtime)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_signal_playback_playtime *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playback_volume_set)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_volume_set *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playback_volume_get)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_volume_get *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*broadcast_playback_volume_changed)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_volume_changed *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*broadcast_playlist_loaded)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_loaded *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_load)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_load *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_list)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_list *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_remove)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_remove *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_shuffle)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_shuffle *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_rinsert)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_rinsert *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_insert_url)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_url *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_insert_id)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_id *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_insert_collection)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, struct __pyx_obj_9xmmsvalue_Collection *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_collection *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_radd)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_radd *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_add_url)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_url *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_add_id)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_id *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_add_collection)(struct __pyx_obj_7xmmsapi_XmmsApi *, struct __pyx_obj_9xmmsvalue_Collection *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_collection *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_remove_entry)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_remove_entry *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_clear)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_clear *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_list_entries)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_list_entries *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_sort)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_sort *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_set_next_rel)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_set_next_rel *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_set_next)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_set_next *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_move)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_move *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_create)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_create *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_current_pos)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_current_pos *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*playlist_current_active)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_current_active *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*broadcast_playlist_current_pos)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_current_pos *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*broadcast_playlist_changed)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_changed *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*broadcast_config_value_changed)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_config_value_changed *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*config_set_value)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_set_value *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*config_get_value)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_get_value *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*config_list_values)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_list_values *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*config_register_value)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_register_value *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*medialib_add_entry)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_add_entry *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*medialib_remove_entry)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_remove_entry *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*medialib_move_entry)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_move_entry *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*medialib_get_info)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_get_info *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*medialib_rehash)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_rehash *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*medialib_get_id)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_get_id *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*medialib_import_path)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_import_path *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*medialib_property_set)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_property_set *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*medialib_property_remove)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_property_remove *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*broadcast_medialib_entry_added)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_medialib_entry_added *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*broadcast_medialib_entry_changed)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_medialib_entry_changed *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*broadcast_collection_changed)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_collection_changed *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*signal_mediainfo_reader_unindexed)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_signal_mediainfo_reader_unindexed *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*broadcast_mediainfo_reader_status)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_mediainfo_reader_status *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*xform_media_browse)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_xform_media_browse *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*coll_get)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_get *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*coll_list)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_list *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*coll_save)(struct __pyx_obj_7xmmsapi_XmmsApi *, struct __pyx_obj_9xmmsvalue_Collection *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_save *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*coll_remove)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_remove *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*coll_rename)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_rename *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*coll_idlist_from_playlist_file)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_idlist_from_playlist_file *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*coll_query_ids)(struct __pyx_obj_7xmmsapi_XmmsApi *, struct __pyx_obj_9xmmsvalue_Collection *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_query_ids *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*coll_query_infos)(struct __pyx_obj_7xmmsapi_XmmsApi *, struct __pyx_obj_9xmmsvalue_Collection *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_query_infos *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*bindata_add)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_add *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*bindata_retrieve)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_retrieve *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*bindata_remove)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_remove *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*bindata_list)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_list *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*stats)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_stats *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*visualization_version)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_version *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*visualization_init)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_init *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*visualization_start)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_start *__pyx_optional_args);
  int (*visualization_started)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch);
  int (*visualization_errored)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*visualization_property_set)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_property_set *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsResult *(*visualization_properties_set)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_properties_set *__pyx_optional_args);
  struct __pyx_obj_7xmmsapi_XmmsVisChunk *(*visualization_chunk_get)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_chunk_get *__pyx_optional_args);
  PyObject *(*visualization_shutdown)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsApi *__pyx_vtabptr_7xmmsapi_XmmsApi;



/* "xmmsvalue.pxd":88
 * 
 * 
 * cdef class CollectionIDList(CollectionRef):             # <<<<<<<<<<<<<<
 * 	cpdef list(self)
 * 	cpdef append(self, int v)
 */

struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList {
  struct __pyx_vtabstruct_9xmmsvalue_CollectionRef __pyx_base;
  PyObject *(*list)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int __pyx_skip_dispatch);
  PyObject *(*append)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int, int, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int, int __pyx_skip_dispatch);
  PyObject *(*clear)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *__pyx_vtabptr_9xmmsvalue_CollectionIDList;


/* "xmmsapi.pyx":1784
 * 
 * from os import write
 * cdef class XmmsLoop(XmmsApi):             # <<<<<<<<<<<<<<
 * 	#cdef bint do_loop
 * 	#cdef object wakeup
 */

struct __pyx_vtabstruct_7xmmsapi_XmmsLoop {
  struct __pyx_vtabstruct_7xmmsapi_XmmsApi __pyx_base;
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsLoop *__pyx_vtabptr_7xmmsapi_XmmsLoop;


/* "xmmsvalue.pxd":46
 * 	cdef set_collection(self, xmmsv_coll_t *coll)
 * 
 * cdef class Collection(CollectionRef):             # <<<<<<<<<<<<<<
 * 	cdef object _attributes
 * 	cdef object _operands
 */

struct __pyx_vtabstruct_9xmmsvalue_Collection {
  struct __pyx_vtabstruct_9xmmsvalue_CollectionRef __pyx_base;
  PyObject *(*init_idlist)(struct __pyx_obj_9xmmsvalue_Collection *);
  PyObject *(*init_attributes)(struct __pyx_obj_9xmmsvalue_Collection *);
  PyObject *(*init_operands)(struct __pyx_obj_9xmmsvalue_Collection *);
};
static struct __pyx_vtabstruct_9xmmsvalue_Collection *__pyx_vtabptr_9xmmsvalue_Collection;


/* "xmmsvalue.pxd":77
 * 
 * 
 * cdef class CollectionOperands(CollectionRef):             # <<<<<<<<<<<<<<
 * 	cdef object pylist
 * 	cdef init_pylist(self)
 */

struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands {
  struct __pyx_vtabstruct_9xmmsvalue_CollectionRef __pyx_base;
  PyObject *(*init_pylist)(struct __pyx_obj_9xmmsvalue_CollectionOperands *);
  PyObject *(*append)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, struct __pyx_obj_9xmmsvalue_Collection *, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, struct __pyx_obj_9xmmsvalue_Collection *, int __pyx_skip_dispatch);
  PyObject *(*clear)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, int __pyx_skip_dispatch);
  PyObject *(*list)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands *__pyx_vtabptr_9xmmsvalue_CollectionOperands;


/* "xmmsapi.pyx":316
 * 			return XmmsResult.xmmsvalue(self)
 * 
 * cdef class XmmsVisChunk:             # <<<<<<<<<<<<<<
 * 	#cdef short *data
 * 	#cdef int sample_count
 */

struct __pyx_vtabstruct_7xmmsapi_XmmsVisChunk {
  PyObject *(*set_data)(struct __pyx_obj_7xmmsapi_XmmsVisChunk *, short *, int);
  PyObject *(*get_buffer)(struct __pyx_obj_7xmmsapi_XmmsVisChunk *, int __pyx_skip_dispatch);
  PyObject *(*get_data)(struct __pyx_obj_7xmmsapi_XmmsVisChunk *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsVisChunk *__pyx_vtabptr_7xmmsapi_XmmsVisChunk;

#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif

#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  #define __Pyx_RefNannySetupContext(name)           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  #define __Pyx_RefNannyFinishContext()           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict,
    const char* function_name, int kw_allowed); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name, PyObject* kw_name); /*proto*/

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/

static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (PyList_Append(L, x) < 0) return NULL;
        Py_INCREF(Py_None);
        return Py_None; /* this is just to have an accurate signature */
    }
    else {
        PyObject *r, *m;
        m = __Pyx_GetAttrString(L, "append");
        if (!m) return NULL;
        r = PyObject_CallFunctionObjArgs(m, x, NULL);
        Py_DECREF(m);
        return r;
    }
}

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/


static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}


#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
    if (likely(o != Py_None)) {
        if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
            PyObject *r = PyList_GET_ITEM(o, i);
            Py_INCREF(r);
            return r;
        }
        else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
            PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
            Py_INCREF(r);
            return r;
        }
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
    if (likely(o != Py_None)) {
        if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, i);
            Py_INCREF(r);
            return r;
        }
        else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
            PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
            Py_INCREF(r);
            return r;
        }
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}


#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
    PyObject *r;
    if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
    }
    else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
    }
    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
        r = PySequence_GetItem(o, i);
    }
    else {
        r = __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
    }
    return r;
}

static CYTHON_INLINE int __Pyx_NegateNonNeg(int b) { 
    return unlikely(b < 0) ? b : !b; 
}
static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
    return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b);
}

static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void);

#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    if (unlikely(d == Py_None)) {
        __Pyx_RaiseNoneIndexingError();
        return NULL;
    }
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred())
            PyErr_SetObject(PyExc_KeyError, key);
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#else
    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#endif

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/

#include <string.h>

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/

#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/

static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                   PyObject *modname); /*proto*/

#define __pyx_binding_PyCFunctionType_USED 1

typedef struct {
    PyCFunctionObject func;
} __pyx_binding_PyCFunctionType_object;

static PyTypeObject __pyx_binding_PyCFunctionType_type;
static PyTypeObject *__pyx_binding_PyCFunctionType = NULL;

static PyObject *__pyx_binding_PyCFunctionType_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module); /* proto */
#define __pyx_binding_PyCFunctionType_New(ml, self) __pyx_binding_PyCFunctionType_NewEx(ml, self, NULL)

static int __pyx_binding_PyCFunctionType_init(void); /* proto */

static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/
#if PY_MAJOR_VERSION >= 3
static PyObject* __pyx_print = 0;
static PyObject* __pyx_print_kwargs = 0;
#endif

static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename); /*proto*/

static int __Pyx_check_binary_version(void);

static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /*proto*/

static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/

static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/

static PyObject *__Pyx_ImportModule(const char *name); /*proto*/

static void* __Pyx_GetVtable(PyObject *dict); /*proto*/

static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/

static void __Pyx_AddTraceback(const char *funcname, int __pyx_clineno,
                               int __pyx_lineno, const char *__pyx_filename); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/

/* Module declarations from 'xmmsvalue' */
static PyTypeObject *__pyx_ptype_9xmmsvalue_XmmsValue = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_XmmsListIter = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_XmmsDictIter = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_CollectionRef = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_Collection = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_CollectionAttributes = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_AttributesIterator = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_CollectionOperands = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_CollectionIDList = 0;
static PyObject *(*__pyx_f_9xmmsvalue_create_coll)(xmmsv_coll_t *); /*proto*/
static xmmsv_t *(*__pyx_f_9xmmsvalue_create_native_value)(PyObject *); /*proto*/

/* Module declarations from 'cxmmsvalue' */

/* Module declarations from 'cxmmsclient' */

/* Module declarations from 'cpython.mem' */

/* Module declarations from 'cpython.ref' */

/* Module declarations from 'cpython.bytes' */

/* Module declarations from 'cython.cython.view' */

/* Module declarations from 'cython' */

/* Module declarations from 'cpython.unicode' */

/* Module declarations from 'xmmsutils' */
static CYTHON_INLINE PyObject *__pyx_f_9xmmsutils_to_unicode(char *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9xmmsutils_from_unicode(PyObject *); /*proto*/

/* Module declarations from 'xmmsapi' */
static PyTypeObject *__pyx_ptype_7xmmsapi_XmmsSourcePreference = 0;
static PyTypeObject *__pyx_ptype_7xmmsapi_XmmsResult = 0;
static PyTypeObject *__pyx_ptype_7xmmsapi_XmmsResultTracker = 0;
static PyTypeObject *__pyx_ptype_7xmmsapi_XmmsVisResult = 0;
static PyTypeObject *__pyx_ptype_7xmmsapi_XmmsVisChunk = 0;
static PyTypeObject *__pyx_ptype_7xmmsapi_XmmsCore = 0;
static PyTypeObject *__pyx_ptype_7xmmsapi_XmmsApi = 0;
static PyTypeObject *__pyx_ptype_7xmmsapi_XmmsLoop = 0;
static PyTypeObject *__pyx_ptype_7xmmsapi___pyx_scope_struct__deprecated = 0;
static int __pyx_v_7xmmsapi_show_deprecated;
static PyObject *__pyx_v_7xmmsapi_select = 0;
static int __pyx_f_7xmmsapi_ResultNotifier(xmmsv_t *, void *); /*proto*/
static void __pyx_f_7xmmsapi_ResultDestroyNotifier(void *); /*proto*/
static CYTHON_INLINE char *__pyx_f_7xmmsapi_check_namespace(PyObject *, int); /*proto*/
static void __pyx_f_7xmmsapi_python_need_out_fun(int, void *); /*proto*/
static void __pyx_f_7xmmsapi_python_disconnect_fun(void *); /*proto*/
static PyObject *__pyx_f_7xmmsapi_userconfdir_get(int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7xmmsapi__install_select(void); /*proto*/
static PyObject *__pyx_f_7xmmsapi_check_playlist(PyObject *, int); /*proto*/
#define __Pyx_MODULE_NAME "xmmsapi"
int __pyx_module_is_main_xmmsapi = 0;

/* Implementation of 'xmmsapi' */
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_map;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_IOError;
static PyObject *__pyx_builtin_ImportError;
static char __pyx_k_1[] = "DEPRECATED: %s()";
static char __pyx_k_2[] = "Type '%s' is not callable";
static char __pyx_k_3[] = "Uninitialized result";
static char __pyx_k_6[] = "Failed to initialize visualization";
static char __pyx_k_9[] = "Internal connection reference not set";
static char __pyx_k_11[] = "Failed to initialize chunk data";
static char __pyx_k_13[] = "chunk data not initialized";
static char __pyx_k_16[] = "UTF-8";
static char __pyx_k_17[] = "expected str, %s found";
static char __pyx_k_18[] = "client/";
static char __pyx_k_19[] = "plugins/*";
static char __pyx_k_20[] = "client/*";
static char __pyx_k_21[] = "*";
static char __pyx_k_22[] = "Failed to initialize xmmsclient library! Probably due to broken name.";
static char __pyx_k_24[] = "get_source_preference";
static char __pyx_k_25[] = "set_source_preference";
static char __pyx_k_26[] = "Couldn't connect to the server";
static char __pyx_k_28[] = "xmmsc_result_t couldn't be allocated";
static char __pyx_k_31[] = "Bad whence parameter";
static char __pyx_k_34[] = "playback_seek_samples";
static char __pyx_k_36[] = "broadcast_playback_status";
static char __pyx_k_37[] = "broadcast_playback_current_id";
static char __pyx_k_38[] = "signal_playback_playtime";
static char __pyx_k_39[] = "broadcast_playback_volume_changed";
static char __pyx_k_40[] = "broadcast_playlist_loaded";
static char __pyx_k_43[] = "playlist_insert_collection";
static char __pyx_k_46[] = "playlist_add_collection";
static char __pyx_k_47[] = "playlist_remove_entry";
static char __pyx_k_48[] = "playlist_list_entries";
static char __pyx_k_49[] = "playlist_set_next_rel";
static char __pyx_k_50[] = "playlist_current_pos";
static char __pyx_k_51[] = "playlist_current_active";
static char __pyx_k_52[] = "broadcast_playlist_current_pos";
static char __pyx_k_53[] = "broadcast_playlist_changed";
static char __pyx_k_54[] = "broadcast_config_value_changed";
static char __pyx_k_55[] = "config_register_value";
static char __pyx_k_57[] = "medialib_remove_entry";
static char __pyx_k_59[] = "urllib.parse";
static char __pyx_k_62[] = "medialib_import_path";
static char __pyx_k_64[] = "medialib_property_set";
static char __pyx_k_65[] = "medialib_property_remove";
static char __pyx_k_66[] = "broadcast_medialib_entry_added";
static char __pyx_k_67[] = "broadcast_medialib_entry_changed";
static char __pyx_k_68[] = "broadcast_collection_changed";
static char __pyx_k_69[] = "signal_mediainfo_reader_unindexed";
static char __pyx_k_70[] = "broadcast_mediainfo_reader_status";
static char __pyx_k_72[] = "coll_idlist_from_playlist_file";
static char __pyx_k_73[] = "visualization_version";
static char __pyx_k_74[] = "visualization_started";
static char __pyx_k_75[] = "visualization_errored";
static char __pyx_k_76[] = "visualization_property_set";
static char __pyx_k_78[] = "visualization_properties_set";
static char __pyx_k_79[] = "visualization_chunk_get";
static char __pyx_k_80[] = "Unrecoverable error in visualization";
static char __pyx_k_82[] = "visualization_shutdown";
static char __pyx_k_84[] = "XmmsDisconnectException";
static char __pyx_k_86[] = "Bad namespace";
static char __pyx_k_88[] = "\nPython bindings for XMMS2.\n";
static char __pyx_k_89[] = "PLAYBACK_STATUS_STOP";
static char __pyx_k_90[] = "PLAYBACK_STATUS_PLAY";
static char __pyx_k_91[] = "PLAYBACK_STATUS_PAUSE";
static char __pyx_k_92[] = "PLAYLIST_CHANGED_ADD";
static char __pyx_k_93[] = "PLAYLIST_CHANGED_INSERT";
static char __pyx_k_94[] = "PLAYLIST_CHANGED_SHUFFLE";
static char __pyx_k_95[] = "PLAYLIST_CHANGED_REMOVE";
static char __pyx_k_96[] = "PLAYLIST_CHANGED_CLEAR";
static char __pyx_k_97[] = "PLAYLIST_CHANGED_MOVE";
static char __pyx_k_98[] = "PLAYLIST_CHANGED_SORT";
static char __pyx_k_99[] = "PLAYLIST_CHANGED_UPDATE";
static char __pyx_k__1[] = "1";
static char __pyx_k_100[] = "MEDIALIB_ENTRY_STATUS_NEW";
static char __pyx_k_101[] = "MEDIALIB_ENTRY_STATUS_OK";
static char __pyx_k_102[] = "MEDIALIB_ENTRY_STATUS_RESOLVING";
static char __pyx_k_103[] = "MEDIALIB_ENTRY_STATUS_NOT_AVAILABLE";
static char __pyx_k_104[] = "MEDIALIB_ENTRY_STATUS_REHASH";
static char __pyx_k_105[] = "COLLECTION_CHANGED_ADD";
static char __pyx_k_106[] = "COLLECTION_CHANGED_UPDATE";
static char __pyx_k_107[] = "COLLECTION_CHANGED_RENAME";
static char __pyx_k_108[] = "COLLECTION_CHANGED_REMOVE";
static char __pyx_k_109[] = "COLLECTION_NS_COLLECTIONS";
static char __pyx_k_110[] = "COLLECTION_NS_PLAYLISTS";
static char __pyx_k_111[] = "XMMS_PYTHON_SHOW_DEPRECATED";
static char __pyx_k_113[] = "playback_seek_ms_rel";
static char __pyx_k_114[] = "playback_seek_samples_rel";
static char __pyx_k_115[] = "playlist_rinsert_encoded";
static char __pyx_k_116[] = "playlist_insert_encoded";
static char __pyx_k_117[] = "playlist_radd_encoded";
static char __pyx_k_118[] = "playlist_add_encoded";
static char __pyx_k_119[] = "broadcast_configval_changed";
static char __pyx_k_120[] = "medialib_add_entry_encoded";
static char __pyx_k_121[] = "medialib_path_import";
static char __pyx_k_122[] = "medialib_path_import_encoded";
static char __pyx_k_123[] = "xform_media_browse_encoded";
static char __pyx_k__cb[] = "cb";
static char __pyx_k__id[] = "id";
static char __pyx_k__ms[] = "ms";
static char __pyx_k__ns[] = "ns";
static char __pyx_k__os[] = "os";
static char __pyx_k__get[] = "get";
static char __pyx_k__key[] = "key";
static char __pyx_k__map[] = "map";
static char __pyx_k__pos[] = "pos";
static char __pyx_k__set[] = "set";
static char __pyx_k__sys[] = "sys";
static char __pyx_k__typ[] = "typ";
static char __pyx_k__url[] = "url";
static char __pyx_k__val[] = "val";
static char __pyx_k__XMMS[] = "XMMS";
static char __pyx_k__coll[] = "coll";
static char __pyx_k__data[] = "data";
static char __pyx_k__hash[] = "hash";
static char __pyx_k__infd[] = "infd";
static char __pyx_k__ioin[] = "ioin";
static char __pyx_k__leng[] = "leng";
static char __pyx_k__name[] = "name";
static char __pyx_k__path[] = "path";
static char __pyx_k__pipe[] = "pipe";
static char __pyx_k__quit[] = "quit";
static char __pyx_k__read[] = "read";
static char __pyx_k__wait[] = "wait";
static char __pyx_k__ascii[] = "ascii";
static char __pyx_k__errfd[] = "errfd";
static char __pyx_k__ioout[] = "ioout";
static char __pyx_k__order[] = "order";
static char __pyx_k__outfd[] = "outfd";
static char __pyx_k__props[] = "props";
static char __pyx_k__pyval[] = "pyval";
static char __pyx_k__range[] = "range";
static char __pyx_k__start[] = "start";
static char __pyx_k__stats[] = "stats";
static char __pyx_k__value[] = "value";
static char __pyx_k__write[] = "write";
static char __pyx_k___value[] = "_value";
static char __pyx_k__encode[] = "encode";
static char __pyx_k__fields[] = "fields";
static char __pyx_k__get_fd[] = "get_fd";
static char __pyx_k__getenv[] = "getenv";
static char __pyx_k__handle[] = "handle";
static char __pyx_k__remove[] = "remove";
static char __pyx_k__select[] = "select";
static char __pyx_k__server[] = "server";
static char __pyx_k__source[] = "source";
static char __pyx_k__stderr[] = "stderr";
static char __pyx_k__urllib[] = "urllib";
static char __pyx_k__volume[] = "volume";
static char __pyx_k__whence[] = "whence";
static char __pyx_k__IOError[] = "IOError";
static char __pyx_k__channel[] = "channel";
static char __pyx_k__connect[] = "connect";
static char __pyx_k__cur_pos[] = "cur_pos";
static char __pyx_k__encoded[] = "encoded";
static char __pyx_k__groupby[] = "groupby";
static char __pyx_k__iserror[] = "iserror";
static char __pyx_k__new_pos[] = "new_pos";
static char __pyx_k__newname[] = "newname";
static char __pyx_k__oldname[] = "oldname";
static char __pyx_k__samples[] = "samples";
static char __pyx_k__sources[] = "sources";
static char __pyx_k__timeout[] = "timeout";
static char __pyx_k__xmmsapi[] = "xmmsapi";
static char __pyx_k____call__[] = "__call__";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____name__[] = "__name__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__blocking[] = "blocking";
static char __pyx_k__callback[] = "callback";
static char __pyx_k__coll_get[] = "coll_get";
static char __pyx_k__drawtime[] = "drawtime";
static char __pyx_k__exc_info[] = "exc_info";
static char __pyx_k__get_data[] = "get_data";
static char __pyx_k__is_error[] = "is_error";
static char __pyx_k__playlist[] = "playlist";
static char __pyx_k__position[] = "position";
static char __pyx_k__Exception[] = "Exception";
static char __pyx_k__Playlists[] = "Playlists";
static char __pyx_k__TypeError[] = "TypeError";
static char __pyx_k____class__[] = "__class__";
static char __pyx_k___callback[] = "_callback";
static char __pyx_k__coll_list[] = "coll_list";
static char __pyx_k__coll_save[] = "coll_save";
static char __pyx_k__loop_iter[] = "loop_iter";
static char __pyx_k__traceback[] = "traceback";
static char __pyx_k__valuename[] = "valuename";
static char __pyx_k__xmmsvalue[] = "xmmsvalue";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k__XMMSResult[] = "XMMSResult";
static char __pyx_k__clientname[] = "clientname";
static char __pyx_k__deprecated[] = "deprecated";
static char __pyx_k__disconnect[] = "disconnect";
static char __pyx_k__get_buffer[] = "get_buffer";
static char __pyx_k__want_ioout[] = "want_ioout";
static char __pyx_k__Collections[] = "Collections";
static char __pyx_k__ImportError[] = "ImportError";
static char __pyx_k___needout_cb[] = "_needout_cb";
static char __pyx_k__bindata_add[] = "bindata_add";
static char __pyx_k__coll_remove[] = "coll_remove";
static char __pyx_k__coll_rename[] = "coll_rename";
static char __pyx_k__loop_tickle[] = "loop_tickle";
static char __pyx_k__plugin_list[] = "plugin_list";
static char __pyx_k__RuntimeError[] = "RuntimeError";
static char __pyx_k__bindata_list[] = "bindata_list";
static char __pyx_k__defaultvalue[] = "defaultvalue";
static char __pyx_k__unquote_plus[] = "unquote_plus";
static char __pyx_k__configval_get[] = "configval_get";
static char __pyx_k__configval_set[] = "configval_set";
static char __pyx_k__playback_stop[] = "playback_stop";
static char __pyx_k__playlist_list[] = "playlist_list";
static char __pyx_k__playlist_load[] = "playlist_load";
static char __pyx_k__playlist_move[] = "playlist_move";
static char __pyx_k__playlist_radd[] = "playlist_radd";
static char __pyx_k__playlist_sort[] = "playlist_sort";
static char __pyx_k___disconnect_cb[] = "_disconnect_cb";
static char __pyx_k__bindata_remove[] = "bindata_remove";
static char __pyx_k__coll_query_ids[] = "coll_query_ids";
static char __pyx_k__configval_list[] = "configval_list";
static char __pyx_k__playback_pause[] = "playback_pause";
static char __pyx_k__playback_start[] = "playback_start";
static char __pyx_k__playlist_clear[] = "playlist_clear";
static char __pyx_k__ACTIVE_PLAYLIST[] = "ACTIVE_PLAYLIST";
static char __pyx_k__PLUGIN_TYPE_ALL[] = "PLUGIN_TYPE_ALL";
static char __pyx_k__disconnect_func[] = "disconnect_func";
static char __pyx_k__enforce_unicode[] = "enforce_unicode";
static char __pyx_k__medialib_get_id[] = "medialib_get_id";
static char __pyx_k__medialib_rehash[] = "medialib_rehash";
static char __pyx_k__playback_status[] = "playback_status";
static char __pyx_k__playback_tickle[] = "playback_tickle";
static char __pyx_k__playlist_add_id[] = "playlist_add_id";
static char __pyx_k__playlist_create[] = "playlist_create";
static char __pyx_k__playlist_remove[] = "playlist_remove";
static char __pyx_k__print_exception[] = "print_exception";
static char __pyx_k___loop_get_wakeup[] = "_loop_get_wakeup";
static char __pyx_k___loop_set_wakeup[] = "_loop_set_wakeup";
static char __pyx_k__bindata_retrieve[] = "bindata_retrieve";
static char __pyx_k__coll_query_infos[] = "coll_query_infos";
static char __pyx_k__config_get_value[] = "config_get_value";
static char __pyx_k__config_set_value[] = "config_set_value";
static char __pyx_k__playback_seek_ms[] = "playback_seek_ms";
static char __pyx_k__playlist_add_url[] = "playlist_add_url";
static char __pyx_k__playlist_rinsert[] = "playlist_rinsert";
static char __pyx_k__playlist_shuffle[] = "playlist_shuffle";
static char __pyx_k__set_need_out_fun[] = "set_need_out_fun";
static char __pyx_k__COLLECTION_NS_ALL[] = "COLLECTION_NS_ALL";
static char __pyx_k__PLAYBACK_SEEK_CUR[] = "PLAYBACK_SEEK_CUR";
static char __pyx_k__PLAYBACK_SEEK_SET[] = "PLAYBACK_SEEK_SET";
static char __pyx_k__PLUGIN_TYPE_XFORM[] = "PLUGIN_TYPE_XFORM";
static char __pyx_k__medialib_get_info[] = "medialib_get_info";
static char __pyx_k__playback_playtime[] = "playback_playtime";
static char __pyx_k__playlist_set_next[] = "playlist_set_next";
static char __pyx_k__PLUGIN_TYPE_OUTPUT[] = "PLUGIN_TYPE_OUTPUT";
static char __pyx_k__VisualizationError[] = "VisualizationError";
static char __pyx_k__config_list_values[] = "config_list_values";
static char __pyx_k__configval_register[] = "configval_register";
static char __pyx_k__medialib_add_entry[] = "medialib_add_entry";
static char __pyx_k__playlist_insert_id[] = "playlist_insert_id";
static char __pyx_k__visualization_init[] = "visualization_init";
static char __pyx_k__xform_media_browse[] = "xform_media_browse";
static char __pyx_k__UnnamedPythonClient[] = "UnnamedPythonClient";
static char __pyx_k__medialib_move_entry[] = "medialib_move_entry";
static char __pyx_k__playback_current_id[] = "playback_current_id";
static char __pyx_k__playback_volume_get[] = "playback_volume_get";
static char __pyx_k__playback_volume_set[] = "playback_volume_set";
static char __pyx_k__playlist_insert_url[] = "playlist_insert_url";
static char __pyx_k__visualization_start[] = "visualization_start";
static PyObject *__pyx_kp_s_1;
static PyObject *__pyx_n_s_100;
static PyObject *__pyx_n_s_101;
static PyObject *__pyx_n_s_102;
static PyObject *__pyx_n_s_103;
static PyObject *__pyx_n_s_104;
static PyObject *__pyx_n_s_105;
static PyObject *__pyx_n_s_106;
static PyObject *__pyx_n_s_107;
static PyObject *__pyx_n_s_108;
static PyObject *__pyx_n_s_109;
static PyObject *__pyx_kp_s_11;
static PyObject *__pyx_n_s_110;
static PyObject *__pyx_n_s_111;
static PyObject *__pyx_n_s_113;
static PyObject *__pyx_n_s_114;
static PyObject *__pyx_n_s_115;
static PyObject *__pyx_n_s_116;
static PyObject *__pyx_n_s_117;
static PyObject *__pyx_n_s_118;
static PyObject *__pyx_n_s_119;
static PyObject *__pyx_n_s_120;
static PyObject *__pyx_n_s_121;
static PyObject *__pyx_n_s_122;
static PyObject *__pyx_n_s_123;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_kp_s_16;
static PyObject *__pyx_kp_s_17;
static PyObject *__pyx_kp_s_18;
static PyObject *__pyx_kp_s_19;
static PyObject *__pyx_kp_s_2;
static PyObject *__pyx_kp_s_20;
static PyObject *__pyx_kp_s_21;
static PyObject *__pyx_kp_s_22;
static PyObject *__pyx_n_s_24;
static PyObject *__pyx_n_s_25;
static PyObject *__pyx_kp_s_26;
static PyObject *__pyx_kp_s_28;
static PyObject *__pyx_kp_s_3;
static PyObject *__pyx_kp_s_31;
static PyObject *__pyx_n_s_34;
static PyObject *__pyx_n_s_36;
static PyObject *__pyx_n_s_37;
static PyObject *__pyx_n_s_38;
static PyObject *__pyx_n_s_39;
static PyObject *__pyx_n_s_40;
static PyObject *__pyx_n_s_43;
static PyObject *__pyx_n_s_46;
static PyObject *__pyx_n_s_47;
static PyObject *__pyx_n_s_48;
static PyObject *__pyx_n_s_49;
static PyObject *__pyx_n_s_50;
static PyObject *__pyx_n_s_51;
static PyObject *__pyx_n_s_52;
static PyObject *__pyx_n_s_53;
static PyObject *__pyx_n_s_54;
static PyObject *__pyx_n_s_55;
static PyObject *__pyx_n_s_57;
static PyObject *__pyx_n_s_59;
static PyObject *__pyx_n_s_62;
static PyObject *__pyx_n_s_64;
static PyObject *__pyx_n_s_65;
static PyObject *__pyx_n_s_66;
static PyObject *__pyx_n_s_67;
static PyObject *__pyx_n_s_68;
static PyObject *__pyx_n_s_69;
static PyObject *__pyx_n_s_70;
static PyObject *__pyx_n_s_72;
static PyObject *__pyx_n_s_73;
static PyObject *__pyx_n_s_74;
static PyObject *__pyx_n_s_75;
static PyObject *__pyx_n_s_76;
static PyObject *__pyx_n_s_78;
static PyObject *__pyx_n_s_79;
static PyObject *__pyx_kp_s_80;
static PyObject *__pyx_n_s_82;
static PyObject *__pyx_n_s_84;
static PyObject *__pyx_kp_s_86;
static PyObject *__pyx_n_s_89;
static PyObject *__pyx_kp_s_9;
static PyObject *__pyx_n_s_90;
static PyObject *__pyx_n_s_91;
static PyObject *__pyx_n_s_92;
static PyObject *__pyx_n_s_93;
static PyObject *__pyx_n_s_94;
static PyObject *__pyx_n_s_95;
static PyObject *__pyx_n_s_96;
static PyObject *__pyx_n_s_97;
static PyObject *__pyx_n_s_98;
static PyObject *__pyx_n_s_99;
static PyObject *__pyx_kp_s__1;
static PyObject *__pyx_n_s__ACTIVE_PLAYLIST;
static PyObject *__pyx_n_s__COLLECTION_NS_ALL;
static PyObject *__pyx_n_s__Collections;
static PyObject *__pyx_n_s__Exception;
static PyObject *__pyx_n_s__IOError;
static PyObject *__pyx_n_s__ImportError;
static PyObject *__pyx_n_s__PLAYBACK_SEEK_CUR;
static PyObject *__pyx_n_s__PLAYBACK_SEEK_SET;
static PyObject *__pyx_n_s__PLUGIN_TYPE_ALL;
static PyObject *__pyx_n_s__PLUGIN_TYPE_OUTPUT;
static PyObject *__pyx_n_s__PLUGIN_TYPE_XFORM;
static PyObject *__pyx_n_s__Playlists;
static PyObject *__pyx_n_s__RuntimeError;
static PyObject *__pyx_n_s__TypeError;
static PyObject *__pyx_n_s__UnnamedPythonClient;
static PyObject *__pyx_n_s__ValueError;
static PyObject *__pyx_n_s__VisualizationError;
static PyObject *__pyx_n_s__XMMS;
static PyObject *__pyx_n_s__XMMSResult;
static PyObject *__pyx_n_s____call__;
static PyObject *__pyx_n_s____class__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____name__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s___callback;
static PyObject *__pyx_n_s___disconnect_cb;
static PyObject *__pyx_n_s___loop_get_wakeup;
static PyObject *__pyx_n_s___loop_set_wakeup;
static PyObject *__pyx_n_s___needout_cb;
static PyObject *__pyx_n_s___value;
static PyObject *__pyx_n_s__ascii;
static PyObject *__pyx_n_s__bindata_add;
static PyObject *__pyx_n_s__bindata_list;
static PyObject *__pyx_n_s__bindata_remove;
static PyObject *__pyx_n_s__bindata_retrieve;
static PyObject *__pyx_n_s__blocking;
static PyObject *__pyx_n_s__callback;
static PyObject *__pyx_n_s__cb;
static PyObject *__pyx_n_s__channel;
static PyObject *__pyx_n_s__clientname;
static PyObject *__pyx_n_s__coll;
static PyObject *__pyx_n_s__coll_get;
static PyObject *__pyx_n_s__coll_list;
static PyObject *__pyx_n_s__coll_query_ids;
static PyObject *__pyx_n_s__coll_query_infos;
static PyObject *__pyx_n_s__coll_remove;
static PyObject *__pyx_n_s__coll_rename;
static PyObject *__pyx_n_s__coll_save;
static PyObject *__pyx_n_s__config_get_value;
static PyObject *__pyx_n_s__config_list_values;
static PyObject *__pyx_n_s__config_set_value;
static PyObject *__pyx_n_s__configval_get;
static PyObject *__pyx_n_s__configval_list;
static PyObject *__pyx_n_s__configval_register;
static PyObject *__pyx_n_s__configval_set;
static PyObject *__pyx_n_s__connect;
static PyObject *__pyx_n_s__cur_pos;
static PyObject *__pyx_n_s__data;
static PyObject *__pyx_n_s__defaultvalue;
static PyObject *__pyx_n_s__deprecated;
static PyObject *__pyx_n_s__disconnect;
static PyObject *__pyx_n_s__disconnect_func;
static PyObject *__pyx_n_s__drawtime;
static PyObject *__pyx_n_s__encode;
static PyObject *__pyx_n_s__encoded;
static PyObject *__pyx_n_s__enforce_unicode;
static PyObject *__pyx_n_s__errfd;
static PyObject *__pyx_n_s__exc_info;
static PyObject *__pyx_n_s__fields;
static PyObject *__pyx_n_s__get;
static PyObject *__pyx_n_s__get_buffer;
static PyObject *__pyx_n_s__get_data;
static PyObject *__pyx_n_s__get_fd;
static PyObject *__pyx_n_s__getenv;
static PyObject *__pyx_n_s__groupby;
static PyObject *__pyx_n_s__handle;
static PyObject *__pyx_n_s__hash;
static PyObject *__pyx_n_s__id;
static PyObject *__pyx_n_s__infd;
static PyObject *__pyx_n_s__ioin;
static PyObject *__pyx_n_s__ioout;
static PyObject *__pyx_n_s__is_error;
static PyObject *__pyx_n_s__iserror;
static PyObject *__pyx_n_s__key;
static PyObject *__pyx_n_s__leng;
static PyObject *__pyx_n_s__loop_iter;
static PyObject *__pyx_n_s__loop_tickle;
static PyObject *__pyx_n_s__map;
static PyObject *__pyx_n_s__medialib_add_entry;
static PyObject *__pyx_n_s__medialib_get_id;
static PyObject *__pyx_n_s__medialib_get_info;
static PyObject *__pyx_n_s__medialib_move_entry;
static PyObject *__pyx_n_s__medialib_rehash;
static PyObject *__pyx_n_s__ms;
static PyObject *__pyx_n_s__name;
static PyObject *__pyx_n_s__new_pos;
static PyObject *__pyx_n_s__newname;
static PyObject *__pyx_n_s__ns;
static PyObject *__pyx_n_s__oldname;
static PyObject *__pyx_n_s__order;
static PyObject *__pyx_n_s__os;
static PyObject *__pyx_n_s__outfd;
static PyObject *__pyx_n_s__path;
static PyObject *__pyx_n_s__pipe;
static PyObject *__pyx_n_s__playback_current_id;
static PyObject *__pyx_n_s__playback_pause;
static PyObject *__pyx_n_s__playback_playtime;
static PyObject *__pyx_n_s__playback_seek_ms;
static PyObject *__pyx_n_s__playback_start;
static PyObject *__pyx_n_s__playback_status;
static PyObject *__pyx_n_s__playback_stop;
static PyObject *__pyx_n_s__playback_tickle;
static PyObject *__pyx_n_s__playback_volume_get;
static PyObject *__pyx_n_s__playback_volume_set;
static PyObject *__pyx_n_s__playlist;
static PyObject *__pyx_n_s__playlist_add_id;
static PyObject *__pyx_n_s__playlist_add_url;
static PyObject *__pyx_n_s__playlist_clear;
static PyObject *__pyx_n_s__playlist_create;
static PyObject *__pyx_n_s__playlist_insert_id;
static PyObject *__pyx_n_s__playlist_insert_url;
static PyObject *__pyx_n_s__playlist_list;
static PyObject *__pyx_n_s__playlist_load;
static PyObject *__pyx_n_s__playlist_move;
static PyObject *__pyx_n_s__playlist_radd;
static PyObject *__pyx_n_s__playlist_remove;
static PyObject *__pyx_n_s__playlist_rinsert;
static PyObject *__pyx_n_s__playlist_set_next;
static PyObject *__pyx_n_s__playlist_shuffle;
static PyObject *__pyx_n_s__playlist_sort;
static PyObject *__pyx_n_s__plugin_list;
static PyObject *__pyx_n_s__pos;
static PyObject *__pyx_n_s__position;
static PyObject *__pyx_n_s__print_exception;
static PyObject *__pyx_n_s__props;
static PyObject *__pyx_n_s__pyval;
static PyObject *__pyx_n_s__quit;
static PyObject *__pyx_n_s__range;
static PyObject *__pyx_n_s__read;
static PyObject *__pyx_n_s__remove;
static PyObject *__pyx_n_s__samples;
static PyObject *__pyx_n_s__select;
static PyObject *__pyx_n_s__server;
static PyObject *__pyx_n_s__set;
static PyObject *__pyx_n_s__set_need_out_fun;
static PyObject *__pyx_n_s__source;
static PyObject *__pyx_n_s__sources;
static PyObject *__pyx_n_s__start;
static PyObject *__pyx_n_s__stats;
static PyObject *__pyx_n_s__stderr;
static PyObject *__pyx_n_s__sys;
static PyObject *__pyx_n_s__timeout;
static PyObject *__pyx_n_s__traceback;
static PyObject *__pyx_n_s__typ;
static PyObject *__pyx_n_s__unquote_plus;
static PyObject *__pyx_n_s__url;
static PyObject *__pyx_n_s__urllib;
static PyObject *__pyx_n_s__val;
static PyObject *__pyx_n_s__value;
static PyObject *__pyx_n_s__valuename;
static PyObject *__pyx_n_s__visualization_init;
static PyObject *__pyx_n_s__visualization_start;
static PyObject *__pyx_n_s__volume;
static PyObject *__pyx_n_s__wait;
static PyObject *__pyx_n_s__want_ioout;
static PyObject *__pyx_n_s__whence;
static PyObject *__pyx_n_s__write;
static PyObject *__pyx_n_s__xform_media_browse;
static PyObject *__pyx_n_s__xmmsapi;
static PyObject *__pyx_n_s__xmmsvalue;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_neg_1;
static xmms_playback_seek_mode_t __pyx_k_30;
static xmms_playback_seek_mode_t __pyx_k_33;
static PyObject *__pyx_k_41;
static PyObject *__pyx_k_42;
static PyObject *__pyx_k_44;
static PyObject *__pyx_k_45;
static PyObject *__pyx_k_56;
static PyObject *__pyx_k_58;
static PyObject *__pyx_k_60;
static PyObject *__pyx_k_61;
static PyObject *__pyx_k_63;
static PyObject *__pyx_k_71;
static PyObject *__pyx_k_77;
static PyObject *__pyx_k_tuple_4;
static PyObject *__pyx_k_tuple_5;
static PyObject *__pyx_k_tuple_7;
static PyObject *__pyx_k_tuple_8;
static PyObject *__pyx_k_tuple_10;
static PyObject *__pyx_k_tuple_12;
static PyObject *__pyx_k_tuple_14;
static PyObject *__pyx_k_tuple_15;
static PyObject *__pyx_k_tuple_23;
static PyObject *__pyx_k_tuple_27;
static PyObject *__pyx_k_tuple_29;
static PyObject *__pyx_k_tuple_32;
static PyObject *__pyx_k_tuple_35;
static PyObject *__pyx_k_tuple_81;
static PyObject *__pyx_k_tuple_83;
static PyObject *__pyx_k_tuple_85;
static PyObject *__pyx_k_tuple_87;
static PyObject *__pyx_k_tuple_112;

/* "xmmsapi.pyx":62
 * 
 * def deprecated(f):
 * 	def deprecated_decorator(*a, **kw):             # <<<<<<<<<<<<<<
 * 		if show_deprecated:
 * 			from sys import stderr
 */

static PyObject *__pyx_pf_7xmmsapi_10deprecated_deprecated_decorator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7xmmsapi_10deprecated_deprecated_decorator = {__Pyx_NAMESTR("deprecated_decorator"), (PyCFunction)__pyx_pf_7xmmsapi_10deprecated_deprecated_decorator, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_7xmmsapi_10deprecated_deprecated_decorator(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *__pyx_cur_scope;
  struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *__pyx_outer_scope;
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_v_stderr = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("deprecated_decorator");
  __pyx_outer_scope = (struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *)__pyx_self;
  __pyx_cur_scope = __pyx_outer_scope;
  __pyx_self = __pyx_self;
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "deprecated_decorator", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_a = __pyx_args;

  /* "xmmsapi.pyx":63
 * def deprecated(f):
 * 	def deprecated_decorator(*a, **kw):
 * 		if show_deprecated:             # <<<<<<<<<<<<<<
 * 			from sys import stderr
 * 			print >>stderr, "DEPRECATED: %s()" % f.__name__
 */
  if (__pyx_v_7xmmsapi_show_deprecated) {

    /* "xmmsapi.pyx":64
 * 	def deprecated_decorator(*a, **kw):
 * 		if show_deprecated:
 * 			from sys import stderr             # <<<<<<<<<<<<<<
 * 			print >>stderr, "DEPRECATED: %s()" % f.__name__
 * 		return f(*a, **kw)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(((PyObject *)__pyx_n_s__stderr));
    PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__stderr));
    __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stderr));
    __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__stderr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_stderr = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_v_f)) { __Pyx_RaiseClosureNameError("f"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }__pyx_t_2 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_f, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "xmmsapi.pyx":65
 * 		if show_deprecated:
 * 			from sys import stderr
 * 			print >>stderr, "DEPRECATED: %s()" % f.__name__             # <<<<<<<<<<<<<<
 * 		return f(*a, **kw)
 * 	return deprecated_decorator
 */
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_1), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__Pyx_PrintOne(__pyx_v_stderr, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsapi.pyx":66
 * 			from sys import stderr
 * 			print >>stderr, "DEPRECATED: %s()" % f.__name__
 * 		return f(*a, **kw)             # <<<<<<<<<<<<<<
 * 	return deprecated_decorator
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_f)) { __Pyx_RaiseClosureNameError("f"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }__pyx_t_1 = PySequence_Tuple(((PyObject *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_cur_scope->__pyx_v_f, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_v_kw)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.deprecated.deprecated_decorator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_kw);
  __Pyx_XDECREF(__pyx_v_stderr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":61
 * del getenv
 * 
 * def deprecated(f):             # <<<<<<<<<<<<<<
 * 	def deprecated_decorator(*a, **kw):
 * 		if show_deprecated:
 */

static PyObject *__pyx_pf_7xmmsapi_deprecated(PyObject *__pyx_self, PyObject *__pyx_v_f); /*proto*/
static PyMethodDef __pyx_mdef_7xmmsapi_deprecated = {__Pyx_NAMESTR("deprecated"), (PyCFunction)__pyx_pf_7xmmsapi_deprecated, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_7xmmsapi_deprecated(PyObject *__pyx_self, PyObject *__pyx_v_f) {
  struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *__pyx_cur_scope;
  PyObject *__pyx_v_deprecated_decorator = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("deprecated");
  __pyx_cur_scope = (struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *)__pyx_ptype_7xmmsapi___pyx_scope_struct__deprecated->tp_new(__pyx_ptype_7xmmsapi___pyx_scope_struct__deprecated, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_self = __pyx_self;
  __Pyx_INCREF(__pyx_v_f);
  __pyx_cur_scope->__pyx_v_f = __pyx_v_f;
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f);

  /* "xmmsapi.pyx":62
 * 
 * def deprecated(f):
 * 	def deprecated_decorator(*a, **kw):             # <<<<<<<<<<<<<<
 * 		if show_deprecated:
 * 			from sys import stderr
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_7xmmsapi_10deprecated_deprecated_decorator, ((PyObject*)__pyx_cur_scope), __pyx_n_s__xmmsapi); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_v_deprecated_decorator);
  __pyx_v_deprecated_decorator = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":67
 * 			print >>stderr, "DEPRECATED: %s()" % f.__name__
 * 		return f(*a, **kw)
 * 	return deprecated_decorator             # <<<<<<<<<<<<<<
 * 
 * # Trick to not expose select in the module, but keep it accessible from builtins
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_deprecated_decorator);
  __pyx_r = __pyx_v_deprecated_decorator;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.deprecated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_deprecated_decorator);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":72
 * # methods.
 * cdef object select
 * cdef _install_select():             # <<<<<<<<<<<<<<
 * 	global select
 * 	from select import select as _sel
 */

static PyObject *__pyx_f_7xmmsapi__install_select(void) {
  PyObject *__pyx_v__sel = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_install_select");

  /* "xmmsapi.pyx":74
 * cdef _install_select():
 * 	global select
 * 	from select import select as _sel             # <<<<<<<<<<<<<<
 * 	select = _sel
 * _install_select()
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__select));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__select));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__select));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__select), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__select); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v__sel = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":75
 * 	global select
 * 	from select import select as _sel
 * 	select = _sel             # <<<<<<<<<<<<<<
 * _install_select()
 * 
 */
  __Pyx_INCREF(__pyx_v__sel);
  __Pyx_XGOTREF(__pyx_v_7xmmsapi_select);
  __Pyx_DECREF(__pyx_v_7xmmsapi_select);
  __Pyx_GIVEREF(__pyx_v__sel);
  __pyx_v_7xmmsapi_select = __pyx_v__sel;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi._install_select", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__sel);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":78
 * _install_select()
 * 
 * cdef bint ResultNotifier(xmmsv_t *res, void *o):             # <<<<<<<<<<<<<<
 * 	cdef object xres
 * 	xres = <object> o
 */

static int __pyx_f_7xmmsapi_ResultNotifier(xmmsv_t *__pyx_v_res, void *__pyx_v_o) {
  PyObject *__pyx_v_xres = 0;
  PyObject *__pyx_v_traceback = NULL;
  PyObject *__pyx_v_sys = NULL;
  PyObject *__pyx_v_exc = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ResultNotifier");

  /* "xmmsapi.pyx":80
 * cdef bint ResultNotifier(xmmsv_t *res, void *o):
 * 	cdef object xres
 * 	xres = <object> o             # <<<<<<<<<<<<<<
 * 	try:
 * 		return xres()
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_o));
  __pyx_v_xres = ((PyObject *)__pyx_v_o);

  /* "xmmsapi.pyx":81
 * 	cdef object xres
 * 	xres = <object> o
 * 	try:             # <<<<<<<<<<<<<<
 * 		return xres()
 * 	except:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "xmmsapi.pyx":82
 * 	xres = <object> o
 * 	try:
 * 		return xres()             # <<<<<<<<<<<<<<
 * 	except:
 * 		import traceback, sys
 */
      __pyx_t_4 = PyObject_Call(__pyx_v_xres, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_5;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "xmmsapi.pyx":83
 * 	try:
 * 		return xres()
 * 	except:             # <<<<<<<<<<<<<<
 * 		import traceback, sys
 * 		exc = sys.exc_info()
 */
    /*except:*/ {
      __Pyx_AddTraceback("xmmsapi.ResultNotifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "xmmsapi.pyx":84
 * 		return xres()
 * 	except:
 * 		import traceback, sys             # <<<<<<<<<<<<<<
 * 		exc = sys.exc_info()
 * 		traceback.print_exception(*exc)
 */
      __pyx_t_8 = __Pyx_Import(((PyObject *)__pyx_n_s__traceback), 0, -1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_traceback = __pyx_t_8;
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_sys = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "xmmsapi.pyx":85
 * 	except:
 * 		import traceback, sys
 * 		exc = sys.exc_info()             # <<<<<<<<<<<<<<
 * 		traceback.print_exception(*exc)
 * 		return False
 */
      __pyx_t_8 = PyObject_GetAttr(__pyx_v_sys, __pyx_n_s__exc_info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_exc = __pyx_t_9;
      __pyx_t_9 = 0;

      /* "xmmsapi.pyx":86
 * 		import traceback, sys
 * 		exc = sys.exc_info()
 * 		traceback.print_exception(*exc)             # <<<<<<<<<<<<<<
 * 		return False
 * 
 */
      __pyx_t_9 = PyObject_GetAttr(__pyx_v_traceback, __pyx_n_s__print_exception); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = PySequence_Tuple(__pyx_v_exc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __pyx_t_10 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "xmmsapi.pyx":87
 * 		exc = sys.exc_info()
 * 		traceback.print_exception(*exc)
 * 		return False             # <<<<<<<<<<<<<<
 * 
 * cdef void ResultDestroyNotifier(void *o):
 */
      __pyx_r = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_WriteUnraisable("xmmsapi.ResultNotifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_xres);
  __Pyx_XDECREF(__pyx_v_traceback);
  __Pyx_XDECREF(__pyx_v_sys);
  __Pyx_XDECREF(__pyx_v_exc);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":89
 * 		return False
 * 
 * cdef void ResultDestroyNotifier(void *o):             # <<<<<<<<<<<<<<
 * 	cdef XmmsResult obj
 * 	obj = <XmmsResult>o
 */

static void __pyx_f_7xmmsapi_ResultDestroyNotifier(void *__pyx_v_o) {
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_obj = 0;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ResultDestroyNotifier");

  /* "xmmsapi.pyx":91
 * cdef void ResultDestroyNotifier(void *o):
 * 	cdef XmmsResult obj
 * 	obj = <XmmsResult>o             # <<<<<<<<<<<<<<
 * 	obj._cb = None
 * 	obj.result_tracker.release_result(obj)
 */
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_o)));
  __pyx_v_obj = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_o);

  /* "xmmsapi.pyx":92
 * 	cdef XmmsResult obj
 * 	obj = <XmmsResult>o
 * 	obj._cb = None             # <<<<<<<<<<<<<<
 * 	obj.result_tracker.release_result(obj)
 * 
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_obj->_cb);
  __Pyx_DECREF(__pyx_v_obj->_cb);
  __pyx_v_obj->_cb = Py_None;

  /* "xmmsapi.pyx":93
 * 	obj = <XmmsResult>o
 * 	obj._cb = None
 * 	obj.result_tracker.release_result(obj)             # <<<<<<<<<<<<<<
 * 
 * cdef class XmmsSourcePreference:
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResultTracker *)__pyx_v_obj->result_tracker->__pyx_vtab)->release_result(__pyx_v_obj->result_tracker, __pyx_v_obj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_WriteUnraisable("xmmsapi.ResultDestroyNotifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
  __Pyx_RefNannyFinishContext();
}

/* "xmmsapi.pyx":101
 * 	#cdef object sources
 * 
 * 	def __init__(self, sources=None):             # <<<<<<<<<<<<<<
 * 		self.set(sources)
 * 
 */

static int __pyx_pf_7xmmsapi_20XmmsSourcePreference___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_7xmmsapi_20XmmsSourcePreference___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_sources = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sources,0};
  __Pyx_RefNannySetupContext("__init__");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sources);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_sources = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsSourcePreference.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":102
 * 
 * 	def __init__(self, sources=None):
 * 		self.set(sources)             # <<<<<<<<<<<<<<
 * 
 * 	def get(self):
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_sources);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sources);
  __Pyx_GIVEREF(__pyx_v_sources);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsSourcePreference.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":104
 * 		self.set(sources)
 * 
 * 	def get(self):             # <<<<<<<<<<<<<<
 * 		return self.sources
 * 
 */

static PyObject *__pyx_pf_7xmmsapi_20XmmsSourcePreference_1get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_20XmmsSourcePreference_1get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get");

  /* "xmmsapi.pyx":105
 * 
 * 	def get(self):
 * 		return self.sources             # <<<<<<<<<<<<<<
 * 
 * 	def set(self, sources):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)__pyx_v_self)->sources);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)__pyx_v_self)->sources;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":107
 * 		return self.sources
 * 
 * 	def set(self, sources):             # <<<<<<<<<<<<<<
 * 		if sources is None:
 * 			self.sources = []
 */

static PyObject *__pyx_pf_7xmmsapi_20XmmsSourcePreference_2set(PyObject *__pyx_v_self, PyObject *__pyx_v_sources); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_20XmmsSourcePreference_2set(PyObject *__pyx_v_self, PyObject *__pyx_v_sources) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set");

  /* "xmmsapi.pyx":108
 * 
 * 	def set(self, sources):
 * 		if sources is None:             # <<<<<<<<<<<<<<
 * 			self.sources = []
 * 		else:
 */
  __pyx_t_1 = (__pyx_v_sources == Py_None);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":109
 * 	def set(self, sources):
 * 		if sources is None:
 * 			self.sources = []             # <<<<<<<<<<<<<<
 * 		else:
 * 			self.sources = map(enforce_unicode, [s for s in sources])
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __Pyx_GOTREF(((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)__pyx_v_self)->sources);
    __Pyx_DECREF(((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)__pyx_v_self)->sources);
    ((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)__pyx_v_self)->sources = ((PyObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "xmmsapi.pyx":111
 * 			self.sources = []
 * 		else:
 * 			self.sources = map(enforce_unicode, [s for s in sources])             # <<<<<<<<<<<<<<
 * 
 * cdef class XmmsResultTracker:
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__enforce_unicode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    if (PyList_CheckExact(__pyx_v_sources) || PyTuple_CheckExact(__pyx_v_sources)) {
      __pyx_t_4 = __pyx_v_sources; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_sources); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
    }
    for (;;) {
      if (PyList_CheckExact(__pyx_t_4)) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++;
      } else if (PyTuple_CheckExact(__pyx_t_4)) {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++;
      } else {
        __pyx_t_7 = __pyx_t_6(__pyx_t_4);
        if (unlikely(!__pyx_t_7)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF(__pyx_v_s);
      __pyx_v_s = __pyx_t_7;
      __pyx_t_7 = 0;
      if (unlikely(PyList_Append(__pyx_t_3, (PyObject*)__pyx_v_s))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)__pyx_t_3));
    PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_3));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
    __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)__pyx_v_self)->sources);
    __Pyx_DECREF(((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)__pyx_v_self)->sources);
    ((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)__pyx_v_self)->sources = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L5:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("xmmsapi.XmmsSourcePreference.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":119
 * 	#cdef object results
 * 
 * 	def __cinit__(self):             # <<<<<<<<<<<<<<
 * 		self.results = []
 * 
 */

static int __pyx_pf_7xmmsapi_17XmmsResultTracker___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_7xmmsapi_17XmmsResultTracker___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;

  /* "xmmsapi.pyx":120
 * 
 * 	def __cinit__(self):
 * 		self.results = []             # <<<<<<<<<<<<<<
 * 
 * 	cdef track_result(self, XmmsResult r):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(((struct __pyx_obj_7xmmsapi_XmmsResultTracker *)__pyx_v_self)->results);
  __Pyx_DECREF(((struct __pyx_obj_7xmmsapi_XmmsResultTracker *)__pyx_v_self)->results);
  ((struct __pyx_obj_7xmmsapi_XmmsResultTracker *)__pyx_v_self)->results = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsResultTracker.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":122
 * 		self.results = []
 * 
 * 	cdef track_result(self, XmmsResult r):             # <<<<<<<<<<<<<<
 * 		self.results.append(r)
 * 
 */

static PyObject *__pyx_f_7xmmsapi_17XmmsResultTracker_track_result(struct __pyx_obj_7xmmsapi_XmmsResultTracker *__pyx_v_self, struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_r) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("track_result");

  /* "xmmsapi.pyx":123
 * 
 * 	cdef track_result(self, XmmsResult r):
 * 		self.results.append(r)             # <<<<<<<<<<<<<<
 * 
 * 	cdef release_result(self, XmmsResult r):
 */
  __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_self->results, ((PyObject *)__pyx_v_r)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsResultTracker.track_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":125
 * 		self.results.append(r)
 * 
 * 	cdef release_result(self, XmmsResult r):             # <<<<<<<<<<<<<<
 * 		self.results.remove(r)
 * 
 */

static PyObject *__pyx_f_7xmmsapi_17XmmsResultTracker_release_result(struct __pyx_obj_7xmmsapi_XmmsResultTracker *__pyx_v_self, struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_r) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("release_result");

  /* "xmmsapi.pyx":126
 * 
 * 	cdef release_result(self, XmmsResult r):
 * 		self.results.remove(r)             # <<<<<<<<<<<<<<
 * 
 * 	cdef disconnect_all(self, bint unset_result):
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->results, __pyx_n_s__remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((PyObject *)__pyx_v_r));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_r));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_r));
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsResultTracker.release_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":128
 * 		self.results.remove(r)
 * 
 * 	cdef disconnect_all(self, bint unset_result):             # <<<<<<<<<<<<<<
 * 		cdef XmmsResult r
 * 		for r in self.results[:]: # Create a copy because r.disconnect() will remove the result from the list.
 */

static PyObject *__pyx_f_7xmmsapi_17XmmsResultTracker_disconnect_all(struct __pyx_obj_7xmmsapi_XmmsResultTracker *__pyx_v_self, int __pyx_v_unset_result) {
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_r = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("disconnect_all");

  /* "xmmsapi.pyx":130
 * 	cdef disconnect_all(self, bint unset_result):
 * 		cdef XmmsResult r
 * 		for r in self.results[:]: # Create a copy because r.disconnect() will remove the result from the list.             # <<<<<<<<<<<<<<
 * 			r.disconnect()
 * 			if unset_result: #This would become useless if results didn't xmmsc_ref() the connection.
 */
  __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_self->results, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++;
    } else if (PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++;
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_r));
    __pyx_v_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "xmmsapi.pyx":131
 * 		cdef XmmsResult r
 * 		for r in self.results[:]: # Create a copy because r.disconnect() will remove the result from the list.
 * 			r.disconnect()             # <<<<<<<<<<<<<<
 * 			if unset_result: #This would become useless if results didn't xmmsc_ref() the connection.
 * 				xmmsc_result_unref(r.res)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)__pyx_v_r->__pyx_vtab)->disconnect(__pyx_v_r, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "xmmsapi.pyx":132
 * 		for r in self.results[:]: # Create a copy because r.disconnect() will remove the result from the list.
 * 			r.disconnect()
 * 			if unset_result: #This would become useless if results didn't xmmsc_ref() the connection.             # <<<<<<<<<<<<<<
 * 				xmmsc_result_unref(r.res)
 * 				r.res = NULL
 */
    if (__pyx_v_unset_result) {

      /* "xmmsapi.pyx":133
 * 			r.disconnect()
 * 			if unset_result: #This would become useless if results didn't xmmsc_ref() the connection.
 * 				xmmsc_result_unref(r.res)             # <<<<<<<<<<<<<<
 * 				r.res = NULL
 * 
 */
      xmmsc_result_unref(__pyx_v_r->res);

      /* "xmmsapi.pyx":134
 * 			if unset_result: #This would become useless if results didn't xmmsc_ref() the connection.
 * 				xmmsc_result_unref(r.res)
 * 				r.res = NULL             # <<<<<<<<<<<<<<
 * 
 * cdef class XmmsResult:
 */
      __pyx_v_r->res = NULL;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsResultTracker.disconnect_all", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":148
 * 	#cdef XmmsResultTracker result_tracker
 * 
 * 	def __cinit__(self):             # <<<<<<<<<<<<<<
 * 		self.res = NULL
 * 		self.ispropdict = 0
 */

static int __pyx_pf_7xmmsapi_10XmmsResult___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_7xmmsapi_10XmmsResult___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;

  /* "xmmsapi.pyx":149
 * 
 * 	def __cinit__(self):
 * 		self.res = NULL             # <<<<<<<<<<<<<<
 * 		self.ispropdict = 0
 * 		self._cb_issetup = False
 */
  ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->res = NULL;

  /* "xmmsapi.pyx":150
 * 	def __cinit__(self):
 * 		self.res = NULL
 * 		self.ispropdict = 0             # <<<<<<<<<<<<<<
 * 		self._cb_issetup = False
 * 
 */
  ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->ispropdict = 0;

  /* "xmmsapi.pyx":151
 * 		self.res = NULL
 * 		self.ispropdict = 0
 * 		self._cb_issetup = False             # <<<<<<<<<<<<<<
 * 
 * 	def __dealloc__(self):
 */
  ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->_cb_issetup = 0;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":153
 * 		self._cb_issetup = False
 * 
 * 	def __dealloc__(self):             # <<<<<<<<<<<<<<
 * 		if self.res != NULL:
 * 			xmmsc_result_unref(self.res)
 */

static void __pyx_pf_7xmmsapi_10XmmsResult_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_7xmmsapi_10XmmsResult_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "xmmsapi.pyx":154
 * 
 * 	def __dealloc__(self):
 * 		if self.res != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsc_result_unref(self.res)
 * 			self.res = NULL
 */
  __pyx_t_1 = (((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->res != NULL);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":155
 * 	def __dealloc__(self):
 * 		if self.res != NULL:
 * 			xmmsc_result_unref(self.res)             # <<<<<<<<<<<<<<
 * 			self.res = NULL
 * 
 */
    xmmsc_result_unref(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->res);

    /* "xmmsapi.pyx":156
 * 		if self.res != NULL:
 * 			xmmsc_result_unref(self.res)
 * 			self.res = NULL             # <<<<<<<<<<<<<<
 * 
 * 	cdef set_sourcepref(self, XmmsSourcePreference sourcepref):
 */
    ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->res = NULL;
    goto __pyx_L5;
  }
  __pyx_L5:;

  __Pyx_RefNannyFinishContext();
}

/* "xmmsapi.pyx":158
 * 			self.res = NULL
 * 
 * 	cdef set_sourcepref(self, XmmsSourcePreference sourcepref):             # <<<<<<<<<<<<<<
 * 		self.source_pref = sourcepref
 * 	cdef set_result(self, xmmsc_result_t *res):
 */

static PyObject *__pyx_f_7xmmsapi_10XmmsResult_set_sourcepref(struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_self, struct __pyx_obj_7xmmsapi_XmmsSourcePreference *__pyx_v_sourcepref) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_sourcepref");

  /* "xmmsapi.pyx":159
 * 
 * 	cdef set_sourcepref(self, XmmsSourcePreference sourcepref):
 * 		self.source_pref = sourcepref             # <<<<<<<<<<<<<<
 * 	cdef set_result(self, xmmsc_result_t *res):
 * 		self.res = res
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_sourcepref));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_sourcepref));
  __Pyx_GOTREF(__pyx_v_self->source_pref);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->source_pref));
  __pyx_v_self->source_pref = __pyx_v_sourcepref;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":160
 * 	cdef set_sourcepref(self, XmmsSourcePreference sourcepref):
 * 		self.source_pref = sourcepref
 * 	cdef set_result(self, xmmsc_result_t *res):             # <<<<<<<<<<<<<<
 * 		self.res = res
 * 	cdef set_callback(self, XmmsResultTracker rt, cb):
 */

static PyObject *__pyx_f_7xmmsapi_10XmmsResult_set_result(struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_self, xmmsc_result_t *__pyx_v_res) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_result");

  /* "xmmsapi.pyx":161
 * 		self.source_pref = sourcepref
 * 	cdef set_result(self, xmmsc_result_t *res):
 * 		self.res = res             # <<<<<<<<<<<<<<
 * 	cdef set_callback(self, XmmsResultTracker rt, cb):
 * 		"""
 */
  __pyx_v_self->res = __pyx_v_res;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":162
 * 	cdef set_result(self, xmmsc_result_t *res):
 * 		self.res = res
 * 	cdef set_callback(self, XmmsResultTracker rt, cb):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Set a callback function for a result
 */

static PyObject *__pyx_f_7xmmsapi_10XmmsResult_set_callback(struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_self, struct __pyx_obj_7xmmsapi_XmmsResultTracker *__pyx_v_rt, PyObject *__pyx_v_cb) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_callback");

  /* "xmmsapi.pyx":166
 * 		Set a callback function for a result
 * 		"""
 * 		if cb is not None and not hasattr(cb, '__call__'):             # <<<<<<<<<<<<<<
 * 			raise TypeError("Type '%s' is not callable"%cb.__class__.__name__)
 * 		self._cb = cb
 */
  __pyx_t_1 = (__pyx_v_cb != Py_None);
  if (__pyx_t_1) {
    __pyx_t_2 = ((PyObject *)__pyx_n_s____call__);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PyObject_HasAttr(__pyx_v_cb, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (!__pyx_t_3);
    __pyx_t_3 = __pyx_t_4;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "xmmsapi.pyx":167
 * 		"""
 * 		if cb is not None and not hasattr(cb, '__call__'):
 * 			raise TypeError("Type '%s' is not callable"%cb.__class__.__name__)             # <<<<<<<<<<<<<<
 * 		self._cb = cb
 * 		if cb is not None and not self._cb_issetup:
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_cb, __pyx_n_s____class__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____name__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_2), __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":168
 * 		if cb is not None and not hasattr(cb, '__call__'):
 * 			raise TypeError("Type '%s' is not callable"%cb.__class__.__name__)
 * 		self._cb = cb             # <<<<<<<<<<<<<<
 * 		if cb is not None and not self._cb_issetup:
 * 			self.result_tracker = rt
 */
  __Pyx_INCREF(__pyx_v_cb);
  __Pyx_GIVEREF(__pyx_v_cb);
  __Pyx_GOTREF(__pyx_v_self->_cb);
  __Pyx_DECREF(__pyx_v_self->_cb);
  __pyx_v_self->_cb = __pyx_v_cb;

  /* "xmmsapi.pyx":169
 * 			raise TypeError("Type '%s' is not callable"%cb.__class__.__name__)
 * 		self._cb = cb
 * 		if cb is not None and not self._cb_issetup:             # <<<<<<<<<<<<<<
 * 			self.result_tracker = rt
 * 			rt.track_result(self)
 */
  __pyx_t_3 = (__pyx_v_cb != Py_None);
  if (__pyx_t_3) {
    __pyx_t_1 = (!__pyx_v_self->_cb_issetup);
    __pyx_t_4 = __pyx_t_1;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":170
 * 		self._cb = cb
 * 		if cb is not None and not self._cb_issetup:
 * 			self.result_tracker = rt             # <<<<<<<<<<<<<<
 * 			rt.track_result(self)
 * 			xmmsc_result_notifier_set_full(self.res, ResultNotifier, <void *> self, ResultDestroyNotifier)
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_rt));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_rt));
    __Pyx_GOTREF(__pyx_v_self->result_tracker);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->result_tracker));
    __pyx_v_self->result_tracker = __pyx_v_rt;

    /* "xmmsapi.pyx":171
 * 		if cb is not None and not self._cb_issetup:
 * 			self.result_tracker = rt
 * 			rt.track_result(self)             # <<<<<<<<<<<<<<
 * 			xmmsc_result_notifier_set_full(self.res, ResultNotifier, <void *> self, ResultDestroyNotifier)
 * 			self._cb_issetup = True
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResultTracker *)__pyx_v_rt->__pyx_vtab)->track_result(__pyx_v_rt, __pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "xmmsapi.pyx":172
 * 			self.result_tracker = rt
 * 			rt.track_result(self)
 * 			xmmsc_result_notifier_set_full(self.res, ResultNotifier, <void *> self, ResultDestroyNotifier)             # <<<<<<<<<<<<<<
 * 			self._cb_issetup = True
 * 
 */
    xmmsc_result_notifier_set_full(__pyx_v_self->res, __pyx_f_7xmmsapi_ResultNotifier, ((void *)__pyx_v_self), __pyx_f_7xmmsapi_ResultDestroyNotifier);

    /* "xmmsapi.pyx":173
 * 			rt.track_result(self)
 * 			xmmsc_result_notifier_set_full(self.res, ResultNotifier, <void *> self, ResultDestroyNotifier)
 * 			self._cb_issetup = True             # <<<<<<<<<<<<<<
 * 
 * 	cpdef disconnect(self):
 */
    __pyx_v_self->_cb_issetup = 1;
    goto __pyx_L4;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.set_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":175
 * 			self._cb_issetup = True
 * 
 * 	cpdef disconnect(self):             # <<<<<<<<<<<<<<
 * 		self._cb = None
 * 		if self._cb_issetup and self.res != NULL:
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_2disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_10XmmsResult_disconnect(struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("disconnect");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__disconnect); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_10XmmsResult_2disconnect)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":176
 * 
 * 	cpdef disconnect(self):
 * 		self._cb = None             # <<<<<<<<<<<<<<
 * 		if self._cb_issetup and self.res != NULL:
 * 			self._cb_issetup = False
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cb);
  __Pyx_DECREF(__pyx_v_self->_cb);
  __pyx_v_self->_cb = Py_None;

  /* "xmmsapi.pyx":177
 * 	cpdef disconnect(self):
 * 		self._cb = None
 * 		if self._cb_issetup and self.res != NULL:             # <<<<<<<<<<<<<<
 * 			self._cb_issetup = False
 * 			#xmmsc_result_ref(self.res) # Needed ? oO
 */
  if (__pyx_v_self->_cb_issetup) {
    __pyx_t_3 = (__pyx_v_self->res != NULL);
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_v_self->_cb_issetup;
  }
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":178
 * 		self._cb = None
 * 		if self._cb_issetup and self.res != NULL:
 * 			self._cb_issetup = False             # <<<<<<<<<<<<<<
 * 			#xmmsc_result_ref(self.res) # Needed ? oO
 * 			xmmsc_result_disconnect(self.res) #self.result_tracker.release_result() called in ResultDestroyNotifier()
 */
    __pyx_v_self->_cb_issetup = 0;

    /* "xmmsapi.pyx":180
 * 			self._cb_issetup = False
 * 			#xmmsc_result_ref(self.res) # Needed ? oO
 * 			xmmsc_result_disconnect(self.res) #self.result_tracker.release_result() called in ResultDestroyNotifier()             # <<<<<<<<<<<<<<
 * 
 * 	property callback:
 */
    xmmsc_result_disconnect(__pyx_v_self->res);
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.disconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":175
 * 			self._cb_issetup = True
 * 
 * 	cpdef disconnect(self):             # <<<<<<<<<<<<<<
 * 		self._cb = None
 * 		if self._cb_issetup and self.res != NULL:
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_2disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_2disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("disconnect");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->__pyx_vtab)->disconnect(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.disconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":183
 * 
 * 	property callback:
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			return self._cb
 * 
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_8callback___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_8callback___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");

  /* "xmmsapi.pyx":184
 * 	property callback:
 * 		def __get__(self):
 * 			return self._cb             # <<<<<<<<<<<<<<
 * 
 * 	# XXX Kept for compatibility.
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->_cb);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->_cb;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":188
 * 	# XXX Kept for compatibility.
 * 	@deprecated
 * 	def _callback(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_3_callback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_10XmmsResult_3_callback[] = "\n\t\t@deprecated\n\t\tUse __call__ instead.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_3_callback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_v_traceback = NULL;
  PyObject *__pyx_v_sys = NULL;
  PyObject *__pyx_v_exc = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_callback");

  /* "xmmsapi.pyx":193
 * 		Use __call__ instead.
 * 		"""
 * 		try:             # <<<<<<<<<<<<<<
 * 			ret = self()
 * 		except:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "xmmsapi.pyx":194
 * 		"""
 * 		try:
 * 			ret = self()             # <<<<<<<<<<<<<<
 * 		except:
 * 			import traceback, sys
 */
      __pyx_t_4 = PyObject_Call(__pyx_v_self, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_ret = __pyx_t_4;
      __pyx_t_4 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L12_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "xmmsapi.pyx":195
 * 		try:
 * 			ret = self()
 * 		except:             # <<<<<<<<<<<<<<
 * 			import traceback, sys
 * 			exc = sys.exc_info()
 */
    /*except:*/ {
      __Pyx_AddTraceback("xmmsapi.XmmsResult._callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);

      /* "xmmsapi.pyx":196
 * 			ret = self()
 * 		except:
 * 			import traceback, sys             # <<<<<<<<<<<<<<
 * 			exc = sys.exc_info()
 * 			traceback.print_exception(exc[0], exc[1], exc[2])
 */
      __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__traceback), 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_v_traceback = __pyx_t_7;
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_Import(((PyObject *)__pyx_n_s__sys), 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_v_sys = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "xmmsapi.pyx":197
 * 		except:
 * 			import traceback, sys
 * 			exc = sys.exc_info()             # <<<<<<<<<<<<<<
 * 			traceback.print_exception(exc[0], exc[1], exc[2])
 * 			return False
 */
      __pyx_t_7 = PyObject_GetAttr(__pyx_v_sys, __pyx_n_s__exc_info); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_exc = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "xmmsapi.pyx":198
 * 			import traceback, sys
 * 			exc = sys.exc_info()
 * 			traceback.print_exception(exc[0], exc[1], exc[2])             # <<<<<<<<<<<<<<
 * 			return False
 * 		return ret
 */
      __pyx_t_8 = PyObject_GetAttr(__pyx_v_traceback, __pyx_n_s__print_exception); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_exc, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_exc, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_exc, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_10) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_11));
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      __pyx_t_7 = 0;
      __pyx_t_9 = 0;
      __pyx_t_10 = 0;
      __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "xmmsapi.pyx":199
 * 			exc = sys.exc_info()
 * 			traceback.print_exception(exc[0], exc[1], exc[2])
 * 			return False             # <<<<<<<<<<<<<<
 * 		return ret
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_10 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_r = __pyx_t_10;
      __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L8_except_return;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_exception_handled;
    }
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L8_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L12_try_end:;
  }

  /* "xmmsapi.pyx":200
 * 			traceback.print_exception(exc[0], exc[1], exc[2])
 * 			return False
 * 		return ret             # <<<<<<<<<<<<<<
 * 
 * 	def __call__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("xmmsapi.XmmsResult._callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_traceback);
  __Pyx_XDECREF(__pyx_v_sys);
  __Pyx_XDECREF(__pyx_v_exc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":202
 * 		return ret
 * 
 * 	def __call__(self):             # <<<<<<<<<<<<<<
 * 		cb = self.callback
 * 		if cb is not None:
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_4__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_4__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = NULL;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__call__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 0))) return NULL;

  /* "xmmsapi.pyx":203
 * 
 * 	def __call__(self):
 * 		cb = self.callback             # <<<<<<<<<<<<<<
 * 		if cb is not None:
 * 			ret = cb(self.xmmsvalue())
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__callback); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cb = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":204
 * 	def __call__(self):
 * 		cb = self.callback
 * 		if cb is not None:             # <<<<<<<<<<<<<<
 * 			ret = cb(self.xmmsvalue())
 * 			return True if ret is None else ret
 */
  __pyx_t_2 = (__pyx_v_cb != Py_None);
  if (__pyx_t_2) {

    /* "xmmsapi.pyx":205
 * 		cb = self.callback
 * 		if cb is not None:
 * 			ret = cb(self.xmmsvalue())             # <<<<<<<<<<<<<<
 * 			return True if ret is None else ret
 * 		return False
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->__pyx_vtab)->xmmsvalue(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_v_cb, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_v_ret = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "xmmsapi.pyx":206
 * 		if cb is not None:
 * 			ret = cb(self.xmmsvalue())
 * 			return True if ret is None else ret             # <<<<<<<<<<<<<<
 * 		return False
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = (__pyx_v_ret == Py_None);
    if (__pyx_t_2) {
      __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __Pyx_INCREF(__pyx_v_ret);
      __pyx_t_1 = __pyx_v_ret;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsapi.pyx":207
 * 			ret = cb(self.xmmsvalue())
 * 			return True if ret is None else ret
 * 		return False             # <<<<<<<<<<<<<<
 * 
 * 	cpdef wait(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cb);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":209
 * 		return False
 * 
 * 	cpdef wait(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Wait for the result from the daemon.
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_5wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_10XmmsResult_wait(struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wait");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__wait); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_10XmmsResult_5wait)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":213
 * 		Wait for the result from the daemon.
 * 		"""
 * 		if self.res == NULL:             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("Uninitialized result")
 * 
 */
  __pyx_t_3 = (__pyx_v_self->res == NULL);
  if (__pyx_t_3) {

    /* "xmmsapi.pyx":214
 * 		"""
 * 		if self.res == NULL:
 * 			raise RuntimeError("Uninitialized result")             # <<<<<<<<<<<<<<
 * 
 * 		xmmsc_result_wait(self.res)
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":216
 * 			raise RuntimeError("Uninitialized result")
 * 
 * 		xmmsc_result_wait(self.res)             # <<<<<<<<<<<<<<
 * 
 * 		# XXX Never used.
 */
  xmmsc_result_wait(__pyx_v_self->res);

  /* "xmmsapi.pyx":219
 * 
 * 		# XXX Never used.
 * 		if self._exc is not None:             # <<<<<<<<<<<<<<
 * 			raise self._exc[0], self._exc[1], self._exc[2]
 * 
 */
  __pyx_t_3 = (__pyx_v_self->_exc != Py_None);
  if (__pyx_t_3) {

    /* "xmmsapi.pyx":220
 * 		# XXX Never used.
 * 		if self._exc is not None:
 * 			raise self._exc[0], self._exc[1], self._exc[2]             # <<<<<<<<<<<<<<
 * 
 * 	cpdef is_error(self):
 */
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->_exc, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_self->_exc, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self->_exc, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_1, __pyx_t_2, __pyx_t_4, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":209
 * 		return False
 * 
 * 	cpdef wait(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Wait for the result from the daemon.
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_5wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_10XmmsResult_5wait[] = "\n\t\tWait for the result from the daemon.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_5wait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wait");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->__pyx_vtab)->wait(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":222
 * 			raise self._exc[0], self._exc[1], self._exc[2]
 * 
 * 	cpdef is_error(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: Whether the result represents an error or not.
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_6is_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_10XmmsResult_is_error(struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_error");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_10XmmsResult_6is_error)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":227
 * 		@rtype: Boolean
 * 		"""
 * 		return self._value().is_error()             # <<<<<<<<<<<<<<
 * 
 * 	cpdef iserror(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)__pyx_v_self->__pyx_vtab)->_value(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__is_error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.is_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":222
 * 			raise self._exc[0], self._exc[1], self._exc[2]
 * 
 * 	cpdef is_error(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: Whether the result represents an error or not.
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_6is_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_10XmmsResult_6is_error[] = "\n\t\t@return: Whether the result represents an error or not.\n\t\t@rtype: Boolean\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_6is_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_error");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->__pyx_vtab)->is_error(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.is_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":229
 * 		return self._value().is_error()
 * 
 * 	cpdef iserror(self):             # <<<<<<<<<<<<<<
 * 		return self.is_error()
 * 
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_7iserror(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_10XmmsResult_iserror(struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("iserror");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__iserror); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_10XmmsResult_7iserror)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":230
 * 
 * 	cpdef iserror(self):
 * 		return self.is_error()             # <<<<<<<<<<<<<<
 * 
 * 	cpdef xmmsvalue(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)__pyx_v_self->__pyx_vtab)->is_error(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.iserror", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":229
 * 		return self._value().is_error()
 * 
 * 	cpdef iserror(self):             # <<<<<<<<<<<<<<
 * 		return self.is_error()
 * 
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_7iserror(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_7iserror(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("iserror");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->__pyx_vtab)->iserror(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.iserror", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":232
 * 		return self.is_error()
 * 
 * 	cpdef xmmsvalue(self):             # <<<<<<<<<<<<<<
 * 		cdef XmmsValue obj
 * 		cdef xmmsv_t *value
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_8xmmsvalue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_10XmmsResult_xmmsvalue(struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_obj = 0;
  xmmsv_t *__pyx_v_value;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  struct __pyx_opt_args_9xmmsvalue_9XmmsValue_set_value __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("xmmsvalue");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_10XmmsResult_8xmmsvalue)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":235
 * 		cdef XmmsValue obj
 * 		cdef xmmsv_t *value
 * 		if self.res == NULL:             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("Uninitialized result")
 * 		value = xmmsc_result_get_value(self.res)
 */
  __pyx_t_3 = (__pyx_v_self->res == NULL);
  if (__pyx_t_3) {

    /* "xmmsapi.pyx":236
 * 		cdef xmmsv_t *value
 * 		if self.res == NULL:
 * 			raise RuntimeError("Uninitialized result")             # <<<<<<<<<<<<<<
 * 		value = xmmsc_result_get_value(self.res)
 * 		obj = XmmsValue(self.source_pref.get())
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":237
 * 		if self.res == NULL:
 * 			raise RuntimeError("Uninitialized result")
 * 		value = xmmsc_result_get_value(self.res)             # <<<<<<<<<<<<<<
 * 		obj = XmmsValue(self.source_pref.get())
 * 		obj.set_value(value, self.ispropdict)
 */
  __pyx_v_value = xmmsc_result_get_value(__pyx_v_self->res);

  /* "xmmsapi.pyx":238
 * 			raise RuntimeError("Uninitialized result")
 * 		value = xmmsc_result_get_value(self.res)
 * 		obj = XmmsValue(self.source_pref.get())             # <<<<<<<<<<<<<<
 * 		obj.set_value(value, self.ispropdict)
 * 		return obj
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->source_pref), __pyx_n_s__get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_XmmsValue)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_obj = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "xmmsapi.pyx":239
 * 		value = xmmsc_result_get_value(self.res)
 * 		obj = XmmsValue(self.source_pref.get())
 * 		obj.set_value(value, self.ispropdict)             # <<<<<<<<<<<<<<
 * 		return obj
 * 
 */
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.ispropdict = __pyx_v_self->ispropdict;
  __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_obj->__pyx_vtab)->set_value(__pyx_v_obj, __pyx_v_value, &__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":240
 * 		obj = XmmsValue(self.source_pref.get())
 * 		obj.set_value(value, self.ispropdict)
 * 		return obj             # <<<<<<<<<<<<<<
 * 
 * 	cpdef _value(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_obj));
  __pyx_r = ((PyObject *)__pyx_v_obj);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.xmmsvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":232
 * 		return self.is_error()
 * 
 * 	cpdef xmmsvalue(self):             # <<<<<<<<<<<<<<
 * 		cdef XmmsValue obj
 * 		cdef xmmsv_t *value
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_8xmmsvalue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_8xmmsvalue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("xmmsvalue");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->__pyx_vtab)->xmmsvalue(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.xmmsvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":242
 * 		return obj
 * 
 * 	cpdef _value(self):             # <<<<<<<<<<<<<<
 * 		return self.xmmsvalue()
 * 
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_9_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_10XmmsResult__value(struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_value");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_10XmmsResult_9_value)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":243
 * 
 * 	cpdef _value(self):
 * 		return self.xmmsvalue()             # <<<<<<<<<<<<<<
 * 
 * 	cpdef value(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)__pyx_v_self->__pyx_vtab)->xmmsvalue(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsResult._value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":242
 * 		return obj
 * 
 * 	cpdef _value(self):             # <<<<<<<<<<<<<<
 * 		return self.xmmsvalue()
 * 
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_9_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_9_value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_value");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->__pyx_vtab)->_value(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsResult._value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":245
 * 		return self.xmmsvalue()
 * 
 * 	cpdef value(self):             # <<<<<<<<<<<<<<
 * 		return self.xmmsvalue().value()
 * 
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_10value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_10XmmsResult_value(struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("value");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_10XmmsResult_10value)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":246
 * 
 * 	cpdef value(self):
 * 		return self.xmmsvalue().value()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)__pyx_v_self->__pyx_vtab)->xmmsvalue(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":245
 * 		return self.xmmsvalue()
 * 
 * 	cpdef value(self):             # <<<<<<<<<<<<<<
 * 		return self.xmmsvalue().value()
 * 
 */

static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_10value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_10XmmsResult_10value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("value");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self)->__pyx_vtab)->value(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsResult.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":254
 * 	#cdef xmmsc_connection_t *conn
 * 
 * 	def __cinit__(self):             # <<<<<<<<<<<<<<
 * 		self.command = VIS_RESULT_CMD_NONE
 * 		self.conn = NULL
 */

static int __pyx_pf_7xmmsapi_13XmmsVisResult___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_7xmmsapi_13XmmsVisResult___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;

  /* "xmmsapi.pyx":255
 * 
 * 	def __cinit__(self):
 * 		self.command = VIS_RESULT_CMD_NONE             # <<<<<<<<<<<<<<
 * 		self.conn = NULL
 * 
 */
  ((struct __pyx_obj_7xmmsapi_XmmsVisResult *)__pyx_v_self)->command = __pyx_e_7xmmsapi_VIS_RESULT_CMD_NONE;

  /* "xmmsapi.pyx":256
 * 	def __cinit__(self):
 * 		self.command = VIS_RESULT_CMD_NONE
 * 		self.conn = NULL             # <<<<<<<<<<<<<<
 * 
 * 	def __dealloc__(self):
 */
  ((struct __pyx_obj_7xmmsapi_XmmsVisResult *)__pyx_v_self)->conn = NULL;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":258
 * 		self.conn = NULL
 * 
 * 	def __dealloc__(self):             # <<<<<<<<<<<<<<
 * 		if self.conn != NULL:
 * 			xmmsc_unref(self.conn)
 */

static void __pyx_pf_7xmmsapi_13XmmsVisResult_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_7xmmsapi_13XmmsVisResult_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "xmmsapi.pyx":259
 * 
 * 	def __dealloc__(self):
 * 		if self.conn != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsc_unref(self.conn)
 * 			self.conn = NULL
 */
  __pyx_t_1 = (((struct __pyx_obj_7xmmsapi_XmmsVisResult *)__pyx_v_self)->conn != NULL);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":260
 * 	def __dealloc__(self):
 * 		if self.conn != NULL:
 * 			xmmsc_unref(self.conn)             # <<<<<<<<<<<<<<
 * 			self.conn = NULL
 * 
 */
    xmmsc_unref(((struct __pyx_obj_7xmmsapi_XmmsVisResult *)__pyx_v_self)->conn);

    /* "xmmsapi.pyx":261
 * 		if self.conn != NULL:
 * 			xmmsc_unref(self.conn)
 * 			self.conn = NULL             # <<<<<<<<<<<<<<
 * 
 * 	cdef set_command(self, VisResultCommand cmd, xmmsc_connection_t *conn):
 */
    ((struct __pyx_obj_7xmmsapi_XmmsVisResult *)__pyx_v_self)->conn = NULL;
    goto __pyx_L5;
  }
  __pyx_L5:;

  __Pyx_RefNannyFinishContext();
}

/* "xmmsapi.pyx":263
 * 			self.conn = NULL
 * 
 * 	cdef set_command(self, VisResultCommand cmd, xmmsc_connection_t *conn):             # <<<<<<<<<<<<<<
 * 		self.command = cmd
 * 		if self.conn != NULL:
 */

static PyObject *__pyx_f_7xmmsapi_13XmmsVisResult_set_command(struct __pyx_obj_7xmmsapi_XmmsVisResult *__pyx_v_self, __pyx_t_7xmmsapi_VisResultCommand __pyx_v_cmd, xmmsc_connection_t *__pyx_v_conn) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("set_command");

  /* "xmmsapi.pyx":264
 * 
 * 	cdef set_command(self, VisResultCommand cmd, xmmsc_connection_t *conn):
 * 		self.command = cmd             # <<<<<<<<<<<<<<
 * 		if self.conn != NULL:
 * 			xmmsc_unref(self.conn)
 */
  __pyx_v_self->command = __pyx_v_cmd;

  /* "xmmsapi.pyx":265
 * 	cdef set_command(self, VisResultCommand cmd, xmmsc_connection_t *conn):
 * 		self.command = cmd
 * 		if self.conn != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsc_unref(self.conn)
 * 			self.conn = NULL
 */
  __pyx_t_1 = (__pyx_v_self->conn != NULL);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":266
 * 		self.command = cmd
 * 		if self.conn != NULL:
 * 			xmmsc_unref(self.conn)             # <<<<<<<<<<<<<<
 * 			self.conn = NULL
 * 		if conn != NULL:
 */
    xmmsc_unref(__pyx_v_self->conn);

    /* "xmmsapi.pyx":267
 * 		if self.conn != NULL:
 * 			xmmsc_unref(self.conn)
 * 			self.conn = NULL             # <<<<<<<<<<<<<<
 * 		if conn != NULL:
 * 			self.conn = xmmsc_ref(conn)
 */
    __pyx_v_self->conn = NULL;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":268
 * 			xmmsc_unref(self.conn)
 * 			self.conn = NULL
 * 		if conn != NULL:             # <<<<<<<<<<<<<<
 * 			self.conn = xmmsc_ref(conn)
 * 
 */
  __pyx_t_1 = (__pyx_v_conn != NULL);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":269
 * 			self.conn = NULL
 * 		if conn != NULL:
 * 			self.conn = xmmsc_ref(conn)             # <<<<<<<<<<<<<<
 * 
 * 	cdef retrieve_error(self):
 */
    __pyx_v_self->conn = xmmsc_ref(__pyx_v_conn);
    goto __pyx_L4;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":271
 * 			self.conn = xmmsc_ref(conn)
 * 
 * 	cdef retrieve_error(self):             # <<<<<<<<<<<<<<
 * 		cdef xmmsv_t *errval
 * 		xval = XmmsResult.xmmsvalue(self)
 */

static PyObject *__pyx_f_7xmmsapi_13XmmsVisResult_retrieve_error(struct __pyx_obj_7xmmsapi_XmmsVisResult *__pyx_v_self) {
  xmmsv_t *__pyx_v_errval;
  PyObject *__pyx_v_xval = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("retrieve_error");

  /* "xmmsapi.pyx":273
 * 	cdef retrieve_error(self):
 * 		cdef xmmsv_t *errval
 * 		xval = XmmsResult.xmmsvalue(self)             # <<<<<<<<<<<<<<
 * 		if xval.is_error():
 * 			self._val = xval
 */
  __pyx_t_1 = __pyx_vtabptr_7xmmsapi_XmmsResult->xmmsvalue(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_xval = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":274
 * 		cdef xmmsv_t *errval
 * 		xval = XmmsResult.xmmsvalue(self)
 * 		if xval.is_error():             # <<<<<<<<<<<<<<
 * 			self._val = xval
 * 		else:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_xval, __pyx_n_s__is_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "xmmsapi.pyx":275
 * 		xval = XmmsResult.xmmsvalue(self)
 * 		if xval.is_error():
 * 			self._val = xval             # <<<<<<<<<<<<<<
 * 		else:
 * 			self._val = XmmsValue()
 */
    if (!(likely(((__pyx_v_xval) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_xval, __pyx_ptype_9xmmsvalue_XmmsValue))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v_xval);
    __Pyx_GIVEREF(__pyx_v_xval);
    __Pyx_GOTREF(__pyx_v_self->_val);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_val));
    __pyx_v_self->_val = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_xval);
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":277
 * 			self._val = xval
 * 		else:
 * 			self._val = XmmsValue()             # <<<<<<<<<<<<<<
 * 			errval = xmmsv_new_error("Failed to initialize visualization")
 * 			self._val.set_value(errval)
 */
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_XmmsValue)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->_val);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->_val));
    __pyx_v_self->_val = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "xmmsapi.pyx":278
 * 		else:
 * 			self._val = XmmsValue()
 * 			errval = xmmsv_new_error("Failed to initialize visualization")             # <<<<<<<<<<<<<<
 * 			self._val.set_value(errval)
 * 			xmmsv_unref(errval)
 */
    __pyx_v_errval = xmmsv_new_error(__pyx_k_6);

    /* "xmmsapi.pyx":279
 * 			self._val = XmmsValue()
 * 			errval = xmmsv_new_error("Failed to initialize visualization")
 * 			self._val.set_value(errval)             # <<<<<<<<<<<<<<
 * 			xmmsv_unref(errval)
 * 
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->_val->__pyx_vtab)->set_value(__pyx_v_self->_val, __pyx_v_errval, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "xmmsapi.pyx":280
 * 			errval = xmmsv_new_error("Failed to initialize visualization")
 * 			self._val.set_value(errval)
 * 			xmmsv_unref(errval)             # <<<<<<<<<<<<<<
 * 
 * 	cdef _init_xmmsvalue(self):
 */
    xmmsv_unref(__pyx_v_errval);
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsVisResult.retrieve_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_xval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":282
 * 			xmmsv_unref(errval)
 * 
 * 	cdef _init_xmmsvalue(self):             # <<<<<<<<<<<<<<
 * 		if self._val is None:
 * 			if self.res == NULL:
 */

static PyObject *__pyx_f_7xmmsapi_13XmmsVisResult__init_xmmsvalue(struct __pyx_obj_7xmmsapi_XmmsVisResult *__pyx_v_self) {
  int __pyx_v_hid;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_init_xmmsvalue");

  /* "xmmsapi.pyx":283
 * 
 * 	cdef _init_xmmsvalue(self):
 * 		if self._val is None:             # <<<<<<<<<<<<<<
 * 			if self.res == NULL:
 * 				raise RuntimeError("Uninitialized result")
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_val) == Py_None);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":284
 * 	cdef _init_xmmsvalue(self):
 * 		if self._val is None:
 * 			if self.res == NULL:             # <<<<<<<<<<<<<<
 * 				raise RuntimeError("Uninitialized result")
 * 			hid = xmmsc_visualization_init_handle(self.res)
 */
    __pyx_t_1 = (__pyx_v_self->__pyx_base.res == NULL);
    if (__pyx_t_1) {

      /* "xmmsapi.pyx":285
 * 		if self._val is None:
 * 			if self.res == NULL:
 * 				raise RuntimeError("Uninitialized result")             # <<<<<<<<<<<<<<
 * 			hid = xmmsc_visualization_init_handle(self.res)
 * 			if hid == -1:
 */
      __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "xmmsapi.pyx":286
 * 			if self.res == NULL:
 * 				raise RuntimeError("Uninitialized result")
 * 			hid = xmmsc_visualization_init_handle(self.res)             # <<<<<<<<<<<<<<
 * 			if hid == -1:
 * 				self.retrieve_error()
 */
    __pyx_v_hid = xmmsc_visualization_init_handle(__pyx_v_self->__pyx_base.res);

    /* "xmmsapi.pyx":287
 * 				raise RuntimeError("Uninitialized result")
 * 			hid = xmmsc_visualization_init_handle(self.res)
 * 			if hid == -1:             # <<<<<<<<<<<<<<
 * 				self.retrieve_error()
 * 			else:
 */
    __pyx_t_1 = (__pyx_v_hid == -1);
    if (__pyx_t_1) {

      /* "xmmsapi.pyx":288
 * 			hid = xmmsc_visualization_init_handle(self.res)
 * 			if hid == -1:
 * 				self.retrieve_error()             # <<<<<<<<<<<<<<
 * 			else:
 * 				self._val = XmmsValue(pyval=hid)
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsVisResult *)__pyx_v_self->__pyx_base.__pyx_vtab)->retrieve_error(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "xmmsapi.pyx":290
 * 				self.retrieve_error()
 * 			else:
 * 				self._val = XmmsValue(pyval=hid)             # <<<<<<<<<<<<<<
 * 		return self._val
 * 
 */
      __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __pyx_t_3 = PyInt_FromLong(__pyx_v_hid); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__pyval), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyEval_CallObjectWithKeywords(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_XmmsValue)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_GOTREF(__pyx_v_self->_val);
      __Pyx_DECREF(((PyObject *)__pyx_v_self->_val));
      __pyx_v_self->_val = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_t_3);
      __pyx_t_3 = 0;
    }
    __pyx_L5:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":291
 * 			else:
 * 				self._val = XmmsValue(pyval=hid)
 * 		return self._val             # <<<<<<<<<<<<<<
 * 
 * 	cdef _start_xmmsvalue(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_val));
  __pyx_r = ((PyObject *)__pyx_v_self->_val);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsVisResult._init_xmmsvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":293
 * 		return self._val
 * 
 * 	cdef _start_xmmsvalue(self):             # <<<<<<<<<<<<<<
 * 		if self._val is None:
 * 			if self.res == NULL:
 */

static PyObject *__pyx_f_7xmmsapi_13XmmsVisResult__start_xmmsvalue(struct __pyx_obj_7xmmsapi_XmmsVisResult *__pyx_v_self) {
  PyObject *__pyx_v_xval = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_start_xmmsvalue");

  /* "xmmsapi.pyx":294
 * 
 * 	cdef _start_xmmsvalue(self):
 * 		if self._val is None:             # <<<<<<<<<<<<<<
 * 			if self.res == NULL:
 * 				raise RuntimeError("Uninitialized result")
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_self->_val) == Py_None);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":295
 * 	cdef _start_xmmsvalue(self):
 * 		if self._val is None:
 * 			if self.res == NULL:             # <<<<<<<<<<<<<<
 * 				raise RuntimeError("Uninitialized result")
 * 			xval = XmmsResult.xmmsvalue(self)
 */
    __pyx_t_1 = (__pyx_v_self->__pyx_base.res == NULL);
    if (__pyx_t_1) {

      /* "xmmsapi.pyx":296
 * 		if self._val is None:
 * 			if self.res == NULL:
 * 				raise RuntimeError("Uninitialized result")             # <<<<<<<<<<<<<<
 * 			xval = XmmsResult.xmmsvalue(self)
 * 			if xval.is_error():
 */
      __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "xmmsapi.pyx":297
 * 			if self.res == NULL:
 * 				raise RuntimeError("Uninitialized result")
 * 			xval = XmmsResult.xmmsvalue(self)             # <<<<<<<<<<<<<<
 * 			if xval.is_error():
 * 				self._val = xval
 */
    __pyx_t_2 = __pyx_vtabptr_7xmmsapi_XmmsResult->xmmsvalue(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self), 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_xval = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "xmmsapi.pyx":298
 * 				raise RuntimeError("Uninitialized result")
 * 			xval = XmmsResult.xmmsvalue(self)
 * 			if xval.is_error():             # <<<<<<<<<<<<<<
 * 				self._val = xval
 * 			elif self.conn == NULL:
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_xval, __pyx_n_s__is_error); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "xmmsapi.pyx":299
 * 			xval = XmmsResult.xmmsvalue(self)
 * 			if xval.is_error():
 * 				self._val = xval             # <<<<<<<<<<<<<<
 * 			elif self.conn == NULL:
 * 				raise RuntimeError("Internal connection reference not set")
 */
      if (!(likely(((__pyx_v_xval) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_xval, __pyx_ptype_9xmmsvalue_XmmsValue))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_INCREF(__pyx_v_xval);
      __Pyx_GIVEREF(__pyx_v_xval);
      __Pyx_GOTREF(__pyx_v_self->_val);
      __Pyx_DECREF(((PyObject *)__pyx_v_self->_val));
      __pyx_v_self->_val = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_xval);
      goto __pyx_L5;
    }

    /* "xmmsapi.pyx":300
 * 			if xval.is_error():
 * 				self._val = xval
 * 			elif self.conn == NULL:             # <<<<<<<<<<<<<<
 * 				raise RuntimeError("Internal connection reference not set")
 * 			else:
 */
    __pyx_t_1 = (__pyx_v_self->conn == NULL);
    if (__pyx_t_1) {

      /* "xmmsapi.pyx":301
 * 				self._val = xval
 * 			elif self.conn == NULL:
 * 				raise RuntimeError("Internal connection reference not set")             # <<<<<<<<<<<<<<
 * 			else:
 * 				xmmsc_visualization_start_handle(self.conn, self.res)
 */
      __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    /*else*/ {

      /* "xmmsapi.pyx":303
 * 				raise RuntimeError("Internal connection reference not set")
 * 			else:
 * 				xmmsc_visualization_start_handle(self.conn, self.res)             # <<<<<<<<<<<<<<
 * 				self._val = XmmsValue(pyval=None)
 * 		return self._val
 */
      xmmsc_visualization_start_handle(__pyx_v_self->conn, __pyx_v_self->__pyx_base.res);

      /* "xmmsapi.pyx":304
 * 			else:
 * 				xmmsc_visualization_start_handle(self.conn, self.res)
 * 				self._val = XmmsValue(pyval=None)             # <<<<<<<<<<<<<<
 * 		return self._val
 * 
 */
      __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__pyval), Py_None) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = PyEval_CallObjectWithKeywords(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_XmmsValue)), ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->_val);
      __Pyx_DECREF(((PyObject *)__pyx_v_self->_val));
      __pyx_v_self->_val = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_t_2);
      __pyx_t_2 = 0;
    }
    __pyx_L5:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":305
 * 				xmmsc_visualization_start_handle(self.conn, self.res)
 * 				self._val = XmmsValue(pyval=None)
 * 		return self._val             # <<<<<<<<<<<<<<
 * 
 * 	cpdef xmmsvalue(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_val));
  __pyx_r = ((PyObject *)__pyx_v_self->_val);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsVisResult._start_xmmsvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_xval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":307
 * 		return self._val
 * 
 * 	cpdef xmmsvalue(self):             # <<<<<<<<<<<<<<
 * 		if self.command == VIS_RESULT_CMD_INIT:
 * 			return self._init_xmmsvalue()
 */

static PyObject *__pyx_pf_7xmmsapi_13XmmsVisResult_2xmmsvalue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_13XmmsVisResult_xmmsvalue(struct __pyx_obj_7xmmsapi_XmmsVisResult *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("xmmsvalue");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_13XmmsVisResult_2xmmsvalue)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":310
 * 		if self.command == VIS_RESULT_CMD_INIT:
 * 			return self._init_xmmsvalue()
 * 		elif self.command == VIS_RESULT_CMD_START:             # <<<<<<<<<<<<<<
 * 			return self._start_xmmsvalue()
 * 		else:
 */
  switch (__pyx_v_self->command) {

    /* "xmmsapi.pyx":308
 * 
 * 	cpdef xmmsvalue(self):
 * 		if self.command == VIS_RESULT_CMD_INIT:             # <<<<<<<<<<<<<<
 * 			return self._init_xmmsvalue()
 * 		elif self.command == VIS_RESULT_CMD_START:
 */
    case __pyx_e_7xmmsapi_VIS_RESULT_CMD_INIT:

    /* "xmmsapi.pyx":309
 * 	cpdef xmmsvalue(self):
 * 		if self.command == VIS_RESULT_CMD_INIT:
 * 			return self._init_xmmsvalue()             # <<<<<<<<<<<<<<
 * 		elif self.command == VIS_RESULT_CMD_START:
 * 			return self._start_xmmsvalue()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsVisResult *)__pyx_v_self->__pyx_base.__pyx_vtab)->_init_xmmsvalue(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    break;

    /* "xmmsapi.pyx":310
 * 		if self.command == VIS_RESULT_CMD_INIT:
 * 			return self._init_xmmsvalue()
 * 		elif self.command == VIS_RESULT_CMD_START:             # <<<<<<<<<<<<<<
 * 			return self._start_xmmsvalue()
 * 		else:
 */
    case __pyx_e_7xmmsapi_VIS_RESULT_CMD_START:

    /* "xmmsapi.pyx":311
 * 			return self._init_xmmsvalue()
 * 		elif self.command == VIS_RESULT_CMD_START:
 * 			return self._start_xmmsvalue()             # <<<<<<<<<<<<<<
 * 		else:
 * 			# XXX Raise an exception ?
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsVisResult *)__pyx_v_self->__pyx_base.__pyx_vtab)->_start_xmmsvalue(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    break;
    default:

    /* "xmmsapi.pyx":314
 * 		else:
 * 			# XXX Raise an exception ?
 * 			return XmmsResult.xmmsvalue(self)             # <<<<<<<<<<<<<<
 * 
 * cdef class XmmsVisChunk:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_vtabptr_7xmmsapi_XmmsResult->xmmsvalue(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    break;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsVisResult.xmmsvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":307
 * 		return self._val
 * 
 * 	cpdef xmmsvalue(self):             # <<<<<<<<<<<<<<
 * 		if self.command == VIS_RESULT_CMD_INIT:
 * 			return self._init_xmmsvalue()
 */

static PyObject *__pyx_pf_7xmmsapi_13XmmsVisResult_2xmmsvalue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_13XmmsVisResult_2xmmsvalue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("xmmsvalue");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsVisResult *)((struct __pyx_obj_7xmmsapi_XmmsVisResult *)__pyx_v_self)->__pyx_base.__pyx_vtab)->__pyx_base.xmmsvalue(((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsVisResult.xmmsvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":320
 * 	#cdef int sample_count
 * 
 * 	def __cinit__(self):             # <<<<<<<<<<<<<<
 * 		self.data = NULL
 * 		self.sample_count = 0
 */

static int __pyx_pf_7xmmsapi_12XmmsVisChunk___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_7xmmsapi_12XmmsVisChunk___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;

  /* "xmmsapi.pyx":321
 * 
 * 	def __cinit__(self):
 * 		self.data = NULL             # <<<<<<<<<<<<<<
 * 		self.sample_count = 0
 * 
 */
  ((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)__pyx_v_self)->data = NULL;

  /* "xmmsapi.pyx":322
 * 	def __cinit__(self):
 * 		self.data = NULL
 * 		self.sample_count = 0             # <<<<<<<<<<<<<<
 * 
 * 	def __dealloc__(self):
 */
  ((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)__pyx_v_self)->sample_count = 0;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":324
 * 		self.sample_count = 0
 * 
 * 	def __dealloc__(self):             # <<<<<<<<<<<<<<
 * 		if self.data != NULL:
 * 			PyMem_Free(self.data)
 */

static void __pyx_pf_7xmmsapi_12XmmsVisChunk_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_7xmmsapi_12XmmsVisChunk_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "xmmsapi.pyx":325
 * 
 * 	def __dealloc__(self):
 * 		if self.data != NULL:             # <<<<<<<<<<<<<<
 * 			PyMem_Free(self.data)
 * 
 */
  __pyx_t_1 = (((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)__pyx_v_self)->data != NULL);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":326
 * 	def __dealloc__(self):
 * 		if self.data != NULL:
 * 			PyMem_Free(self.data)             # <<<<<<<<<<<<<<
 * 
 * 	cdef set_data(self, short *data, int sample_count):
 */
    PyMem_Free(((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)__pyx_v_self)->data);
    goto __pyx_L5;
  }
  __pyx_L5:;

  __Pyx_RefNannyFinishContext();
}

/* "xmmsapi.pyx":328
 * 			PyMem_Free(self.data)
 * 
 * 	cdef set_data(self, short *data, int sample_count):             # <<<<<<<<<<<<<<
 * 		if self.data != NULL:
 * 			PyMem_Free(self.data)
 */

static PyObject *__pyx_f_7xmmsapi_12XmmsVisChunk_set_data(struct __pyx_obj_7xmmsapi_XmmsVisChunk *__pyx_v_self, short *__pyx_v_data, int __pyx_v_sample_count) {
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_data");

  /* "xmmsapi.pyx":329
 * 
 * 	cdef set_data(self, short *data, int sample_count):
 * 		if self.data != NULL:             # <<<<<<<<<<<<<<
 * 			PyMem_Free(self.data)
 * 			self.sample_count = 0
 */
  __pyx_t_1 = (__pyx_v_self->data != NULL);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":330
 * 	cdef set_data(self, short *data, int sample_count):
 * 		if self.data != NULL:
 * 			PyMem_Free(self.data)             # <<<<<<<<<<<<<<
 * 			self.sample_count = 0
 * 		self.data = <short *>PyMem_Malloc(sizeof (short) * sample_count)
 */
    PyMem_Free(__pyx_v_self->data);

    /* "xmmsapi.pyx":331
 * 		if self.data != NULL:
 * 			PyMem_Free(self.data)
 * 			self.sample_count = 0             # <<<<<<<<<<<<<<
 * 		self.data = <short *>PyMem_Malloc(sizeof (short) * sample_count)
 * 		if self.data == NULL:
 */
    __pyx_v_self->sample_count = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":332
 * 			PyMem_Free(self.data)
 * 			self.sample_count = 0
 * 		self.data = <short *>PyMem_Malloc(sizeof (short) * sample_count)             # <<<<<<<<<<<<<<
 * 		if self.data == NULL:
 * 			raise RuntimeError("Failed to initialize chunk data")
 */
  __pyx_v_self->data = ((short *)PyMem_Malloc(((sizeof(short)) * __pyx_v_sample_count)));

  /* "xmmsapi.pyx":333
 * 			self.sample_count = 0
 * 		self.data = <short *>PyMem_Malloc(sizeof (short) * sample_count)
 * 		if self.data == NULL:             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("Failed to initialize chunk data")
 * 		for i in range(sample_count):
 */
  __pyx_t_1 = (__pyx_v_self->data == NULL);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":334
 * 		self.data = <short *>PyMem_Malloc(sizeof (short) * sample_count)
 * 		if self.data == NULL:
 * 			raise RuntimeError("Failed to initialize chunk data")             # <<<<<<<<<<<<<<
 * 		for i in range(sample_count):
 * 			self.data[i] = data[i]
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "xmmsapi.pyx":335
 * 		if self.data == NULL:
 * 			raise RuntimeError("Failed to initialize chunk data")
 * 		for i in range(sample_count):             # <<<<<<<<<<<<<<
 * 			self.data[i] = data[i]
 * 		self.sample_count = sample_count
 */
  __pyx_t_3 = __pyx_v_sample_count;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "xmmsapi.pyx":336
 * 			raise RuntimeError("Failed to initialize chunk data")
 * 		for i in range(sample_count):
 * 			self.data[i] = data[i]             # <<<<<<<<<<<<<<
 * 		self.sample_count = sample_count
 * 
 */
    (__pyx_v_self->data[__pyx_v_i]) = (__pyx_v_data[__pyx_v_i]);
  }

  /* "xmmsapi.pyx":337
 * 		for i in range(sample_count):
 * 			self.data[i] = data[i]
 * 		self.sample_count = sample_count             # <<<<<<<<<<<<<<
 * 
 * 	def __len__(self):
 */
  __pyx_v_self->sample_count = __pyx_v_sample_count;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsVisChunk.set_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":339
 * 		self.sample_count = sample_count
 * 
 * 	def __len__(self):             # <<<<<<<<<<<<<<
 * 		return self.sample_count
 * 
 */

static Py_ssize_t __pyx_pf_7xmmsapi_12XmmsVisChunk_2__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pf_7xmmsapi_12XmmsVisChunk_2__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__");

  /* "xmmsapi.pyx":340
 * 
 * 	def __len__(self):
 * 		return self.sample_count             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_buffer(self):
 */
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)__pyx_v_self)->sample_count;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":342
 * 		return self.sample_count
 * 
 * 	cpdef get_buffer(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		get_buffer() -> bytes (str in python 2.x)
 */

static PyObject *__pyx_pf_7xmmsapi_12XmmsVisChunk_3get_buffer(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_12XmmsVisChunk_get_buffer(struct __pyx_obj_7xmmsapi_XmmsVisChunk *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_buffer");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_buffer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_12XmmsVisChunk_3get_buffer)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":350
 * 		@return chunk data as a string
 * 		"""
 * 		if self.data == NULL:             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("chunk data not initialized")
 * 		return PyBytes_FromStringAndSize(<char *>self.data, sizeof (short) * self.sample_count)
 */
  __pyx_t_3 = (__pyx_v_self->data == NULL);
  if (__pyx_t_3) {

    /* "xmmsapi.pyx":351
 * 		"""
 * 		if self.data == NULL:
 * 			raise RuntimeError("chunk data not initialized")             # <<<<<<<<<<<<<<
 * 		return PyBytes_FromStringAndSize(<char *>self.data, sizeof (short) * self.sample_count)
 * 
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":352
 * 		if self.data == NULL:
 * 			raise RuntimeError("chunk data not initialized")
 * 		return PyBytes_FromStringAndSize(<char *>self.data, sizeof (short) * self.sample_count)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_data(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)PyBytes_FromStringAndSize(((char *)__pyx_v_self->data), ((sizeof(short)) * __pyx_v_self->sample_count))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsVisChunk.get_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":342
 * 		return self.sample_count
 * 
 * 	cpdef get_buffer(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		get_buffer() -> bytes (str in python 2.x)
 */

static PyObject *__pyx_pf_7xmmsapi_12XmmsVisChunk_3get_buffer(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_12XmmsVisChunk_3get_buffer[] = "\n\t\tget_buffer() -> bytes (str in python 2.x)\n\n\t\tGet the chunk buffer\n\t\t@rtype: L{bytes}\n\t\t@return chunk data as a string\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_12XmmsVisChunk_3get_buffer(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_buffer");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsVisChunk *)((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)__pyx_v_self)->__pyx_vtab)->get_buffer(((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsVisChunk.get_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":354
 * 		return PyBytes_FromStringAndSize(<char *>self.data, sizeof (short) * self.sample_count)
 * 
 * 	cpdef get_data(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		get_data() -> list
 */

static PyObject *__pyx_pf_7xmmsapi_12XmmsVisChunk_4get_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_12XmmsVisChunk_get_data(struct __pyx_obj_7xmmsapi_XmmsVisChunk *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_data");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_12XmmsVisChunk_4get_data)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":362
 * 		@return A list of int
 * 		"""
 * 		if self.data == NULL:             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("chunk data not initialized")
 * 		return [<int>self.data[i] for i in range(self.sample_count)]
 */
  __pyx_t_3 = (__pyx_v_self->data == NULL);
  if (__pyx_t_3) {

    /* "xmmsapi.pyx":363
 * 		"""
 * 		if self.data == NULL:
 * 			raise RuntimeError("chunk data not initialized")             # <<<<<<<<<<<<<<
 * 		return [<int>self.data[i] for i in range(self.sample_count)]
 * 
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":364
 * 		if self.data == NULL:
 * 			raise RuntimeError("chunk data not initialized")
 * 		return [<int>self.data[i] for i in range(self.sample_count)]             # <<<<<<<<<<<<<<
 * 
 * class VisualizationError(Exception):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_2 = PyInt_FromLong(__pyx_v_self->sample_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (PyList_CheckExact(__pyx_t_4)) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
    } else if (PyTuple_CheckExact(__pyx_t_4)) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++;
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[1]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF(__pyx_v_i);
    __pyx_v_i = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyInt_FromLong(((int)(__pyx_v_self->data[__pyx_t_7]))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsVisChunk.get_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":354
 * 		return PyBytes_FromStringAndSize(<char *>self.data, sizeof (short) * self.sample_count)
 * 
 * 	cpdef get_data(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		get_data() -> list
 */

static PyObject *__pyx_pf_7xmmsapi_12XmmsVisChunk_4get_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_12XmmsVisChunk_4get_data[] = "\n\t\tget_data() -> list\n\n\t\tGet chunk data as a list.\n\t\t@rtype: L{list}\n\t\t@return A list of int\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_12XmmsVisChunk_4get_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_data");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsVisChunk *)((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)__pyx_v_self)->__pyx_vtab)->get_data(((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsVisChunk.get_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":370
 * 
 * 
 * cdef void python_need_out_fun(int i, void *obj):             # <<<<<<<<<<<<<<
 * 	cdef object o
 * 	o = <object> obj
 */

static void __pyx_f_7xmmsapi_python_need_out_fun(int __pyx_v_i, void *__pyx_v_obj) {
  PyObject *__pyx_v_o = 0;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("python_need_out_fun");

  /* "xmmsapi.pyx":372
 * cdef void python_need_out_fun(int i, void *obj):
 * 	cdef object o
 * 	o = <object> obj             # <<<<<<<<<<<<<<
 * 	o._needout_cb(i)
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_obj));
  __pyx_v_o = ((PyObject *)__pyx_v_obj);

  /* "xmmsapi.pyx":373
 * 	cdef object o
 * 	o = <object> obj
 * 	o._needout_cb(i)             # <<<<<<<<<<<<<<
 * 
 * cdef void python_disconnect_fun(void *obj):
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_o, __pyx_n_s___needout_cb); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("xmmsapi.python_need_out_fun", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_RefNannyFinishContext();
}

/* "xmmsapi.pyx":375
 * 	o._needout_cb(i)
 * 
 * cdef void python_disconnect_fun(void *obj):             # <<<<<<<<<<<<<<
 * 	cdef object o
 * 	o = <object> obj
 */

static void __pyx_f_7xmmsapi_python_disconnect_fun(void *__pyx_v_obj) {
  PyObject *__pyx_v_o = 0;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("python_disconnect_fun");

  /* "xmmsapi.pyx":377
 * cdef void python_disconnect_fun(void *obj):
 * 	cdef object o
 * 	o = <object> obj             # <<<<<<<<<<<<<<
 * 	o._disconnect_cb()
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_obj));
  __pyx_v_o = ((PyObject *)__pyx_v_obj);

  /* "xmmsapi.pyx":378
 * 	cdef object o
 * 	o = <object> obj
 * 	o._disconnect_cb()             # <<<<<<<<<<<<<<
 * 
 * cpdef userconfdir_get():
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_o, __pyx_n_s___disconnect_cb); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_WriteUnraisable("xmmsapi.python_disconnect_fun", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_RefNannyFinishContext();
}

/* "xmmsapi.pyx":380
 * 	o._disconnect_cb()
 * 
 * cpdef userconfdir_get():             # <<<<<<<<<<<<<<
 * 	"""
 * 	Get the user configuration directory, where XMMS2 stores its
 */

static PyObject *__pyx_pf_7xmmsapi_1userconfdir_get(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_userconfdir_get(int __pyx_skip_dispatch) {
  char __pyx_v_path[XMMS_PATH_MAX];
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("userconfdir_get");

  /* "xmmsapi.pyx":388
 * 	"""
 * 	cdef char path[XMMS_PATH_MAX]
 * 	if xmmsc_userconfdir_get (path, XMMS_PATH_MAX) == NULL:             # <<<<<<<<<<<<<<
 * 		return None
 * 	return path
 */
  __pyx_t_1 = (xmmsc_userconfdir_get(__pyx_v_path, XMMS_PATH_MAX) == NULL);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":389
 * 	cdef char path[XMMS_PATH_MAX]
 * 	if xmmsc_userconfdir_get (path, XMMS_PATH_MAX) == NULL:
 * 		return None             # <<<<<<<<<<<<<<
 * 	return path
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":390
 * 	if xmmsc_userconfdir_get (path, XMMS_PATH_MAX) == NULL:
 * 		return None
 * 	return path             # <<<<<<<<<<<<<<
 * 
 * def enforce_unicode(object o):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyBytes_FromString(__pyx_v_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_r = ((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.userconfdir_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":380
 * 	o._disconnect_cb()
 * 
 * cpdef userconfdir_get():             # <<<<<<<<<<<<<<
 * 	"""
 * 	Get the user configuration directory, where XMMS2 stores its
 */

static PyObject *__pyx_pf_7xmmsapi_1userconfdir_get(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_1userconfdir_get[] = "\n\tGet the user configuration directory, where XMMS2 stores its\n\tuser-specific configuration files. Clients may store their\n\tconfiguration under the 'clients' subdirectory. This varies from\n\tplatform to platform so should always be retrieved at runtime.\n\t";
static PyObject *__pyx_pf_7xmmsapi_1userconfdir_get(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("userconfdir_get");
  __pyx_self = __pyx_self;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7xmmsapi_userconfdir_get(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.userconfdir_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":392
 * 	return path
 * 
 * def enforce_unicode(object o):             # <<<<<<<<<<<<<<
 * 	if isinstance(o, unicode):
 * 		s = o
 */

static PyObject *__pyx_pf_7xmmsapi_2enforce_unicode(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_7xmmsapi_2enforce_unicode = {__Pyx_NAMESTR("enforce_unicode"), (PyCFunction)__pyx_pf_7xmmsapi_2enforce_unicode, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_7xmmsapi_2enforce_unicode(PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("enforce_unicode");
  __pyx_self = __pyx_self;

  /* "xmmsapi.pyx":393
 * 
 * def enforce_unicode(object o):
 * 	if isinstance(o, unicode):             # <<<<<<<<<<<<<<
 * 		s = o
 * 	else:
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)(&PyUnicode_Type)));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_o, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "xmmsapi.pyx":394
 * def enforce_unicode(object o):
 * 	if isinstance(o, unicode):
 * 		s = o             # <<<<<<<<<<<<<<
 * 	else:
 * 		try:
 */
    __Pyx_INCREF(__pyx_v_o);
    __pyx_v_s = __pyx_v_o;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "xmmsapi.pyx":396
 * 		s = o
 * 	else:
 * 		try:             # <<<<<<<<<<<<<<
 * 			s = unicode(o, "UTF-8")
 * 		except:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "xmmsapi.pyx":397
 * 	else:
 * 		try:
 * 			s = unicode(o, "UTF-8")             # <<<<<<<<<<<<<<
 * 		except:
 * 			s = o
 */
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
        __Pyx_INCREF(__pyx_v_o);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_o);
        __Pyx_GIVEREF(__pyx_v_o);
        __Pyx_INCREF(((PyObject *)__pyx_kp_s_16));
        PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_16));
        __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_16));
        __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __pyx_v_s = __pyx_t_6;
        __pyx_t_6 = 0;
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L13_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "xmmsapi.pyx":398
 * 		try:
 * 			s = unicode(o, "UTF-8")
 * 		except:             # <<<<<<<<<<<<<<
 * 			s = o
 * 	return s
 */
      /*except:*/ {
        __Pyx_AddTraceback("xmmsapi.enforce_unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_7);

        /* "xmmsapi.pyx":399
 * 			s = unicode(o, "UTF-8")
 * 		except:
 * 			s = o             # <<<<<<<<<<<<<<
 * 	return s
 * 
 */
        __Pyx_INCREF(__pyx_v_o);
        __Pyx_XDECREF(__pyx_v_s);
        __pyx_v_s = __pyx_v_o;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L7_exception_handled;
      }
      __pyx_L8_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      __pyx_L13_try_end:;
    }
  }
  __pyx_L5:;

  /* "xmmsapi.pyx":400
 * 		except:
 * 			s = o
 * 	return s             # <<<<<<<<<<<<<<
 * 
 * cdef object check_playlist(object pls, bint None_is_active):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_s);
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("xmmsapi.enforce_unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":402
 * 	return s
 * 
 * cdef object check_playlist(object pls, bint None_is_active):             # <<<<<<<<<<<<<<
 * 	if pls is None and not None_is_active:
 * 		raise TypeError("expected str, %s found" % pls.__class__.__name__)
 */

static PyObject *__pyx_f_7xmmsapi_check_playlist(PyObject *__pyx_v_pls, int __pyx_v_None_is_active) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_playlist");

  /* "xmmsapi.pyx":403
 * 
 * cdef object check_playlist(object pls, bint None_is_active):
 * 	if pls is None and not None_is_active:             # <<<<<<<<<<<<<<
 * 		raise TypeError("expected str, %s found" % pls.__class__.__name__)
 * 	return from_unicode(pls or ACTIVE_PLAYLIST)
 */
  __pyx_t_1 = (__pyx_v_pls == Py_None);
  if (__pyx_t_1) {
    __pyx_t_2 = (!__pyx_v_None_is_active);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "xmmsapi.pyx":404
 * cdef object check_playlist(object pls, bint None_is_active):
 * 	if pls is None and not None_is_active:
 * 		raise TypeError("expected str, %s found" % pls.__class__.__name__)             # <<<<<<<<<<<<<<
 * 	return from_unicode(pls or ACTIVE_PLAYLIST)
 * 
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_pls, __pyx_n_s____class__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s____name__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":405
 * 	if pls is None and not None_is_active:
 * 		raise TypeError("expected str, %s found" % pls.__class__.__name__)
 * 	return from_unicode(pls or ACTIVE_PLAYLIST)             # <<<<<<<<<<<<<<
 * 
 * cdef class XmmsCore:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_pls); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!__pyx_t_3) {
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__ACTIVE_PLAYLIST); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __pyx_t_4;
    __pyx_t_4 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_pls);
    __pyx_t_5 = __pyx_v_pls;
  }
  __pyx_t_4 = __pyx_f_9xmmsutils_from_unicode(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("xmmsapi.check_playlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":420
 * 	#cdef readonly object clientname
 * 
 * 	def __cinit__(self, *args, **kargs): #Trick to allow subclass with init arguments             # <<<<<<<<<<<<<<
 * 		"""
 * 		Initiates a connection to the XMMS2 daemon. All operations
 */

static int __pyx_pf_7xmmsapi_8XmmsCore___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_7xmmsapi_8XmmsCore___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kargs = 0;
  PyObject *__pyx_v_clientname = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__");
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
  __pyx_v_kargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kargs)) return -1;
  __Pyx_GOTREF(__pyx_v_kargs);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;

  /* "xmmsapi.pyx":425
 * 		involving the daemon are done via this connection.
 * 		"""
 * 		if 'clientname' in kargs:             # <<<<<<<<<<<<<<
 * 			clientname = kargs['clientname']
 * 		elif len(args):
 */
  if (unlikely(((PyObject *)__pyx_v_kargs) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = ((PyDict_Contains(((PyObject *)__pyx_v_kargs), ((PyObject *)__pyx_n_s__clientname)))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":426
 * 		"""
 * 		if 'clientname' in kargs:
 * 			clientname = kargs['clientname']             # <<<<<<<<<<<<<<
 * 		elif len(args):
 * 			clientname = args[0]
 */
    __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_kargs), ((PyObject *)__pyx_n_s__clientname)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_clientname = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L5;
  }

  /* "xmmsapi.pyx":427
 * 		if 'clientname' in kargs:
 * 			clientname = kargs['clientname']
 * 		elif len(args):             # <<<<<<<<<<<<<<
 * 			clientname = args[0]
 * 		else:
 */
  if (unlikely(((PyObject *)__pyx_v_args) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_3 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_args)); 
  if (__pyx_t_3) {

    /* "xmmsapi.pyx":428
 * 			clientname = kargs['clientname']
 * 		elif len(args):
 * 			clientname = args[0]             # <<<<<<<<<<<<<<
 * 		else:
 * 			clientname = None
 */
    __pyx_t_2 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_args), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_clientname = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "xmmsapi.pyx":430
 * 			clientname = args[0]
 * 		else:
 * 			clientname = None             # <<<<<<<<<<<<<<
 * 		if clientname is None:
 * 			clientname = "UnnamedPythonClient"
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_clientname = Py_None;
  }
  __pyx_L5:;

  /* "xmmsapi.pyx":431
 * 		else:
 * 			clientname = None
 * 		if clientname is None:             # <<<<<<<<<<<<<<
 * 			clientname = "UnnamedPythonClient"
 * 		self.clientname = clientname
 */
  __pyx_t_1 = (__pyx_v_clientname == Py_None);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":432
 * 			clientname = None
 * 		if clientname is None:
 * 			clientname = "UnnamedPythonClient"             # <<<<<<<<<<<<<<
 * 		self.clientname = clientname
 * 		self.source_preference = XmmsSourcePreference(["client/"+clientname, "server", "plugins/[inserted by cython to avoid comment start]*", "client/[inserted by cython to avoid comment start]*", "*"])
 */
    __Pyx_INCREF(((PyObject *)__pyx_n_s__UnnamedPythonClient));
    __Pyx_DECREF(__pyx_v_clientname);
    __pyx_v_clientname = ((PyObject *)__pyx_n_s__UnnamedPythonClient);
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsapi.pyx":433
 * 		if clientname is None:
 * 			clientname = "UnnamedPythonClient"
 * 		self.clientname = clientname             # <<<<<<<<<<<<<<
 * 		self.source_preference = XmmsSourcePreference(["client/"+clientname, "server", "plugins/[inserted by cython to avoid comment start]*", "client/[inserted by cython to avoid comment start]*", "*"])
 * 		self.result_tracker = XmmsResultTracker() # Keep track of all results that set a notifier.
 */
  __Pyx_INCREF(__pyx_v_clientname);
  __Pyx_GIVEREF(__pyx_v_clientname);
  __Pyx_GOTREF(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->clientname);
  __Pyx_DECREF(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->clientname);
  ((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->clientname = __pyx_v_clientname;

  /* "xmmsapi.pyx":434
 * 			clientname = "UnnamedPythonClient"
 * 		self.clientname = clientname
 * 		self.source_preference = XmmsSourcePreference(["client/"+clientname, "server", "plugins/[inserted by cython to avoid comment start]*", "client/[inserted by cython to avoid comment start]*", "*"])             # <<<<<<<<<<<<<<
 * 		self.result_tracker = XmmsResultTracker() # Keep track of all results that set a notifier.
 * 		self.new_connection()
 */
  __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_s_18), __pyx_v_clientname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyList_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__server));
  PyList_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_n_s__server));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__server));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_19));
  PyList_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_kp_s_19));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_19));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
  PyList_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_kp_s_20));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_21));
  PyList_SET_ITEM(__pyx_t_4, 4, ((PyObject *)__pyx_kp_s_21));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_21));
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7xmmsapi_XmmsSourcePreference)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->source_preference);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->source_preference));
  ((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->source_preference = ((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "xmmsapi.pyx":435
 * 		self.clientname = clientname
 * 		self.source_preference = XmmsSourcePreference(["client/"+clientname, "server", "plugins/[inserted by cython to avoid comment start]*", "client/[inserted by cython to avoid comment start]*", "*"])
 * 		self.result_tracker = XmmsResultTracker() # Keep track of all results that set a notifier.             # <<<<<<<<<<<<<<
 * 		self.new_connection()
 * 
 */
  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7xmmsapi_XmmsResultTracker)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->result_tracker);
  __Pyx_DECREF(((PyObject *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->result_tracker));
  ((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->result_tracker = ((struct __pyx_obj_7xmmsapi_XmmsResultTracker *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "xmmsapi.pyx":436
 * 		self.source_preference = XmmsSourcePreference(["client/"+clientname, "server", "plugins/[inserted by cython to avoid comment start]*", "client/[inserted by cython to avoid comment start]*", "*"])
 * 		self.result_tracker = XmmsResultTracker() # Keep track of all results that set a notifier.
 * 		self.new_connection()             # <<<<<<<<<<<<<<
 * 
 * 	def __dealloc__(self):
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->new_connection(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kargs);
  __Pyx_XDECREF(__pyx_v_clientname);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":438
 * 		self.new_connection()
 * 
 * 	def __dealloc__(self):             # <<<<<<<<<<<<<<
 * 		if self.conn != NULL:
 * 			xmmsc_unref(self.conn)
 */

static void __pyx_pf_7xmmsapi_8XmmsCore_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_7xmmsapi_8XmmsCore_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "xmmsapi.pyx":439
 * 
 * 	def __dealloc__(self):
 * 		if self.conn != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsc_unref(self.conn)
 * 			self.conn = NULL
 */
  __pyx_t_1 = (((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->conn != NULL);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":440
 * 	def __dealloc__(self):
 * 		if self.conn != NULL:
 * 			xmmsc_unref(self.conn)             # <<<<<<<<<<<<<<
 * 			self.conn = NULL
 * 
 */
    xmmsc_unref(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->conn);

    /* "xmmsapi.pyx":441
 * 		if self.conn != NULL:
 * 			xmmsc_unref(self.conn)
 * 			self.conn = NULL             # <<<<<<<<<<<<<<
 * 
 * 	def __del__(self):
 */
    ((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->conn = NULL;
    goto __pyx_L5;
  }
  __pyx_L5:;

  __Pyx_RefNannyFinishContext();
}

/* "xmmsapi.pyx":443
 * 			self.conn = NULL
 * 
 * 	def __del__(self):             # <<<<<<<<<<<<<<
 * 		self.disconnect()
 * 
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_2__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_2__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__del__");

  /* "xmmsapi.pyx":444
 * 
 * 	def __del__(self):
 * 		self.disconnect()             # <<<<<<<<<<<<<<
 * 
 * 	cdef new_connection(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->disconnect(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":446
 * 		self.disconnect()
 * 
 * 	cdef new_connection(self):             # <<<<<<<<<<<<<<
 * 		cn = from_unicode(self.clientname)
 * 		self.conn = xmmsc_init(<char *>cn)
 */

static PyObject *__pyx_f_7xmmsapi_8XmmsCore_new_connection(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self) {
  PyObject *__pyx_v_cn = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  char *__pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("new_connection");

  /* "xmmsapi.pyx":447
 * 
 * 	cdef new_connection(self):
 * 		cn = from_unicode(self.clientname)             # <<<<<<<<<<<<<<
 * 		self.conn = xmmsc_init(<char *>cn)
 * 		if self.conn == NULL:
 */
  __pyx_t_1 = __pyx_v_self->clientname;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_9xmmsutils_from_unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cn = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "xmmsapi.pyx":448
 * 	cdef new_connection(self):
 * 		cn = from_unicode(self.clientname)
 * 		self.conn = xmmsc_init(<char *>cn)             # <<<<<<<<<<<<<<
 * 		if self.conn == NULL:
 * 			raise ValueError("Failed to initialize xmmsclient library! Probably due to broken name.")
 */
  __pyx_t_3 = PyBytes_AsString(__pyx_v_cn); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->conn = xmmsc_init(((char *)__pyx_t_3));

  /* "xmmsapi.pyx":449
 * 		cn = from_unicode(self.clientname)
 * 		self.conn = xmmsc_init(<char *>cn)
 * 		if self.conn == NULL:             # <<<<<<<<<<<<<<
 * 			raise ValueError("Failed to initialize xmmsclient library! Probably due to broken name.")
 * 
 */
  __pyx_t_4 = (__pyx_v_self->conn == NULL);
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":450
 * 		self.conn = xmmsc_init(<char *>cn)
 * 		if self.conn == NULL:
 * 			raise ValueError("Failed to initialize xmmsclient library! Probably due to broken name.")             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_source_preference(self):
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.new_connection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":452
 * 			raise ValueError("Failed to initialize xmmsclient library! Probably due to broken name.")
 * 
 * 	cpdef get_source_preference(self):             # <<<<<<<<<<<<<<
 * 		return self.source_preference.get()
 * 	cpdef set_source_preference(self, sources):
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_3get_source_preference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_8XmmsCore_get_source_preference(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_source_preference");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_24); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_8XmmsCore_3get_source_preference)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":453
 * 
 * 	cpdef get_source_preference(self):
 * 		return self.source_preference.get()             # <<<<<<<<<<<<<<
 * 	cpdef set_source_preference(self, sources):
 * 		self.source_preference.set(sources)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->source_preference), __pyx_n_s__get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.get_source_preference", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":452
 * 			raise ValueError("Failed to initialize xmmsclient library! Probably due to broken name.")
 * 
 * 	cpdef get_source_preference(self):             # <<<<<<<<<<<<<<
 * 		return self.source_preference.get()
 * 	cpdef set_source_preference(self, sources):
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_3get_source_preference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_3get_source_preference(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_source_preference");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->get_source_preference(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.get_source_preference", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":454
 * 	cpdef get_source_preference(self):
 * 		return self.source_preference.get()
 * 	cpdef set_source_preference(self, sources):             # <<<<<<<<<<<<<<
 * 		self.source_preference.set(sources)
 * 
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_4set_source_preference(PyObject *__pyx_v_self, PyObject *__pyx_v_sources); /*proto*/
static PyObject *__pyx_f_7xmmsapi_8XmmsCore_set_source_preference(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, PyObject *__pyx_v_sources, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_source_preference");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_25); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_8XmmsCore_4set_source_preference)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_sources);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sources);
      __Pyx_GIVEREF(__pyx_v_sources);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":455
 * 		return self.source_preference.get()
 * 	cpdef set_source_preference(self, sources):
 * 		self.source_preference.set(sources)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef _needout_cb(self, int i):
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->source_preference), __pyx_n_s__set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(__pyx_v_sources);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_sources);
  __Pyx_GIVEREF(__pyx_v_sources);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.set_source_preference", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":454
 * 	cpdef get_source_preference(self):
 * 		return self.source_preference.get()
 * 	cpdef set_source_preference(self, sources):             # <<<<<<<<<<<<<<
 * 		self.source_preference.set(sources)
 * 
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_4set_source_preference(PyObject *__pyx_v_self, PyObject *__pyx_v_sources); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_4set_source_preference(PyObject *__pyx_v_self, PyObject *__pyx_v_sources) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_source_preference");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->set_source_preference(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_sources, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.set_source_preference", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":457
 * 		self.source_preference.set(sources)
 * 
 * 	cpdef _needout_cb(self, int i):             # <<<<<<<<<<<<<<
 * 		if self.needout_fun is not None:
 * 			self.needout_fun(i)
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_5_needout_cb(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_f_7xmmsapi_8XmmsCore__needout_cb(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, int __pyx_v_i, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_needout_cb");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___needout_cb); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_8XmmsCore_5_needout_cb)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":458
 * 
 * 	cpdef _needout_cb(self, int i):
 * 		if self.needout_fun is not None:             # <<<<<<<<<<<<<<
 * 			self.needout_fun(i)
 * 	cpdef _disconnect_cb(self):
 */
  __pyx_t_4 = (__pyx_v_self->needout_fun != Py_None);
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":459
 * 	cpdef _needout_cb(self, int i):
 * 		if self.needout_fun is not None:
 * 			self.needout_fun(i)             # <<<<<<<<<<<<<<
 * 	cpdef _disconnect_cb(self):
 * 		if self.disconnect_fun is not None:
 */
    __pyx_t_1 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_v_self->needout_fun, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsCore._needout_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":457
 * 		self.source_preference.set(sources)
 * 
 * 	cpdef _needout_cb(self, int i):             # <<<<<<<<<<<<<<
 * 		if self.needout_fun is not None:
 * 			self.needout_fun(i)
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_5_needout_cb(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_5_needout_cb(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_needout_cb");
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_AsInt(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsCore._needout_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->_needout_cb(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_i, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore._needout_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":460
 * 		if self.needout_fun is not None:
 * 			self.needout_fun(i)
 * 	cpdef _disconnect_cb(self):             # <<<<<<<<<<<<<<
 * 		if self.disconnect_fun is not None:
 * 			self.disconnect_fun(self)
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_6_disconnect_cb(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_8XmmsCore__disconnect_cb(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_disconnect_cb");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___disconnect_cb); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_8XmmsCore_6_disconnect_cb)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":461
 * 			self.needout_fun(i)
 * 	cpdef _disconnect_cb(self):
 * 		if self.disconnect_fun is not None:             # <<<<<<<<<<<<<<
 * 			self.disconnect_fun(self)
 * 
 */
  __pyx_t_3 = (__pyx_v_self->disconnect_fun != Py_None);
  if (__pyx_t_3) {

    /* "xmmsapi.pyx":462
 * 	cpdef _disconnect_cb(self):
 * 		if self.disconnect_fun is not None:
 * 			self.disconnect_fun(self)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef disconnect(self):
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __pyx_t_2 = PyObject_Call(__pyx_v_self->disconnect_fun, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsCore._disconnect_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":460
 * 		if self.needout_fun is not None:
 * 			self.needout_fun(i)
 * 	cpdef _disconnect_cb(self):             # <<<<<<<<<<<<<<
 * 		if self.disconnect_fun is not None:
 * 			self.disconnect_fun(self)
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_6_disconnect_cb(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_6_disconnect_cb(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_disconnect_cb");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->_disconnect_cb(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore._disconnect_cb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":464
 * 			self.disconnect_fun(self)
 * 
 * 	cpdef disconnect(self):             # <<<<<<<<<<<<<<
 * 		# Disconnect all results.
 * 		self.result_tracker.disconnect_all(True)
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_7disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_8XmmsCore_disconnect(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("disconnect");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__disconnect); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_8XmmsCore_7disconnect)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":466
 * 	cpdef disconnect(self):
 * 		# Disconnect all results.
 * 		self.result_tracker.disconnect_all(True)             # <<<<<<<<<<<<<<
 * 		if self.conn is not NULL:
 * 			xmmsc_unref(self.conn)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResultTracker *)__pyx_v_self->result_tracker->__pyx_vtab)->disconnect_all(__pyx_v_self->result_tracker, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsapi.pyx":467
 * 		# Disconnect all results.
 * 		self.result_tracker.disconnect_all(True)
 * 		if self.conn is not NULL:             # <<<<<<<<<<<<<<
 * 			xmmsc_unref(self.conn)
 * 			self.conn = NULL
 */
  __pyx_t_3 = (__pyx_v_self->conn != NULL);
  if (__pyx_t_3) {

    /* "xmmsapi.pyx":468
 * 		self.result_tracker.disconnect_all(True)
 * 		if self.conn is not NULL:
 * 			xmmsc_unref(self.conn)             # <<<<<<<<<<<<<<
 * 			self.conn = NULL
 * 		self.new_connection()
 */
    xmmsc_unref(__pyx_v_self->conn);

    /* "xmmsapi.pyx":469
 * 		if self.conn is not NULL:
 * 			xmmsc_unref(self.conn)
 * 			self.conn = NULL             # <<<<<<<<<<<<<<
 * 		self.new_connection()
 * 
 */
    __pyx_v_self->conn = NULL;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":470
 * 			xmmsc_unref(self.conn)
 * 			self.conn = NULL
 * 		self.new_connection()             # <<<<<<<<<<<<<<
 * 
 * 	cpdef ioin(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)__pyx_v_self->__pyx_vtab)->new_connection(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.disconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":464
 * 			self.disconnect_fun(self)
 * 
 * 	cpdef disconnect(self):             # <<<<<<<<<<<<<<
 * 		# Disconnect all results.
 * 		self.result_tracker.disconnect_all(True)
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_7disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_7disconnect(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("disconnect");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->disconnect(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.disconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":472
 * 		self.new_connection()
 * 
 * 	cpdef ioin(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		ioin() -> bool
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_8ioin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_8XmmsCore_ioin(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ioin");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__ioin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_8XmmsCore_8ioin)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":480
 * 		certain circumstances. e.g. a custom event loop
 * 		"""
 * 		return xmmsc_io_in_handle(self.conn)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef ioout(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(xmmsc_io_in_handle(__pyx_v_self->conn)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.ioin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":472
 * 		self.new_connection()
 * 
 * 	cpdef ioin(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		ioin() -> bool
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_8ioin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_8XmmsCore_8ioin[] = "\n\t\tioin() -> bool\n\n\t\tRead data from the daemon, when available.\n\t\tNote: This is a low level function that should only be used in\n\t\tcertain circumstances. e.g. a custom event loop\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_8ioin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ioin");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->ioin(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.ioin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":482
 * 		return xmmsc_io_in_handle(self.conn)
 * 
 * 	cpdef ioout(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		ioout() -> bool
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_9ioout(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_8XmmsCore_ioout(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ioout");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__ioout); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_8XmmsCore_9ioout)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":490
 * 		circumstances. e.g. a custom event loop
 * 		"""
 * 		return xmmsc_io_out_handle(self.conn)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef want_ioout(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(xmmsc_io_out_handle(__pyx_v_self->conn)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.ioout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":482
 * 		return xmmsc_io_in_handle(self.conn)
 * 
 * 	cpdef ioout(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		ioout() -> bool
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_9ioout(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_8XmmsCore_9ioout[] = "\n\t\tioout() -> bool\n\n\t\tWrite data out to the daemon, when available. Note: This is a\n\t\tlow level function that should only be used in certain\n\t\tcircumstances. e.g. a custom event loop\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_9ioout(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ioout");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->ioout(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.ioout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":492
 * 		return xmmsc_io_out_handle(self.conn)
 * 
 * 	cpdef want_ioout(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		want_ioout() -> bool
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_10want_ioout(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_8XmmsCore_want_ioout(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("want_ioout");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__want_ioout); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_8XmmsCore_10want_ioout)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":496
 * 		want_ioout() -> bool
 * 		"""
 * 		return xmmsc_io_want_out(self.conn)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef set_need_out_fun(self, fun):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(xmmsc_io_want_out(__pyx_v_self->conn)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.want_ioout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":492
 * 		return xmmsc_io_out_handle(self.conn)
 * 
 * 	cpdef want_ioout(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		want_ioout() -> bool
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_10want_ioout(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_8XmmsCore_10want_ioout[] = "\n\t\twant_ioout() -> bool\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_10want_ioout(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("want_ioout");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->want_ioout(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.want_ioout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":498
 * 		return xmmsc_io_want_out(self.conn)
 * 
 * 	cpdef set_need_out_fun(self, fun):             # <<<<<<<<<<<<<<
 * 		"""
 * 		set_need_out_fun(fun)
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_11set_need_out_fun(PyObject *__pyx_v_self, PyObject *__pyx_v_fun); /*proto*/
static PyObject *__pyx_f_7xmmsapi_8XmmsCore_set_need_out_fun(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, PyObject *__pyx_v_fun, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_need_out_fun");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__set_need_out_fun); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_8XmmsCore_11set_need_out_fun)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_fun);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fun);
      __Pyx_GIVEREF(__pyx_v_fun);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":502
 * 		set_need_out_fun(fun)
 * 		"""
 * 		self.needout_fun = fun             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_fd(self):
 */
  __Pyx_INCREF(__pyx_v_fun);
  __Pyx_GIVEREF(__pyx_v_fun);
  __Pyx_GOTREF(__pyx_v_self->needout_fun);
  __Pyx_DECREF(__pyx_v_self->needout_fun);
  __pyx_v_self->needout_fun = __pyx_v_fun;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.set_need_out_fun", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":498
 * 		return xmmsc_io_want_out(self.conn)
 * 
 * 	cpdef set_need_out_fun(self, fun):             # <<<<<<<<<<<<<<
 * 		"""
 * 		set_need_out_fun(fun)
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_11set_need_out_fun(PyObject *__pyx_v_self, PyObject *__pyx_v_fun); /*proto*/
static char __pyx_doc_7xmmsapi_8XmmsCore_11set_need_out_fun[] = "\n\t\tset_need_out_fun(fun)\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_11set_need_out_fun(PyObject *__pyx_v_self, PyObject *__pyx_v_fun) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_need_out_fun");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->set_need_out_fun(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_fun, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.set_need_out_fun", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":504
 * 		self.needout_fun = fun
 * 
 * 	cpdef get_fd(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		get_fd() -> int
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_12get_fd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7xmmsapi_8XmmsCore_get_fd(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_fd");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_fd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_8XmmsCore_12get_fd)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":515
 * 		@return: IPC file descriptor
 * 		"""
 * 		return xmmsc_io_fd_get(self.conn)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef connect(self, path=None, disconnect_func=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(xmmsc_io_fd_get(__pyx_v_self->conn)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.get_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":504
 * 		self.needout_fun = fun
 * 
 * 	cpdef get_fd(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		get_fd() -> int
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_12get_fd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_8XmmsCore_12get_fd[] = "\n\t\tget_fd() -> int\n\n\t\tGet the underlying file descriptor used for communication with\n\t\tthe XMMS2 daemon. You can use this in a client to ensure that\n\t\tthe IPC link is still active and safe to use.(e.g by calling\n\t\tselect() or poll())\n\t\t@rtype: int\n\t\t@return: IPC file descriptor\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_12get_fd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_fd");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->get_fd(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.get_fd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":517
 * 		return xmmsc_io_fd_get(self.conn)
 * 
 * 	cpdef connect(self, path=None, disconnect_func=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		connect(path=None, disconnect_func=None)
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_13connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7xmmsapi_8XmmsCore_connect(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_8XmmsCore_connect *__pyx_optional_args) {
  PyObject *__pyx_v_path = ((PyObject *)Py_None);
  PyObject *__pyx_v_disconnect_func = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("connect");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_path = __pyx_optional_args->path;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_disconnect_func = __pyx_optional_args->disconnect_func;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__connect); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_8XmmsCore_13connect)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_path);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
      __Pyx_GIVEREF(__pyx_v_path);
      __Pyx_INCREF(__pyx_v_disconnect_func);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_disconnect_func);
      __Pyx_GIVEREF(__pyx_v_disconnect_func);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":539
 * 		L{exit_loop} at some point.
 * 		"""
 * 		if path:             # <<<<<<<<<<<<<<
 * 			p = from_unicode(path)
 * 			ret = xmmsc_connect(self.conn, <char *>p)
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_path); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":540
 * 		"""
 * 		if path:
 * 			p = from_unicode(path)             # <<<<<<<<<<<<<<
 * 			ret = xmmsc_connect(self.conn, <char *>p)
 * 		else:
 */
    __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_p = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "xmmsapi.pyx":541
 * 		if path:
 * 			p = from_unicode(path)
 * 			ret = xmmsc_connect(self.conn, <char *>p)             # <<<<<<<<<<<<<<
 * 		else:
 * 			ret = xmmsc_connect(self.conn, NULL)
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_ret = xmmsc_connect(__pyx_v_self->conn, ((char *)__pyx_t_5));
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":543
 * 			ret = xmmsc_connect(self.conn, <char *>p)
 * 		else:
 * 			ret = xmmsc_connect(self.conn, NULL)             # <<<<<<<<<<<<<<
 * 
 * 		if not ret:
 */
    __pyx_v_ret = xmmsc_connect(__pyx_v_self->conn, NULL);
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":545
 * 			ret = xmmsc_connect(self.conn, NULL)
 * 
 * 		if not ret:             # <<<<<<<<<<<<<<
 * 			raise IOError("Couldn't connect to the server")
 * 		self.isconnected = 1
 */
  __pyx_t_4 = (!__pyx_v_ret);
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":546
 * 
 * 		if not ret:
 * 			raise IOError("Couldn't connect to the server")             # <<<<<<<<<<<<<<
 * 		self.isconnected = 1
 * 
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_IOError, ((PyObject *)__pyx_k_tuple_27), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "xmmsapi.pyx":547
 * 		if not ret:
 * 			raise IOError("Couldn't connect to the server")
 * 		self.isconnected = 1             # <<<<<<<<<<<<<<
 * 
 * 		self.disconnect_fun = disconnect_func
 */
  __pyx_v_self->isconnected = 1;

  /* "xmmsapi.pyx":549
 * 		self.isconnected = 1
 * 
 * 		self.disconnect_fun = disconnect_func             # <<<<<<<<<<<<<<
 * 		xmmsc_disconnect_callback_set_full(self.conn, python_disconnect_fun, <void *>self, NULL)
 * 		xmmsc_io_need_out_callback_set_full(self.conn, python_need_out_fun, <void *> self, NULL)
 */
  __Pyx_INCREF(__pyx_v_disconnect_func);
  __Pyx_GIVEREF(__pyx_v_disconnect_func);
  __Pyx_GOTREF(__pyx_v_self->disconnect_fun);
  __Pyx_DECREF(__pyx_v_self->disconnect_fun);
  __pyx_v_self->disconnect_fun = __pyx_v_disconnect_func;

  /* "xmmsapi.pyx":550
 * 
 * 		self.disconnect_fun = disconnect_func
 * 		xmmsc_disconnect_callback_set_full(self.conn, python_disconnect_fun, <void *>self, NULL)             # <<<<<<<<<<<<<<
 * 		xmmsc_io_need_out_callback_set_full(self.conn, python_need_out_fun, <void *> self, NULL)
 * 
 */
  xmmsc_disconnect_callback_set_full(__pyx_v_self->conn, __pyx_f_7xmmsapi_python_disconnect_fun, ((void *)__pyx_v_self), NULL);

  /* "xmmsapi.pyx":551
 * 		self.disconnect_fun = disconnect_func
 * 		xmmsc_disconnect_callback_set_full(self.conn, python_disconnect_fun, <void *>self, NULL)
 * 		xmmsc_io_need_out_callback_set_full(self.conn, python_need_out_fun, <void *> self, NULL)             # <<<<<<<<<<<<<<
 * 
 * 	def is_connected(self):
 */
  xmmsc_io_need_out_callback_set_full(__pyx_v_self->conn, __pyx_f_7xmmsapi_python_need_out_fun, ((void *)__pyx_v_self), NULL);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":517
 * 		return xmmsc_io_fd_get(self.conn)
 * 
 * 	cpdef connect(self, path=None, disconnect_func=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		connect(path=None, disconnect_func=None)
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_13connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_8XmmsCore_13connect[] = "\n\t\tconnect(path=None, disconnect_func=None)\n\n\t\tConnect to the appropriate IPC path, for communication with the\n\t\tXMMS2 daemon. This path defaults to /tmp/xmms-ipc-<username> if\n\t\tnot specified. Call this once you have instantiated the object:\n\n\t\tC{import xmmsclient}\n\n\t\tC{xmms = xmmsclient.XMMS()}\n\n\t\tC{xmms.connect()}\n\n\t\t...\n\n\t\tYou can provide a disconnect callback function to be activated\n\t\twhen the daemon disconnects.(e.g. daemon quit) This function\n\t\ttypically has to exit the main loop used by your application.\n\t\tFor example, if using L{loop}, your callback should call\n\t\tL{exit_loop} at some point.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_13connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_disconnect_func = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_8XmmsCore_connect __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path,&__pyx_n_s__disconnect_func,0};
  __Pyx_RefNannySetupContext("connect");
  {
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__disconnect_func);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "connect") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_path = values[0];
    __pyx_v_disconnect_func = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("connect", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsCore.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.path = __pyx_v_path;
  __pyx_t_2.disconnect_func = __pyx_v_disconnect_func;
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->__pyx_vtab)->connect(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":553
 * 		xmmsc_io_need_out_callback_set_full(self.conn, python_need_out_fun, <void *> self, NULL)
 * 
 * 	def is_connected(self):             # <<<<<<<<<<<<<<
 * 		return self.isconnected != 0
 * 
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_14is_connected(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_14is_connected(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_connected");

  /* "xmmsapi.pyx":554
 * 
 * 	def is_connected(self):
 * 		return self.isconnected != 0             # <<<<<<<<<<<<<<
 * 
 * 	cdef XmmsResult _create_result(self, cb, xmmsc_result_t *res, Cls):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->isconnected != 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.is_connected", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":556
 * 		return self.isconnected != 0
 * 
 * 	cdef XmmsResult _create_result(self, cb, xmmsc_result_t *res, Cls):             # <<<<<<<<<<<<<<
 * 		cdef XmmsResult ret
 * 		if res == NULL:
 */

static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_8XmmsCore__create_result(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, PyObject *__pyx_v_cb, xmmsc_result_t *__pyx_v_res, PyObject *__pyx_v_Cls) {
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_ret = 0;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_create_result");

  /* "xmmsapi.pyx":558
 * 	cdef XmmsResult _create_result(self, cb, xmmsc_result_t *res, Cls):
 * 		cdef XmmsResult ret
 * 		if res == NULL:             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("xmmsc_result_t couldn't be allocated")
 * 		ret = Cls()
 */
  __pyx_t_1 = (__pyx_v_res == NULL);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":559
 * 		cdef XmmsResult ret
 * 		if res == NULL:
 * 			raise RuntimeError("xmmsc_result_t couldn't be allocated")             # <<<<<<<<<<<<<<
 * 		ret = Cls()
 * 		ret.set_sourcepref(self.source_preference)
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":560
 * 		if res == NULL:
 * 			raise RuntimeError("xmmsc_result_t couldn't be allocated")
 * 		ret = Cls()             # <<<<<<<<<<<<<<
 * 		ret.set_sourcepref(self.source_preference)
 * 		ret.set_result(res)
 */
  __pyx_t_2 = PyObject_Call(__pyx_v_Cls, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_ret = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "xmmsapi.pyx":561
 * 			raise RuntimeError("xmmsc_result_t couldn't be allocated")
 * 		ret = Cls()
 * 		ret.set_sourcepref(self.source_preference)             # <<<<<<<<<<<<<<
 * 		ret.set_result(res)
 * 		if cb is not None:
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->source_preference);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)__pyx_v_ret->__pyx_vtab)->set_sourcepref(__pyx_v_ret, ((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "xmmsapi.pyx":562
 * 		ret = Cls()
 * 		ret.set_sourcepref(self.source_preference)
 * 		ret.set_result(res)             # <<<<<<<<<<<<<<
 * 		if cb is not None:
 * 			ret.set_callback(self.result_tracker, cb) # property that setup all.
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)__pyx_v_ret->__pyx_vtab)->set_result(__pyx_v_ret, __pyx_v_res); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "xmmsapi.pyx":563
 * 		ret.set_sourcepref(self.source_preference)
 * 		ret.set_result(res)
 * 		if cb is not None:             # <<<<<<<<<<<<<<
 * 			ret.set_callback(self.result_tracker, cb) # property that setup all.
 * 		return ret
 */
  __pyx_t_1 = (__pyx_v_cb != Py_None);
  if (__pyx_t_1) {

    /* "xmmsapi.pyx":564
 * 		ret.set_result(res)
 * 		if cb is not None:
 * 			ret.set_callback(self.result_tracker, cb) # property that setup all.             # <<<<<<<<<<<<<<
 * 		return ret
 * 
 */
    __pyx_t_3 = ((PyObject *)__pyx_v_self->result_tracker);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsResult *)__pyx_v_ret->__pyx_vtab)->set_callback(__pyx_v_ret, ((struct __pyx_obj_7xmmsapi_XmmsResultTracker *)__pyx_t_3), __pyx_v_cb); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "xmmsapi.pyx":565
 * 		if cb is not None:
 * 			ret.set_callback(self.result_tracker, cb) # property that setup all.
 * 		return ret             # <<<<<<<<<<<<<<
 * 
 * 	cdef XmmsResult create_result(self, cb, xmmsc_result_t *res):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_ret));
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsCore._create_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ret);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":567
 * 		return ret
 * 
 * 	cdef XmmsResult create_result(self, cb, xmmsc_result_t *res):             # <<<<<<<<<<<<<<
 * 		return self._create_result(cb, res, XmmsResult)
 * 
 */

static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_8XmmsCore_create_result(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, PyObject *__pyx_v_cb, xmmsc_result_t *__pyx_v_res) {
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_result");

  /* "xmmsapi.pyx":568
 * 
 * 	cdef XmmsResult create_result(self, cb, xmmsc_result_t *res):
 * 		return self._create_result(cb, res, XmmsResult)             # <<<<<<<<<<<<<<
 * 
 * 	cdef XmmsResult create_vis_result(self, cb, xmmsc_result_t *res, VisResultCommand cmd):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_7xmmsapi_XmmsResult));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)__pyx_v_self->__pyx_vtab)->_create_result(__pyx_v_self, __pyx_v_cb, __pyx_v_res, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.create_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":570
 * 		return self._create_result(cb, res, XmmsResult)
 * 
 * 	cdef XmmsResult create_vis_result(self, cb, xmmsc_result_t *res, VisResultCommand cmd):             # <<<<<<<<<<<<<<
 * 		cdef XmmsVisResult vres = self._create_result(cb, res, XmmsVisResult)
 * 		vres.set_command(cmd, self.conn)
 */

static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_8XmmsCore_create_vis_result(struct __pyx_obj_7xmmsapi_XmmsCore *__pyx_v_self, PyObject *__pyx_v_cb, xmmsc_result_t *__pyx_v_res, __pyx_t_7xmmsapi_VisResultCommand __pyx_v_cmd) {
  struct __pyx_obj_7xmmsapi_XmmsVisResult *__pyx_v_vres = 0;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_vis_result");

  /* "xmmsapi.pyx":571
 * 
 * 	cdef XmmsResult create_vis_result(self, cb, xmmsc_result_t *res, VisResultCommand cmd):
 * 		cdef XmmsVisResult vres = self._create_result(cb, res, XmmsVisResult)             # <<<<<<<<<<<<<<
 * 		vres.set_command(cmd, self.conn)
 * 		return vres
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_7xmmsapi_XmmsVisResult));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsCore *)__pyx_v_self->__pyx_vtab)->_create_result(__pyx_v_self, __pyx_v_cb, __pyx_v_res, __pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsVisResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_vres = ((struct __pyx_obj_7xmmsapi_XmmsVisResult *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "xmmsapi.pyx":572
 * 	cdef XmmsResult create_vis_result(self, cb, xmmsc_result_t *res, VisResultCommand cmd):
 * 		cdef XmmsVisResult vres = self._create_result(cb, res, XmmsVisResult)
 * 		vres.set_command(cmd, self.conn)             # <<<<<<<<<<<<<<
 * 		return vres
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsVisResult *)__pyx_v_vres->__pyx_base.__pyx_vtab)->set_command(__pyx_v_vres, __pyx_v_cmd, __pyx_v_self->conn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":573
 * 		cdef XmmsVisResult vres = self._create_result(cb, res, XmmsVisResult)
 * 		vres.set_command(cmd, self.conn)
 * 		return vres             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_vres));
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_v_vres);
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsCore.create_vis_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_vres);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pxd":82
 * 	cdef object disconnect_fun
 * 	cdef object needout_fun
 * 	cdef readonly XmmsSourcePreference source_preference             # <<<<<<<<<<<<<<
 * 	cdef XmmsResultTracker result_tracker
 * 	cdef readonly object clientname
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_17source_preference___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_17source_preference___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->source_preference));
  __pyx_r = ((PyObject *)((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->source_preference);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pxd":84
 * 	cdef readonly XmmsSourcePreference source_preference
 * 	cdef XmmsResultTracker result_tracker
 * 	cdef readonly object clientname             # <<<<<<<<<<<<<<
 * 
 * 	cdef new_connection(self)
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_10clientname___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_8XmmsCore_10clientname___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->clientname);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self)->clientname;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":577
 * 
 * cdef class XmmsApi(XmmsCore):
 * 	cpdef XmmsResult quit(self, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		quit(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_quit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_quit(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_quit *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("quit");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__quit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_quit)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":585
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_quit(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult plugin_list(self, typ, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_quit(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.quit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":577
 * 
 * cdef class XmmsApi(XmmsCore):
 * 	cpdef XmmsResult quit(self, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		quit(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_quit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_quit[] = "\n\t\tquit(cb=None) -> XmmsResult\n\n\t\tTell the XMMS2 daemon to quit.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_quit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_quit __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("quit");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "quit") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("quit", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.quit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->quit(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.quit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":587
 * 		return self.create_result(cb, xmmsc_quit(self.conn))
 * 
 * 	cpdef XmmsResult plugin_list(self, typ, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		plugin_list(typ, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_1plugin_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_plugin_list(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_typ, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_plugin_list *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  xmms_plugin_type_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plugin_list");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__plugin_list); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_1plugin_list)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_typ);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_typ);
      __Pyx_GIVEREF(__pyx_v_typ);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":595
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_main_list_plugins(self.conn, typ))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playback_start(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = ((xmms_plugin_type_t)PyInt_AsLong(__pyx_v_typ)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_main_list_plugins(__pyx_v_self->__pyx_base.conn, __pyx_t_4))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.plugin_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":587
 * 		return self.create_result(cb, xmmsc_quit(self.conn))
 * 
 * 	cpdef XmmsResult plugin_list(self, typ, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		plugin_list(typ, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_1plugin_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_1plugin_list[] = "\n\t\tplugin_list(typ, cb=None) -> XmmsResult\n\n\t\tGet a list of loaded plugins from the server\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_1plugin_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_typ = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_plugin_list __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__typ,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("plugin_list");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__typ);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "plugin_list") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_typ = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("plugin_list", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.plugin_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->plugin_list(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_typ, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.plugin_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":597
 * 		return self.create_result(cb, xmmsc_main_list_plugins(self.conn, typ))
 * 
 * 	cpdef XmmsResult playback_start(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_start(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_2playback_start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playback_start(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_start *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playback_start");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playback_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_2playback_start)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":606
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_playback_start(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playback_stop(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playback_start(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":597
 * 		return self.create_result(cb, xmmsc_main_list_plugins(self.conn, typ))
 * 
 * 	cpdef XmmsResult playback_start(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_start(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_2playback_start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_2playback_start[] = "\n\t\tplayback_start(cb=None) -> XmmsResult\n\n\t\tInstruct the XMMS2 daemon to start playing the currently\n\t\tselected file from the playlist.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_2playback_start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_start __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_start");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_start") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_start", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playback_start(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":608
 * 		return self.create_result(cb, xmmsc_playback_start(self.conn))
 * 
 * 	cpdef XmmsResult playback_stop(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_stop(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_3playback_stop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playback_stop(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_stop *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playback_stop");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playback_stop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_3playback_stop)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":617
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_playback_stop(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playback_tickle(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playback_stop(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":608
 * 		return self.create_result(cb, xmmsc_playback_start(self.conn))
 * 
 * 	cpdef XmmsResult playback_stop(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_stop(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_3playback_stop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_3playback_stop[] = "\n\t\tplayback_stop(cb=None) -> XmmsResult\n\n\t\tInstruct the XMMS2 daemon to stop playing the file\n\t\tcurrently being played.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_3playback_stop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_stop __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_stop");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_stop") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_stop", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playback_stop(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":619
 * 		return self.create_result(cb, xmmsc_playback_stop(self.conn))
 * 
 * 	cpdef XmmsResult playback_tickle(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_tickle(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_4playback_tickle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playback_tickle(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_tickle *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playback_tickle");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playback_tickle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_4playback_tickle)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":627
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_playback_tickle(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playback_pause(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playback_tickle(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_tickle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":619
 * 		return self.create_result(cb, xmmsc_playback_stop(self.conn))
 * 
 * 	cpdef XmmsResult playback_tickle(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_tickle(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_4playback_tickle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_4playback_tickle[] = "\n\t\tplayback_tickle(cb=None) -> XmmsResult\n\n\t\tInstruct the XMMS2 daemon to move on to the next playlist item.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_4playback_tickle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_tickle __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_tickle");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_tickle") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_tickle", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_tickle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playback_tickle(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_tickle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":629
 * 		return self.create_result(cb, xmmsc_playback_tickle(self.conn))
 * 
 * 	cpdef XmmsResult playback_pause(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_pause(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_5playback_pause(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playback_pause(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_pause *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playback_pause");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playback_pause); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_5playback_pause)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":637
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_playback_pause(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playback_current_id(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playback_pause(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_pause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":629
 * 		return self.create_result(cb, xmmsc_playback_tickle(self.conn))
 * 
 * 	cpdef XmmsResult playback_pause(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_pause(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_5playback_pause(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_5playback_pause[] = "\n\t\tplayback_pause(cb=None) -> XmmsResult\n\n\t\tInstruct the XMMS2 daemon to pause playback.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_5playback_pause(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_pause __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_pause");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_pause") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_pause", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_pause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playback_pause(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_pause", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":639
 * 		return self.create_result(cb, xmmsc_playback_pause(self.conn))
 * 
 * 	cpdef XmmsResult playback_current_id(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_current_id(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_6playback_current_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playback_current_id(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_current_id *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playback_current_id");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playback_current_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_6playback_current_id)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":646
 * 		@return: The medialib id of the item currently selected.
 * 		"""
 * 		return self.create_result(cb, xmmsc_playback_current_id(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playback_seek_ms(self, int ms, xmms_playback_seek_mode_t whence = PLAYBACK_SEEK_SET, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playback_current_id(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_current_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":639
 * 		return self.create_result(cb, xmmsc_playback_pause(self.conn))
 * 
 * 	cpdef XmmsResult playback_current_id(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_current_id(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_6playback_current_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_6playback_current_id[] = "\n\t\tplayback_current_id(cb=None) -> XmmsResult\n\n\t\t@rtype: L{XmmsResult}(UInt)\n\t\t@return: The medialib id of the item currently selected.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_6playback_current_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_current_id __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_current_id");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_current_id") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_current_id", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_current_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playback_current_id(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_current_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":648
 * 		return self.create_result(cb, xmmsc_playback_current_id(self.conn))
 * 
 * 	cpdef XmmsResult playback_seek_ms(self, int ms, xmms_playback_seek_mode_t whence = PLAYBACK_SEEK_SET, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_seek_ms(ms, whence=PLAYBACK_SEEK_SET, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_7playback_seek_ms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playback_seek_ms(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_ms, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_seek_ms *__pyx_optional_args) {
  xmms_playback_seek_mode_t __pyx_v_whence = __pyx_k_30;
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playback_seek_ms");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_whence = __pyx_optional_args->whence;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playback_seek_ms); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_7playback_seek_ms)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_ms); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyInt_FromLong(__pyx_v_whence); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":656
 * 		@return: The result of the operation.
 * 		"""
 * 		if whence == PLAYBACK_SEEK_SET or whence == PLAYBACK_SEEK_CUR:             # <<<<<<<<<<<<<<
 * 			return self.create_result(cb, xmmsc_playback_seek_ms(self.conn, ms, whence))
 * 		else:
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_whence); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__PLAYBACK_SEEK_SET); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_5) {
    __pyx_t_4 = PyInt_FromLong(__pyx_v_whence); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__PLAYBACK_SEEK_CUR); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_t_6;
  } else {
    __pyx_t_7 = __pyx_t_5;
  }
  if (__pyx_t_7) {

    /* "xmmsapi.pyx":657
 * 		"""
 * 		if whence == PLAYBACK_SEEK_SET or whence == PLAYBACK_SEEK_CUR:
 * 			return self.create_result(cb, xmmsc_playback_seek_ms(self.conn, ms, whence))             # <<<<<<<<<<<<<<
 * 		else:
 * 			raise ValueError("Bad whence parameter")
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playback_seek_ms(__pyx_v_self->__pyx_base.conn, __pyx_v_ms, __pyx_v_whence))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":659
 * 			return self.create_result(cb, xmmsc_playback_seek_ms(self.conn, ms, whence))
 * 		else:
 * 			raise ValueError("Bad whence parameter")             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_seek_ms", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":648
 * 		return self.create_result(cb, xmmsc_playback_current_id(self.conn))
 * 
 * 	cpdef XmmsResult playback_seek_ms(self, int ms, xmms_playback_seek_mode_t whence = PLAYBACK_SEEK_SET, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_seek_ms(ms, whence=PLAYBACK_SEEK_SET, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_7playback_seek_ms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_7playback_seek_ms[] = "\n\t\tplayback_seek_ms(ms, whence=PLAYBACK_SEEK_SET, cb=None) -> XmmsResult\n\n\t\tSeek to a time position in the current file or stream in playback.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_7playback_seek_ms(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_ms;
  xmms_playback_seek_mode_t __pyx_v_whence;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_seek_ms __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ms,&__pyx_n_s__whence,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_seek_ms");
  {
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ms);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__whence);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_seek_ms") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ms = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_ms == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    if (values[1]) {
      __pyx_v_whence = PyInt_AsLong(values[1]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_whence = __pyx_k_30;
    }
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_seek_ms", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_seek_ms", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.whence = __pyx_v_whence;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playback_seek_ms(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_ms, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_seek_ms", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":662
 * 
 * 	@deprecated
 * 	def playback_seek_ms_rel(self, int ms, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_8playback_seek_ms_rel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_8playback_seek_ms_rel[] = "\n\t\t@deprecated\n\t\tplayback_seek_ms_rel(ms, cb=None) -> XmmsResult\n\n\t\tSeek to a time position by the given offset in the current file or\n\t\tstream in playback.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_8playback_seek_ms_rel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_ms;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ms,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_seek_ms_rel");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ms);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_seek_ms_rel") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ms = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_ms == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_seek_ms_rel", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_seek_ms_rel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":672
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.playback_seek_ms(ms, PLAYBACK_SEEK_CUR, cb=cb)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playback_seek_samples(self, int samples, xmms_playback_seek_mode_t whence=PLAYBACK_SEEK_SET, cb = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__playback_seek_ms); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_ms); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__PLAYBACK_SEEK_CUR); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__cb), __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_seek_ms_rel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":674
 * 		return self.playback_seek_ms(ms, PLAYBACK_SEEK_CUR, cb=cb)
 * 
 * 	cpdef XmmsResult playback_seek_samples(self, int samples, xmms_playback_seek_mode_t whence=PLAYBACK_SEEK_SET, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_seek_samples(samples, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_9playback_seek_samples(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playback_seek_samples(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_samples, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_seek_samples *__pyx_optional_args) {
  xmms_playback_seek_mode_t __pyx_v_whence = __pyx_k_33;
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playback_seek_samples");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_whence = __pyx_optional_args->whence;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_34); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_9playback_seek_samples)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyInt_FromLong(__pyx_v_whence); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":682
 * 		@return: The result of the operation.
 * 		"""
 * 		if whence == PLAYBACK_SEEK_SET or whence == PLAYBACK_SEEK_CUR:             # <<<<<<<<<<<<<<
 * 			return self.create_result(cb, xmmsc_playback_seek_samples(self.conn, samples, whence))
 * 		else:
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_whence); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__PLAYBACK_SEEK_SET); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_5) {
    __pyx_t_4 = PyInt_FromLong(__pyx_v_whence); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__PLAYBACK_SEEK_CUR); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_t_6;
  } else {
    __pyx_t_7 = __pyx_t_5;
  }
  if (__pyx_t_7) {

    /* "xmmsapi.pyx":683
 * 		"""
 * 		if whence == PLAYBACK_SEEK_SET or whence == PLAYBACK_SEEK_CUR:
 * 			return self.create_result(cb, xmmsc_playback_seek_samples(self.conn, samples, whence))             # <<<<<<<<<<<<<<
 * 		else:
 * 			raise ValueError("Bad whence parameter")
 */
    __Pyx_XDECREF(((PyObject *)__pyx_r));
    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playback_seek_samples(__pyx_v_self->__pyx_base.conn, __pyx_v_samples, __pyx_v_whence))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":685
 * 			return self.create_result(cb, xmmsc_playback_seek_samples(self.conn, samples, whence))
 * 		else:
 * 			raise ValueError("Bad whence parameter")             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_seek_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":674
 * 		return self.playback_seek_ms(ms, PLAYBACK_SEEK_CUR, cb=cb)
 * 
 * 	cpdef XmmsResult playback_seek_samples(self, int samples, xmms_playback_seek_mode_t whence=PLAYBACK_SEEK_SET, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_seek_samples(samples, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_9playback_seek_samples(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_9playback_seek_samples[] = "\n\t\tplayback_seek_samples(samples, cb=None) -> XmmsResult\n\n\t\tSeek to a number of samples in the current file or stream in playback.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_9playback_seek_samples(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_samples;
  xmms_playback_seek_mode_t __pyx_v_whence;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_seek_samples __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__samples,&__pyx_n_s__whence,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_seek_samples");
  {
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samples);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__whence);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_seek_samples") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_samples = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_samples == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    if (values[1]) {
      __pyx_v_whence = PyInt_AsLong(values[1]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_whence = __pyx_k_33;
    }
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_seek_samples", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_seek_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.whence = __pyx_v_whence;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playback_seek_samples(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_samples, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_seek_samples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":688
 * 
 * 	@deprecated
 * 	def playback_seek_samples_rel(self, int samples, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_10playback_seek_samples_rel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_10playback_seek_samples_rel[] = "\n\t\t@deprecated\n\t\tplayback_seek_samples_rel(samples, cb=None) -> XmmsResult\n\n\t\tSeek to a number of samples by the given offset in the\n\t\tcurrent file or stream in playback.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_10playback_seek_samples_rel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_samples;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__samples,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_seek_samples_rel");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__samples);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_seek_samples_rel") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_samples = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_samples == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_seek_samples_rel", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_seek_samples_rel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":698
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.playback_seek_samples(samples, XMMS_PLAYBACK_SEEK_CUR, cb=cb)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playback_status(self, cb = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_34); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyInt_FromLong(XMMS_PLAYBACK_SEEK_CUR); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__cb), __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_seek_samples_rel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":700
 * 		return self.playback_seek_samples(samples, XMMS_PLAYBACK_SEEK_CUR, cb=cb)
 * 
 * 	cpdef XmmsResult playback_status(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_status(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_11playback_status(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playback_status(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_status *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playback_status");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playback_status); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_11playback_status)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":712
 * 		@return: Current playback status(UInt)
 * 		"""
 * 		return self.create_result(cb, xmmsc_playback_status(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult broadcast_playback_status(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playback_status(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":700
 * 		return self.playback_seek_samples(samples, XMMS_PLAYBACK_SEEK_CUR, cb=cb)
 * 
 * 	cpdef XmmsResult playback_status(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_status(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_11playback_status(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_11playback_status[] = "\n\t\tplayback_status(cb=None) -> XmmsResult\n\n\t\tGet current playback status from XMMS2 daemon. This is\n\t\tessentially the more direct version of\n\t\tL{broadcast_playback_status}. Possible return values are:\n\t\tL{PLAYBACK_STATUS_STOP}, L{PLAYBACK_STATUS_PLAY},\n\t\tL{PLAYBACK_STATUS_PAUSE}\n\t\t@rtype: L{XmmsResult}(UInt)\n\t\t@return: Current playback status(UInt)\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_11playback_status(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_status __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_status");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_status") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_status", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playback_status(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":714
 * 		return self.create_result(cb, xmmsc_playback_status(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_playback_status(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_playback_status(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_12broadcast_playback_status(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_broadcast_playback_status(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_status *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("broadcast_playback_status");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_36); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_12broadcast_playback_status)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":722
 * 		@rtype: L{XmmsResult}(UInt)
 * 		"""
 * 		return self.create_result(cb, xmmsc_broadcast_playback_status(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult broadcast_playback_current_id(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_broadcast_playback_status(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playback_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":714
 * 		return self.create_result(cb, xmmsc_playback_status(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_playback_status(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_playback_status(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_12broadcast_playback_status(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_12broadcast_playback_status[] = "\n\t\tbroadcast_playback_status(cb=None) -> XmmsResult\n\n\t\tSet a method to handle the playback status broadcast from the\n\t\tXMMS2 daemon.\n\t\t@rtype: L{XmmsResult}(UInt)\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_12broadcast_playback_status(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_status __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("broadcast_playback_status");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "broadcast_playback_status") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("broadcast_playback_status", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playback_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->broadcast_playback_status(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playback_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":724
 * 		return self.create_result(cb, xmmsc_broadcast_playback_status(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_playback_current_id(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_playback_current_id(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_13broadcast_playback_current_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_broadcast_playback_current_id(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_current_id *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("broadcast_playback_current_id");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_37); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_13broadcast_playback_current_id)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":732
 * 		@rtype: L{XmmsResult}(UInt)
 * 		"""
 * 		return self.create_result(cb, xmmsc_broadcast_playback_current_id(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playback_playtime(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_broadcast_playback_current_id(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playback_current_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":724
 * 		return self.create_result(cb, xmmsc_broadcast_playback_status(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_playback_current_id(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_playback_current_id(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_13broadcast_playback_current_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_13broadcast_playback_current_id[] = "\n\t\tbroadcast_playback_current_id(cb=None) -> XmmsResult\n\n\t\tSet a method to handle the playback id broadcast from the\n\t\tXMMS2 daemon.\n\t\t@rtype: L{XmmsResult}(UInt)\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_13broadcast_playback_current_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_current_id __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("broadcast_playback_current_id");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "broadcast_playback_current_id") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("broadcast_playback_current_id", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playback_current_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->broadcast_playback_current_id(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playback_current_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":734
 * 		return self.create_result(cb, xmmsc_broadcast_playback_current_id(self.conn))
 * 
 * 	cpdef XmmsResult playback_playtime(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_playtime(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_14playback_playtime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playback_playtime(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_playtime *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playback_playtime");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playback_playtime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_14playback_playtime)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":743
 * 		@return: The result of the operation.(playtime in milliseconds)
 * 		"""
 * 		return self.create_result(cb, xmmsc_playback_playtime(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult signal_playback_playtime(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playback_playtime(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_playtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":734
 * 		return self.create_result(cb, xmmsc_broadcast_playback_current_id(self.conn))
 * 
 * 	cpdef XmmsResult playback_playtime(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_playtime(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_14playback_playtime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_14playback_playtime[] = "\n\t\tplayback_playtime(cb=None) -> XmmsResult\n\n\t\tReturn playtime on current file/stream. This is essentially a\n\t\tmore direct version of L{signal_playback_playtime}\n\t\t@rtype: L{XmmsResult}(UInt)\n\t\t@return: The result of the operation.(playtime in milliseconds)\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_14playback_playtime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_playtime __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_playtime");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_playtime") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_playtime", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_playtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playback_playtime(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_playtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":745
 * 		return self.create_result(cb, xmmsc_playback_playtime(self.conn))
 * 
 * 	cpdef XmmsResult signal_playback_playtime(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		signal_playback_playtime(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_15signal_playback_playtime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_signal_playback_playtime(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_signal_playback_playtime *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("signal_playback_playtime");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_38); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_15signal_playback_playtime)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":753
 * 		@rtype: L{XmmsResult}(UInt)
 * 		"""
 * 		return self.create_result(cb, xmmsc_signal_playback_playtime(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playback_volume_set(self, channel, int volume, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_signal_playback_playtime(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.signal_playback_playtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":745
 * 		return self.create_result(cb, xmmsc_playback_playtime(self.conn))
 * 
 * 	cpdef XmmsResult signal_playback_playtime(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		signal_playback_playtime(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_15signal_playback_playtime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_15signal_playback_playtime[] = "\n\t\tsignal_playback_playtime(cb=None) -> XmmsResult\n\n\t\tSet a method to handle the playback playtime signal from the\n\t\tXMMS2 daemon.\n\t\t@rtype: L{XmmsResult}(UInt)\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_15signal_playback_playtime(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_signal_playback_playtime __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("signal_playback_playtime");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "signal_playback_playtime") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("signal_playback_playtime", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.signal_playback_playtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->signal_playback_playtime(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.signal_playback_playtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":755
 * 		return self.create_result(cb, xmmsc_signal_playback_playtime(self.conn))
 * 
 * 	cpdef XmmsResult playback_volume_set(self, channel, int volume, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_volume_set(channel, volume, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_16playback_volume_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playback_volume_set(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_channel, int __pyx_v_volume, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_volume_set *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_c = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playback_volume_set");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playback_volume_set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_16playback_volume_set)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_volume); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      __Pyx_INCREF(__pyx_v_channel);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_channel);
      __Pyx_GIVEREF(__pyx_v_channel);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":762
 * 		@rtype: L{XmmsResult}(UInt)
 * 		"""
 * 		c = from_unicode(channel)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_playback_volume_set(self.conn, c, volume))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_channel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_c = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":763
 * 		"""
 * 		c = from_unicode(channel)
 * 		return self.create_result(cb, xmmsc_playback_volume_set(self.conn, c, volume))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playback_volume_get(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_c); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playback_volume_set(__pyx_v_self->__pyx_base.conn, __pyx_t_4, __pyx_v_volume))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_volume_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":755
 * 		return self.create_result(cb, xmmsc_signal_playback_playtime(self.conn))
 * 
 * 	cpdef XmmsResult playback_volume_set(self, channel, int volume, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_volume_set(channel, volume, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_16playback_volume_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_16playback_volume_set[] = "\n\t\tplayback_volume_set(channel, volume, cb=None) -> XmmsResult\n\n\t\tSet the playback volume for specified channel\n\t\t@rtype: L{XmmsResult}(UInt)\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_16playback_volume_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_channel = 0;
  int __pyx_v_volume;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_volume_set __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__channel,&__pyx_n_s__volume,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_volume_set");
  {
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__channel);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__volume);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("playback_volume_set", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_volume_set") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_channel = values[0];
    __pyx_v_volume = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_volume == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_volume_set", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_volume_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playback_volume_set(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_channel, __pyx_v_volume, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_volume_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":765
 * 		return self.create_result(cb, xmmsc_playback_volume_set(self.conn, c, volume))
 * 
 * 	cpdef XmmsResult playback_volume_get(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_volume_get(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_17playback_volume_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playback_volume_get(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_volume_get *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playback_volume_get");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playback_volume_get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_17playback_volume_get)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":772
 * 		@rtype: L{XmmsResult}(UInt)
 * 		"""
 * 		return self.create_result(cb, xmmsc_playback_volume_get(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult broadcast_playback_volume_changed(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playback_volume_get(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_volume_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":765
 * 		return self.create_result(cb, xmmsc_playback_volume_set(self.conn, c, volume))
 * 
 * 	cpdef XmmsResult playback_volume_get(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_volume_get(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_17playback_volume_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_17playback_volume_get[] = "\n\t\tplayback_volume_get(cb=None) -> XmmsResult\n\n\t\tGet the playback for all channels\n\t\t@rtype: L{XmmsResult}(UInt)\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_17playback_volume_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_volume_get __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playback_volume_get");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playback_volume_get") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playback_volume_get", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_volume_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playback_volume_get(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playback_volume_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":774
 * 		return self.create_result(cb, xmmsc_playback_volume_get(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_playback_volume_changed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_playback_volume_changed(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_18broadcast_playback_volume_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_broadcast_playback_volume_changed(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_volume_changed *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("broadcast_playback_volume_changed");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_39); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_18broadcast_playback_volume_changed)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":781
 * 		@rtype: L{XmmsResult}(UInt)
 * 		"""
 * 		return self.create_result(cb, xmmsc_broadcast_playback_volume_changed(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult broadcast_playlist_loaded(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_broadcast_playback_volume_changed(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playback_volume_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":774
 * 		return self.create_result(cb, xmmsc_playback_volume_get(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_playback_volume_changed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_playback_volume_changed(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_18broadcast_playback_volume_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_18broadcast_playback_volume_changed[] = "\n\t\tbroadcast_playback_volume_changed(cb=None) -> XmmsResult\n\n\t\tSet a broadcast callback for volume updates\n\t\t@rtype: L{XmmsResult}(UInt)\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_18broadcast_playback_volume_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_volume_changed __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("broadcast_playback_volume_changed");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "broadcast_playback_volume_changed") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("broadcast_playback_volume_changed", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playback_volume_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->broadcast_playback_volume_changed(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playback_volume_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":783
 * 		return self.create_result(cb, xmmsc_broadcast_playback_volume_changed(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_playlist_loaded(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_playlist_loaded(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_19broadcast_playlist_loaded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_broadcast_playlist_loaded(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_loaded *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("broadcast_playlist_loaded");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_40); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_19broadcast_playlist_loaded)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":790
 * 		@rtype: L{XmmsResult}(UInt)
 * 		"""
 * 		return self.create_result(cb, xmmsc_broadcast_playlist_loaded(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_load(self, playlist, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_broadcast_playlist_loaded(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playlist_loaded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":783
 * 		return self.create_result(cb, xmmsc_broadcast_playback_volume_changed(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_playlist_loaded(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_playlist_loaded(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_19broadcast_playlist_loaded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_19broadcast_playlist_loaded[] = "\n\t\tbroadcast_playlist_loaded(cb=None) -> XmmsResult\n\n\t\tSet a broadcast callback for loaded playlist event\n\t\t@rtype: L{XmmsResult}(UInt)\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_19broadcast_playlist_loaded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_loaded __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("broadcast_playlist_loaded");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "broadcast_playlist_loaded") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("broadcast_playlist_loaded", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playlist_loaded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->broadcast_playlist_loaded(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playlist_loaded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":792
 * 		return self.create_result(cb, xmmsc_broadcast_playlist_loaded(self.conn))
 * 
 * 	cpdef XmmsResult playlist_load(self, playlist, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_load(playlist, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_20playlist_load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_load(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_playlist, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_load *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_load");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_load); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_20playlist_load)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":800
 * 		@return: The result of the operation.
 * 		"""
 * 		p = check_playlist(playlist, False)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_playlist_load(self.conn, <char *>p))
 * 
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":801
 * 		"""
 * 		p = check_playlist(playlist, False)
 * 		return self.create_result(cb, xmmsc_playlist_load(self.conn, <char *>p))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_list(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_load(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":792
 * 		return self.create_result(cb, xmmsc_broadcast_playlist_loaded(self.conn))
 * 
 * 	cpdef XmmsResult playlist_load(self, playlist, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_load(playlist, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_20playlist_load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_20playlist_load[] = "\n\t\tplaylist_load(playlist, cb=None) -> XmmsResult\n\n\t\tLoad the playlist as current playlist\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_20playlist_load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_load __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_load");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_load") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_playlist = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_load", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_load(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_playlist, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":803
 * 		return self.create_result(cb, xmmsc_playlist_load(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_list(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_list(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_21playlist_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_list(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_list *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_list");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_list); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_21playlist_list)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":811
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_playlist_list(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_remove(self, playlist, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_list(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":803
 * 		return self.create_result(cb, xmmsc_playlist_load(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_list(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_list(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_21playlist_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_21playlist_list[] = "\n\t\tplaylist_list(cb=None) -> XmmsResult\n\n\t\tLists the playlists\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_21playlist_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_list __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_list");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_list") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_list", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_list(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":813
 * 		return self.create_result(cb, xmmsc_playlist_list(self.conn))
 * 
 * 	cpdef XmmsResult playlist_remove(self, playlist, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_remove(playlist, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_22playlist_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_remove(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_playlist, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_remove *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_remove");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_22playlist_remove)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":821
 * 		@return: The result of the operation.
 * 		"""
 * 		p = check_playlist(playlist, False)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_playlist_remove(self.conn, <char *>p))
 * 
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":822
 * 		"""
 * 		p = check_playlist(playlist, False)
 * 		return self.create_result(cb, xmmsc_playlist_remove(self.conn, <char *>p))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_shuffle(self, playlist = None, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_remove(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":813
 * 		return self.create_result(cb, xmmsc_playlist_list(self.conn))
 * 
 * 	cpdef XmmsResult playlist_remove(self, playlist, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_remove(playlist, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_22playlist_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_22playlist_remove[] = "\n\t\tplaylist_remove(playlist, cb=None) -> XmmsResult\n\n\t\tRemove the playlist from the server\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_22playlist_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_remove __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_remove");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_remove") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_playlist = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_remove", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_remove(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_playlist, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":824
 * 		return self.create_result(cb, xmmsc_playlist_remove(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_shuffle(self, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_shuffle(playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_23playlist_shuffle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_shuffle(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_shuffle *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_shuffle");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_shuffle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_23playlist_shuffle)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":832
 * 		@return: The result of the operation.
 * 		"""
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_playlist_shuffle(self.conn, <char *>p))
 * 
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":833
 * 		"""
 * 		p = check_playlist(playlist, True)
 * 		return self.create_result(cb, xmmsc_playlist_shuffle(self.conn, <char *>p))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_rinsert(self, int pos, url, playlist = None, cb = None, encoded=False):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_shuffle(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_shuffle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":824
 * 		return self.create_result(cb, xmmsc_playlist_remove(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_shuffle(self, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_shuffle(playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_23playlist_shuffle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_23playlist_shuffle[] = "\n\t\tplaylist_shuffle(playlist=None, cb=None) -> XmmsResult\n\n\t\tInstruct the XMMS2 daemon to shuffle the playlist.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_23playlist_shuffle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_shuffle __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_shuffle");
  {
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_shuffle") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_playlist = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_shuffle", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_shuffle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_shuffle(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_shuffle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":835
 * 		return self.create_result(cb, xmmsc_playlist_shuffle(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_rinsert(self, int pos, url, playlist = None, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_rinsert(pos, url, playlist=None, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_24playlist_rinsert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_rinsert(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_pos, PyObject *__pyx_v_url, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_rinsert *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_encoded = __pyx_k_41;
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_rinsert");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_encoded = __pyx_optional_args->encoded;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_rinsert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_24playlist_rinsert)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_url);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_url);
      __Pyx_GIVEREF(__pyx_v_url);
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __Pyx_INCREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":846
 * 		cdef xmmsc_result_t *res
 * 
 * 		c = from_unicode(url)             # <<<<<<<<<<<<<<
 * 		p = check_playlist(playlist, True)
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_c = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":847
 * 
 * 		c = from_unicode(url)
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 
 * 		if encoded:
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":849
 * 		p = check_playlist(playlist, True)
 * 
 * 		if encoded:             # <<<<<<<<<<<<<<
 * 			res = xmmsc_playlist_rinsert_encoded(self.conn, <char *>p, pos, <char *>c)
 * 		else:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_encoded); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":850
 * 
 * 		if encoded:
 * 			res = xmmsc_playlist_rinsert_encoded(self.conn, <char *>p, pos, <char *>c)             # <<<<<<<<<<<<<<
 * 		else:
 * 			res = xmmsc_playlist_rinsert(self.conn, <char *>p, pos, <char *>c)
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PyBytes_AsString(__pyx_v_c); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_playlist_rinsert_encoded(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5), __pyx_v_pos, ((char *)__pyx_t_6));
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":852
 * 			res = xmmsc_playlist_rinsert_encoded(self.conn, <char *>p, pos, <char *>c)
 * 		else:
 * 			res = xmmsc_playlist_rinsert(self.conn, <char *>p, pos, <char *>c)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
    __pyx_t_6 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = PyBytes_AsString(__pyx_v_c); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_playlist_rinsert(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_6), __pyx_v_pos, ((char *)__pyx_t_5));
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":853
 * 		else:
 * 			res = xmmsc_playlist_rinsert(self.conn, <char *>p, pos, <char *>c)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_rinsert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":835
 * 		return self.create_result(cb, xmmsc_playlist_shuffle(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_rinsert(self, int pos, url, playlist = None, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_rinsert(pos, url, playlist=None, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_24playlist_rinsert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_24playlist_rinsert[] = "\n\t\tplaylist_rinsert(pos, url, playlist=None, cb=None, encoded=False) -> XmmsResult\n\n\t\tInsert a directory in the playlist.\n\t\tRequires an int 'pos' and a string 'url' as argument.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_24playlist_rinsert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_pos;
  PyObject *__pyx_v_url = 0;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_v_encoded = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_rinsert __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__pos,&__pyx_n_s__url,&__pyx_n_s__playlist,&__pyx_n_s__cb,&__pyx_n_s__encoded,0};
  __Pyx_RefNannySetupContext("playlist_rinsert");
  {
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = __pyx_k_41;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__url);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("playlist_rinsert", 0, 2, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoded);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_rinsert") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_pos = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_url = values[1];
    __pyx_v_playlist = values[2];
    __pyx_v_cb = values[3];
    __pyx_v_encoded = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_rinsert", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_rinsert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_2.encoded = __pyx_v_encoded;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_rinsert(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_pos, __pyx_v_url, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_rinsert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":856
 * 
 * 	@deprecated
 * 	def playlist_rinsert_encoded(self, int pos, url, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_25playlist_rinsert_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_25playlist_rinsert_encoded[] = "\n\t\t@deprecated\n\t\tUse playlist_rinsert(pos, url, ..., encoded=True) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_25playlist_rinsert_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_pos;
  PyObject *__pyx_v_url = 0;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__pos,&__pyx_n_s__url,&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_rinsert_encoded");
  {
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__url);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("playlist_rinsert_encoded", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_rinsert_encoded") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_pos = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_url = values[1];
    __pyx_v_playlist = values[2];
    __pyx_v_cb = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_rinsert_encoded", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_rinsert_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":861
 * 		Use playlist_rinsert(pos, url, ..., encoded=True) instead
 * 		"""
 * 		return self.playlist_rinsert(pos, url, playlist, cb=cb, encoded=True)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_insert_url(self, int pos, url, playlist = None, cb = None, encoded = False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__playlist_rinsert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_url);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_url);
  __Pyx_GIVEREF(__pyx_v_url);
  __Pyx_INCREF(__pyx_v_playlist);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_playlist);
  __Pyx_GIVEREF(__pyx_v_playlist);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__cb), __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__encoded), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_rinsert_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":863
 * 		return self.playlist_rinsert(pos, url, playlist, cb=cb, encoded=True)
 * 
 * 	cpdef XmmsResult playlist_insert_url(self, int pos, url, playlist = None, cb = None, encoded = False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_insert_url(pos, url, playlist=None, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_26playlist_insert_url(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_insert_url(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_pos, PyObject *__pyx_v_url, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_url *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_encoded = __pyx_k_42;
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_insert_url");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_encoded = __pyx_optional_args->encoded;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_insert_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_26playlist_insert_url)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_url);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_url);
      __Pyx_GIVEREF(__pyx_v_url);
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __Pyx_INCREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":875
 * 		cdef xmmsc_result_t *res
 * 
 * 		c = from_unicode(url)             # <<<<<<<<<<<<<<
 * 		p = check_playlist(playlist, True)
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_c = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":876
 * 
 * 		c = from_unicode(url)
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 
 * 		if encoded:
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":878
 * 		p = check_playlist(playlist, True)
 * 
 * 		if encoded:             # <<<<<<<<<<<<<<
 * 			res = xmmsc_playlist_insert_encoded(self.conn, <char *>p, pos, <char *>c)
 * 		else:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_encoded); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":879
 * 
 * 		if encoded:
 * 			res = xmmsc_playlist_insert_encoded(self.conn, <char *>p, pos, <char *>c)             # <<<<<<<<<<<<<<
 * 		else:
 * 			res = xmmsc_playlist_insert_url(self.conn, <char *>p, pos, <char *>c)
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PyBytes_AsString(__pyx_v_c); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_playlist_insert_encoded(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5), __pyx_v_pos, ((char *)__pyx_t_6));
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":881
 * 			res = xmmsc_playlist_insert_encoded(self.conn, <char *>p, pos, <char *>c)
 * 		else:
 * 			res = xmmsc_playlist_insert_url(self.conn, <char *>p, pos, <char *>c)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
    __pyx_t_6 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = PyBytes_AsString(__pyx_v_c); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_playlist_insert_url(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_6), __pyx_v_pos, ((char *)__pyx_t_5));
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":882
 * 		else:
 * 			res = xmmsc_playlist_insert_url(self.conn, <char *>p, pos, <char *>c)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_insert_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":863
 * 		return self.playlist_rinsert(pos, url, playlist, cb=cb, encoded=True)
 * 
 * 	cpdef XmmsResult playlist_insert_url(self, int pos, url, playlist = None, cb = None, encoded = False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_insert_url(pos, url, playlist=None, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_26playlist_insert_url(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_26playlist_insert_url[] = "\n\t\tplaylist_insert_url(pos, url, playlist=None, cb=None, encoded=False) -> XmmsResult\n\n\t\tInsert a path or URL to a playable media item to the playlist.\n\t\tPlayable media items may be files or streams.\n\t\tRequires an int 'pos' and a string 'url' as argument.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_26playlist_insert_url(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_pos;
  PyObject *__pyx_v_url = 0;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_v_encoded = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_url __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__pos,&__pyx_n_s__url,&__pyx_n_s__playlist,&__pyx_n_s__cb,&__pyx_n_s__encoded,0};
  __Pyx_RefNannySetupContext("playlist_insert_url");
  {
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = __pyx_k_42;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__url);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("playlist_insert_url", 0, 2, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoded);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_insert_url") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_pos = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_url = values[1];
    __pyx_v_playlist = values[2];
    __pyx_v_cb = values[3];
    __pyx_v_encoded = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_insert_url", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_insert_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_2.encoded = __pyx_v_encoded;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_insert_url(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_pos, __pyx_v_url, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_insert_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":885
 * 
 * 	@deprecated
 * 	def playlist_insert_encoded(self, int pos, url, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_27playlist_insert_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_27playlist_insert_encoded[] = "\n\t\t@deprecated\n\t\tUse playlist_insert_url(pos, url, ..., encoded=True) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_27playlist_insert_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_pos;
  PyObject *__pyx_v_url = 0;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__pos,&__pyx_n_s__url,&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_insert_encoded");
  {
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__url);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("playlist_insert_encoded", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_insert_encoded") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_pos = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_url = values[1];
    __pyx_v_playlist = values[2];
    __pyx_v_cb = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_insert_encoded", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_insert_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":890
 * 		Use playlist_insert_url(pos, url, ..., encoded=True) instead
 * 		"""
 * 		return self.playlist_insert_url(pos, url, playlist, cb=cb, encoded=True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__playlist_insert_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_url);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_url);
  __Pyx_GIVEREF(__pyx_v_url);
  __Pyx_INCREF(__pyx_v_playlist);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_playlist);
  __Pyx_GIVEREF(__pyx_v_playlist);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__cb), __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__encoded), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_insert_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":893
 * 
 * 
 * 	cpdef XmmsResult playlist_insert_id(self, int pos, int id, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_insert_id(pos, id, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_28playlist_insert_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_insert_id(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_pos, int __pyx_v_id, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_id *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_insert_id");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_insert_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_28playlist_insert_id)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyInt_FromLong(__pyx_v_id); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":902
 * 		@return: The result of the operation.
 * 		"""
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_playlist_insert_id(self.conn, <char *>p, pos, id))
 * 
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":903
 * 		"""
 * 		p = check_playlist(playlist, True)
 * 		return self.create_result(cb, xmmsc_playlist_insert_id(self.conn, <char *>p, pos, id))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_5 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_insert_id(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5), __pyx_v_pos, __pyx_v_id))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_insert_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":893
 * 
 * 
 * 	cpdef XmmsResult playlist_insert_id(self, int pos, int id, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_insert_id(pos, id, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_28playlist_insert_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_28playlist_insert_id[] = "\n\t\tplaylist_insert_id(pos, id, playlist=None, cb=None) -> XmmsResult\n\n\t\tInsert a medialib to the playlist.\n\t\tRequires an int 'pos' and an int 'id' as argument.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_28playlist_insert_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_pos;
  int __pyx_v_id;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_id __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__pos,&__pyx_n_s__id,&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_insert_id");
  {
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__id);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("playlist_insert_id", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_insert_id") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_pos = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_id = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_playlist = values[2];
    __pyx_v_cb = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_insert_id", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_insert_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_insert_id(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_pos, __pyx_v_id, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_insert_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":906
 * 
 * 
 * 	cpdef XmmsResult playlist_insert_collection(self, int pos, Collection coll, order = None, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_insert_collection(pos, coll, order=None, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_29playlist_insert_collection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_insert_collection(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_pos, struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_coll, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_collection *__pyx_optional_args) {
  PyObject *__pyx_v_order = ((PyObject *)Py_None);
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  xmmsv_t *__pyx_v_order_val;
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  xmmsv_t *__pyx_t_5;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_insert_collection");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_order = __pyx_optional_args->order;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_playlist = __pyx_optional_args->playlist;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cb = __pyx_optional_args->cb;
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_order);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_43); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_29playlist_insert_collection)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject *)__pyx_v_coll));
      PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_coll));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_coll));
      __Pyx_INCREF(__pyx_v_order);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_order);
      __Pyx_GIVEREF(__pyx_v_order);
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":918
 * 		cdef xmmsc_result_t *res
 * 
 * 		if order is None:             # <<<<<<<<<<<<<<
 * 			order = []
 * 		p = check_playlist(playlist, True)
 */
  __pyx_t_4 = (__pyx_v_order == Py_None);
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":919
 * 
 * 		if order is None:
 * 			order = []             # <<<<<<<<<<<<<<
 * 		p = check_playlist(playlist, True)
 * 		order_val = create_native_value(order)
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_DECREF(__pyx_v_order);
    __pyx_v_order = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":920
 * 		if order is None:
 * 			order = []
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		order_val = create_native_value(order)
 * 		res = xmmsc_playlist_insert_collection(self.conn, <char *>p, pos, coll.coll, order_val)
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":921
 * 			order = []
 * 		p = check_playlist(playlist, True)
 * 		order_val = create_native_value(order)             # <<<<<<<<<<<<<<
 * 		res = xmmsc_playlist_insert_collection(self.conn, <char *>p, pos, coll.coll, order_val)
 * 		xmmsv_unref(order_val)
 */
  __pyx_t_5 = __pyx_f_9xmmsvalue_create_native_value(__pyx_v_order); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_order_val = __pyx_t_5;

  /* "xmmsapi.pyx":922
 * 		p = check_playlist(playlist, True)
 * 		order_val = create_native_value(order)
 * 		res = xmmsc_playlist_insert_collection(self.conn, <char *>p, pos, coll.coll, order_val)             # <<<<<<<<<<<<<<
 * 		xmmsv_unref(order_val)
 * 		return self.create_result(cb, res)
 */
  __pyx_t_6 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_res = xmmsc_playlist_insert_collection(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_6), __pyx_v_pos, __pyx_v_coll->__pyx_base.coll, __pyx_v_order_val);

  /* "xmmsapi.pyx":923
 * 		order_val = create_native_value(order)
 * 		res = xmmsc_playlist_insert_collection(self.conn, <char *>p, pos, coll.coll, order_val)
 * 		xmmsv_unref(order_val)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
  xmmsv_unref(__pyx_v_order_val);

  /* "xmmsapi.pyx":924
 * 		res = xmmsc_playlist_insert_collection(self.conn, <char *>p, pos, coll.coll, order_val)
 * 		xmmsv_unref(order_val)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_radd(self, url, playlist = None, cb = None, encoded=False):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_insert_collection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_order);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":906
 * 
 * 
 * 	cpdef XmmsResult playlist_insert_collection(self, int pos, Collection coll, order = None, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_insert_collection(pos, coll, order=None, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_29playlist_insert_collection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_29playlist_insert_collection[] = "\n\t\tplaylist_insert_collection(pos, coll, order=None, playlist=None, cb=None) -> XmmsResult\n\n\t\tInsert the content of a collection to the playlist.\n\t\tRequires an int 'pos' and an int 'id' as argument.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_29playlist_insert_collection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_pos;
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_coll = 0;
  PyObject *__pyx_v_order = 0;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_collection __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__pos,&__pyx_n_s__coll,&__pyx_n_s__order,&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_insert_collection");
  {
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coll);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("playlist_insert_collection", 0, 2, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__order);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_insert_collection") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_pos = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_coll = ((struct __pyx_obj_9xmmsvalue_Collection *)values[1]);
    __pyx_v_order = values[2];
    __pyx_v_playlist = values[3];
    __pyx_v_cb = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_insert_collection", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_insert_collection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_coll), __pyx_ptype_9xmmsvalue_Collection, 1, "coll", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.order = __pyx_v_order;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_insert_collection(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_pos, __pyx_v_coll, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_insert_collection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":926
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult playlist_radd(self, url, playlist = None, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_radd(url, playlist=None, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_30playlist_radd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_radd(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_url, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_radd *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_encoded = __pyx_k_44;
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_radd");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_encoded = __pyx_optional_args->encoded;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_radd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_30playlist_radd)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_url);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_url);
      __Pyx_GIVEREF(__pyx_v_url);
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __Pyx_INCREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":937
 * 		cdef xmmsc_result_t *res
 * 
 * 		c = from_unicode(url)             # <<<<<<<<<<<<<<
 * 		p = check_playlist(playlist, True)
 * 		if encoded:
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_c = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":938
 * 
 * 		c = from_unicode(url)
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		if encoded:
 * 			res = xmmsc_playlist_radd_encoded(self.conn, <char *>p, <char *>c)
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":939
 * 		c = from_unicode(url)
 * 		p = check_playlist(playlist, True)
 * 		if encoded:             # <<<<<<<<<<<<<<
 * 			res = xmmsc_playlist_radd_encoded(self.conn, <char *>p, <char *>c)
 * 		else:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_encoded); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":940
 * 		p = check_playlist(playlist, True)
 * 		if encoded:
 * 			res = xmmsc_playlist_radd_encoded(self.conn, <char *>p, <char *>c)             # <<<<<<<<<<<<<<
 * 		else:
 * 			res = xmmsc_playlist_radd(self.conn, <char *>p, <char *>c)
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PyBytes_AsString(__pyx_v_c); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_playlist_radd_encoded(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5), ((char *)__pyx_t_6));
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":942
 * 			res = xmmsc_playlist_radd_encoded(self.conn, <char *>p, <char *>c)
 * 		else:
 * 			res = xmmsc_playlist_radd(self.conn, <char *>p, <char *>c)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
    __pyx_t_6 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = PyBytes_AsString(__pyx_v_c); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_playlist_radd(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_6), ((char *)__pyx_t_5));
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":943
 * 		else:
 * 			res = xmmsc_playlist_radd(self.conn, <char *>p, <char *>c)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_radd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":926
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult playlist_radd(self, url, playlist = None, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_radd(url, playlist=None, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_30playlist_radd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_30playlist_radd[] = "\n\t\tplaylist_radd(url, playlist=None, cb=None, encoded=False) -> XmmsResult\n\n\t\tAdd a directory to the playlist.\n\t\tRequires a string 'url' as argument.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_30playlist_radd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_url = 0;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_v_encoded = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_radd __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__url,&__pyx_n_s__playlist,&__pyx_n_s__cb,&__pyx_n_s__encoded,0};
  __Pyx_RefNannySetupContext("playlist_radd");
  {
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_44;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__url);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoded);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_radd") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_url = values[0];
    __pyx_v_playlist = values[1];
    __pyx_v_cb = values[2];
    __pyx_v_encoded = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_radd", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_radd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_2.encoded = __pyx_v_encoded;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_radd(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_url, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_radd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":946
 * 
 * 	@deprecated
 * 	def playlist_radd_encoded(self, url, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_31playlist_radd_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_31playlist_radd_encoded[] = "\n\t\t@deprecated\n\t\tUse playlist_radd(url, ..., encoded=True) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_31playlist_radd_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_url = 0;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__url,&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_radd_encoded");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__url);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_radd_encoded") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_url = values[0];
    __pyx_v_playlist = values[1];
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_radd_encoded", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_radd_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":951
 * 		Use playlist_radd(url, ..., encoded=True) instead
 * 		"""
 * 		return self.playlist_radd(url, playlist, cb = cb, encoded=True)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_add_url(self, url, playlist = None, cb = None, encoded=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__playlist_radd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_url);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_url);
  __Pyx_GIVEREF(__pyx_v_url);
  __Pyx_INCREF(__pyx_v_playlist);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_playlist);
  __Pyx_GIVEREF(__pyx_v_playlist);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__cb), __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__encoded), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_radd_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":953
 * 		return self.playlist_radd(url, playlist, cb = cb, encoded=True)
 * 
 * 	cpdef XmmsResult playlist_add_url(self, url, playlist = None, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_add_url(url, playlist=None, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_32playlist_add_url(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_add_url(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_url, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_url *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_encoded = __pyx_k_45;
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_add_url");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_encoded = __pyx_optional_args->encoded;
        }
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_add_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_32playlist_add_url)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_url);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_url);
      __Pyx_GIVEREF(__pyx_v_url);
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __Pyx_INCREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":965
 * 		cdef xmmsc_result_t *res
 * 
 * 		c = from_unicode(url)             # <<<<<<<<<<<<<<
 * 		p = check_playlist(playlist, True)
 * 		if encoded:
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_c = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":966
 * 
 * 		c = from_unicode(url)
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		if encoded:
 * 			res = xmmsc_playlist_add_encoded(self.conn, <char *>p, <char *>c)
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":967
 * 		c = from_unicode(url)
 * 		p = check_playlist(playlist, True)
 * 		if encoded:             # <<<<<<<<<<<<<<
 * 			res = xmmsc_playlist_add_encoded(self.conn, <char *>p, <char *>c)
 * 		else:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_encoded); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":968
 * 		p = check_playlist(playlist, True)
 * 		if encoded:
 * 			res = xmmsc_playlist_add_encoded(self.conn, <char *>p, <char *>c)             # <<<<<<<<<<<<<<
 * 		else:
 * 			res = xmmsc_playlist_add_url(self.conn, <char *>p, <char *>c)
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PyBytes_AsString(__pyx_v_c); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_playlist_add_encoded(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5), ((char *)__pyx_t_6));
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":970
 * 			res = xmmsc_playlist_add_encoded(self.conn, <char *>p, <char *>c)
 * 		else:
 * 			res = xmmsc_playlist_add_url(self.conn, <char *>p, <char *>c)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
    __pyx_t_6 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = PyBytes_AsString(__pyx_v_c); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_playlist_add_url(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_6), ((char *)__pyx_t_5));
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":971
 * 		else:
 * 			res = xmmsc_playlist_add_url(self.conn, <char *>p, <char *>c)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_add_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":953
 * 		return self.playlist_radd(url, playlist, cb = cb, encoded=True)
 * 
 * 	cpdef XmmsResult playlist_add_url(self, url, playlist = None, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_add_url(url, playlist=None, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_32playlist_add_url(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_32playlist_add_url[] = "\n\t\tplaylist_add_url(url, playlist=None, cb=None, encoded=False) -> XmmsResult\n\n\t\tAdd a path or URL to a playable media item to the playlist.\n\t\tPlayable media items may be files or streams.\n\t\tRequires a string 'url' as argument.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_32playlist_add_url(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_url = 0;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_v_encoded = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_url __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__url,&__pyx_n_s__playlist,&__pyx_n_s__cb,&__pyx_n_s__encoded,0};
  __Pyx_RefNannySetupContext("playlist_add_url");
  {
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_45;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__url);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoded);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_add_url") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_url = values[0];
    __pyx_v_playlist = values[1];
    __pyx_v_cb = values[2];
    __pyx_v_encoded = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_add_url", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_add_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_2.encoded = __pyx_v_encoded;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_add_url(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_url, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_add_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":974
 * 
 * 	@deprecated
 * 	def playlist_add_encoded(self, url, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_33playlist_add_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_33playlist_add_encoded[] = "\n\t\t@deprecated\n\t\tUse playlist_add_url(url, ..., encoded=True) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_33playlist_add_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_url = 0;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__url,&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_add_encoded");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__url);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_add_encoded") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_url = values[0];
    __pyx_v_playlist = values[1];
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_add_encoded", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_add_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":979
 * 		Use playlist_add_url(url, ..., encoded=True) instead
 * 		"""
 * 		return self.playlist_add_url(url, playlist, cb=cb, encoded=True)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_add_id(self, int id, playlist = None, cb = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__playlist_add_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_url);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_url);
  __Pyx_GIVEREF(__pyx_v_url);
  __Pyx_INCREF(__pyx_v_playlist);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_playlist);
  __Pyx_GIVEREF(__pyx_v_playlist);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__cb), __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__encoded), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_add_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":981
 * 		return self.playlist_add_url(url, playlist, cb=cb, encoded=True)
 * 
 * 	cpdef XmmsResult playlist_add_id(self, int id, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_add_id(id, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_34playlist_add_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_add_id(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_id, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_id *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_add_id");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_add_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_34playlist_add_id)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":989
 * 		@return: The result of the operation.
 * 		"""
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_playlist_add_id(self.conn, <char *>p, id))
 * 
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":990
 * 		"""
 * 		p = check_playlist(playlist, True)
 * 		return self.create_result(cb, xmmsc_playlist_add_id(self.conn, <char *>p, id))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_add_collection(self, Collection coll, order = None, playlist = None, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_add_id(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4), __pyx_v_id))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_add_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":981
 * 		return self.playlist_add_url(url, playlist, cb=cb, encoded=True)
 * 
 * 	cpdef XmmsResult playlist_add_id(self, int id, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_add_id(id, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_34playlist_add_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_34playlist_add_id[] = "\n\t\tplaylist_add_id(id, playlist=None, cb=None) -> XmmsResult\n\n\t\tAdd a medialib id to the playlist.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_34playlist_add_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_id;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_id __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__id,&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_add_id");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__id);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_add_id") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_playlist = values[1];
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_add_id", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_add_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_add_id(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_id, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_add_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":992
 * 		return self.create_result(cb, xmmsc_playlist_add_id(self.conn, <char *>p, id))
 * 
 * 	cpdef XmmsResult playlist_add_collection(self, Collection coll, order = None, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_add_collection(coll, order, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_35playlist_add_collection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_add_collection(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_coll, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_collection *__pyx_optional_args) {
  PyObject *__pyx_v_order = ((PyObject *)Py_None);
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  xmmsv_t *__pyx_v_order_val;
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  xmmsv_t *__pyx_t_5;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_add_collection");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_order = __pyx_optional_args->order;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_playlist = __pyx_optional_args->playlist;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cb = __pyx_optional_args->cb;
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_order);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_46); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_35playlist_add_collection)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(((PyObject *)__pyx_v_coll));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_coll));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_coll));
      __Pyx_INCREF(__pyx_v_order);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_order);
      __Pyx_GIVEREF(__pyx_v_order);
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1003
 * 		cdef xmmsc_result_t *res
 * 
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		if order is None:
 * 			order = []
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1004
 * 
 * 		p = check_playlist(playlist, True)
 * 		if order is None:             # <<<<<<<<<<<<<<
 * 			order = []
 * 		order_val = create_native_value(order)
 */
  __pyx_t_4 = (__pyx_v_order == Py_None);
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":1005
 * 		p = check_playlist(playlist, True)
 * 		if order is None:
 * 			order = []             # <<<<<<<<<<<<<<
 * 		order_val = create_native_value(order)
 * 		res = xmmsc_playlist_add_collection(self.conn, <char *>p, coll.coll, order_val)
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_DECREF(__pyx_v_order);
    __pyx_v_order = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":1006
 * 		if order is None:
 * 			order = []
 * 		order_val = create_native_value(order)             # <<<<<<<<<<<<<<
 * 		res = xmmsc_playlist_add_collection(self.conn, <char *>p, coll.coll, order_val)
 * 		xmmsv_unref(order_val)
 */
  __pyx_t_5 = __pyx_f_9xmmsvalue_create_native_value(__pyx_v_order); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_order_val = __pyx_t_5;

  /* "xmmsapi.pyx":1007
 * 			order = []
 * 		order_val = create_native_value(order)
 * 		res = xmmsc_playlist_add_collection(self.conn, <char *>p, coll.coll, order_val)             # <<<<<<<<<<<<<<
 * 		xmmsv_unref(order_val)
 * 		return self.create_result(cb, res)
 */
  __pyx_t_6 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_res = xmmsc_playlist_add_collection(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_6), __pyx_v_coll->__pyx_base.coll, __pyx_v_order_val);

  /* "xmmsapi.pyx":1008
 * 		order_val = create_native_value(order)
 * 		res = xmmsc_playlist_add_collection(self.conn, <char *>p, coll.coll, order_val)
 * 		xmmsv_unref(order_val)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
  xmmsv_unref(__pyx_v_order_val);

  /* "xmmsapi.pyx":1009
 * 		res = xmmsc_playlist_add_collection(self.conn, <char *>p, coll.coll, order_val)
 * 		xmmsv_unref(order_val)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_remove_entry(self, int id, playlist = None, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_add_collection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_order);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":992
 * 		return self.create_result(cb, xmmsc_playlist_add_id(self.conn, <char *>p, id))
 * 
 * 	cpdef XmmsResult playlist_add_collection(self, Collection coll, order = None, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_add_collection(coll, order, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_35playlist_add_collection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_35playlist_add_collection[] = "\n\t\tplaylist_add_collection(coll, order, playlist=None, cb=None) -> XmmsResult\n\n\t\tAdd the content of a collection to the playlist.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_35playlist_add_collection(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_coll = 0;
  PyObject *__pyx_v_order = 0;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_collection __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__coll,&__pyx_n_s__order,&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_add_collection");
  {
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coll);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__order);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_add_collection") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_coll = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_order = values[1];
    __pyx_v_playlist = values[2];
    __pyx_v_cb = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_add_collection", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_add_collection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_coll), __pyx_ptype_9xmmsvalue_Collection, 1, "coll", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 3;
  __pyx_t_2.order = __pyx_v_order;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_add_collection(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_coll, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_add_collection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1011
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult playlist_remove_entry(self, int id, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_remove_entry(id, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_36playlist_remove_entry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_remove_entry(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_id, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_remove_entry *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_remove_entry");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_47); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_36playlist_remove_entry)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1020
 * 		@return: The result of the operation.
 * 		"""
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_playlist_remove_entry(self.conn, <char *>p, id))
 * 
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1021
 * 		"""
 * 		p = check_playlist(playlist, True)
 * 		return self.create_result(cb, xmmsc_playlist_remove_entry(self.conn, <char *>p, id))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_clear(self, playlist = None, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_remove_entry(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4), __pyx_v_id))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_remove_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1011
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult playlist_remove_entry(self, int id, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_remove_entry(id, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_36playlist_remove_entry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_36playlist_remove_entry[] = "\n\t\tplaylist_remove_entry(id, playlist=None, cb=None) -> XmmsResult\n\n\t\tRemove a certain media item from the playlist.\n\t\tRequires a number 'id' as argument.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_36playlist_remove_entry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_id;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_remove_entry __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__id,&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_remove_entry");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__id);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_remove_entry") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_playlist = values[1];
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_remove_entry", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_remove_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_remove_entry(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_id, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_remove_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1023
 * 		return self.create_result(cb, xmmsc_playlist_remove_entry(self.conn, <char *>p, id))
 * 
 * 	cpdef XmmsResult playlist_clear(self, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_clear(playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_37playlist_clear(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_clear(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_clear *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_clear");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_clear); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_37playlist_clear)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1031
 * 		@return: The result of the operation.
 * 		"""
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_playlist_clear(self.conn, <char *>p))
 * 
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1032
 * 		"""
 * 		p = check_playlist(playlist, True)
 * 		return self.create_result(cb, xmmsc_playlist_clear(self.conn, <char *>p))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_list_entries(self, playlist = None, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_clear(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1023
 * 		return self.create_result(cb, xmmsc_playlist_remove_entry(self.conn, <char *>p, id))
 * 
 * 	cpdef XmmsResult playlist_clear(self, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_clear(playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_37playlist_clear(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_37playlist_clear[] = "\n\t\tplaylist_clear(playlist=None, cb=None) -> XmmsResult\n\n\t\tClear the playlist.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_37playlist_clear(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_clear __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_clear");
  {
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_clear") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_playlist = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_clear", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_clear(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1034
 * 		return self.create_result(cb, xmmsc_playlist_clear(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_list_entries(self, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_list_entries(playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_38playlist_list_entries(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_list_entries(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_list_entries *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_list_entries");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_48); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_38playlist_list_entries)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1044
 * 		@return: The current playlist.
 * 		"""
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_playlist_list_entries(self.conn, <char *>p))
 * 
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1045
 * 		"""
 * 		p = check_playlist(playlist, True)
 * 		return self.create_result(cb, xmmsc_playlist_list_entries(self.conn, <char *>p))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_sort(self, props, playlist = None, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_list_entries(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_list_entries", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1034
 * 		return self.create_result(cb, xmmsc_playlist_clear(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_list_entries(self, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_list_entries(playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_38playlist_list_entries(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_38playlist_list_entries[] = "\n\t\tplaylist_list_entries(playlist=None, cb=None) -> XmmsResult\n\n\t\tGet the current playlist. This function returns a list of IDs\n\t\tof the files/streams currently in the playlist. Use\n\t\tL{medialib_get_info} to retrieve more specific information.\n\t\t@rtype: L{XmmsResult}(UIntList)\n\t\t@return: The current playlist.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_38playlist_list_entries(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_list_entries __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_list_entries");
  {
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_list_entries") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_playlist = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_list_entries", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_list_entries", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_list_entries(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_list_entries", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1047
 * 		return self.create_result(cb, xmmsc_playlist_list_entries(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_sort(self, props, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_sort(props, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_39playlist_sort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_sort(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_props, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_sort *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  xmmsv_t *__pyx_v_props_val;
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  xmmsv_t *__pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_sort");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_sort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_39playlist_sort)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_props);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_props);
      __Pyx_GIVEREF(__pyx_v_props);
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1058
 * 		cdef xmmsc_result_t *res
 * 
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		props_val = create_native_value(props)
 * 		res = xmmsc_playlist_sort(self.conn, <char *>p, props_val)
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1059
 * 
 * 		p = check_playlist(playlist, True)
 * 		props_val = create_native_value(props)             # <<<<<<<<<<<<<<
 * 		res = xmmsc_playlist_sort(self.conn, <char *>p, props_val)
 * 		xmmsv_unref(props_val)
 */
  __pyx_t_4 = __pyx_f_9xmmsvalue_create_native_value(__pyx_v_props); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_props_val = __pyx_t_4;

  /* "xmmsapi.pyx":1060
 * 		p = check_playlist(playlist, True)
 * 		props_val = create_native_value(props)
 * 		res = xmmsc_playlist_sort(self.conn, <char *>p, props_val)             # <<<<<<<<<<<<<<
 * 		xmmsv_unref(props_val)
 * 		return self.create_result(cb, res)
 */
  __pyx_t_5 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_res = xmmsc_playlist_sort(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5), __pyx_v_props_val);

  /* "xmmsapi.pyx":1061
 * 		props_val = create_native_value(props)
 * 		res = xmmsc_playlist_sort(self.conn, <char *>p, props_val)
 * 		xmmsv_unref(props_val)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
  xmmsv_unref(__pyx_v_props_val);

  /* "xmmsapi.pyx":1062
 * 		res = xmmsc_playlist_sort(self.conn, <char *>p, props_val)
 * 		xmmsv_unref(props_val)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_set_next_rel(self, int position, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1047
 * 		return self.create_result(cb, xmmsc_playlist_list_entries(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_sort(self, props, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_sort(props, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_39playlist_sort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_39playlist_sort[] = "\n\t\tplaylist_sort(props, playlist=None, cb=None) -> XmmsResult\n\n\t\tSorts the playlist according to the properties specified.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_39playlist_sort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_props = 0;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_sort __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__props,&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_sort");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__props);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_sort") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_props = values[0];
    __pyx_v_playlist = values[1];
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_sort", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_sort(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_props, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_sort", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1064
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult playlist_set_next_rel(self, int position, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_set_next_rel(position, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_40playlist_set_next_rel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_set_next_rel(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_position, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_set_next_rel *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_set_next_rel");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_49); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_40playlist_set_next_rel)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_position); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1073
 * 		@rtype: L{XmmsResult}
 * 		"""
 * 		return self.create_result(cb, xmmsc_playlist_set_next_rel(self.conn, position))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_set_next(self, int position, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_set_next_rel(__pyx_v_self->__pyx_base.conn, __pyx_v_position))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_set_next_rel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1064
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult playlist_set_next_rel(self, int position, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_set_next_rel(position, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_40playlist_set_next_rel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_40playlist_set_next_rel[] = "\n\t\tplaylist_set_next_rel(position, cb=None) -> XmmsResult\n\n\t\tSets the position in the playlist. Same as L{playlist_set_next}\n\t\tbut sets the next position relative to the current position.\n\t\tYou can do set_next_rel(-1) to move backwards for example.\n\t\t@rtype: L{XmmsResult}\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_40playlist_set_next_rel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_position;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_set_next_rel __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__position,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_set_next_rel");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__position);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_set_next_rel") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_position = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_position == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_set_next_rel", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_set_next_rel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_set_next_rel(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_position, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_set_next_rel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1075
 * 		return self.create_result(cb, xmmsc_playlist_set_next_rel(self.conn, position))
 * 
 * 	cpdef XmmsResult playlist_set_next(self, int position, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_set_next(position, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_41playlist_set_next(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_set_next(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_position, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_set_next *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_set_next");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_set_next); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_41playlist_set_next)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_position); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1083
 * 		@rtype: L{XmmsResult}
 * 		"""
 * 		return self.create_result(cb, xmmsc_playlist_set_next(self.conn, position))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_move(self, int cur_pos, int new_pos, playlist = None, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_set_next(__pyx_v_self->__pyx_base.conn, __pyx_v_position))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_set_next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1075
 * 		return self.create_result(cb, xmmsc_playlist_set_next_rel(self.conn, position))
 * 
 * 	cpdef XmmsResult playlist_set_next(self, int position, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_set_next(position, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_41playlist_set_next(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_41playlist_set_next[] = "\n\t\tplaylist_set_next(position, cb=None) -> XmmsResult\n\n\t\tSets the position to move to, next, in the playlist. Calling\n\t\tL{playback_tickle} will perform the jump to that position.\n\t\t@rtype: L{XmmsResult}\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_41playlist_set_next(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_position;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_set_next __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__position,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_set_next");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__position);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_set_next") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_position = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_position == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_set_next", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_set_next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_set_next(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_position, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_set_next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1085
 * 		return self.create_result(cb, xmmsc_playlist_set_next(self.conn, position))
 * 
 * 	cpdef XmmsResult playlist_move(self, int cur_pos, int new_pos, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_move(cur_pos, new_pos, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_42playlist_move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_move(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_cur_pos, int __pyx_v_new_pos, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_move *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_move");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_move); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_42playlist_move)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_cur_pos); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyInt_FromLong(__pyx_v_new_pos); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1093
 * 		@return: The result of the operation.
 * 		"""
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_playlist_move_entry(self.conn, <char *>p, cur_pos, new_pos))
 * 
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1094
 * 		"""
 * 		p = check_playlist(playlist, True)
 * 		return self.create_result(cb, xmmsc_playlist_move_entry(self.conn, <char *>p, cur_pos, new_pos))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_create(self, playlist, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_5 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_move_entry(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5), __pyx_v_cur_pos, __pyx_v_new_pos))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_move", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1085
 * 		return self.create_result(cb, xmmsc_playlist_set_next(self.conn, position))
 * 
 * 	cpdef XmmsResult playlist_move(self, int cur_pos, int new_pos, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_move(cur_pos, new_pos, playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_42playlist_move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_42playlist_move[] = "\n\t\tplaylist_move(cur_pos, new_pos, playlist=None, cb=None) -> XmmsResult\n\n\t\tMoves a playlist entry to a new position.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_42playlist_move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_cur_pos;
  int __pyx_v_new_pos;
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_move __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cur_pos,&__pyx_n_s__new_pos,&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_move");
  {
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cur_pos);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__new_pos);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("playlist_move", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_move") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cur_pos = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_cur_pos == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_new_pos = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_new_pos == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_playlist = values[2];
    __pyx_v_cb = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_move", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_move", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_move(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_cur_pos, __pyx_v_new_pos, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_move", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1096
 * 		return self.create_result(cb, xmmsc_playlist_move_entry(self.conn, <char *>p, cur_pos, new_pos))
 * 
 * 	cpdef XmmsResult playlist_create(self, playlist, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_create(playlist, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_43playlist_create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_create(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_playlist, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_create *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_create");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__playlist_create); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_43playlist_create)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1104
 * 		@return: The result of the operation.
 * 		"""
 * 		p = check_playlist(playlist, False)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_playlist_create(self.conn, <char *>p))
 * 
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1105
 * 		"""
 * 		p = check_playlist(playlist, False)
 * 		return self.create_result(cb, xmmsc_playlist_create(self.conn, <char *>p))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_current_pos(self, playlist = None, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_create(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1096
 * 		return self.create_result(cb, xmmsc_playlist_move_entry(self.conn, <char *>p, cur_pos, new_pos))
 * 
 * 	cpdef XmmsResult playlist_create(self, playlist, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_create(playlist, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_43playlist_create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_43playlist_create[] = "\n\t\tplaylist_create(playlist, cb=None) -> XmmsResult\n\n\t\tCreate a new playlist.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_43playlist_create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_create __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_create");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_create") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_playlist = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_create", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_create(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_playlist, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1107
 * 		return self.create_result(cb, xmmsc_playlist_create(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_current_pos(self, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_current_pos(playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_44playlist_current_pos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_current_pos(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_current_pos *__pyx_optional_args) {
  PyObject *__pyx_v_playlist = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_current_pos");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_playlist = __pyx_optional_args->playlist;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_50); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_44playlist_current_pos)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_playlist);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_playlist);
      __Pyx_GIVEREF(__pyx_v_playlist);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1116
 * 		@rtype: L{XmmsResult}
 * 		"""
 * 		p = check_playlist(playlist, True)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_playlist_current_pos(self.conn, <char *>p))
 * 
 */
  __pyx_t_1 = __pyx_f_7xmmsapi_check_playlist(__pyx_v_playlist, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1117
 * 		"""
 * 		p = check_playlist(playlist, True)
 * 		return self.create_result(cb, xmmsc_playlist_current_pos(self.conn, <char *>p))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult playlist_current_active(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_current_pos(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_current_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1107
 * 		return self.create_result(cb, xmmsc_playlist_create(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_current_pos(self, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_current_pos(playlist=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_44playlist_current_pos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_44playlist_current_pos[] = "\n\t\tplaylist_current_pos(playlist=None, cb=None) -> XmmsResult\n\n\t\tReturns the current position in the playlist. This value will\n\t\talways be equal to, or larger than 0. The first entry in the\n\t\tlist is 0.\n\t\t@rtype: L{XmmsResult}\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_44playlist_current_pos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_playlist = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_current_pos __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__playlist,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_current_pos");
  {
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__playlist);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_current_pos") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_playlist = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_current_pos", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_current_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.playlist = __pyx_v_playlist;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_current_pos(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_current_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1119
 * 		return self.create_result(cb, xmmsc_playlist_current_pos(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_current_active(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_current_active(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_45playlist_current_active(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_playlist_current_active(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_current_active *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("playlist_current_active");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_51); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_45playlist_current_active)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1126
 * 		@rtype: L{XmmsResult}
 * 		"""
 * 		return self.create_result(cb, xmmsc_playlist_current_active(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult broadcast_playlist_current_pos(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_playlist_current_active(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_current_active", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1119
 * 		return self.create_result(cb, xmmsc_playlist_current_pos(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_current_active(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_current_active(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_45playlist_current_active(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_45playlist_current_active[] = "\n\t\tplaylist_current_active(cb=None) -> XmmsResult\n\n\t\tReturns the name of the current active playlist\n\t\t@rtype: L{XmmsResult}\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_45playlist_current_active(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_current_active __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("playlist_current_active");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "playlist_current_active") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("playlist_current_active", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_current_active", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->playlist_current_active(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.playlist_current_active", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1128
 * 		return self.create_result(cb, xmmsc_playlist_current_active(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_playlist_current_pos(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_playlist_current_pos(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_46broadcast_playlist_current_pos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_broadcast_playlist_current_pos(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_current_pos *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("broadcast_playlist_current_pos");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_52); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_46broadcast_playlist_current_pos)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1138
 * 		@rtype: L{XmmsResult}
 * 		"""
 * 		return self.create_result(cb, xmmsc_broadcast_playlist_current_pos(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult broadcast_playlist_changed(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_broadcast_playlist_current_pos(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playlist_current_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1128
 * 		return self.create_result(cb, xmmsc_playlist_current_active(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_playlist_current_pos(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_playlist_current_pos(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_46broadcast_playlist_current_pos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_46broadcast_playlist_current_pos[] = "\n\t\tbroadcast_playlist_current_pos(cb=None) -> XmmsResult\n\n\t\tSet a method to handle the playlist current position updates\n\t\tfrom the XMMS2 daemon. This is triggered whenever the daemon\n\t\tjumps from one playlist position to another. (not when moving\n\t\ta playlist item from one position to another)\n\t\t@rtype: L{XmmsResult}\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_46broadcast_playlist_current_pos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_current_pos __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("broadcast_playlist_current_pos");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "broadcast_playlist_current_pos") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("broadcast_playlist_current_pos", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playlist_current_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->broadcast_playlist_current_pos(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playlist_current_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1140
 * 		return self.create_result(cb, xmmsc_broadcast_playlist_current_pos(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_playlist_changed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_playlist_changed(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_47broadcast_playlist_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_broadcast_playlist_changed(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_changed *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("broadcast_playlist_changed");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_53); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_47broadcast_playlist_changed)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1149
 * 		@rtype: L{XmmsResult}
 * 		"""
 * 		return self.create_result(cb, xmmsc_broadcast_playlist_changed(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult broadcast_config_value_changed(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_broadcast_playlist_changed(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playlist_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1140
 * 		return self.create_result(cb, xmmsc_broadcast_playlist_current_pos(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_playlist_changed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_playlist_changed(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_47broadcast_playlist_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_47broadcast_playlist_changed[] = "\n\t\tbroadcast_playlist_changed(cb=None) -> XmmsResult\n\n\t\tSet a method to handle the playlist changed broadcast from the\n\t\tXMMS2 daemon. Updated data is sent whenever the daemon's\n\t\tplaylist changes.\n\t\t@rtype: L{XmmsResult}\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_47broadcast_playlist_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_changed __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("broadcast_playlist_changed");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "broadcast_playlist_changed") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("broadcast_playlist_changed", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playlist_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->broadcast_playlist_changed(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_playlist_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1151
 * 		return self.create_result(cb, xmmsc_broadcast_playlist_changed(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_config_value_changed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_config_value_changed(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_48broadcast_config_value_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_broadcast_config_value_changed(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_config_value_changed *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("broadcast_config_value_changed");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_54); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_48broadcast_config_value_changed)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1161
 * 		@rtype: L{XmmsResult} (the modified config key and its value)
 * 		"""
 * 		return self.create_result(cb, xmmsc_broadcast_config_value_changed(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_broadcast_config_value_changed(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_config_value_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1151
 * 		return self.create_result(cb, xmmsc_broadcast_playlist_changed(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_config_value_changed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_config_value_changed(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_48broadcast_config_value_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_48broadcast_config_value_changed[] = "\n\t\tbroadcast_config_value_changed(cb=None) -> XmmsResult\n\n\t\tSet a method to handle the config value changed broadcast\n\t\tfrom the XMMS2 daemon.(i.e. some configuration value has\n\t\tbeen modified) Updated data is sent whenever a config\n\t\tvalue is modified.\n\t\t@rtype: L{XmmsResult} (the modified config key and its value)\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_48broadcast_config_value_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_config_value_changed __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("broadcast_config_value_changed");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "broadcast_config_value_changed") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("broadcast_config_value_changed", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_config_value_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->broadcast_config_value_changed(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_config_value_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1164
 * 
 * 	@deprecated
 * 	def broadcast_configval_changed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_49broadcast_configval_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_49broadcast_configval_changed[] = "\n\t\t@deprecated\n\t\tUse broadcast_config_value_changed(...) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_49broadcast_configval_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_config_value_changed __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("broadcast_configval_changed");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "broadcast_configval_changed") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("broadcast_configval_changed", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_configval_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":1169
 * 		Use broadcast_config_value_changed(...) instead
 * 		"""
 * 		return self.broadcast_config_value_changed(cb)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult config_set_value(self, key, val, cb = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->broadcast_config_value_changed(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_configval_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1171
 * 		return self.broadcast_config_value_changed(cb)
 * 
 * 	cpdef XmmsResult config_set_value(self, key, val, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		config_set_value(key, val, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_50config_set_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_config_set_value(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_val, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_set_value *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("config_set_value");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__config_set_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_50config_set_value)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1179
 * 		@return: The result of the operation.
 * 		"""
 * 		k = from_unicode(key)             # <<<<<<<<<<<<<<
 * 		v = from_unicode(val)
 * 		return self.create_result(cb, xmmsc_config_set_value(self.conn, <char *>k, <char *>v))
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_k = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1180
 * 		"""
 * 		k = from_unicode(key)
 * 		v = from_unicode(val)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_config_set_value(self.conn, <char *>k, <char *>v))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1181
 * 		k = from_unicode(key)
 * 		v = from_unicode(val)
 * 		return self.create_result(cb, xmmsc_config_set_value(self.conn, <char *>k, <char *>v))             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_k); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyBytes_AsString(__pyx_v_v); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_config_set_value(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4), ((char *)__pyx_t_5)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.config_set_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1171
 * 		return self.broadcast_config_value_changed(cb)
 * 
 * 	cpdef XmmsResult config_set_value(self, key, val, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		config_set_value(key, val, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_50config_set_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_50config_set_value[] = "\n\t\tconfig_set_value(key, val, cb=None) -> XmmsResult\n\n\t\tSet a configuration value on the daemon, given a key.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_50config_set_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_set_value __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("config_set_value");
  {
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("config_set_value", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "config_set_value") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_key = values[0];
    __pyx_v_val = values[1];
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("config_set_value", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.config_set_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->config_set_value(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_key, __pyx_v_val, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.config_set_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1184
 * 
 * 	@deprecated
 * 	def configval_set(self, key, val, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_51configval_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_51configval_set[] = "\n\t\t@deprecated\n\t\tUse config_set_value(key, val, ...) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_51configval_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_set_value __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("configval_set");
  {
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("configval_set", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "configval_set") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_key = values[0];
    __pyx_v_val = values[1];
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("configval_set", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.configval_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":1189
 * 		Use config_set_value(key, val, ...) instead
 * 		"""
 * 		return self.config_set_value(key, val, cb)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult config_get_value(self, key, cb = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->config_set_value(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_key, __pyx_v_val, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.configval_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1191
 * 		return self.config_set_value(key, val, cb)
 * 
 * 	cpdef XmmsResult config_get_value(self, key, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		config_get_value(key, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_52config_get_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_config_get_value(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_get_value *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_k = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("config_get_value");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__config_get_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_52config_get_value)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1199
 * 		@return: The result of the operation.
 * 		"""
 * 		k = from_unicode(key)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_config_get_value(self.conn, <char *>k))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_k = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1200
 * 		"""
 * 		k = from_unicode(key)
 * 		return self.create_result(cb, xmmsc_config_get_value(self.conn, <char *>k))             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_k); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_config_get_value(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.config_get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1191
 * 		return self.config_set_value(key, val, cb)
 * 
 * 	cpdef XmmsResult config_get_value(self, key, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		config_get_value(key, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_52config_get_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_52config_get_value[] = "\n\t\tconfig_get_value(key, cb=None) -> XmmsResult\n\n\t\tGet the configuration value of a given key, from the daemon.\n\t\t@rtype: L{XmmsResult}(String)\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_52config_get_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_get_value __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("config_get_value");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "config_get_value") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_key = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("config_get_value", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.config_get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->config_get_value(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_key, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.config_get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1203
 * 
 * 	@deprecated
 * 	def configval_get(self, key, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_53configval_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_53configval_get[] = "\n\t\t@deprecated\n\t\tUse config_get_value(key, ...) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_53configval_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_get_value __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("configval_get");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "configval_get") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_key = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("configval_get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.configval_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":1208
 * 		Use config_get_value(key, ...) instead
 * 		"""
 * 		return self.config_get_value(key, cb)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult config_list_values(self, cb = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->config_get_value(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_key, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.configval_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1210
 * 		return self.config_get_value(key, cb)
 * 
 * 	cpdef XmmsResult config_list_values(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		config_list_values(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_54config_list_values(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_config_list_values(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_list_values *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("config_list_values");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__config_list_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_54config_list_values)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1220
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_config_list_values(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_config_list_values(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.config_list_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1210
 * 		return self.config_get_value(key, cb)
 * 
 * 	cpdef XmmsResult config_list_values(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		config_list_values(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_54config_list_values(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_54config_list_values[] = "\n\t\tconfig_list_values(cb=None) -> XmmsResult\n\n\t\tGet list of configuration keys on the daemon. Use\n\t\tL{config_get_value} to retrieve the values corresponding to the\n\t\tconfiguration keys.\n\t\t@rtype: L{XmmsResult}(StringList)\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_54config_list_values(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_list_values __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("config_list_values");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "config_list_values") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("config_list_values", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.config_list_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->config_list_values(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.config_list_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1223
 * 
 * 	@deprecated
 * 	def configval_list(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_55configval_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_55configval_list[] = "\n\t\t@deprecated\n\t\tUse config_list_values(...) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_55configval_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_list_values __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("configval_list");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "configval_list") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("configval_list", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.configval_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":1228
 * 		Use config_list_values(...) instead
 * 		"""
 * 		return self.config_list_values(cb)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult config_register_value(self, valuename, defaultvalue, cb = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->config_list_values(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.configval_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1230
 * 		return self.config_list_values(cb)
 * 
 * 	cpdef XmmsResult config_register_value(self, valuename, defaultvalue, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		config_register_value(valuename, defaultvalue, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_56config_register_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_config_register_value(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_valuename, PyObject *__pyx_v_defaultvalue, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_register_value *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_v_dv = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("config_register_value");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_55); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_56config_register_value)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_valuename);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_valuename);
      __Pyx_GIVEREF(__pyx_v_valuename);
      __Pyx_INCREF(__pyx_v_defaultvalue);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_defaultvalue);
      __Pyx_GIVEREF(__pyx_v_defaultvalue);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1240
 * 		@return: The result of the operation.
 * 		"""
 * 		v = from_unicode(valuename)             # <<<<<<<<<<<<<<
 * 		dv = from_unicode(defaultvalue)
 * 		return self.create_result(cb, xmmsc_config_register_value(self.conn, <char *>v, <char *>dv))
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_valuename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1241
 * 		"""
 * 		v = from_unicode(valuename)
 * 		dv = from_unicode(defaultvalue)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_config_register_value(self.conn, <char *>v, <char *>dv))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_defaultvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_dv = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1242
 * 		v = from_unicode(valuename)
 * 		dv = from_unicode(defaultvalue)
 * 		return self.create_result(cb, xmmsc_config_register_value(self.conn, <char *>v, <char *>dv))             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_v); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyBytes_AsString(__pyx_v_dv); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_config_register_value(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4), ((char *)__pyx_t_5)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.config_register_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_dv);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1230
 * 		return self.config_list_values(cb)
 * 
 * 	cpdef XmmsResult config_register_value(self, valuename, defaultvalue, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		config_register_value(valuename, defaultvalue, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_56config_register_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_56config_register_value[] = "\n\t\tconfig_register_value(valuename, defaultvalue, cb=None) -> XmmsResult\n\n\t\tRegister a new configvalue.\n\t\tThis should be called in the initcode as XMMS2 won't allow\n\t\tset/get on values that haven't been registered.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_56config_register_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_valuename = 0;
  PyObject *__pyx_v_defaultvalue = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_register_value __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__valuename,&__pyx_n_s__defaultvalue,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("config_register_value");
  {
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__valuename);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__defaultvalue);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("config_register_value", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "config_register_value") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_valuename = values[0];
    __pyx_v_defaultvalue = values[1];
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("config_register_value", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.config_register_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->config_register_value(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_valuename, __pyx_v_defaultvalue, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.config_register_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1245
 * 
 * 	@deprecated
 * 	def configval_register(self, valuename, defaultvalue, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_57configval_register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_57configval_register[] = "\n\t\t@deprecated\n\t\tUse config_register_value(valuename, defaultvalue, ...) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_57configval_register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_valuename = 0;
  PyObject *__pyx_v_defaultvalue = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_register_value __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__valuename,&__pyx_n_s__defaultvalue,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("configval_register");
  {
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__valuename);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__defaultvalue);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("configval_register", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "configval_register") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_valuename = values[0];
    __pyx_v_defaultvalue = values[1];
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("configval_register", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.configval_register", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":1250
 * 		Use config_register_value(valuename, defaultvalue, ...) instead
 * 		"""
 * 		return self.config_register_value(valuename, defaultvalue, cb)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult medialib_add_entry(self, path, cb = None, encoded=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->config_register_value(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_valuename, __pyx_v_defaultvalue, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.configval_register", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1252
 * 		return self.config_register_value(valuename, defaultvalue, cb)
 * 
 * 	cpdef XmmsResult medialib_add_entry(self, path, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_add_entry(file, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_58medialib_add_entry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_medialib_add_entry(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_path, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_add_entry *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_encoded = __pyx_k_56;
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("medialib_add_entry");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_encoded = __pyx_optional_args->encoded;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__medialib_add_entry); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_58medialib_add_entry)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_path);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
      __Pyx_GIVEREF(__pyx_v_path);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __Pyx_INCREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1261
 * 		"""
 * 		cdef xmmsc_result_t *res
 * 		p = from_unicode(path)             # <<<<<<<<<<<<<<
 * 		if encoded:
 * 			res = xmmsc_medialib_add_entry_encoded(self.conn, <char *>p)
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1262
 * 		cdef xmmsc_result_t *res
 * 		p = from_unicode(path)
 * 		if encoded:             # <<<<<<<<<<<<<<
 * 			res = xmmsc_medialib_add_entry_encoded(self.conn, <char *>p)
 * 		else:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_encoded); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":1263
 * 		p = from_unicode(path)
 * 		if encoded:
 * 			res = xmmsc_medialib_add_entry_encoded(self.conn, <char *>p)             # <<<<<<<<<<<<<<
 * 		else:
 * 			res = xmmsc_medialib_add_entry(self.conn, <char *>p)
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_medialib_add_entry_encoded(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5));
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":1265
 * 			res = xmmsc_medialib_add_entry_encoded(self.conn, <char *>p)
 * 		else:
 * 			res = xmmsc_medialib_add_entry(self.conn, <char *>p)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_medialib_add_entry(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5));
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":1266
 * 		else:
 * 			res = xmmsc_medialib_add_entry(self.conn, <char *>p)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_add_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1252
 * 		return self.config_register_value(valuename, defaultvalue, cb)
 * 
 * 	cpdef XmmsResult medialib_add_entry(self, path, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_add_entry(file, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_58medialib_add_entry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_58medialib_add_entry[] = "\n\t\tmedialib_add_entry(file, cb=None, encoded=False) -> XmmsResult\n\n\t\tAdd an entry to the MediaLib.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_58medialib_add_entry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_v_encoded = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_add_entry __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path,&__pyx_n_s__cb,&__pyx_n_s__encoded,0};
  __Pyx_RefNannySetupContext("medialib_add_entry");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = __pyx_k_56;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoded);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "medialib_add_entry") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_path = values[0];
    __pyx_v_cb = values[1];
    __pyx_v_encoded = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("medialib_add_entry", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_add_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_2.encoded = __pyx_v_encoded;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->medialib_add_entry(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_path, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_add_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1269
 * 
 * 	@deprecated
 * 	def medialib_add_entry_encoded(self, path, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_59medialib_add_entry_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_59medialib_add_entry_encoded[] = "\n\t\t@deprecated\n\t\tUse medialib_add_entry(file, ..., encoded=True) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_59medialib_add_entry_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("medialib_add_entry_encoded");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "medialib_add_entry_encoded") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_path = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("medialib_add_entry_encoded", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_add_entry_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":1274
 * 		Use medialib_add_entry(file, ..., encoded=True) instead
 * 		"""
 * 		return self.medialib_add_entry(path, cb=cb, encoded=True)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult medialib_remove_entry(self, int id, cb=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__medialib_add_entry); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__cb), __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__encoded), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_add_entry_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1276
 * 		return self.medialib_add_entry(path, cb=cb, encoded=True)
 * 
 * 	cpdef XmmsResult medialib_remove_entry(self, int id, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_remove_entry(id, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_60medialib_remove_entry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_medialib_remove_entry(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_id, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_remove_entry *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("medialib_remove_entry");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_57); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_60medialib_remove_entry)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1284
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_medialib_remove_entry(self.conn, id))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult medialib_move_entry(self, int id,  url, cb = None, encoded = False):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_medialib_remove_entry(__pyx_v_self->__pyx_base.conn, __pyx_v_id))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_remove_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1276
 * 		return self.medialib_add_entry(path, cb=cb, encoded=True)
 * 
 * 	cpdef XmmsResult medialib_remove_entry(self, int id, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_remove_entry(id, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_60medialib_remove_entry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_60medialib_remove_entry[] = "\n\t\tmedialib_remove_entry(id, cb=None) -> XmmsResult\n\n\t\tRemove an entry from the medialib.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_60medialib_remove_entry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_id;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_remove_entry __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__id,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("medialib_remove_entry");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__id);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "medialib_remove_entry") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("medialib_remove_entry", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_remove_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->medialib_remove_entry(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_id, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_remove_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1286
 * 		return self.create_result(cb, xmmsc_medialib_remove_entry(self.conn, id))
 * 
 * 	cpdef XmmsResult medialib_move_entry(self, int id,  url, cb = None, encoded = False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_move_entry(id, url, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_61medialib_move_entry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_medialib_move_entry(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_id, PyObject *__pyx_v_url, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_move_entry *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_encoded = __pyx_k_58;
  PyObject *__pyx_v_unquote_plus = NULL;
  PyObject *__pyx_v_u = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  char *__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("medialib_move_entry");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_encoded = __pyx_optional_args->encoded;
      }
    }
  }
  __Pyx_INCREF(__pyx_v_url);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__medialib_move_entry); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_61medialib_move_entry)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_url);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_url);
      __Pyx_GIVEREF(__pyx_v_url);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __Pyx_INCREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1294
 * 		@return The result of the operation.
 * 		"""
 * 		if encoded:             # <<<<<<<<<<<<<<
 * 			try:
 * 				from urllib import unquote_plus
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_encoded); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":1295
 * 		"""
 * 		if encoded:
 * 			try:             # <<<<<<<<<<<<<<
 * 				from urllib import unquote_plus
 * 			except ImportError: #Py3k
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      /*try:*/ {

        /* "xmmsapi.pyx":1296
 * 		if encoded:
 * 			try:
 * 				from urllib import unquote_plus             # <<<<<<<<<<<<<<
 * 			except ImportError: #Py3k
 * 				from urllib.parse import unquote_plus
 */
        __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_1));
        __Pyx_INCREF(((PyObject *)__pyx_n_s__unquote_plus));
        PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__unquote_plus));
        __Pyx_GIVEREF(((PyObject *)__pyx_n_s__unquote_plus));
        __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__urllib), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__unquote_plus); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_v_unquote_plus = __pyx_t_1;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L11_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "xmmsapi.pyx":1297
 * 			try:
 * 				from urllib import unquote_plus
 * 			except ImportError: #Py3k             # <<<<<<<<<<<<<<
 * 				from urllib.parse import unquote_plus
 * 			url = unquote_plus(url)
 */
      __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
      if (__pyx_t_8) {
        __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_move_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_3);

        /* "xmmsapi.pyx":1298
 * 				from urllib import unquote_plus
 * 			except ImportError: #Py3k
 * 				from urllib.parse import unquote_plus             # <<<<<<<<<<<<<<
 * 			url = unquote_plus(url)
 * 		u = from_unicode(url)
 */
        __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_9));
        __Pyx_INCREF(((PyObject *)__pyx_n_s__unquote_plus));
        PyList_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_n_s__unquote_plus));
        __Pyx_GIVEREF(((PyObject *)__pyx_n_s__unquote_plus));
        __pyx_t_10 = __Pyx_Import(((PyObject *)__pyx_n_s_59), ((PyObject *)__pyx_t_9), -1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
        __pyx_t_9 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__unquote_plus); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_XDECREF(__pyx_v_unquote_plus);
        __pyx_v_unquote_plus = __pyx_t_9;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L5_exception_handled;
      }
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
      __pyx_L11_try_end:;
    }

    /* "xmmsapi.pyx":1299
 * 			except ImportError: #Py3k
 * 				from urllib.parse import unquote_plus
 * 			url = unquote_plus(url)             # <<<<<<<<<<<<<<
 * 		u = from_unicode(url)
 * 		return self.create_result(cb, xmmsc_medialib_move_entry(self.conn, id, <char *>u))
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_INCREF(__pyx_v_url);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_url);
    __Pyx_GIVEREF(__pyx_v_url);
    __pyx_t_1 = PyObject_Call(__pyx_v_unquote_plus, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_url);
    __pyx_v_url = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":1300
 * 				from urllib.parse import unquote_plus
 * 			url = unquote_plus(url)
 * 		u = from_unicode(url)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_medialib_move_entry(self.conn, id, <char *>u))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_u = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1301
 * 			url = unquote_plus(url)
 * 		u = from_unicode(url)
 * 		return self.create_result(cb, xmmsc_medialib_move_entry(self.conn, id, <char *>u))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult medialib_get_info(self, int id, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_11 = PyBytes_AsString(__pyx_v_u); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_medialib_move_entry(__pyx_v_self->__pyx_base.conn, __pyx_v_id, ((char *)__pyx_t_11)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_move_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_unquote_plus);
  __Pyx_XDECREF(__pyx_v_u);
  __Pyx_XDECREF(__pyx_v_url);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1286
 * 		return self.create_result(cb, xmmsc_medialib_remove_entry(self.conn, id))
 * 
 * 	cpdef XmmsResult medialib_move_entry(self, int id,  url, cb = None, encoded = False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_move_entry(id, url, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_61medialib_move_entry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_61medialib_move_entry[] = "\n\t\tmedialib_move_entry(id, url, cb=None, encoded=False) -> XmmsResult\n\n\t\tSet a new url for an entry in the medialib.\n\t\t@rtype: L{XmmsResult}\n\t\t@return The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_61medialib_move_entry(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_id;
  PyObject *__pyx_v_url = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_v_encoded = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_move_entry __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__id,&__pyx_n_s__url,&__pyx_n_s__cb,&__pyx_n_s__encoded,0};
  __Pyx_RefNannySetupContext("medialib_move_entry");
  {
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_58;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__id);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__url);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("medialib_move_entry", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoded);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "medialib_move_entry") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_url = values[1];
    __pyx_v_cb = values[2];
    __pyx_v_encoded = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("medialib_move_entry", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_move_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_2.encoded = __pyx_v_encoded;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->medialib_move_entry(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_id, __pyx_v_url, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_move_entry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1303
 * 		return self.create_result(cb, xmmsc_medialib_move_entry(self.conn, id, <char *>u))
 * 
 * 	cpdef XmmsResult medialib_get_info(self, int id, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_get_info(id, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_62medialib_get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_medialib_get_info(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_id, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_get_info *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_v_res = 0;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("medialib_get_info");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__medialib_get_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_62medialib_get_info)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1312
 * 		"""
 * 		cdef XmmsResult res
 * 		res = self.create_result(cb, xmmsc_medialib_get_info(self.conn, id))             # <<<<<<<<<<<<<<
 * 		res.ispropdict = 1
 * 		return res
 */
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_medialib_get_info(__pyx_v_self->__pyx_base.conn, __pyx_v_id))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1313
 * 		cdef XmmsResult res
 * 		res = self.create_result(cb, xmmsc_medialib_get_info(self.conn, id))
 * 		res.ispropdict = 1             # <<<<<<<<<<<<<<
 * 		return res
 * 
 */
  __pyx_v_res->ispropdict = 1;

  /* "xmmsapi.pyx":1314
 * 		res = self.create_result(cb, xmmsc_medialib_get_info(self.conn, id))
 * 		res.ispropdict = 1
 * 		return res             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult medialib_rehash(self, int id = 0, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_get_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1303
 * 		return self.create_result(cb, xmmsc_medialib_move_entry(self.conn, id, <char *>u))
 * 
 * 	cpdef XmmsResult medialib_get_info(self, int id, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_get_info(id, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_62medialib_get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_62medialib_get_info[] = "\n\t\tmedialib_get_info(id, cb=None) -> XmmsResult\n\n\t\t@rtype: L{XmmsResult}(HashTable)\n\t\t@return: Information about the medialib entry position\n\t\tspecified.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_62medialib_get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_id;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_get_info __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__id,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("medialib_get_info");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__id);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "medialib_get_info") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("medialib_get_info", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_get_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->medialib_get_info(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_id, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_get_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1316
 * 		return res
 * 
 * 	cpdef XmmsResult medialib_rehash(self, int id = 0, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_rehash(id=0, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_63medialib_rehash(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_medialib_rehash(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_rehash *__pyx_optional_args) {
  int __pyx_v_id = ((int)0);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("medialib_rehash");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_id = __pyx_optional_args->id;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__medialib_rehash); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_63medialib_rehash)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1325
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_medialib_rehash(self.conn, id))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult medialib_get_id(self, url, cb = None, encoded=False):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_medialib_rehash(__pyx_v_self->__pyx_base.conn, __pyx_v_id))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_rehash", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1316
 * 		return res
 * 
 * 	cpdef XmmsResult medialib_rehash(self, int id = 0, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_rehash(id=0, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_63medialib_rehash(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_63medialib_rehash[] = "\n\t\tmedialib_rehash(id=0, cb=None) -> XmmsResult\n\n\t\tForce the medialib to check that metadata stored is up to\n\t\tdate.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_63medialib_rehash(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_id;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_rehash __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__id,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("medialib_rehash");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__id);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "medialib_rehash") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_id = ((int)0);
    }
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("medialib_rehash", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_rehash", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.id = __pyx_v_id;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->medialib_rehash(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_rehash", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1327
 * 		return self.create_result(cb, xmmsc_medialib_rehash(self.conn, id))
 * 
 * 	cpdef XmmsResult medialib_get_id(self, url, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_get_id(url, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_64medialib_get_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_medialib_get_id(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_url, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_get_id *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_encoded = __pyx_k_60;
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_u = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("medialib_get_id");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_encoded = __pyx_optional_args->encoded;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__medialib_get_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_64medialib_get_id)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_url);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_url);
      __Pyx_GIVEREF(__pyx_v_url);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __Pyx_INCREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1337
 * 		"""
 * 		cdef xmmsc_result_t *res
 * 		u = from_unicode(url)             # <<<<<<<<<<<<<<
 * 		if encoded:
 * 			res = xmmsc_medialib_get_id_encoded(self.conn, <char *>u)
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_u = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1338
 * 		cdef xmmsc_result_t *res
 * 		u = from_unicode(url)
 * 		if encoded:             # <<<<<<<<<<<<<<
 * 			res = xmmsc_medialib_get_id_encoded(self.conn, <char *>u)
 * 		else:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_encoded); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":1339
 * 		u = from_unicode(url)
 * 		if encoded:
 * 			res = xmmsc_medialib_get_id_encoded(self.conn, <char *>u)             # <<<<<<<<<<<<<<
 * 		else:
 * 			res = xmmsc_medialib_get_id(self.conn, <char *>u)
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_u); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_medialib_get_id_encoded(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5));
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":1341
 * 			res = xmmsc_medialib_get_id_encoded(self.conn, <char *>u)
 * 		else:
 * 			res = xmmsc_medialib_get_id(self.conn, <char *>u)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_u); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_medialib_get_id(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5));
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":1342
 * 		else:
 * 			res = xmmsc_medialib_get_id(self.conn, <char *>u)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult medialib_import_path(self, path, cb = None, encoded=False):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_get_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_u);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1327
 * 		return self.create_result(cb, xmmsc_medialib_rehash(self.conn, id))
 * 
 * 	cpdef XmmsResult medialib_get_id(self, url, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_get_id(url, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_64medialib_get_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_64medialib_get_id[] = "\n\t\tmedialib_get_id(url, cb=None, encoded=False) -> XmmsResult\n\n\t\tSearch for an entry (URL) in the medialib and return its ID\n\t\tnumber.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_64medialib_get_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_url = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_v_encoded = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_get_id __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__url,&__pyx_n_s__cb,&__pyx_n_s__encoded,0};
  __Pyx_RefNannySetupContext("medialib_get_id");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = __pyx_k_60;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__url);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoded);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "medialib_get_id") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_url = values[0];
    __pyx_v_cb = values[1];
    __pyx_v_encoded = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("medialib_get_id", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_get_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_2.encoded = __pyx_v_encoded;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->medialib_get_id(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_url, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_get_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1344
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult medialib_import_path(self, path, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_import_path(path, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_65medialib_import_path(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_medialib_import_path(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_path, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_import_path *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_encoded = __pyx_k_61;
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("medialib_import_path");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_encoded = __pyx_optional_args->encoded;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_62); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_65medialib_import_path)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_path);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
      __Pyx_GIVEREF(__pyx_v_path);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __Pyx_INCREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1354
 * 		"""
 * 		cdef xmmsc_result_t *res
 * 		p = from_unicode(path)             # <<<<<<<<<<<<<<
 * 		if encoded:
 * 			res = xmmsc_medialib_import_path_encoded(self.conn, <char *>p)
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1355
 * 		cdef xmmsc_result_t *res
 * 		p = from_unicode(path)
 * 		if encoded:             # <<<<<<<<<<<<<<
 * 			res = xmmsc_medialib_import_path_encoded(self.conn, <char *>p)
 * 		else:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_encoded); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":1356
 * 		p = from_unicode(path)
 * 		if encoded:
 * 			res = xmmsc_medialib_import_path_encoded(self.conn, <char *>p)             # <<<<<<<<<<<<<<
 * 		else:
 * 			res = xmmsc_medialib_import_path(self.conn, <char *>p)
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_medialib_import_path_encoded(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5));
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":1358
 * 			res = xmmsc_medialib_import_path_encoded(self.conn, <char *>p)
 * 		else:
 * 			res = xmmsc_medialib_import_path(self.conn, <char *>p)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_medialib_import_path(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5));
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":1359
 * 		else:
 * 			res = xmmsc_medialib_import_path(self.conn, <char *>p)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_import_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1344
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult medialib_import_path(self, path, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_import_path(path, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_65medialib_import_path(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_65medialib_import_path[] = "\n\t\tmedialib_import_path(path, cb=None, encoded=False) -> XmmsResult\n\n\t\tImport metadata from all files recursively from the directory\n\t\tpassed as argument.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_65medialib_import_path(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_v_encoded = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_import_path __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path,&__pyx_n_s__cb,&__pyx_n_s__encoded,0};
  __Pyx_RefNannySetupContext("medialib_import_path");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = __pyx_k_61;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoded);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "medialib_import_path") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_path = values[0];
    __pyx_v_cb = values[1];
    __pyx_v_encoded = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("medialib_import_path", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_import_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_2.encoded = __pyx_v_encoded;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->medialib_import_path(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_path, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_import_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1362
 * 
 * 	@deprecated
 * 	def medialib_path_import(self, path, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_66medialib_path_import(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_66medialib_path_import[] = "\n\t\t@deprecated\n\t\tUse medialib_import_path(path, ...) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_66medialib_path_import(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_v_encoded = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path,&__pyx_n_s__cb,&__pyx_n_s__encoded,0};
  __Pyx_RefNannySetupContext("medialib_path_import");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = __pyx_k_63;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoded);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "medialib_path_import") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_path = values[0];
    __pyx_v_cb = values[1];
    __pyx_v_encoded = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("medialib_path_import", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_path_import", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":1367
 * 		Use medialib_import_path(path, ...) instead
 * 		"""
 * 		return self.medialib_import_path(self, path, cb=cb, encoded=encoded)             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_62); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__cb), __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__encoded), __pyx_v_encoded) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_path_import", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1370
 * 
 * 	@deprecated
 * 	def medialib_path_import_encoded(self, path, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_67medialib_path_import_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_67medialib_path_import_encoded[] = "\n\t\t@deprecated\n\t\tUse medialib_import_path(path, ..., encoded=True) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_67medialib_path_import_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("medialib_path_import_encoded");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "medialib_path_import_encoded") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_path = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("medialib_path_import_encoded", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_path_import_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":1375
 * 		Use medialib_import_path(path, ..., encoded=True) instead
 * 		"""
 * 		return self.medialib_import_path(self, path, cb=cb, encoded=True)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult medialib_property_set(self, int id, key, value, source=None, cb=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s_62); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__cb), __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__encoded), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_path_import_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1377
 * 		return self.medialib_import_path(self, path, cb=cb, encoded=True)
 * 
 * 	cpdef XmmsResult medialib_property_set(self, int id, key, value, source=None, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_property_set(id, key, value, source=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_68medialib_property_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_medialib_property_set(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_id, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_property_set *__pyx_optional_args) {
  PyObject *__pyx_v_source = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_v = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  int __pyx_t_7;
  char *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("medialib_property_set");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_source = __pyx_optional_args->source;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_68medialib_property_set)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __Pyx_INCREF(__pyx_v_source);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_source);
      __Pyx_GIVEREF(__pyx_v_source);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1386
 * 		"""
 * 		cdef xmmsc_result_t *res
 * 		k = from_unicode(key)             # <<<<<<<<<<<<<<
 * 		if isinstance(value, int):
 * 			if source:
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_k = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1387
 * 		cdef xmmsc_result_t *res
 * 		k = from_unicode(key)
 * 		if isinstance(value, int):             # <<<<<<<<<<<<<<
 * 			if source:
 * 				s = from_unicode(source)
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)(&PyInt_Type)));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_value, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":1388
 * 		k = from_unicode(key)
 * 		if isinstance(value, int):
 * 			if source:             # <<<<<<<<<<<<<<
 * 				s = from_unicode(source)
 * 				res = xmmsc_medialib_entry_property_set_int_with_source(self.conn, id, <char *>s, <char *>k, value)
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_source); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "xmmsapi.pyx":1389
 * 		if isinstance(value, int):
 * 			if source:
 * 				s = from_unicode(source)             # <<<<<<<<<<<<<<
 * 				res = xmmsc_medialib_entry_property_set_int_with_source(self.conn, id, <char *>s, <char *>k, value)
 * 			else:
 */
      __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_source); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_s = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "xmmsapi.pyx":1390
 * 			if source:
 * 				s = from_unicode(source)
 * 				res = xmmsc_medialib_entry_property_set_int_with_source(self.conn, id, <char *>s, <char *>k, value)             # <<<<<<<<<<<<<<
 * 			else:
 * 				res = xmmsc_medialib_entry_property_set_int(self.conn, id, <char *>k, value)
 */
      __pyx_t_5 = PyBytes_AsString(__pyx_v_s); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = PyBytes_AsString(__pyx_v_k); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_res = xmmsc_medialib_entry_property_set_int_with_source(__pyx_v_self->__pyx_base.conn, __pyx_v_id, ((char *)__pyx_t_5), ((char *)__pyx_t_6), __pyx_t_7);
      goto __pyx_L4;
    }
    /*else*/ {

      /* "xmmsapi.pyx":1392
 * 				res = xmmsc_medialib_entry_property_set_int_with_source(self.conn, id, <char *>s, <char *>k, value)
 * 			else:
 * 				res = xmmsc_medialib_entry_property_set_int(self.conn, id, <char *>k, value)             # <<<<<<<<<<<<<<
 * 		else:
 * 			v = from_unicode(value)
 */
      __pyx_t_6 = PyBytes_AsString(__pyx_v_k); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_res = xmmsc_medialib_entry_property_set_int(__pyx_v_self->__pyx_base.conn, __pyx_v_id, ((char *)__pyx_t_6), __pyx_t_7);
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":1394
 * 				res = xmmsc_medialib_entry_property_set_int(self.conn, id, <char *>k, value)
 * 		else:
 * 			v = from_unicode(value)             # <<<<<<<<<<<<<<
 * 			if source:
 * 				s = from_unicode(source)
 */
    __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_v = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "xmmsapi.pyx":1395
 * 		else:
 * 			v = from_unicode(value)
 * 			if source:             # <<<<<<<<<<<<<<
 * 				s = from_unicode(source)
 * 				res = xmmsc_medialib_entry_property_set_str_with_source(self.conn, id, <char *>s, <char *>k, <char *>v)
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_source); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "xmmsapi.pyx":1396
 * 			v = from_unicode(value)
 * 			if source:
 * 				s = from_unicode(source)             # <<<<<<<<<<<<<<
 * 				res = xmmsc_medialib_entry_property_set_str_with_source(self.conn, id, <char *>s, <char *>k, <char *>v)
 * 			else:
 */
      __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_source); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_s = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "xmmsapi.pyx":1397
 * 			if source:
 * 				s = from_unicode(source)
 * 				res = xmmsc_medialib_entry_property_set_str_with_source(self.conn, id, <char *>s, <char *>k, <char *>v)             # <<<<<<<<<<<<<<
 * 			else:
 * 				res = xmmsc_medialib_entry_property_set_str(self.conn, id, <char *>k, <char *>v)
 */
      __pyx_t_6 = PyBytes_AsString(__pyx_v_s); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = PyBytes_AsString(__pyx_v_k); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = PyBytes_AsString(__pyx_v_v); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_res = xmmsc_medialib_entry_property_set_str_with_source(__pyx_v_self->__pyx_base.conn, __pyx_v_id, ((char *)__pyx_t_6), ((char *)__pyx_t_5), ((char *)__pyx_t_8));
      goto __pyx_L5;
    }
    /*else*/ {

      /* "xmmsapi.pyx":1399
 * 				res = xmmsc_medialib_entry_property_set_str_with_source(self.conn, id, <char *>s, <char *>k, <char *>v)
 * 			else:
 * 				res = xmmsc_medialib_entry_property_set_str(self.conn, id, <char *>k, <char *>v)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
      __pyx_t_8 = PyBytes_AsString(__pyx_v_k); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = PyBytes_AsString(__pyx_v_v); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_res = xmmsc_medialib_entry_property_set_str(__pyx_v_self->__pyx_base.conn, __pyx_v_id, ((char *)__pyx_t_8), ((char *)__pyx_t_5));
    }
    __pyx_L5:;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":1400
 * 			else:
 * 				res = xmmsc_medialib_entry_property_set_str(self.conn, id, <char *>k, <char *>v)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult medialib_property_remove(self, int id, key, source=None, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_property_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1377
 * 		return self.medialib_import_path(self, path, cb=cb, encoded=True)
 * 
 * 	cpdef XmmsResult medialib_property_set(self, int id, key, value, source=None, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_property_set(id, key, value, source=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_68medialib_property_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_68medialib_property_set[] = "\n\t\tmedialib_property_set(id, key, value, source=None, cb=None) -> XmmsResult\n\n\t\tAssociate a value with a medialib entry. Source is optional.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_68medialib_property_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_id;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_source = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_property_set __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__id,&__pyx_n_s__key,&__pyx_n_s__value,&__pyx_n_s__source,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("medialib_property_set");
  {
    PyObject* values[5] = {0,0,0,0,0};
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__id);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("medialib_property_set", 0, 3, 5, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("medialib_property_set", 0, 3, 5, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__source);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "medialib_property_set") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_key = values[1];
    __pyx_v_value = values[2];
    __pyx_v_source = values[3];
    __pyx_v_cb = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("medialib_property_set", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_property_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.source = __pyx_v_source;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->medialib_property_set(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_id, __pyx_v_key, __pyx_v_value, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_property_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1402
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult medialib_property_remove(self, int id, key, source=None, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_property_remove(id, key, source=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_69medialib_property_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_medialib_property_remove(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_id, PyObject *__pyx_v_key, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_property_remove *__pyx_optional_args) {
  PyObject *__pyx_v_source = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_s = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  char *__pyx_t_5;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("medialib_property_remove");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_source = __pyx_optional_args->source;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_65); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_69medialib_property_remove)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_id); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_source);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_source);
      __Pyx_GIVEREF(__pyx_v_source);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1411
 * 		"""
 * 		cdef xmmsc_result_t *res
 * 		k = from_unicode(key)             # <<<<<<<<<<<<<<
 * 		if source:
 * 			s = from_unicode(source)
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_k = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1412
 * 		cdef xmmsc_result_t *res
 * 		k = from_unicode(key)
 * 		if source:             # <<<<<<<<<<<<<<
 * 			s = from_unicode(source)
 * 			res = xmmsc_medialib_entry_property_remove_with_source(self.conn, id, <char *>s, <char *>k)
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_source); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":1413
 * 		k = from_unicode(key)
 * 		if source:
 * 			s = from_unicode(source)             # <<<<<<<<<<<<<<
 * 			res = xmmsc_medialib_entry_property_remove_with_source(self.conn, id, <char *>s, <char *>k)
 * 		else:
 */
    __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_source); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_s = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "xmmsapi.pyx":1414
 * 		if source:
 * 			s = from_unicode(source)
 * 			res = xmmsc_medialib_entry_property_remove_with_source(self.conn, id, <char *>s, <char *>k)             # <<<<<<<<<<<<<<
 * 		else:
 * 			res = xmmsc_medialib_entry_property_remove(self.conn, id, <char *>k)
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_s); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = PyBytes_AsString(__pyx_v_k); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_medialib_entry_property_remove_with_source(__pyx_v_self->__pyx_base.conn, __pyx_v_id, ((char *)__pyx_t_5), ((char *)__pyx_t_6));
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":1416
 * 			res = xmmsc_medialib_entry_property_remove_with_source(self.conn, id, <char *>s, <char *>k)
 * 		else:
 * 			res = xmmsc_medialib_entry_property_remove(self.conn, id, <char *>k)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
    __pyx_t_6 = PyBytes_AsString(__pyx_v_k); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_medialib_entry_property_remove(__pyx_v_self->__pyx_base.conn, __pyx_v_id, ((char *)__pyx_t_6));
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":1417
 * 		else:
 * 			res = xmmsc_medialib_entry_property_remove(self.conn, id, <char *>k)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult broadcast_medialib_entry_added(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_property_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1402
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult medialib_property_remove(self, int id, key, source=None, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_property_remove(id, key, source=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_69medialib_property_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_69medialib_property_remove[] = "\n\t\tmedialib_property_remove(id, key, source=None, cb=None) -> XmmsResult\n\n\t\tRemove a value from a medialib entry. Source is optional.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_69medialib_property_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_id;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_source = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_property_remove __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__id,&__pyx_n_s__key,&__pyx_n_s__source,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("medialib_property_remove");
  {
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__id);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("medialib_property_remove", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__source);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "medialib_property_remove") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_key = values[1];
    __pyx_v_source = values[2];
    __pyx_v_cb = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("medialib_property_remove", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_property_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.source = __pyx_v_source;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->medialib_property_remove(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_id, __pyx_v_key, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.medialib_property_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1419
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult broadcast_medialib_entry_added(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_medialib_entry_added(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_70broadcast_medialib_entry_added(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_broadcast_medialib_entry_added(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_medialib_entry_added *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("broadcast_medialib_entry_added");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_66); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_70broadcast_medialib_entry_added)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1427
 * 		@rtype: L{XmmsResult}
 * 		"""
 * 		return self.create_result(cb, xmmsc_broadcast_medialib_entry_added(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult broadcast_medialib_entry_changed(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_broadcast_medialib_entry_added(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_medialib_entry_added", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1419
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult broadcast_medialib_entry_added(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_medialib_entry_added(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_70broadcast_medialib_entry_added(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_70broadcast_medialib_entry_added[] = "\n\t\tbroadcast_medialib_entry_added(cb=None) -> XmmsResult\n\n\t\tSet a method to handle the medialib entry added broadcast\n\t\tfrom the XMMS2 daemon. (i.e. a new entry has been added)\n\t\t@rtype: L{XmmsResult}\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_70broadcast_medialib_entry_added(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_medialib_entry_added __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("broadcast_medialib_entry_added");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "broadcast_medialib_entry_added") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("broadcast_medialib_entry_added", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_medialib_entry_added", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->broadcast_medialib_entry_added(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_medialib_entry_added", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1429
 * 		return self.create_result(cb, xmmsc_broadcast_medialib_entry_added(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_medialib_entry_changed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_medialib_entry_changed(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_71broadcast_medialib_entry_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_broadcast_medialib_entry_changed(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_medialib_entry_changed *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("broadcast_medialib_entry_changed");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_67); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_71broadcast_medialib_entry_changed)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1439
 * 		@rtype: L{XmmsResult}
 * 		"""
 * 		return self.create_result(cb, xmmsc_broadcast_medialib_entry_changed(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult broadcast_collection_changed(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_broadcast_medialib_entry_changed(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_medialib_entry_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1429
 * 		return self.create_result(cb, xmmsc_broadcast_medialib_entry_added(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_medialib_entry_changed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_medialib_entry_changed(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_71broadcast_medialib_entry_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_71broadcast_medialib_entry_changed[] = "\n\t\tbroadcast_medialib_entry_changed(cb=None) -> XmmsResult\n\n\t\tSet a method to handle the medialib entry changed broadcast\n\t\tfrom the XMMS2 daemon.\n\t\tUpdated data is sent when the metadata for a song is updated\n\t\tin the medialib.\n\t\t@rtype: L{XmmsResult}\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_71broadcast_medialib_entry_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_medialib_entry_changed __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("broadcast_medialib_entry_changed");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "broadcast_medialib_entry_changed") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1429; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("broadcast_medialib_entry_changed", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1429; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_medialib_entry_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->broadcast_medialib_entry_changed(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_medialib_entry_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1441
 * 		return self.create_result(cb, xmmsc_broadcast_medialib_entry_changed(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_collection_changed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_collection_changed(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_72broadcast_collection_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_broadcast_collection_changed(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_collection_changed *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("broadcast_collection_changed");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_68); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_72broadcast_collection_changed)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1449
 * 		@rtype: L{XmmsResult}
 * 		"""
 * 		return self.create_result(cb, xmmsc_broadcast_collection_changed(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult signal_mediainfo_reader_unindexed(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_broadcast_collection_changed(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_collection_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1441
 * 		return self.create_result(cb, xmmsc_broadcast_medialib_entry_changed(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_collection_changed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_collection_changed(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_72broadcast_collection_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_72broadcast_collection_changed[] = "\n\t\tbroadcast_collection_changed(cb=None) -> XmmsResult\n\n\t\tSet a method to handle the collection changed broadcast\n\t\tfrom the XMMS2 daemon.\n\t\t@rtype: L{XmmsResult}\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_72broadcast_collection_changed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_collection_changed __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("broadcast_collection_changed");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "broadcast_collection_changed") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("broadcast_collection_changed", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_collection_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->broadcast_collection_changed(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_collection_changed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1451
 * 		return self.create_result(cb, xmmsc_broadcast_collection_changed(self.conn))
 * 
 * 	cpdef XmmsResult signal_mediainfo_reader_unindexed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		signal_mediainfo_reader_unindexed(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_73signal_mediainfo_reader_unindexed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_signal_mediainfo_reader_unindexed(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_signal_mediainfo_reader_unindexed *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("signal_mediainfo_reader_unindexed");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_69); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_73signal_mediainfo_reader_unindexed)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1459
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_signal_mediainfo_reader_unindexed(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult broadcast_mediainfo_reader_status(self, cb = None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_signal_mediainfo_reader_unindexed(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.signal_mediainfo_reader_unindexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1451
 * 		return self.create_result(cb, xmmsc_broadcast_collection_changed(self.conn))
 * 
 * 	cpdef XmmsResult signal_mediainfo_reader_unindexed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		signal_mediainfo_reader_unindexed(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_73signal_mediainfo_reader_unindexed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_73signal_mediainfo_reader_unindexed[] = "\n\t\tsignal_mediainfo_reader_unindexed(cb=None) -> XmmsResult\n\n\t\tTell daemon to send you the number of unindexed files in the mlib\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_73signal_mediainfo_reader_unindexed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_signal_mediainfo_reader_unindexed __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("signal_mediainfo_reader_unindexed");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "signal_mediainfo_reader_unindexed") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("signal_mediainfo_reader_unindexed", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.signal_mediainfo_reader_unindexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->signal_mediainfo_reader_unindexed(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.signal_mediainfo_reader_unindexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1461
 * 		return self.create_result(cb, xmmsc_signal_mediainfo_reader_unindexed(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_mediainfo_reader_status(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_mediainfo_reader_status(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_74broadcast_mediainfo_reader_status(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_broadcast_mediainfo_reader_status(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_mediainfo_reader_status *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("broadcast_mediainfo_reader_status");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_70); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_74broadcast_mediainfo_reader_status)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1469
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_broadcast_mediainfo_reader_status(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult xform_media_browse(self, url, cb=None, encoded=False):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_broadcast_mediainfo_reader_status(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_mediainfo_reader_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1461
 * 		return self.create_result(cb, xmmsc_signal_mediainfo_reader_unindexed(self.conn))
 * 
 * 	cpdef XmmsResult broadcast_mediainfo_reader_status(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		broadcast_mediainfo_reader_status(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_74broadcast_mediainfo_reader_status(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_74broadcast_mediainfo_reader_status[] = "\n\t\tbroadcast_mediainfo_reader_status(cb=None) -> XmmsResult\n\n\t\tTell daemon to send you the status of the mediainfo reader\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_74broadcast_mediainfo_reader_status(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_mediainfo_reader_status __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("broadcast_mediainfo_reader_status");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "broadcast_mediainfo_reader_status") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("broadcast_mediainfo_reader_status", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_mediainfo_reader_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->broadcast_mediainfo_reader_status(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.broadcast_mediainfo_reader_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1471
 * 		return self.create_result(cb, xmmsc_broadcast_mediainfo_reader_status(self.conn))
 * 
 * 	cpdef XmmsResult xform_media_browse(self, url, cb=None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xform_media_browse(url, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_75xform_media_browse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_xform_media_browse(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_url, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_xform_media_browse *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_encoded = __pyx_k_71;
  xmmsc_result_t *__pyx_v_res;
  PyObject *__pyx_v_u = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("xform_media_browse");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_encoded = __pyx_optional_args->encoded;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__xform_media_browse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_75xform_media_browse)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_url);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_url);
      __Pyx_GIVEREF(__pyx_v_url);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __Pyx_INCREF(__pyx_v_encoded);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_encoded);
      __Pyx_GIVEREF(__pyx_v_encoded);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1480
 * 		"""
 * 		cdef xmmsc_result_t *res
 * 		u = from_unicode(url)             # <<<<<<<<<<<<<<
 * 		if encoded:
 * 			res = xmmsc_xform_media_browse_encoded(self.conn, <char *>u)
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_u = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1481
 * 		cdef xmmsc_result_t *res
 * 		u = from_unicode(url)
 * 		if encoded:             # <<<<<<<<<<<<<<
 * 			res = xmmsc_xform_media_browse_encoded(self.conn, <char *>u)
 * 		else:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_encoded); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":1482
 * 		u = from_unicode(url)
 * 		if encoded:
 * 			res = xmmsc_xform_media_browse_encoded(self.conn, <char *>u)             # <<<<<<<<<<<<<<
 * 		else:
 * 			res = xmmsc_xform_media_browse(self.conn, <char *>u)
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_u); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_xform_media_browse_encoded(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5));
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pyx":1484
 * 			res = xmmsc_xform_media_browse_encoded(self.conn, <char *>u)
 * 		else:
 * 			res = xmmsc_xform_media_browse(self.conn, <char *>u)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_u); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_res = xmmsc_xform_media_browse(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_5));
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":1485
 * 		else:
 * 			res = xmmsc_xform_media_browse(self.conn, <char *>u)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.xform_media_browse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_u);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1471
 * 		return self.create_result(cb, xmmsc_broadcast_mediainfo_reader_status(self.conn))
 * 
 * 	cpdef XmmsResult xform_media_browse(self, url, cb=None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xform_media_browse(url, cb=None, encoded=False) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_75xform_media_browse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_75xform_media_browse[] = "\n\t\txform_media_browse(url, cb=None, encoded=False) -> XmmsResult\n\n\t\tBrowse files from xform plugins.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_75xform_media_browse(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_url = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_v_encoded = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_xform_media_browse __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__url,&__pyx_n_s__cb,&__pyx_n_s__encoded,0};
  __Pyx_RefNannySetupContext("xform_media_browse");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = __pyx_k_71;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__url);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__encoded);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "xform_media_browse") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_url = values[0];
    __pyx_v_cb = values[1];
    __pyx_v_encoded = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("xform_media_browse", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.xform_media_browse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_2.encoded = __pyx_v_encoded;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->xform_media_browse(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_url, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.xform_media_browse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1488
 * 
 * 	@deprecated
 * 	def xform_media_browse_encoded(self, url, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_76xform_media_browse_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_76xform_media_browse_encoded[] = "\n\t\t@deprecated\n\t\tUse xform_media_browse(url, ..., encoded=True) instead\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_76xform_media_browse_encoded(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_url = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__url,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("xform_media_browse_encoded");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__url);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "xform_media_browse_encoded") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_url = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("xform_media_browse_encoded", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.xform_media_browse_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":1493
 * 		Use xform_media_browse(url, ..., encoded=True) instead
 * 		"""
 * 		return self.xform_media_browse(url, cb=cb, encoded=True)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult coll_get(self, name, ns="Collections", cb=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__xform_media_browse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_url);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_url);
  __Pyx_GIVEREF(__pyx_v_url);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__cb), __pyx_v_cb) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__encoded), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.xform_media_browse_encoded", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1495
 * 		return self.xform_media_browse(url, cb=cb, encoded=True)
 * 
 * 	cpdef XmmsResult coll_get(self, name, ns="Collections", cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_get(name, ns="Collections", cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_77coll_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_coll_get(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_name, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_get *__pyx_optional_args) {
  PyObject *__pyx_v_ns = ((PyObject *)__pyx_n_s__Collections);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  char *__pyx_v_n;
  PyObject *__pyx_v_nam = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coll_get");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_ns = __pyx_optional_args->ns;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__coll_get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_77coll_get)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      __Pyx_INCREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1504
 * 		"""
 * 		cdef char *n
 * 		n = check_namespace(ns, False)             # <<<<<<<<<<<<<<
 * 		nam = from_unicode(name)
 * 		return self.create_result(cb, xmmsc_coll_get(self.conn, nam, n))
 */
  __pyx_t_4 = __pyx_f_7xmmsapi_check_namespace(__pyx_v_ns, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_4;

  /* "xmmsapi.pyx":1505
 * 		cdef char *n
 * 		n = check_namespace(ns, False)
 * 		nam = from_unicode(name)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_coll_get(self.conn, nam, n))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_nam = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1506
 * 		n = check_namespace(ns, False)
 * 		nam = from_unicode(name)
 * 		return self.create_result(cb, xmmsc_coll_get(self.conn, nam, n))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult coll_list(self, ns="Collections", cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_nam); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_coll_get(__pyx_v_self->__pyx_base.conn, __pyx_t_4, __pyx_v_n))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nam);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1495
 * 		return self.xform_media_browse(url, cb=cb, encoded=True)
 * 
 * 	cpdef XmmsResult coll_get(self, name, ns="Collections", cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_get(name, ns="Collections", cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_77coll_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_77coll_get[] = "\n\t\tcoll_get(name, ns=\"Collections\", cb=None) -> XmmsResult\n\n\t\tRetrieve a Collection\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_77coll_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_get __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__ns,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("coll_get");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_n_s__Collections);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ns);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "coll_get") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = values[0];
    __pyx_v_ns = values[1];
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coll_get", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.ns = __pyx_v_ns;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->coll_get(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_name, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1508
 * 		return self.create_result(cb, xmmsc_coll_get(self.conn, nam, n))
 * 
 * 	cpdef XmmsResult coll_list(self, ns="Collections", cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_list(name, ns="Collections", cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_78coll_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_coll_list(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_list *__pyx_optional_args) {
  PyObject *__pyx_v_ns = ((PyObject *)__pyx_n_s__Collections);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  char *__pyx_v_n;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coll_list");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_ns = __pyx_optional_args->ns;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__coll_list); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_78coll_list)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1517
 * 		"""
 * 		cdef char *n
 * 		n = check_namespace(ns, False)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_coll_list(self.conn, n))
 * 
 */
  __pyx_t_4 = __pyx_f_7xmmsapi_check_namespace(__pyx_v_ns, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_4;

  /* "xmmsapi.pyx":1518
 * 		cdef char *n
 * 		n = check_namespace(ns, False)
 * 		return self.create_result(cb, xmmsc_coll_list(self.conn, n))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult coll_save(self, Collection coll, name, ns="Collections", cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_coll_list(__pyx_v_self->__pyx_base.conn, __pyx_v_n))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1508
 * 		return self.create_result(cb, xmmsc_coll_get(self.conn, nam, n))
 * 
 * 	cpdef XmmsResult coll_list(self, ns="Collections", cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_list(name, ns="Collections", cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_78coll_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_78coll_list[] = "\n\t\tcoll_list(name, ns=\"Collections\", cb=None) -> XmmsResult\n\n\t\tList collections\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_78coll_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_list __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ns,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("coll_list");
  {
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)__pyx_n_s__Collections);
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ns);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "coll_list") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ns = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coll_list", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.ns = __pyx_v_ns;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->coll_list(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1520
 * 		return self.create_result(cb, xmmsc_coll_list(self.conn, n))
 * 
 * 	cpdef XmmsResult coll_save(self, Collection coll, name, ns="Collections", cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_save(coll, name, ns="Collections", cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_79coll_save(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_coll_save(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_coll, PyObject *__pyx_v_name, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_save *__pyx_optional_args) {
  PyObject *__pyx_v_ns = ((PyObject *)__pyx_n_s__Collections);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  char *__pyx_v_n;
  PyObject *__pyx_v_nam = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coll_save");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_ns = __pyx_optional_args->ns;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__coll_save); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_79coll_save)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(((PyObject *)__pyx_v_coll));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_coll));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_coll));
      __Pyx_INCREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      __Pyx_INCREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1529
 * 		"""
 * 		cdef char *n
 * 		n = check_namespace(ns, False)             # <<<<<<<<<<<<<<
 * 		nam = from_unicode(name)
 * 		return self.create_result(cb, xmmsc_coll_save(self.conn, coll.coll, <char *>nam, n))
 */
  __pyx_t_4 = __pyx_f_7xmmsapi_check_namespace(__pyx_v_ns, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_4;

  /* "xmmsapi.pyx":1530
 * 		cdef char *n
 * 		n = check_namespace(ns, False)
 * 		nam = from_unicode(name)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_coll_save(self.conn, coll.coll, <char *>nam, n))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_nam = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1531
 * 		n = check_namespace(ns, False)
 * 		nam = from_unicode(name)
 * 		return self.create_result(cb, xmmsc_coll_save(self.conn, coll.coll, <char *>nam, n))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult coll_remove(self, name, ns="Collections", cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_nam); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_coll_save(__pyx_v_self->__pyx_base.conn, __pyx_v_coll->__pyx_base.coll, ((char *)__pyx_t_4), __pyx_v_n))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_save", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nam);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1520
 * 		return self.create_result(cb, xmmsc_coll_list(self.conn, n))
 * 
 * 	cpdef XmmsResult coll_save(self, Collection coll, name, ns="Collections", cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_save(coll, name, ns="Collections", cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_79coll_save(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_79coll_save[] = "\n\t\tcoll_save(coll, name, ns=\"Collections\", cb=None) -> XmmsResult\n\n\t\tSave a collection on server.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_79coll_save(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_coll = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_save __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__coll,&__pyx_n_s__name,&__pyx_n_s__ns,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("coll_save");
  {
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)__pyx_n_s__Collections);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coll);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("coll_save", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ns);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "coll_save") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_coll = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_name = values[1];
    __pyx_v_ns = values[2];
    __pyx_v_cb = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coll_save", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_save", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_coll), __pyx_ptype_9xmmsvalue_Collection, 1, "coll", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.ns = __pyx_v_ns;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->coll_save(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_coll, __pyx_v_name, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_save", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1533
 * 		return self.create_result(cb, xmmsc_coll_save(self.conn, coll.coll, <char *>nam, n))
 * 
 * 	cpdef XmmsResult coll_remove(self, name, ns="Collections", cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_remove(name, ns="Collections", cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_80coll_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_coll_remove(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_name, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_remove *__pyx_optional_args) {
  PyObject *__pyx_v_ns = ((PyObject *)__pyx_n_s__Collections);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  char *__pyx_v_n;
  PyObject *__pyx_v_nam = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coll_remove");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_ns = __pyx_optional_args->ns;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__coll_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_80coll_remove)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      __Pyx_INCREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1542
 * 		"""
 * 		cdef char *n
 * 		n = check_namespace(ns, False)             # <<<<<<<<<<<<<<
 * 		nam = from_unicode(name)
 * 		return self.create_result(cb, xmmsc_coll_remove(self.conn, <char *>nam, n))
 */
  __pyx_t_4 = __pyx_f_7xmmsapi_check_namespace(__pyx_v_ns, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_4;

  /* "xmmsapi.pyx":1543
 * 		cdef char *n
 * 		n = check_namespace(ns, False)
 * 		nam = from_unicode(name)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_coll_remove(self.conn, <char *>nam, n))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_nam = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1544
 * 		n = check_namespace(ns, False)
 * 		nam = from_unicode(name)
 * 		return self.create_result(cb, xmmsc_coll_remove(self.conn, <char *>nam, n))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult coll_rename(self, oldname, newname, ns="Collections", cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_nam); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_coll_remove(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4), __pyx_v_n))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nam);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1533
 * 		return self.create_result(cb, xmmsc_coll_save(self.conn, coll.coll, <char *>nam, n))
 * 
 * 	cpdef XmmsResult coll_remove(self, name, ns="Collections", cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_remove(name, ns="Collections", cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_80coll_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_80coll_remove[] = "\n\t\tcoll_remove(name, ns=\"Collections\", cb=None) -> XmmsResult\n\n\t\tRemove a collection on server.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_80coll_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_remove __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__ns,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("coll_remove");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_n_s__Collections);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ns);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "coll_remove") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = values[0];
    __pyx_v_ns = values[1];
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coll_remove", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.ns = __pyx_v_ns;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->coll_remove(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_name, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1546
 * 		return self.create_result(cb, xmmsc_coll_remove(self.conn, <char *>nam, n))
 * 
 * 	cpdef XmmsResult coll_rename(self, oldname, newname, ns="Collections", cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_rename(oldname, newname, ns="Collections", cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_81coll_rename(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_coll_rename(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_oldname, PyObject *__pyx_v_newname, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_rename *__pyx_optional_args) {
  PyObject *__pyx_v_ns = ((PyObject *)__pyx_n_s__Collections);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  char *__pyx_v_n;
  PyObject *__pyx_v_oldnam = NULL;
  PyObject *__pyx_v_newnam = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coll_rename");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_ns = __pyx_optional_args->ns;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__coll_rename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_81coll_rename)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_oldname);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_oldname);
      __Pyx_GIVEREF(__pyx_v_oldname);
      __Pyx_INCREF(__pyx_v_newname);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_newname);
      __Pyx_GIVEREF(__pyx_v_newname);
      __Pyx_INCREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1555
 * 		"""
 * 		cdef char *n
 * 		n = check_namespace(ns, False)             # <<<<<<<<<<<<<<
 * 
 * 		oldnam = from_unicode(oldname)
 */
  __pyx_t_4 = __pyx_f_7xmmsapi_check_namespace(__pyx_v_ns, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_4;

  /* "xmmsapi.pyx":1557
 * 		n = check_namespace(ns, False)
 * 
 * 		oldnam = from_unicode(oldname)             # <<<<<<<<<<<<<<
 * 		newnam = from_unicode(newname)
 * 		return self.create_result(cb, xmmsc_coll_rename(self.conn, <char *>oldnam, <char *>newnam, n))
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_oldname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_oldnam = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1558
 * 
 * 		oldnam = from_unicode(oldname)
 * 		newnam = from_unicode(newname)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_coll_rename(self.conn, <char *>oldnam, <char *>newnam, n))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_newname); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_newnam = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1559
 * 		oldnam = from_unicode(oldname)
 * 		newnam = from_unicode(newname)
 * 		return self.create_result(cb, xmmsc_coll_rename(self.conn, <char *>oldnam, <char *>newnam, n))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult coll_idlist_from_playlist_file(self, path, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_oldnam); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyBytes_AsString(__pyx_v_newnam); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_coll_rename(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4), ((char *)__pyx_t_5), __pyx_v_n))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_rename", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_oldnam);
  __Pyx_XDECREF(__pyx_v_newnam);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1546
 * 		return self.create_result(cb, xmmsc_coll_remove(self.conn, <char *>nam, n))
 * 
 * 	cpdef XmmsResult coll_rename(self, oldname, newname, ns="Collections", cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_rename(oldname, newname, ns="Collections", cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_81coll_rename(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_81coll_rename[] = "\n\t\tcoll_rename(oldname, newname, ns=\"Collections\", cb=None) -> XmmsResult\n\n\t\tRename a collection.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_81coll_rename(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_oldname = 0;
  PyObject *__pyx_v_newname = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_rename __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldname,&__pyx_n_s__newname,&__pyx_n_s__ns,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("coll_rename");
  {
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)__pyx_n_s__Collections);
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldname);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newname);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("coll_rename", 0, 2, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ns);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "coll_rename") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_oldname = values[0];
    __pyx_v_newname = values[1];
    __pyx_v_ns = values[2];
    __pyx_v_cb = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coll_rename", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_rename", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.ns = __pyx_v_ns;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->coll_rename(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_oldname, __pyx_v_newname, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_rename", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1561
 * 		return self.create_result(cb, xmmsc_coll_rename(self.conn, <char *>oldnam, <char *>newnam, n))
 * 
 * 	cpdef XmmsResult coll_idlist_from_playlist_file(self, path, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_idlist_from_playlist_file(path, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_82coll_idlist_from_playlist_file(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_coll_idlist_from_playlist_file(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_path, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_idlist_from_playlist_file *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_p = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coll_idlist_from_playlist_file");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_72); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_82coll_idlist_from_playlist_file)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_path);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
      __Pyx_GIVEREF(__pyx_v_path);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1569
 * 		@return: The result of the operation.
 * 		"""
 * 		p = from_unicode(path)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_coll_idlist_from_playlist_file(self.conn, <char *>p))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_p = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1570
 * 		"""
 * 		p = from_unicode(path)
 * 		return self.create_result(cb, xmmsc_coll_idlist_from_playlist_file(self.conn, <char *>p))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult coll_query_ids(self, Collection coll, start=0, leng=0, order=None, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_p); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_coll_idlist_from_playlist_file(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_idlist_from_playlist_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1561
 * 		return self.create_result(cb, xmmsc_coll_rename(self.conn, <char *>oldnam, <char *>newnam, n))
 * 
 * 	cpdef XmmsResult coll_idlist_from_playlist_file(self, path, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_idlist_from_playlist_file(path, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_82coll_idlist_from_playlist_file(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_82coll_idlist_from_playlist_file[] = "\n\t\tcoll_idlist_from_playlist_file(path, cb=None) -> XmmsResult\n\n\t\tCreate an idlist from a playlist.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_82coll_idlist_from_playlist_file(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_idlist_from_playlist_file __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("coll_idlist_from_playlist_file");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "coll_idlist_from_playlist_file") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_path = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coll_idlist_from_playlist_file", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_idlist_from_playlist_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->coll_idlist_from_playlist_file(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_path, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_idlist_from_playlist_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1572
 * 		return self.create_result(cb, xmmsc_coll_idlist_from_playlist_file(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult coll_query_ids(self, Collection coll, start=0, leng=0, order=None, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_query_ids(coll, start=0, leng=0, order=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_83coll_query_ids(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_coll_query_ids(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_coll, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_query_ids *__pyx_optional_args) {
  PyObject *__pyx_v_start = ((PyObject *)__pyx_int_0);
  PyObject *__pyx_v_leng = ((PyObject *)__pyx_int_0);
  PyObject *__pyx_v_order = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  xmmsv_t *__pyx_v_order_val;
  xmmsc_result_t *__pyx_v_res;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  xmmsv_t *__pyx_t_5;
  unsigned int __pyx_t_6;
  unsigned int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coll_query_ids");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_start = __pyx_optional_args->start;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_leng = __pyx_optional_args->leng;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_order = __pyx_optional_args->order;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_cb = __pyx_optional_args->cb;
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_order);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__coll_query_ids); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_83coll_query_ids)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(((PyObject *)__pyx_v_coll));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_coll));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_coll));
      __Pyx_INCREF(__pyx_v_start);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_start);
      __Pyx_GIVEREF(__pyx_v_start);
      __Pyx_INCREF(__pyx_v_leng);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_leng);
      __Pyx_GIVEREF(__pyx_v_leng);
      __Pyx_INCREF(__pyx_v_order);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_order);
      __Pyx_GIVEREF(__pyx_v_order);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1583
 * 		cdef xmmsc_result_t *res
 * 
 * 		if order is None:             # <<<<<<<<<<<<<<
 * 			order = []
 * 		order_val = create_native_value(order)
 */
  __pyx_t_4 = (__pyx_v_order == Py_None);
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":1584
 * 
 * 		if order is None:
 * 			order = []             # <<<<<<<<<<<<<<
 * 		order_val = create_native_value(order)
 * 		res = xmmsc_coll_query_ids(self.conn, coll.coll, order_val, start, leng)
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_DECREF(__pyx_v_order);
    __pyx_v_order = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":1585
 * 		if order is None:
 * 			order = []
 * 		order_val = create_native_value(order)             # <<<<<<<<<<<<<<
 * 		res = xmmsc_coll_query_ids(self.conn, coll.coll, order_val, start, leng)
 * 		xmmsv_unref(order_val)
 */
  __pyx_t_5 = __pyx_f_9xmmsvalue_create_native_value(__pyx_v_order); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_order_val = __pyx_t_5;

  /* "xmmsapi.pyx":1586
 * 			order = []
 * 		order_val = create_native_value(order)
 * 		res = xmmsc_coll_query_ids(self.conn, coll.coll, order_val, start, leng)             # <<<<<<<<<<<<<<
 * 		xmmsv_unref(order_val)
 * 		return self.create_result(cb, res)
 */
  __pyx_t_6 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_start); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_leng); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_res = xmmsc_coll_query_ids(__pyx_v_self->__pyx_base.conn, __pyx_v_coll->__pyx_base.coll, __pyx_v_order_val, __pyx_t_6, __pyx_t_7);

  /* "xmmsapi.pyx":1587
 * 		order_val = create_native_value(order)
 * 		res = xmmsc_coll_query_ids(self.conn, coll.coll, order_val, start, leng)
 * 		xmmsv_unref(order_val)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
  xmmsv_unref(__pyx_v_order_val);

  /* "xmmsapi.pyx":1588
 * 		res = xmmsc_coll_query_ids(self.conn, coll.coll, order_val, start, leng)
 * 		xmmsv_unref(order_val)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult coll_query_infos(self, Collection coll, fields, start=0, leng=0, order=None, groupby=None, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_query_ids", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_order);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1572
 * 		return self.create_result(cb, xmmsc_coll_idlist_from_playlist_file(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult coll_query_ids(self, Collection coll, start=0, leng=0, order=None, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_query_ids(coll, start=0, leng=0, order=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_83coll_query_ids(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_83coll_query_ids[] = "\n\t\tcoll_query_ids(coll, start=0, leng=0, order=None, cb=None) -> XmmsResult\n\n\t\tRetrive a list of ids of the media matching the collection\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_83coll_query_ids(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_coll = 0;
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_leng = 0;
  PyObject *__pyx_v_order = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_query_ids __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__coll,&__pyx_n_s__start,&__pyx_n_s__leng,&__pyx_n_s__order,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("coll_query_ids");
  {
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)__pyx_int_0);
    values[2] = ((PyObject *)__pyx_int_0);
    values[3] = ((PyObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coll);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__leng);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__order);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "coll_query_ids") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_coll = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_start = values[1];
    __pyx_v_leng = values[2];
    __pyx_v_order = values[3];
    __pyx_v_cb = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coll_query_ids", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_query_ids", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_coll), __pyx_ptype_9xmmsvalue_Collection, 1, "coll", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 4;
  __pyx_t_2.start = __pyx_v_start;
  __pyx_t_2.leng = __pyx_v_leng;
  __pyx_t_2.order = __pyx_v_order;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->coll_query_ids(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_coll, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_query_ids", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1590
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult coll_query_infos(self, Collection coll, fields, start=0, leng=0, order=None, groupby=None, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_query_infos(coll, fields, start=0, leng=0, order=None, groupby=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_84coll_query_infos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_coll_query_infos(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_coll, PyObject *__pyx_v_fields, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_query_infos *__pyx_optional_args) {
  PyObject *__pyx_v_start = ((PyObject *)__pyx_int_0);
  PyObject *__pyx_v_leng = ((PyObject *)__pyx_int_0);
  PyObject *__pyx_v_order = ((PyObject *)Py_None);
  PyObject *__pyx_v_groupby = ((PyObject *)Py_None);
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  xmmsv_t *__pyx_v_order_val;
  xmmsv_t *__pyx_v_fields_val;
  xmmsv_t *__pyx_v_groupby_val;
  xmmsc_result_t *__pyx_v_res;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  xmmsv_t *__pyx_t_5;
  unsigned int __pyx_t_6;
  unsigned int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coll_query_infos");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_start = __pyx_optional_args->start;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_leng = __pyx_optional_args->leng;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_order = __pyx_optional_args->order;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_groupby = __pyx_optional_args->groupby;
            if (__pyx_optional_args->__pyx_n > 4) {
              __pyx_v_cb = __pyx_optional_args->cb;
            }
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_order);
  __Pyx_INCREF(__pyx_v_groupby);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__coll_query_infos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_84coll_query_infos)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(((PyObject *)__pyx_v_coll));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_coll));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_coll));
      __Pyx_INCREF(__pyx_v_fields);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_fields);
      __Pyx_GIVEREF(__pyx_v_fields);
      __Pyx_INCREF(__pyx_v_start);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_start);
      __Pyx_GIVEREF(__pyx_v_start);
      __Pyx_INCREF(__pyx_v_leng);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_leng);
      __Pyx_GIVEREF(__pyx_v_leng);
      __Pyx_INCREF(__pyx_v_order);
      PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_order);
      __Pyx_GIVEREF(__pyx_v_order);
      __Pyx_INCREF(__pyx_v_groupby);
      PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_groupby);
      __Pyx_GIVEREF(__pyx_v_groupby);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1603
 * 		cdef xmmsc_result_t *res
 * 
 * 		if order is None:             # <<<<<<<<<<<<<<
 * 			order = []
 * 		if groupby is None:
 */
  __pyx_t_4 = (__pyx_v_order == Py_None);
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":1604
 * 
 * 		if order is None:
 * 			order = []             # <<<<<<<<<<<<<<
 * 		if groupby is None:
 * 			groupby = []
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_DECREF(__pyx_v_order);
    __pyx_v_order = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":1605
 * 		if order is None:
 * 			order = []
 * 		if groupby is None:             # <<<<<<<<<<<<<<
 * 			groupby = []
 * 		order_val = create_native_value(order)
 */
  __pyx_t_4 = (__pyx_v_groupby == Py_None);
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":1606
 * 			order = []
 * 		if groupby is None:
 * 			groupby = []             # <<<<<<<<<<<<<<
 * 		order_val = create_native_value(order)
 * 		fields_val = create_native_value(fields)
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_DECREF(__pyx_v_groupby);
    __pyx_v_groupby = ((PyObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "xmmsapi.pyx":1607
 * 		if groupby is None:
 * 			groupby = []
 * 		order_val = create_native_value(order)             # <<<<<<<<<<<<<<
 * 		fields_val = create_native_value(fields)
 * 		groupby_val = create_native_value(groupby)
 */
  __pyx_t_5 = __pyx_f_9xmmsvalue_create_native_value(__pyx_v_order); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_order_val = __pyx_t_5;

  /* "xmmsapi.pyx":1608
 * 			groupby = []
 * 		order_val = create_native_value(order)
 * 		fields_val = create_native_value(fields)             # <<<<<<<<<<<<<<
 * 		groupby_val = create_native_value(groupby)
 * 		res = xmmsc_coll_query_infos(self.conn, coll.coll, order_val, start, leng, fields_val, groupby_val)
 */
  __pyx_t_5 = __pyx_f_9xmmsvalue_create_native_value(__pyx_v_fields); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_fields_val = __pyx_t_5;

  /* "xmmsapi.pyx":1609
 * 		order_val = create_native_value(order)
 * 		fields_val = create_native_value(fields)
 * 		groupby_val = create_native_value(groupby)             # <<<<<<<<<<<<<<
 * 		res = xmmsc_coll_query_infos(self.conn, coll.coll, order_val, start, leng, fields_val, groupby_val)
 * 		xmmsv_unref(order_val)
 */
  __pyx_t_5 = __pyx_f_9xmmsvalue_create_native_value(__pyx_v_groupby); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_groupby_val = __pyx_t_5;

  /* "xmmsapi.pyx":1610
 * 		fields_val = create_native_value(fields)
 * 		groupby_val = create_native_value(groupby)
 * 		res = xmmsc_coll_query_infos(self.conn, coll.coll, order_val, start, leng, fields_val, groupby_val)             # <<<<<<<<<<<<<<
 * 		xmmsv_unref(order_val)
 * 		xmmsv_unref(fields_val)
 */
  __pyx_t_6 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_start); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_leng); if (unlikely((__pyx_t_7 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_res = xmmsc_coll_query_infos(__pyx_v_self->__pyx_base.conn, __pyx_v_coll->__pyx_base.coll, __pyx_v_order_val, __pyx_t_6, __pyx_t_7, __pyx_v_fields_val, __pyx_v_groupby_val);

  /* "xmmsapi.pyx":1611
 * 		groupby_val = create_native_value(groupby)
 * 		res = xmmsc_coll_query_infos(self.conn, coll.coll, order_val, start, leng, fields_val, groupby_val)
 * 		xmmsv_unref(order_val)             # <<<<<<<<<<<<<<
 * 		xmmsv_unref(fields_val)
 * 		xmmsv_unref(groupby_val)
 */
  xmmsv_unref(__pyx_v_order_val);

  /* "xmmsapi.pyx":1612
 * 		res = xmmsc_coll_query_infos(self.conn, coll.coll, order_val, start, leng, fields_val, groupby_val)
 * 		xmmsv_unref(order_val)
 * 		xmmsv_unref(fields_val)             # <<<<<<<<<<<<<<
 * 		xmmsv_unref(groupby_val)
 * 		return self.create_result(cb, res)
 */
  xmmsv_unref(__pyx_v_fields_val);

  /* "xmmsapi.pyx":1613
 * 		xmmsv_unref(order_val)
 * 		xmmsv_unref(fields_val)
 * 		xmmsv_unref(groupby_val)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
  xmmsv_unref(__pyx_v_groupby_val);

  /* "xmmsapi.pyx":1614
 * 		xmmsv_unref(fields_val)
 * 		xmmsv_unref(groupby_val)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult bindata_add(self, data, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_query_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_order);
  __Pyx_XDECREF(__pyx_v_groupby);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1590
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult coll_query_infos(self, Collection coll, fields, start=0, leng=0, order=None, groupby=None, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		coll_query_infos(coll, fields, start=0, leng=0, order=None, groupby=None, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_84coll_query_infos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_84coll_query_infos[] = "\n\t\tcoll_query_infos(coll, fields, start=0, leng=0, order=None, groupby=None, cb=None) -> XmmsResult\n\n\t\tRetrive a list of mediainfo of the media matching the collection\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_84coll_query_infos(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_coll = 0;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_start = 0;
  PyObject *__pyx_v_leng = 0;
  PyObject *__pyx_v_order = 0;
  PyObject *__pyx_v_groupby = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_query_infos __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__coll,&__pyx_n_s__fields,&__pyx_n_s__start,&__pyx_n_s__leng,&__pyx_n_s__order,&__pyx_n_s__groupby,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("coll_query_infos");
  {
    PyObject* values[7] = {0,0,0,0,0,0,0};
    values[2] = ((PyObject *)__pyx_int_0);
    values[3] = ((PyObject *)__pyx_int_0);
    values[4] = ((PyObject *)Py_None);
    values[5] = ((PyObject *)Py_None);
    values[6] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__coll);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fields);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("coll_query_infos", 0, 2, 7, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__leng);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__order);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__groupby);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "coll_query_infos") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_coll = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_fields = values[1];
    __pyx_v_start = values[2];
    __pyx_v_leng = values[3];
    __pyx_v_order = values[4];
    __pyx_v_groupby = values[5];
    __pyx_v_cb = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("coll_query_infos", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_query_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_coll), __pyx_ptype_9xmmsvalue_Collection, 1, "coll", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 5;
  __pyx_t_2.start = __pyx_v_start;
  __pyx_t_2.leng = __pyx_v_leng;
  __pyx_t_2.order = __pyx_v_order;
  __pyx_t_2.groupby = __pyx_v_groupby;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->coll_query_infos(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_coll, __pyx_v_fields, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.coll_query_infos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1616
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult bindata_add(self, data, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		bindata_add(data, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_85bindata_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_bindata_add(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_add *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  char *__pyx_v_t;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bindata_add");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__bindata_add); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_85bindata_add)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1625
 * 		"""
 * 		cdef char *t
 * 		t = <char *>data             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_bindata_add(self.conn,<unsigned char *>t,len(data)))
 * 
 */
  __pyx_t_4 = PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_t = ((char *)__pyx_t_4);

  /* "xmmsapi.pyx":1626
 * 		cdef char *t
 * 		t = <char *>data
 * 		return self.create_result(cb, xmmsc_bindata_add(self.conn,<unsigned char *>t,len(data)))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult bindata_retrieve(self, hash, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_5 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_bindata_add(__pyx_v_self->__pyx_base.conn, ((unsigned char *)__pyx_v_t), __pyx_t_5))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.bindata_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1616
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult bindata_add(self, data, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		bindata_add(data, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_85bindata_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_85bindata_add[] = "\n\t\tbindata_add(data, cb=None) -> XmmsResult\n\n\t\tAdd a datafile to the server\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_85bindata_add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_add __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__data,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("bindata_add");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "bindata_add") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bindata_add", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.bindata_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->bindata_add(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_data, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.bindata_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1628
 * 		return self.create_result(cb, xmmsc_bindata_add(self.conn,<unsigned char *>t,len(data)))
 * 
 * 	cpdef XmmsResult bindata_retrieve(self, hash, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		bindata_retrieve(hash, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_86bindata_retrieve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_bindata_retrieve(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_hash, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_retrieve *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_h = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bindata_retrieve");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__bindata_retrieve); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_86bindata_retrieve)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_hash);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_hash);
      __Pyx_GIVEREF(__pyx_v_hash);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1636
 * 		@return: The result of the operation.
 * 		"""
 * 		h = from_unicode(hash)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_bindata_retrieve(self.conn, <char *>h))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_hash); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_h = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1637
 * 		"""
 * 		h = from_unicode(hash)
 * 		return self.create_result(cb, xmmsc_bindata_retrieve(self.conn, <char *>h))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult bindata_remove(self, hash, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_h); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_bindata_retrieve(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.bindata_retrieve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1628
 * 		return self.create_result(cb, xmmsc_bindata_add(self.conn,<unsigned char *>t,len(data)))
 * 
 * 	cpdef XmmsResult bindata_retrieve(self, hash, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		bindata_retrieve(hash, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_86bindata_retrieve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_86bindata_retrieve[] = "\n\t\tbindata_retrieve(hash, cb=None) -> XmmsResult\n\n\t\tRetrieve a datafile from the server\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_86bindata_retrieve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hash = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_retrieve __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__hash,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("bindata_retrieve");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__hash);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "bindata_retrieve") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_hash = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bindata_retrieve", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.bindata_retrieve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->bindata_retrieve(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_hash, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.bindata_retrieve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1639
 * 		return self.create_result(cb, xmmsc_bindata_retrieve(self.conn, <char *>h))
 * 
 * 	cpdef XmmsResult bindata_remove(self, hash, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		bindata_remove(hash, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_87bindata_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_bindata_remove(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, PyObject *__pyx_v_hash, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_remove *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_h = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bindata_remove");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__bindata_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_87bindata_remove)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_hash);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_hash);
      __Pyx_GIVEREF(__pyx_v_hash);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1647
 * 		@return: The result of the operation.
 * 		"""
 * 		h = from_unicode(hash)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_bindata_remove(self.conn, <char *>h))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_hash); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_h = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1648
 * 		"""
 * 		h = from_unicode(hash)
 * 		return self.create_result(cb, xmmsc_bindata_remove(self.conn, <char *>h))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult bindata_list(self, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_h); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_bindata_remove(__pyx_v_self->__pyx_base.conn, ((char *)__pyx_t_4)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.bindata_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_h);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1639
 * 		return self.create_result(cb, xmmsc_bindata_retrieve(self.conn, <char *>h))
 * 
 * 	cpdef XmmsResult bindata_remove(self, hash, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		bindata_remove(hash, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_87bindata_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_87bindata_remove[] = "\n\t\tbindata_remove(hash, cb=None) -> XmmsResult\n\n\t\tRemove a datafile from the server\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_87bindata_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hash = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_remove __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__hash,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("bindata_remove");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__hash);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "bindata_remove") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_hash = values[0];
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bindata_remove", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.bindata_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->bindata_remove(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_hash, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.bindata_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1650
 * 		return self.create_result(cb, xmmsc_bindata_remove(self.conn, <char *>h))
 * 
 * 	cpdef XmmsResult bindata_list(self, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		bindata_list(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_88bindata_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_bindata_list(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_list *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bindata_list");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__bindata_list); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_88bindata_list)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1658
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_bindata_list(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult stats(self, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_bindata_list(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.bindata_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1650
 * 		return self.create_result(cb, xmmsc_bindata_remove(self.conn, <char *>h))
 * 
 * 	cpdef XmmsResult bindata_list(self, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		bindata_list(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_88bindata_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_88bindata_list[] = "\n\t\tbindata_list(cb=None) -> XmmsResult\n\n\t\tList all bindata hashes stored on the server\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_88bindata_list(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_list __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("bindata_list");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "bindata_list") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bindata_list", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.bindata_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->bindata_list(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.bindata_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1660
 * 		return self.create_result(cb, xmmsc_bindata_list(self.conn))
 * 
 * 	cpdef XmmsResult stats(self, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		stats(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_89stats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_stats(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_stats *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stats");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__stats); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_89stats)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1668
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_main_stats(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult visualization_version(self, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_main_stats(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.stats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1660
 * 		return self.create_result(cb, xmmsc_bindata_list(self.conn))
 * 
 * 	cpdef XmmsResult stats(self, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		stats(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_89stats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_89stats[] = "\n\t\tstats(cb=None) -> XmmsResult\n\n\t\tGet statistics informations from the server\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_89stats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_stats __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("stats");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "stats") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("stats", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.stats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->stats(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.stats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1670
 * 		return self.create_result(cb, xmmsc_main_stats(self.conn))
 * 
 * 	cpdef XmmsResult visualization_version(self, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_version(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_90visualization_version(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_visualization_version(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_version *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("visualization_version");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_73); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_90visualization_version)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1678
 * 		@return: The result of the operation.
 * 		"""
 * 		return self.create_result(cb, xmmsc_visualization_version(self.conn))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult visualization_init(self, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_visualization_version(__pyx_v_self->__pyx_base.conn))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1670
 * 		return self.create_result(cb, xmmsc_main_stats(self.conn))
 * 
 * 	cpdef XmmsResult visualization_version(self, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_version(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_90visualization_version(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_90visualization_version[] = "\n\t\txmmsc_visualization_version(cb=None) -> XmmsResult\n\n\t\tGet the version of the visualization plugin installed on the server.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_90visualization_version(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_version __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("visualization_version");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "visualization_version") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("visualization_version", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->visualization_version(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1680
 * 		return self.create_result(cb, xmmsc_visualization_version(self.conn))
 * 
 * 	cpdef XmmsResult visualization_init(self, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_init(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_91visualization_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_visualization_init(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_init *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("visualization_init");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__visualization_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_91visualization_init)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1688
 * 		@return: The result of the operation
 * 		"""
 * 		return self.create_vis_result(cb, xmmsc_visualization_init(self.conn), VIS_RESULT_CMD_INIT)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult visualization_start(self, int handle, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_vis_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_visualization_init(__pyx_v_self->__pyx_base.conn), __pyx_e_7xmmsapi_VIS_RESULT_CMD_INIT)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1680
 * 		return self.create_result(cb, xmmsc_visualization_version(self.conn))
 * 
 * 	cpdef XmmsResult visualization_init(self, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_init(cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_91visualization_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_91visualization_init[] = "\n\t\txmmsc_visualization_init(cb=None) -> XmmsResult\n\n\t\tGet a new visualization handle.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_91visualization_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_init __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("visualization_init");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "visualization_init") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cb = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("visualization_init", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->visualization_init(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1690
 * 		return self.create_vis_result(cb, xmmsc_visualization_init(self.conn), VIS_RESULT_CMD_INIT)
 * 
 * 	cpdef XmmsResult visualization_start(self, int handle, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_start(handle, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_92visualization_start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_visualization_start(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_handle, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_start *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("visualization_start");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__visualization_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_92visualization_start)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_handle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1698
 * 		@return: The result of the operation
 * 		"""
 * 		return self.create_vis_result(cb, xmmsc_visualization_start(self.conn, handle), VIS_RESULT_CMD_START)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef bint visualization_started(self, int handle):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_vis_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_visualization_start(__pyx_v_self->__pyx_base.conn, __pyx_v_handle), __pyx_e_7xmmsapi_VIS_RESULT_CMD_START)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1690
 * 		return self.create_vis_result(cb, xmmsc_visualization_init(self.conn), VIS_RESULT_CMD_INIT)
 * 
 * 	cpdef XmmsResult visualization_start(self, int handle, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_start(handle, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_92visualization_start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_92visualization_start[] = "\n\t\txmmsc_visualization_start(handle, cb=None) -> XmmsResult\n\n\t\tStarts the visualization.\n\t\t@rtype: L{XmmsResult}\n\t\t@return: The result of the operation\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_92visualization_start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_handle;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_start __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__handle,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("visualization_start");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__handle);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "visualization_start") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_handle = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_handle == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_cb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("visualization_start", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->visualization_start(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_handle, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1700
 * 		return self.create_vis_result(cb, xmmsc_visualization_start(self.conn, handle), VIS_RESULT_CMD_START)
 * 
 * 	cpdef bint visualization_started(self, int handle):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_started(handle) -> bool
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_93visualization_started(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle); /*proto*/
static int __pyx_f_7xmmsapi_7XmmsApi_visualization_started(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_handle, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("visualization_started");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_74); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_93visualization_started)) {
      __pyx_t_2 = PyInt_FromLong(__pyx_v_handle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1708
 * 		@return: True if the visualization is started, False otherwise.
 * 		"""
 * 		return xmmsc_visualization_started(self.conn, handle)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef bint visualization_errored(self, int handle):
 */
  __pyx_r = xmmsc_visualization_started(__pyx_v_self->__pyx_base.conn, __pyx_v_handle);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("xmmsapi.XmmsApi.visualization_started", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1700
 * 		return self.create_vis_result(cb, xmmsc_visualization_start(self.conn, handle), VIS_RESULT_CMD_START)
 * 
 * 	cpdef bint visualization_started(self, int handle):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_started(handle) -> bool
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_93visualization_started(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_93visualization_started[] = "\n\t\txmmsc_visualization_started(handle) -> bool\n\n\t\tWhether the visualization is started or not.\n\t\t@rtype: L{bool}\n\t\t@return: True if the visualization is started, False otherwise.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_93visualization_started(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle) {
  int __pyx_v_handle;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("visualization_started");
  assert(__pyx_arg_handle); {
    __pyx_v_handle = __Pyx_PyInt_AsInt(__pyx_arg_handle); if (unlikely((__pyx_v_handle == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_started", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->visualization_started(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_handle, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_started", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1710
 * 		return xmmsc_visualization_started(self.conn, handle)
 * 
 * 	cpdef bint visualization_errored(self, int handle):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_errored(handle) -> bool
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_94visualization_errored(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle); /*proto*/
static int __pyx_f_7xmmsapi_7XmmsApi_visualization_errored(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_handle, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("visualization_errored");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_75); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_94visualization_errored)) {
      __pyx_t_2 = PyInt_FromLong(__pyx_v_handle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_4;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1718
 * 		@return: True if the visualization got an error, False otherwise.
 * 		"""
 * 		return xmmsc_visualization_errored(self.conn, handle)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult visualization_property_set(self, int handle, key, value, cb=None):
 */
  __pyx_r = xmmsc_visualization_errored(__pyx_v_self->__pyx_base.conn, __pyx_v_handle);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("xmmsapi.XmmsApi.visualization_errored", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1710
 * 		return xmmsc_visualization_started(self.conn, handle)
 * 
 * 	cpdef bint visualization_errored(self, int handle):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_errored(handle) -> bool
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_94visualization_errored(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_94visualization_errored[] = "\n\t\txmmsc_visualization_errored(handle) -> bool\n\n\t\tWhether the visualization got an error.\n\t\t@rtype: L{bool}\n\t\t@return: True if the visualization got an error, False otherwise.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_94visualization_errored(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle) {
  int __pyx_v_handle;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("visualization_errored");
  assert(__pyx_arg_handle); {
    __pyx_v_handle = __Pyx_PyInt_AsInt(__pyx_arg_handle); if (unlikely((__pyx_v_handle == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_errored", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->visualization_errored(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_handle, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_errored", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1720
 * 		return xmmsc_visualization_errored(self.conn, handle)
 * 
 * 	cpdef XmmsResult visualization_property_set(self, int handle, key, value, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_property_set(handle, key, value, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_95visualization_property_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_visualization_property_set(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_handle, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_property_set *__pyx_optional_args) {
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("visualization_property_set");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_cb = __pyx_optional_args->cb;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_76); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_95visualization_property_set)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_handle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1728
 * 		@return: The result of the operation
 * 		"""
 * 		k = from_unicode(key)             # <<<<<<<<<<<<<<
 * 		v = from_unicode(value)
 * 		return self.create_result(cb, xmmsc_visualization_property_set(self.conn, handle, <char *>k, <char *>v))
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_k = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1729
 * 		"""
 * 		k = from_unicode(key)
 * 		v = from_unicode(value)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, xmmsc_visualization_property_set(self.conn, handle, <char *>k, <char *>v))
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1730
 * 		k = from_unicode(key)
 * 		v = from_unicode(value)
 * 		return self.create_result(cb, xmmsc_visualization_property_set(self.conn, handle, <char *>k, <char *>v))             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsResult visualization_properties_set(self, int handle, props={}, cb=None):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_4 = PyBytes_AsString(__pyx_v_k); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyBytes_AsString(__pyx_v_v); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, xmmsc_visualization_property_set(__pyx_v_self->__pyx_base.conn, __pyx_v_handle, ((char *)__pyx_t_4), ((char *)__pyx_t_5)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_property_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1720
 * 		return xmmsc_visualization_errored(self.conn, handle)
 * 
 * 	cpdef XmmsResult visualization_property_set(self, int handle, key, value, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_property_set(handle, key, value, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_95visualization_property_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_95visualization_property_set[] = "\n\t\txmmsc_visualization_property_set(handle, key, value, cb=None) -> XmmsResult\n\n\t\tSet a visualization's property.\n\t\t@rtype: L{bool}\n\t\t@return: The result of the operation\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_95visualization_property_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_handle;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_property_set __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__handle,&__pyx_n_s__key,&__pyx_n_s__value,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("visualization_property_set");
  {
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__handle);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("visualization_property_set", 0, 3, 4, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("visualization_property_set", 0, 3, 4, 2); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "visualization_property_set") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_handle = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_handle == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_key = values[1];
    __pyx_v_value = values[2];
    __pyx_v_cb = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("visualization_property_set", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_property_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->visualization_property_set(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_handle, __pyx_v_key, __pyx_v_value, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_property_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1732
 * 		return self.create_result(cb, xmmsc_visualization_property_set(self.conn, handle, <char *>k, <char *>v))
 * 
 * 	cpdef XmmsResult visualization_properties_set(self, int handle, props={}, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_properties_set(handle, props={}, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_96visualization_properties_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_f_7xmmsapi_7XmmsApi_visualization_properties_set(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_handle, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_properties_set *__pyx_optional_args) {
  PyObject *__pyx_v_props = __pyx_k_77;
  PyObject *__pyx_v_cb = ((PyObject *)Py_None);
  xmmsv_t *__pyx_v__props;
  xmmsc_result_t *__pyx_v_res;
  struct __pyx_obj_7xmmsapi_XmmsResult *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  xmmsv_t *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("visualization_properties_set");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_props = __pyx_optional_args->props;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_cb = __pyx_optional_args->cb;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_78); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_96visualization_properties_set)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_handle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_props);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_props);
      __Pyx_GIVEREF(__pyx_v_props);
      __Pyx_INCREF(__pyx_v_cb);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_cb);
      __Pyx_GIVEREF(__pyx_v_cb);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7xmmsapi_XmmsResult))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1743
 * 		cdef xmmsc_result_t *res
 * 
 * 		_props = create_native_value(props)             # <<<<<<<<<<<<<<
 * 		res = xmmsc_visualization_properties_set(self.conn, handle, _props)
 * 		xmmsv_unref(_props)
 */
  __pyx_t_4 = __pyx_f_9xmmsvalue_create_native_value(__pyx_v_props); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v__props = __pyx_t_4;

  /* "xmmsapi.pyx":1744
 * 
 * 		_props = create_native_value(props)
 * 		res = xmmsc_visualization_properties_set(self.conn, handle, _props)             # <<<<<<<<<<<<<<
 * 		xmmsv_unref(_props)
 * 		return self.create_result(cb, res)
 */
  __pyx_v_res = xmmsc_visualization_properties_set(__pyx_v_self->__pyx_base.conn, __pyx_v_handle, __pyx_v__props);

  /* "xmmsapi.pyx":1745
 * 		_props = create_native_value(props)
 * 		res = xmmsc_visualization_properties_set(self.conn, handle, _props)
 * 		xmmsv_unref(_props)             # <<<<<<<<<<<<<<
 * 		return self.create_result(cb, res)
 * 
 */
  xmmsv_unref(__pyx_v__props);

  /* "xmmsapi.pyx":1746
 * 		res = xmmsc_visualization_properties_set(self.conn, handle, _props)
 * 		xmmsv_unref(_props)
 * 		return self.create_result(cb, res)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef XmmsVisChunk visualization_chunk_get(self, int handle, int drawtime=0, bint blocking=False):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.create_result(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), __pyx_v_cb, __pyx_v_res)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsResult *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_properties_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1732
 * 		return self.create_result(cb, xmmsc_visualization_property_set(self.conn, handle, <char *>k, <char *>v))
 * 
 * 	cpdef XmmsResult visualization_properties_set(self, int handle, props={}, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_properties_set(handle, props={}, cb=None) -> XmmsResult
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_96visualization_properties_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_96visualization_properties_set[] = "\n\t\txmmsc_visualization_properties_set(handle, props={}, cb=None) -> XmmsResult\n\n\t\tSet visualization's properties.\n\t\t@rtype: L{bool}\n\t\t@return: The result of the operation\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_96visualization_properties_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_handle;
  PyObject *__pyx_v_props = 0;
  PyObject *__pyx_v_cb = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_properties_set __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__handle,&__pyx_n_s__props,&__pyx_n_s__cb,0};
  __Pyx_RefNannySetupContext("visualization_properties_set");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = __pyx_k_77;
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__handle);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__props);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cb);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "visualization_properties_set") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1732; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_handle = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_handle == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1732; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_props = values[1];
    __pyx_v_cb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("visualization_properties_set", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1732; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_properties_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.props = __pyx_v_props;
  __pyx_t_2.cb = __pyx_v_cb;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->visualization_properties_set(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_handle, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_properties_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1748
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsVisChunk visualization_chunk_get(self, int handle, int drawtime=0, bint blocking=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsv_visualization_chunk_get(handle, drawtime=0, blocking=False)
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_97visualization_chunk_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7xmmsapi_XmmsVisChunk *__pyx_f_7xmmsapi_7XmmsApi_visualization_chunk_get(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_handle, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_chunk_get *__pyx_optional_args) {
  int __pyx_v_drawtime = ((int)0);
  int __pyx_v_blocking = ((int)0);
  short *__pyx_v_buf;
  int __pyx_v_size;
  struct __pyx_obj_7xmmsapi_XmmsVisChunk *__pyx_v_chunk = 0;
  struct __pyx_obj_7xmmsapi_XmmsVisChunk *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("visualization_chunk_get");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_drawtime = __pyx_optional_args->drawtime;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_blocking = __pyx_optional_args->blocking;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_79); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_97visualization_chunk_get)) {
      __Pyx_XDECREF(((PyObject *)__pyx_r));
      __pyx_t_2 = PyInt_FromLong(__pyx_v_handle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyInt_FromLong(__pyx_v_drawtime); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_blocking); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7xmmsapi_XmmsVisChunk))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)__pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1760
 * 		cdef XmmsVisChunk chunk
 * 
 * 		buf = <short *>PyMem_Malloc(2 * XMMSC_VISUALIZATION_WINDOW_SIZE * sizeof (short))             # <<<<<<<<<<<<<<
 * 		size = xmmsc_visualization_chunk_get (self.conn, handle, buf, drawtime, blocking)
 * 		if size < 0:
 */
  __pyx_v_buf = ((short *)PyMem_Malloc(((2 * XMMSC_VISUALIZATION_WINDOW_SIZE) * (sizeof(short)))));

  /* "xmmsapi.pyx":1761
 * 
 * 		buf = <short *>PyMem_Malloc(2 * XMMSC_VISUALIZATION_WINDOW_SIZE * sizeof (short))
 * 		size = xmmsc_visualization_chunk_get (self.conn, handle, buf, drawtime, blocking)             # <<<<<<<<<<<<<<
 * 		if size < 0:
 * 			PyMem_Free(buf)
 */
  __pyx_v_size = xmmsc_visualization_chunk_get(__pyx_v_self->__pyx_base.conn, __pyx_v_handle, __pyx_v_buf, __pyx_v_drawtime, __pyx_v_blocking);

  /* "xmmsapi.pyx":1762
 * 		buf = <short *>PyMem_Malloc(2 * XMMSC_VISUALIZATION_WINDOW_SIZE * sizeof (short))
 * 		size = xmmsc_visualization_chunk_get (self.conn, handle, buf, drawtime, blocking)
 * 		if size < 0:             # <<<<<<<<<<<<<<
 * 			PyMem_Free(buf)
 * 			raise VisualizationError("Unrecoverable error in visualization")
 */
  __pyx_t_6 = (__pyx_v_size < 0);
  if (__pyx_t_6) {

    /* "xmmsapi.pyx":1763
 * 		size = xmmsc_visualization_chunk_get (self.conn, handle, buf, drawtime, blocking)
 * 		if size < 0:
 * 			PyMem_Free(buf)             # <<<<<<<<<<<<<<
 * 			raise VisualizationError("Unrecoverable error in visualization")
 * 		chunk = XmmsVisChunk()
 */
    PyMem_Free(__pyx_v_buf);

    /* "xmmsapi.pyx":1764
 * 		if size < 0:
 * 			PyMem_Free(buf)
 * 			raise VisualizationError("Unrecoverable error in visualization")             # <<<<<<<<<<<<<<
 * 		chunk = XmmsVisChunk()
 * 		chunk.set_data(buf, size)
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__VisualizationError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_81), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsapi.pyx":1765
 * 			PyMem_Free(buf)
 * 			raise VisualizationError("Unrecoverable error in visualization")
 * 		chunk = XmmsVisChunk()             # <<<<<<<<<<<<<<
 * 		chunk.set_data(buf, size)
 * 		PyMem_Free(buf)
 */
  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_7xmmsapi_XmmsVisChunk)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_chunk = ((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "xmmsapi.pyx":1766
 * 			raise VisualizationError("Unrecoverable error in visualization")
 * 		chunk = XmmsVisChunk()
 * 		chunk.set_data(buf, size)             # <<<<<<<<<<<<<<
 * 		PyMem_Free(buf)
 * 		return chunk
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsVisChunk *)__pyx_v_chunk->__pyx_vtab)->set_data(__pyx_v_chunk, __pyx_v_buf, __pyx_v_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "xmmsapi.pyx":1767
 * 		chunk = XmmsVisChunk()
 * 		chunk.set_data(buf, size)
 * 		PyMem_Free(buf)             # <<<<<<<<<<<<<<
 * 		return chunk
 * 
 */
  PyMem_Free(__pyx_v_buf);

  /* "xmmsapi.pyx":1768
 * 		chunk.set_data(buf, size)
 * 		PyMem_Free(buf)
 * 		return chunk             # <<<<<<<<<<<<<<
 * 
 * 	cpdef visualization_shutdown(self, int handle):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_chunk));
  __pyx_r = __pyx_v_chunk;
  goto __pyx_L0;

  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)Py_None); __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_chunk_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_chunk);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1748
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsVisChunk visualization_chunk_get(self, int handle, int drawtime=0, bint blocking=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsv_visualization_chunk_get(handle, drawtime=0, blocking=False)
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_97visualization_chunk_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_97visualization_chunk_get[] = "\n\t\txmmsv_visualization_chunk_get(handle, drawtime=0, blocking=False)\n\n\t\tFetches the next available data chunk\n\t\t@rtype: L{XmmsVisChunk}\n\t\t@return: Visualization chunk.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_97visualization_chunk_get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_handle;
  int __pyx_v_drawtime;
  int __pyx_v_blocking;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_chunk_get __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__handle,&__pyx_n_s__drawtime,&__pyx_n_s__blocking,0};
  __Pyx_RefNannySetupContext("visualization_chunk_get");
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__handle);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__drawtime);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__blocking);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "visualization_chunk_get") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_handle = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_handle == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    if (values[1]) {
      __pyx_v_drawtime = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_drawtime == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_drawtime = ((int)0);
    }
    if (values[2]) {
      __pyx_v_blocking = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_blocking == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_blocking = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("visualization_chunk_get", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_chunk_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.drawtime = __pyx_v_drawtime;
  __pyx_t_2.blocking = __pyx_v_blocking;
  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->visualization_chunk_get(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_handle, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_chunk_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1770
 * 		return chunk
 * 
 * 	cpdef visualization_shutdown(self, int handle):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_shutdown(handle) -> None
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_98visualization_shutdown(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle); /*proto*/
static PyObject *__pyx_f_7xmmsapi_7XmmsApi_visualization_shutdown(struct __pyx_obj_7xmmsapi_XmmsApi *__pyx_v_self, int __pyx_v_handle, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("visualization_shutdown");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s_82); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_7xmmsapi_7XmmsApi_98visualization_shutdown)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromLong(__pyx_v_handle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsapi.pyx":1776
 * 		Shutdown and destroy a visualization. After this, handle is no longer valid.
 * 		"""
 * 		xmmsc_visualization_shutdown(self.conn, handle)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  xmmsc_visualization_shutdown(__pyx_v_self->__pyx_base.conn, __pyx_v_handle);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1770
 * 		return chunk
 * 
 * 	cpdef visualization_shutdown(self, int handle):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_shutdown(handle) -> None
 */

static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_98visualization_shutdown(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle); /*proto*/
static char __pyx_doc_7xmmsapi_7XmmsApi_98visualization_shutdown[] = "\n\t\txmmsc_visualization_shutdown(handle) -> None\n\n\t\tShutdown and destroy a visualization. After this, handle is no longer valid.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_7XmmsApi_98visualization_shutdown(PyObject *__pyx_v_self, PyObject *__pyx_arg_handle) {
  int __pyx_v_handle;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("visualization_shutdown");
  assert(__pyx_arg_handle); {
    __pyx_v_handle = __Pyx_PyInt_AsInt(__pyx_arg_handle); if (unlikely((__pyx_v_handle == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsApi *)((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self)->__pyx_base.__pyx_vtab)->visualization_shutdown(((struct __pyx_obj_7xmmsapi_XmmsApi *)__pyx_v_self), __pyx_v_handle, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsapi.XmmsApi.visualization_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1788
 * 	#cdef object wakeup
 * 
 * 	def __cinit__(self):             # <<<<<<<<<<<<<<
 * 		self.do_loop = 0
 * 
 */

static int __pyx_pf_7xmmsapi_8XmmsLoop___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_7xmmsapi_8XmmsLoop___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;

  /* "xmmsapi.pyx":1789
 * 
 * 	def __cinit__(self):
 * 		self.do_loop = 0             # <<<<<<<<<<<<<<
 * 
 * 	def _loop_set_wakeup(self, fd):
 */
  ((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->do_loop = 0;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1791
 * 		self.do_loop = 0
 * 
 * 	def _loop_set_wakeup(self, fd):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Set the file descriptor for wakeup operations.
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsLoop_1_loop_set_wakeup(PyObject *__pyx_v_self, PyObject *__pyx_v_fd); /*proto*/
static char __pyx_doc_7xmmsapi_8XmmsLoop_1_loop_set_wakeup[] = "\n\t\tSet the file descriptor for wakeup operations.\n\t\tThis method should not be used outside the XmmsLoop class implementation.\n\t\tIt is provided to allow subclasses to add some locking on it in\n\t\tmultithreaded applications.\n\n\t\tUse a Rlock if you want to synchronize other methods using the same lock.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_8XmmsLoop_1_loop_set_wakeup(PyObject *__pyx_v_self, PyObject *__pyx_v_fd) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_loop_set_wakeup");

  /* "xmmsapi.pyx":1800
 * 		Use a Rlock if you want to synchronize other methods using the same lock.
 * 		"""
 * 		self.wakeup = fd             # <<<<<<<<<<<<<<
 * 	def _loop_get_wakeup(self):
 * 		"""
 */
  __Pyx_INCREF(__pyx_v_fd);
  __Pyx_GIVEREF(__pyx_v_fd);
  __Pyx_GOTREF(((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->wakeup);
  __Pyx_DECREF(((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->wakeup);
  ((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->wakeup = __pyx_v_fd;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1801
 * 		"""
 * 		self.wakeup = fd
 * 	def _loop_get_wakeup(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Get the file descriptor for wakeup operations.
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsLoop_2_loop_get_wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_8XmmsLoop_2_loop_get_wakeup[] = "\n\t\tGet the file descriptor for wakeup operations.\n\t\tThis method should not be used outside the XmmsLoop class implementation.\n\t\tIt is provided to allow subclasses to add some locking on it in\n\t\tmultithreaded applications.\n\n\t\tUse a Rlock if you want to synchronize other methods using the same lock.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_8XmmsLoop_2_loop_get_wakeup(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_loop_get_wakeup");

  /* "xmmsapi.pyx":1810
 * 		Use a Rlock if you want to synchronize other methods using the same lock.
 * 		"""
 * 		return self.wakeup             # <<<<<<<<<<<<<<
 * 
 * 	def exit_loop(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->wakeup);
  __pyx_r = ((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->wakeup;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1812
 * 		return self.wakeup
 * 
 * 	def exit_loop(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		exit_loop()
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsLoop_3exit_loop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_8XmmsLoop_3exit_loop[] = "\n\t\texit_loop()\n\n\t\tExits from the L{loop} call\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_8XmmsLoop_3exit_loop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("exit_loop");

  /* "xmmsapi.pyx":1818
 * 		Exits from the L{loop} call
 * 		"""
 * 		self.do_loop = False             # <<<<<<<<<<<<<<
 * 		self.loop_tickle()
 * 
 */
  ((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->do_loop = 0;

  /* "xmmsapi.pyx":1819
 * 		"""
 * 		self.do_loop = False
 * 		self.loop_tickle()             # <<<<<<<<<<<<<<
 * 
 * 	def loop_tickle(self):
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__loop_tickle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsapi.XmmsLoop.exit_loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1821
 * 		self.loop_tickle()
 * 
 * 	def loop_tickle(self):             # <<<<<<<<<<<<<<
 * 		w = self._loop_get_wakeup()
 * 		if w is not None:
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsLoop_4loop_tickle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_7xmmsapi_8XmmsLoop_4loop_tickle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_v_w = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("loop_tickle");

  /* "xmmsapi.pyx":1822
 * 
 * 	def loop_tickle(self):
 * 		w = self._loop_get_wakeup()             # <<<<<<<<<<<<<<
 * 		if w is not None:
 * 			write(w, "1".encode('ascii'))
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___loop_get_wakeup); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_w = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "xmmsapi.pyx":1823
 * 	def loop_tickle(self):
 * 		w = self._loop_get_wakeup()
 * 		if w is not None:             # <<<<<<<<<<<<<<
 * 			write(w, "1".encode('ascii'))
 * 
 */
  __pyx_t_3 = (__pyx_v_w != Py_None);
  if (__pyx_t_3) {

    /* "xmmsapi.pyx":1824
 * 		w = self._loop_get_wakeup()
 * 		if w is not None:
 * 			write(w, "1".encode('ascii'))             # <<<<<<<<<<<<<<
 * 
 * 	def loop_iter(self, infd=None, outfd=None, errfd=None, timeout=-1):
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__write); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s__1), __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_83), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(__pyx_v_w);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_w);
    __Pyx_GIVEREF(__pyx_v_w);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsapi.XmmsLoop.loop_tickle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_w);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1826
 * 			write(w, "1".encode('ascii'))
 * 
 * 	def loop_iter(self, infd=None, outfd=None, errfd=None, timeout=-1):             # <<<<<<<<<<<<<<
 * 		"""
 * 		loop_iter(infd=None, outfd=None, errfd=None, timeout=-1)
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsLoop_5loop_iter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7xmmsapi_8XmmsLoop_5loop_iter[] = "\n\t\tloop_iter(infd=None, outfd=None, errfd=None, timeout=-1)\n\t\tRun one iteration of the main loop. Should be overridden to add\n\t\tcustom operations in the main loop.\n\t\t@return The tuple returned by select.select() to be used by overridding\n\t\tmethods in subclasses.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_8XmmsLoop_5loop_iter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_infd = 0;
  PyObject *__pyx_v_outfd = 0;
  PyObject *__pyx_v_errfd = 0;
  PyObject *__pyx_v_timeout = 0;
  int __pyx_v_fd;
  PyObject *__pyx_v_w = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_v_err = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_o = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__infd,&__pyx_n_s__outfd,&__pyx_n_s__errfd,&__pyx_n_s__timeout,0};
  __Pyx_RefNannySetupContext("loop_iter");
  {
    PyObject* values[4] = {0,0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)__pyx_int_neg_1);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__infd);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__outfd);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__errfd);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__timeout);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "loop_iter") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_infd = values[0];
    __pyx_v_outfd = values[1];
    __pyx_v_errfd = values[2];
    __pyx_v_timeout = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("loop_iter", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsapi.XmmsLoop.loop_iter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsapi.pyx":1835
 * 		"""
 * 		cdef int fd
 * 		fd = xmmsc_io_fd_get(self.conn)             # <<<<<<<<<<<<<<
 * 		if self.want_ioout():
 * 			w = [fd]
 */
  __pyx_v_fd = xmmsc_io_fd_get(((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->__pyx_base.__pyx_base.conn);

  /* "xmmsapi.pyx":1836
 * 		cdef int fd
 * 		fd = xmmsc_io_fd_get(self.conn)
 * 		if self.want_ioout():             # <<<<<<<<<<<<<<
 * 			w = [fd]
 * 		else:
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_7xmmsapi_XmmsLoop *)((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.want_ioout(((struct __pyx_obj_7xmmsapi_XmmsCore *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "xmmsapi.pyx":1837
 * 		fd = xmmsc_io_fd_get(self.conn)
 * 		if self.want_ioout():
 * 			w = [fd]             # <<<<<<<<<<<<<<
 * 		else:
 * 			w = []
 */
    __pyx_t_1 = PyInt_FromLong(__pyx_v_fd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_v_w = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "xmmsapi.pyx":1839
 * 			w = [fd]
 * 		else:
 * 			w = []             # <<<<<<<<<<<<<<
 * 		r = [fd]
 * 		err = [fd]
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_v_w = ((PyObject *)__pyx_t_3);
    __pyx_t_3 = 0;
  }
  __pyx_L6:;

  /* "xmmsapi.pyx":1840
 * 		else:
 * 			w = []
 * 		r = [fd]             # <<<<<<<<<<<<<<
 * 		err = [fd]
 * 		if infd:
 */
  __pyx_t_3 = PyInt_FromLong(__pyx_v_fd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_v_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1841
 * 			w = []
 * 		r = [fd]
 * 		err = [fd]             # <<<<<<<<<<<<<<
 * 		if infd:
 * 			r += infd
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_fd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_err = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "xmmsapi.pyx":1842
 * 		r = [fd]
 * 		err = [fd]
 * 		if infd:             # <<<<<<<<<<<<<<
 * 			r += infd
 * 		if outfd:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_infd); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "xmmsapi.pyx":1843
 * 		err = [fd]
 * 		if infd:
 * 			r += infd             # <<<<<<<<<<<<<<
 * 		if outfd:
 * 			w += outfd
 */
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_r, __pyx_v_infd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_v_r);
    __pyx_v_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "xmmsapi.pyx":1844
 * 		if infd:
 * 			r += infd
 * 		if outfd:             # <<<<<<<<<<<<<<
 * 			w += outfd
 * 		if errfd:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_outfd); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "xmmsapi.pyx":1845
 * 			r += infd
 * 		if outfd:
 * 			w += outfd             # <<<<<<<<<<<<<<
 * 		if errfd:
 * 			err += errfd
 */
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_w, __pyx_v_outfd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_v_w);
    __pyx_v_w = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "xmmsapi.pyx":1846
 * 		if outfd:
 * 			w += outfd
 * 		if errfd:             # <<<<<<<<<<<<<<
 * 			err += errfd
 * 		if timeout < 0:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_errfd); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {

    /* "xmmsapi.pyx":1847
 * 			w += outfd
 * 		if errfd:
 * 			err += errfd             # <<<<<<<<<<<<<<
 * 		if timeout < 0:
 * 			(i, o, e) = select(r, w, err)
 */
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_err, __pyx_v_errfd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_v_err);
    __pyx_v_err = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "xmmsapi.pyx":1848
 * 		if errfd:
 * 			err += errfd
 * 		if timeout < 0:             # <<<<<<<<<<<<<<
 * 			(i, o, e) = select(r, w, err)
 * 		else:
 */
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_timeout, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "xmmsapi.pyx":1849
 * 			err += errfd
 * 		if timeout < 0:
 * 			(i, o, e) = select(r, w, err)             # <<<<<<<<<<<<<<
 * 		else:
 * 			(i, o, e) = select(r, w, err, timeout)
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_INCREF(__pyx_v_r);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_r);
    __Pyx_GIVEREF(__pyx_v_r);
    __Pyx_INCREF(__pyx_v_w);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_w);
    __Pyx_GIVEREF(__pyx_v_w);
    __Pyx_INCREF(__pyx_v_err);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_err);
    __Pyx_GIVEREF(__pyx_v_err);
    __pyx_t_1 = PyObject_Call(__pyx_v_7xmmsapi_select, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      if (likely(PyTuple_CheckExact(sequence))) {
        if (unlikely(PyTuple_GET_SIZE(sequence) != 3)) {
          if (PyTuple_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
          else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        if (unlikely(PyList_GET_SIZE(sequence) != 3)) {
          if (PyList_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
          else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L12_unpacking_done;
      __pyx_L11_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
      if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L12_unpacking_done:;
    }
    __pyx_v_i = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_o = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_v_e = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L10;
  }
  /*else*/ {

    /* "xmmsapi.pyx":1851
 * 			(i, o, e) = select(r, w, err)
 * 		else:
 * 			(i, o, e) = select(r, w, err, timeout)             # <<<<<<<<<<<<<<
 * 		if e and fd in e:
 * 			xmmsc_io_disconnect(self.conn)
 */
    __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(__pyx_v_r);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_r);
    __Pyx_GIVEREF(__pyx_v_r);
    __Pyx_INCREF(__pyx_v_w);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_w);
    __Pyx_GIVEREF(__pyx_v_w);
    __Pyx_INCREF(__pyx_v_err);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_err);
    __Pyx_GIVEREF(__pyx_v_err);
    __Pyx_INCREF(__pyx_v_timeout);
    PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_timeout);
    __Pyx_GIVEREF(__pyx_v_timeout);
    __pyx_t_5 = PyObject_Call(__pyx_v_7xmmsapi_select, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
      PyObject* sequence = __pyx_t_5;
      if (likely(PyTuple_CheckExact(sequence))) {
        if (unlikely(PyTuple_GET_SIZE(sequence) != 3)) {
          if (PyTuple_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
          else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        if (unlikely(PyList_GET_SIZE(sequence) != 3)) {
          if (PyList_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
          else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L13_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L13_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 2; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L13_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L14_unpacking_done;
      __pyx_L13_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
      if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L14_unpacking_done:;
    }
    __pyx_v_i = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_o = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_v_e = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L10:;

  /* "xmmsapi.pyx":1852
 * 		else:
 * 			(i, o, e) = select(r, w, err, timeout)
 * 		if e and fd in e:             # <<<<<<<<<<<<<<
 * 			xmmsc_io_disconnect(self.conn)
 * 			raise XmmsDisconnectException()
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_e); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {
    __pyx_t_5 = PyInt_FromLong(__pyx_v_fd); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = ((PySequence_Contains(__pyx_v_e, __pyx_t_5))); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_9 = __pyx_t_8;
  } else {
    __pyx_t_9 = __pyx_t_2;
  }
  if (__pyx_t_9) {

    /* "xmmsapi.pyx":1853
 * 			(i, o, e) = select(r, w, err, timeout)
 * 		if e and fd in e:
 * 			xmmsc_io_disconnect(self.conn)             # <<<<<<<<<<<<<<
 * 			raise XmmsDisconnectException()
 * 		if i and fd in i:
 */
    xmmsc_io_disconnect(((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->__pyx_base.__pyx_base.conn);

    /* "xmmsapi.pyx":1854
 * 		if e and fd in e:
 * 			xmmsc_io_disconnect(self.conn)
 * 			raise XmmsDisconnectException()             # <<<<<<<<<<<<<<
 * 		if i and fd in i:
 * 			if not xmmsc_io_in_handle(self.conn):
 */
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_84); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L15;
  }
  __pyx_L15:;

  /* "xmmsapi.pyx":1855
 * 			xmmsc_io_disconnect(self.conn)
 * 			raise XmmsDisconnectException()
 * 		if i and fd in i:             # <<<<<<<<<<<<<<
 * 			if not xmmsc_io_in_handle(self.conn):
 * 				raise XmmsDisconnectException()
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_i); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_9) {
    __pyx_t_3 = PyInt_FromLong(__pyx_v_fd); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = ((PySequence_Contains(__pyx_v_i, __pyx_t_3))); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __pyx_t_2;
  } else {
    __pyx_t_8 = __pyx_t_9;
  }
  if (__pyx_t_8) {

    /* "xmmsapi.pyx":1856
 * 			raise XmmsDisconnectException()
 * 		if i and fd in i:
 * 			if not xmmsc_io_in_handle(self.conn):             # <<<<<<<<<<<<<<
 * 				raise XmmsDisconnectException()
 * 		if o and fd in o:
 */
    __pyx_t_8 = (!xmmsc_io_in_handle(((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->__pyx_base.__pyx_base.conn));
    if (__pyx_t_8) {

      /* "xmmsapi.pyx":1857
 * 		if i and fd in i:
 * 			if not xmmsc_io_in_handle(self.conn):
 * 				raise XmmsDisconnectException()             # <<<<<<<<<<<<<<
 * 		if o and fd in o:
 * 			if not xmmsc_io_out_handle(self.conn):
 */
      __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_84); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L17;
    }
    __pyx_L17:;
    goto __pyx_L16;
  }
  __pyx_L16:;

  /* "xmmsapi.pyx":1858
 * 			if not xmmsc_io_in_handle(self.conn):
 * 				raise XmmsDisconnectException()
 * 		if o and fd in o:             # <<<<<<<<<<<<<<
 * 			if not xmmsc_io_out_handle(self.conn):
 * 				raise XmmsDisconnectException()
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_o); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_8) {
    __pyx_t_5 = PyInt_FromLong(__pyx_v_fd); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = ((PySequence_Contains(__pyx_v_o, __pyx_t_5))); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __pyx_t_9;
  } else {
    __pyx_t_2 = __pyx_t_8;
  }
  if (__pyx_t_2) {

    /* "xmmsapi.pyx":1859
 * 				raise XmmsDisconnectException()
 * 		if o and fd in o:
 * 			if not xmmsc_io_out_handle(self.conn):             # <<<<<<<<<<<<<<
 * 				raise XmmsDisconnectException()
 * 		return (i, o, e) #Can be used by overridding methods for extra handling.
 */
    __pyx_t_2 = (!xmmsc_io_out_handle(((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->__pyx_base.__pyx_base.conn));
    if (__pyx_t_2) {

      /* "xmmsapi.pyx":1860
 * 		if o and fd in o:
 * 			if not xmmsc_io_out_handle(self.conn):
 * 				raise XmmsDisconnectException()             # <<<<<<<<<<<<<<
 * 		return (i, o, e) #Can be used by overridding methods for extra handling.
 * 
 */
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_84); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L19;
    }
    __pyx_L19:;
    goto __pyx_L18;
  }
  __pyx_L18:;

  /* "xmmsapi.pyx":1861
 * 			if not xmmsc_io_out_handle(self.conn):
 * 				raise XmmsDisconnectException()
 * 		return (i, o, e) #Can be used by overridding methods for extra handling.             # <<<<<<<<<<<<<<
 * 
 * 	def loop(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(__pyx_v_i);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i);
  __Pyx_GIVEREF(__pyx_v_i);
  __Pyx_INCREF(__pyx_v_o);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_o);
  __Pyx_GIVEREF(__pyx_v_o);
  __Pyx_INCREF(__pyx_v_e);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_e);
  __Pyx_GIVEREF(__pyx_v_e);
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("xmmsapi.XmmsLoop.loop_iter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_w);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_err);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pyx":1863
 * 		return (i, o, e) #Can be used by overridding methods for extra handling.
 * 
 * 	def loop(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		loop()
 */

static PyObject *__pyx_pf_7xmmsapi_8XmmsLoop_6loop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7xmmsapi_8XmmsLoop_6loop[] = "\n\t\tloop()\n\n\t\tMain client loop for most python clients. Call this to run the\n\t\tclient once everything has been set up. This function blocks\n\t\tuntil L{exit_loop} is called. One can override L {loop_iter} to\n\t\tperform extra processing.\n\t\t";
static PyObject *__pyx_pf_7xmmsapi_8XmmsLoop_6loop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_v_pipe = NULL;
  PyObject *__pyx_v_read = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_v_w = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_o = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("loop");

  /* "xmmsapi.pyx":1872
 * 		perform extra processing.
 * 		"""
 * 		from os import pipe, read             # <<<<<<<<<<<<<<
 * 		(r, w) = pipe()
 * 
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pipe));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__pipe));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pipe));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__read));
  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__read));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__read));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__os), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__pipe); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_pipe = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__read); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_read = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":1873
 * 		"""
 * 		from os import pipe, read
 * 		(r, w) = pipe()             # <<<<<<<<<<<<<<
 * 
 * 		self.do_loop = True
 */
  __pyx_t_2 = PyObject_Call(__pyx_v_pipe, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L6_unpacking_done;
    __pyx_L5_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L6_unpacking_done:;
  }
  __pyx_v_r = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_w = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "xmmsapi.pyx":1875
 * 		(r, w) = pipe()
 * 
 * 		self.do_loop = True             # <<<<<<<<<<<<<<
 * 		self._loop_set_wakeup(w)
 * 
 */
  ((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->do_loop = 1;

  /* "xmmsapi.pyx":1876
 * 
 * 		self.do_loop = True
 * 		self._loop_set_wakeup(w)             # <<<<<<<<<<<<<<
 * 
 * 		while self.do_loop:
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___loop_set_wakeup); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(__pyx_v_w);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_w);
  __Pyx_GIVEREF(__pyx_v_w);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsapi.pyx":1878
 * 		self._loop_set_wakeup(w)
 * 
 * 		while self.do_loop:             # <<<<<<<<<<<<<<
 * 			try:
 * 				(i, o, e) = self.loop_iter(infd=[r])
 */
  while (1) {
    if (!((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->do_loop) break;

    /* "xmmsapi.pyx":1879
 * 
 * 		while self.do_loop:
 * 			try:             # <<<<<<<<<<<<<<
 * 				(i, o, e) = self.loop_iter(infd=[r])
 * 				if r in i:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "xmmsapi.pyx":1880
 * 		while self.do_loop:
 * 			try:
 * 				(i, o, e) = self.loop_iter(infd=[r])             # <<<<<<<<<<<<<<
 * 				if r in i:
 * 					read(r, 1) # Purge wakeup stream (each wakeup signal should not write more than one byte)
 */
        __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__loop_iter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_3));
        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
        __Pyx_INCREF(__pyx_v_r);
        PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_r);
        __Pyx_GIVEREF(__pyx_v_r);
        if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__infd), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
        __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
          PyObject* sequence = __pyx_t_2;
          if (likely(PyTuple_CheckExact(sequence))) {
            if (unlikely(PyTuple_GET_SIZE(sequence) != 3)) {
              if (PyTuple_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
              else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
              {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
            }
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
          } else {
            if (unlikely(PyList_GET_SIZE(sequence) != 3)) {
              if (PyList_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
              else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
              {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
            }
            __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
          }
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_5 = Py_TYPE(__pyx_t_9)->tp_iternext;
          index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L17_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L17_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_1);
          index = 2; __pyx_t_4 = __pyx_t_5(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L17_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_9), 3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L18_unpacking_done;
          __pyx_L17_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
          if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
          __pyx_L18_unpacking_done:;
        }
        __Pyx_XDECREF(__pyx_v_i);
        __pyx_v_i = __pyx_t_3;
        __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_v_o);
        __pyx_v_o = __pyx_t_1;
        __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_v_e);
        __pyx_v_e = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "xmmsapi.pyx":1881
 * 			try:
 * 				(i, o, e) = self.loop_iter(infd=[r])
 * 				if r in i:             # <<<<<<<<<<<<<<
 * 					read(r, 1) # Purge wakeup stream (each wakeup signal should not write more than one byte)
 * 			except XmmsDisconnectException:
 */
        __pyx_t_10 = ((PySequence_Contains(__pyx_v_i, __pyx_v_r))); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1881; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
        if (__pyx_t_10) {

          /* "xmmsapi.pyx":1882
 * 				(i, o, e) = self.loop_iter(infd=[r])
 * 				if r in i:
 * 					read(r, 1) # Purge wakeup stream (each wakeup signal should not write more than one byte)             # <<<<<<<<<<<<<<
 * 			except XmmsDisconnectException:
 * 				self.do_loop = False
 */
          __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1882; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
          __Pyx_GOTREF(((PyObject *)__pyx_t_2));
          __Pyx_INCREF(__pyx_v_r);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_r);
          __Pyx_GIVEREF(__pyx_v_r);
          __Pyx_INCREF(__pyx_int_1);
          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
          __Pyx_GIVEREF(__pyx_int_1);
          __pyx_t_4 = PyObject_Call(__pyx_v_read, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1882; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L19;
        }
        __pyx_L19:;
      }
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L16_try_end;
      __pyx_L9_error:;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "xmmsapi.pyx":1883
 * 				if r in i:
 * 					read(r, 1) # Purge wakeup stream (each wakeup signal should not write more than one byte)
 * 			except XmmsDisconnectException:             # <<<<<<<<<<<<<<
 * 				self.do_loop = False
 * 
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s_84); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = PyErr_ExceptionMatches(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_11) {
        __Pyx_AddTraceback("xmmsapi.XmmsLoop.loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1883; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_1);

        /* "xmmsapi.pyx":1884
 * 					read(r, 1) # Purge wakeup stream (each wakeup signal should not write more than one byte)
 * 			except XmmsDisconnectException:
 * 				self.do_loop = False             # <<<<<<<<<<<<<<
 * 
 * 		self._loop_set_wakeup(None)
 */
        ((struct __pyx_obj_7xmmsapi_XmmsLoop *)__pyx_v_self)->do_loop = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L10_exception_handled;
      }
      __pyx_L11_except_error:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      goto __pyx_L1_error;
      __pyx_L10_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      __pyx_L16_try_end:;
    }
  }

  /* "xmmsapi.pyx":1886
 * 				self.do_loop = False
 * 
 * 		self._loop_set_wakeup(None)             # <<<<<<<<<<<<<<
 * 
 * # Compatibility
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___loop_set_wakeup); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_85), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("xmmsapi.XmmsLoop.loop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pipe);
  __Pyx_XDECREF(__pyx_v_read);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_w);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsutils.pxd":3
 * from cpython.unicode cimport PyUnicode_DecodeUTF8, PyUnicode_AsUTF8String
 * 
 * cdef inline to_unicode(char *s):             # <<<<<<<<<<<<<<
 * 	try:
 * 		ns = PyUnicode_DecodeUTF8(s, len(s), NULL)
 */

static CYTHON_INLINE PyObject *__pyx_f_9xmmsutils_to_unicode(char *__pyx_v_s) {
  PyObject *__pyx_v_ns = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_unicode");

  /* "xmmsutils.pxd":4
 * 
 * cdef inline to_unicode(char *s):
 * 	try:             # <<<<<<<<<<<<<<
 * 		ns = PyUnicode_DecodeUTF8(s, len(s), NULL)
 * 	except:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "xmmsutils.pxd":5
 * cdef inline to_unicode(char *s):
 * 	try:
 * 		ns = PyUnicode_DecodeUTF8(s, len(s), NULL)             # <<<<<<<<<<<<<<
 * 	except:
 * 		ns = s
 */
      __pyx_t_4 = strlen(__pyx_v_s); 
      __pyx_t_5 = PyUnicode_DecodeUTF8(__pyx_v_s, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_ns = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "xmmsutils.pxd":6
 * 	try:
 * 		ns = PyUnicode_DecodeUTF8(s, len(s), NULL)
 * 	except:             # <<<<<<<<<<<<<<
 * 		ns = s
 * 	return ns
 */
    /*except:*/ {
      __Pyx_AddTraceback("xmmsutils.to_unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "xmmsutils.pxd":7
 * 		ns = PyUnicode_DecodeUTF8(s, len(s), NULL)
 * 	except:
 * 		ns = s             # <<<<<<<<<<<<<<
 * 	return ns
 * 
 */
      __pyx_t_8 = PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __Pyx_XDECREF(__pyx_v_ns);
      __pyx_v_ns = ((PyObject *)__pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "xmmsutils.pxd":8
 * 	except:
 * 		ns = s
 * 	return ns             # <<<<<<<<<<<<<<
 * 
 * cdef inline from_unicode(object o):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ns);
  __pyx_r = __pyx_v_ns;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("xmmsutils.to_unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ns);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsutils.pxd":10
 * 	return ns
 * 
 * cdef inline from_unicode(object o):             # <<<<<<<<<<<<<<
 * 	if isinstance(o, unicode):
 * 		return PyUnicode_AsUTF8String(o)
 */

static CYTHON_INLINE PyObject *__pyx_f_9xmmsutils_from_unicode(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("from_unicode");

  /* "xmmsutils.pxd":11
 * 
 * cdef inline from_unicode(object o):
 * 	if isinstance(o, unicode):             # <<<<<<<<<<<<<<
 * 		return PyUnicode_AsUTF8String(o)
 * 	else:
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)(&PyUnicode_Type)));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_o, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "xmmsutils.pxd":12
 * cdef inline from_unicode(object o):
 * 	if isinstance(o, unicode):
 * 		return PyUnicode_AsUTF8String(o)             # <<<<<<<<<<<<<<
 * 	else:
 * 		return o
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_o); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsutils.pxd":14
 * 		return PyUnicode_AsUTF8String(o)
 * 	else:
 * 		return o             # <<<<<<<<<<<<<<
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_o);
    __pyx_r = __pyx_v_o;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsutils.from_unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsapi.pxd":8
 * cdef void ResultDestroyNotifier(void *o)
 * 
 * cdef inline char *check_namespace(object ns, bint can_be_all) except NULL:             # <<<<<<<<<<<<<<
 * 	cdef char *n
 * 	if ns == "Collections":
 */

static CYTHON_INLINE char *__pyx_f_7xmmsapi_check_namespace(PyObject *__pyx_v_ns, int __pyx_v_can_be_all) {
  char *__pyx_v_n;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_namespace");

  /* "xmmsapi.pxd":10
 * cdef inline char *check_namespace(object ns, bint can_be_all) except NULL:
 * 	cdef char *n
 * 	if ns == "Collections":             # <<<<<<<<<<<<<<
 * 		n = <char *>XMMS_COLLECTION_NS_COLLECTIONS
 * 	elif ns == "Playlists":
 */
  __pyx_t_1 = __Pyx_PyString_Equals(__pyx_v_ns, ((PyObject *)__pyx_n_s__Collections), Py_EQ); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "xmmsapi.pxd":11
 * 	cdef char *n
 * 	if ns == "Collections":
 * 		n = <char *>XMMS_COLLECTION_NS_COLLECTIONS             # <<<<<<<<<<<<<<
 * 	elif ns == "Playlists":
 * 		n = <char *>XMMS_COLLECTION_NS_PLAYLISTS
 */
    __pyx_v_n = ((char *)XMMS_COLLECTION_NS_COLLECTIONS);
    goto __pyx_L3;
  }

  /* "xmmsapi.pxd":12
 * 	if ns == "Collections":
 * 		n = <char *>XMMS_COLLECTION_NS_COLLECTIONS
 * 	elif ns == "Playlists":             # <<<<<<<<<<<<<<
 * 		n = <char *>XMMS_COLLECTION_NS_PLAYLISTS
 * 	elif can_be_all and ns == "*":
 */
  __pyx_t_1 = __Pyx_PyString_Equals(__pyx_v_ns, ((PyObject *)__pyx_n_s__Playlists), Py_EQ); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "xmmsapi.pxd":13
 * 		n = <char *>XMMS_COLLECTION_NS_COLLECTIONS
 * 	elif ns == "Playlists":
 * 		n = <char *>XMMS_COLLECTION_NS_PLAYLISTS             # <<<<<<<<<<<<<<
 * 	elif can_be_all and ns == "*":
 * 		n = <char *>XMMS_COLLECTION_NS_ALL
 */
    __pyx_v_n = ((char *)XMMS_COLLECTION_NS_PLAYLISTS);
    goto __pyx_L3;
  }

  /* "xmmsapi.pxd":14
 * 	elif ns == "Playlists":
 * 		n = <char *>XMMS_COLLECTION_NS_PLAYLISTS
 * 	elif can_be_all and ns == "*":             # <<<<<<<<<<<<<<
 * 		n = <char *>XMMS_COLLECTION_NS_ALL
 * 	else:
 */
  if (__pyx_v_can_be_all) {
    __pyx_t_1 = __Pyx_PyString_Equals(__pyx_v_ns, ((PyObject *)__pyx_kp_s_21), Py_EQ); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = __pyx_t_1;
  } else {
    __pyx_t_2 = __pyx_v_can_be_all;
  }
  if (__pyx_t_2) {

    /* "xmmsapi.pxd":15
 * 		n = <char *>XMMS_COLLECTION_NS_PLAYLISTS
 * 	elif can_be_all and ns == "*":
 * 		n = <char *>XMMS_COLLECTION_NS_ALL             # <<<<<<<<<<<<<<
 * 	else:
 * 		raise ValueError("Bad namespace")
 */
    __pyx_v_n = ((char *)XMMS_COLLECTION_NS_ALL);
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsapi.pxd":17
 * 		n = <char *>XMMS_COLLECTION_NS_ALL
 * 	else:
 * 		raise ValueError("Bad namespace")             # <<<<<<<<<<<<<<
 * 	return n
 * 
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_87), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "xmmsapi.pxd":18
 * 	else:
 * 		raise ValueError("Bad namespace")
 * 	return n             # <<<<<<<<<<<<<<
 * 
 * cdef class XmmsSourcePreference:
 */
  __pyx_r = __pyx_v_n;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsapi.check_namespace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_7xmmsapi_XmmsSourcePreference(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7xmmsapi_XmmsSourcePreference *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)o);
  p->sources = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_7xmmsapi_XmmsSourcePreference(PyObject *o) {
  struct __pyx_obj_7xmmsapi_XmmsSourcePreference *p = (struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)o;
  Py_XDECREF(p->sources);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7xmmsapi_XmmsSourcePreference(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7xmmsapi_XmmsSourcePreference *p = (struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)o;
  if (p->sources) {
    e = (*v)(p->sources, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7xmmsapi_XmmsSourcePreference(PyObject *o) {
  struct __pyx_obj_7xmmsapi_XmmsSourcePreference *p = (struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->sources);
  p->sources = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_7xmmsapi_XmmsSourcePreference[] = {
  {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pf_7xmmsapi_20XmmsSourcePreference_1get, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set"), (PyCFunction)__pyx_pf_7xmmsapi_20XmmsSourcePreference_2set, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_XmmsSourcePreference = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_XmmsSourcePreference = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_XmmsSourcePreference = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_XmmsSourcePreference = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_7xmmsapi_XmmsSourcePreference = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsapi.XmmsSourcePreference"), /*tp_name*/
  sizeof(struct __pyx_obj_7xmmsapi_XmmsSourcePreference), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7xmmsapi_XmmsSourcePreference, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_XmmsSourcePreference, /*tp_as_number*/
  &__pyx_tp_as_sequence_XmmsSourcePreference, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_XmmsSourcePreference, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_XmmsSourcePreference, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\n\tSource preference manager\n\t"), /*tp_doc*/
  __pyx_tp_traverse_7xmmsapi_XmmsSourcePreference, /*tp_traverse*/
  __pyx_tp_clear_7xmmsapi_XmmsSourcePreference, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7xmmsapi_XmmsSourcePreference, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_7xmmsapi_20XmmsSourcePreference___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7xmmsapi_XmmsSourcePreference, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsResult __pyx_vtable_7xmmsapi_XmmsResult;

static PyObject *__pyx_tp_new_7xmmsapi_XmmsResult(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7xmmsapi_XmmsResult *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_7xmmsapi_XmmsResult *)o);
  p->__pyx_vtab = __pyx_vtabptr_7xmmsapi_XmmsResult;
  p->_cb = Py_None; Py_INCREF(Py_None);
  p->_exc = Py_None; Py_INCREF(Py_None);
  p->source_pref = ((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)Py_None); Py_INCREF(Py_None);
  p->result_tracker = ((struct __pyx_obj_7xmmsapi_XmmsResultTracker *)Py_None); Py_INCREF(Py_None);
  if (__pyx_pf_7xmmsapi_10XmmsResult___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7xmmsapi_XmmsResult(PyObject *o) {
  struct __pyx_obj_7xmmsapi_XmmsResult *p = (struct __pyx_obj_7xmmsapi_XmmsResult *)o;
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pf_7xmmsapi_10XmmsResult_1__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_XDECREF(p->_cb);
  Py_XDECREF(p->_exc);
  Py_XDECREF(((PyObject *)p->source_pref));
  Py_XDECREF(((PyObject *)p->result_tracker));
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7xmmsapi_XmmsResult(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7xmmsapi_XmmsResult *p = (struct __pyx_obj_7xmmsapi_XmmsResult *)o;
  if (p->_cb) {
    e = (*v)(p->_cb, a); if (e) return e;
  }
  if (p->_exc) {
    e = (*v)(p->_exc, a); if (e) return e;
  }
  if (p->source_pref) {
    e = (*v)(((PyObject*)p->source_pref), a); if (e) return e;
  }
  if (p->result_tracker) {
    e = (*v)(((PyObject*)p->result_tracker), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7xmmsapi_XmmsResult(PyObject *o) {
  struct __pyx_obj_7xmmsapi_XmmsResult *p = (struct __pyx_obj_7xmmsapi_XmmsResult *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->_cb);
  p->_cb = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_exc);
  p->_exc = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->source_pref);
  p->source_pref = ((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->result_tracker);
  p->result_tracker = ((struct __pyx_obj_7xmmsapi_XmmsResultTracker *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7xmmsapi_10XmmsResult_callback(PyObject *o, void *x) {
  return __pyx_pf_7xmmsapi_10XmmsResult_8callback___get__(o);
}

static PyMethodDef __pyx_methods_7xmmsapi_XmmsResult[] = {
  {__Pyx_NAMESTR("disconnect"), (PyCFunction)__pyx_pf_7xmmsapi_10XmmsResult_2disconnect, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_callback"), (PyCFunction)__pyx_pf_7xmmsapi_10XmmsResult_3_callback, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_10XmmsResult_3_callback)},
  {__Pyx_NAMESTR("wait"), (PyCFunction)__pyx_pf_7xmmsapi_10XmmsResult_5wait, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_10XmmsResult_5wait)},
  {__Pyx_NAMESTR("is_error"), (PyCFunction)__pyx_pf_7xmmsapi_10XmmsResult_6is_error, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_10XmmsResult_6is_error)},
  {__Pyx_NAMESTR("iserror"), (PyCFunction)__pyx_pf_7xmmsapi_10XmmsResult_7iserror, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("xmmsvalue"), (PyCFunction)__pyx_pf_7xmmsapi_10XmmsResult_8xmmsvalue, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_value"), (PyCFunction)__pyx_pf_7xmmsapi_10XmmsResult_9_value, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("value"), (PyCFunction)__pyx_pf_7xmmsapi_10XmmsResult_10value, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7xmmsapi_XmmsResult[] = {
  {(char *)"callback", __pyx_getprop_7xmmsapi_10XmmsResult_callback, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_XmmsResult = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_XmmsResult = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_XmmsResult = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_XmmsResult = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_7xmmsapi_XmmsResult = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsapi.XmmsResult"), /*tp_name*/
  sizeof(struct __pyx_obj_7xmmsapi_XmmsResult), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7xmmsapi_XmmsResult, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_XmmsResult, /*tp_as_number*/
  &__pyx_tp_as_sequence_XmmsResult, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_XmmsResult, /*tp_as_mapping*/
  0, /*tp_hash*/
  __pyx_pf_7xmmsapi_10XmmsResult_4__call__, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_XmmsResult, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\n\tClass containing the results of some operation\n\t"), /*tp_doc*/
  __pyx_tp_traverse_7xmmsapi_XmmsResult, /*tp_traverse*/
  __pyx_tp_clear_7xmmsapi_XmmsResult, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7xmmsapi_XmmsResult, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7xmmsapi_XmmsResult, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7xmmsapi_XmmsResult, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsResultTracker __pyx_vtable_7xmmsapi_XmmsResultTracker;

static PyObject *__pyx_tp_new_7xmmsapi_XmmsResultTracker(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7xmmsapi_XmmsResultTracker *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_7xmmsapi_XmmsResultTracker *)o);
  p->__pyx_vtab = __pyx_vtabptr_7xmmsapi_XmmsResultTracker;
  p->results = Py_None; Py_INCREF(Py_None);
  if (__pyx_pf_7xmmsapi_17XmmsResultTracker___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7xmmsapi_XmmsResultTracker(PyObject *o) {
  struct __pyx_obj_7xmmsapi_XmmsResultTracker *p = (struct __pyx_obj_7xmmsapi_XmmsResultTracker *)o;
  Py_XDECREF(p->results);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7xmmsapi_XmmsResultTracker(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7xmmsapi_XmmsResultTracker *p = (struct __pyx_obj_7xmmsapi_XmmsResultTracker *)o;
  if (p->results) {
    e = (*v)(p->results, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7xmmsapi_XmmsResultTracker(PyObject *o) {
  struct __pyx_obj_7xmmsapi_XmmsResultTracker *p = (struct __pyx_obj_7xmmsapi_XmmsResultTracker *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->results);
  p->results = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_7xmmsapi_XmmsResultTracker[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_XmmsResultTracker = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_XmmsResultTracker = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_XmmsResultTracker = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_XmmsResultTracker = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_7xmmsapi_XmmsResultTracker = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsapi.XmmsResultTracker"), /*tp_name*/
  sizeof(struct __pyx_obj_7xmmsapi_XmmsResultTracker), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7xmmsapi_XmmsResultTracker, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_XmmsResultTracker, /*tp_as_number*/
  &__pyx_tp_as_sequence_XmmsResultTracker, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_XmmsResultTracker, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_XmmsResultTracker, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\n\tClass used by XmmsCore to track results that set a notifier.\n\t"), /*tp_doc*/
  __pyx_tp_traverse_7xmmsapi_XmmsResultTracker, /*tp_traverse*/
  __pyx_tp_clear_7xmmsapi_XmmsResultTracker, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7xmmsapi_XmmsResultTracker, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7xmmsapi_XmmsResultTracker, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsVisResult __pyx_vtable_7xmmsapi_XmmsVisResult;

static PyObject *__pyx_tp_new_7xmmsapi_XmmsVisResult(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7xmmsapi_XmmsVisResult *p;
  PyObject *o = __pyx_tp_new_7xmmsapi_XmmsResult(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_7xmmsapi_XmmsVisResult *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7xmmsapi_XmmsResult*)__pyx_vtabptr_7xmmsapi_XmmsVisResult;
  p->_val = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)Py_None); Py_INCREF(Py_None);
  if (__pyx_pf_7xmmsapi_13XmmsVisResult___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7xmmsapi_XmmsVisResult(PyObject *o) {
  struct __pyx_obj_7xmmsapi_XmmsVisResult *p = (struct __pyx_obj_7xmmsapi_XmmsVisResult *)o;
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pf_7xmmsapi_13XmmsVisResult_1__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_XDECREF(((PyObject *)p->_val));
  __pyx_tp_dealloc_7xmmsapi_XmmsResult(o);
}

static int __pyx_tp_traverse_7xmmsapi_XmmsVisResult(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7xmmsapi_XmmsVisResult *p = (struct __pyx_obj_7xmmsapi_XmmsVisResult *)o;
  e = __pyx_tp_traverse_7xmmsapi_XmmsResult(o, v, a); if (e) return e;
  if (p->_val) {
    e = (*v)(((PyObject*)p->_val), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7xmmsapi_XmmsVisResult(PyObject *o) {
  struct __pyx_obj_7xmmsapi_XmmsVisResult *p = (struct __pyx_obj_7xmmsapi_XmmsVisResult *)o;
  PyObject* tmp;
  __pyx_tp_clear_7xmmsapi_XmmsResult(o);
  tmp = ((PyObject*)p->_val);
  p->_val = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_7xmmsapi_XmmsVisResult[] = {
  {__Pyx_NAMESTR("xmmsvalue"), (PyCFunction)__pyx_pf_7xmmsapi_13XmmsVisResult_2xmmsvalue, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_XmmsVisResult = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_XmmsVisResult = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_XmmsVisResult = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_XmmsVisResult = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_7xmmsapi_XmmsVisResult = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsapi.XmmsVisResult"), /*tp_name*/
  sizeof(struct __pyx_obj_7xmmsapi_XmmsVisResult), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7xmmsapi_XmmsVisResult, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_XmmsVisResult, /*tp_as_number*/
  &__pyx_tp_as_sequence_XmmsVisResult, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_XmmsVisResult, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_XmmsVisResult, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7xmmsapi_XmmsVisResult, /*tp_traverse*/
  __pyx_tp_clear_7xmmsapi_XmmsVisResult, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7xmmsapi_XmmsVisResult, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7xmmsapi_XmmsVisResult, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsVisChunk __pyx_vtable_7xmmsapi_XmmsVisChunk;

static PyObject *__pyx_tp_new_7xmmsapi_XmmsVisChunk(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7xmmsapi_XmmsVisChunk *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_7xmmsapi_XmmsVisChunk *)o);
  p->__pyx_vtab = __pyx_vtabptr_7xmmsapi_XmmsVisChunk;
  if (__pyx_pf_7xmmsapi_12XmmsVisChunk___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7xmmsapi_XmmsVisChunk(PyObject *o) {
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pf_7xmmsapi_12XmmsVisChunk_1__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_7xmmsapi_XmmsVisChunk[] = {
  {__Pyx_NAMESTR("get_buffer"), (PyCFunction)__pyx_pf_7xmmsapi_12XmmsVisChunk_3get_buffer, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_12XmmsVisChunk_3get_buffer)},
  {__Pyx_NAMESTR("get_data"), (PyCFunction)__pyx_pf_7xmmsapi_12XmmsVisChunk_4get_data, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_12XmmsVisChunk_4get_data)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_XmmsVisChunk = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_XmmsVisChunk = {
  __pyx_pf_7xmmsapi_12XmmsVisChunk_2__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_XmmsVisChunk = {
  __pyx_pf_7xmmsapi_12XmmsVisChunk_2__len__, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_XmmsVisChunk = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_7xmmsapi_XmmsVisChunk = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsapi.XmmsVisChunk"), /*tp_name*/
  sizeof(struct __pyx_obj_7xmmsapi_XmmsVisChunk), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7xmmsapi_XmmsVisChunk, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_XmmsVisChunk, /*tp_as_number*/
  &__pyx_tp_as_sequence_XmmsVisChunk, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_XmmsVisChunk, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_XmmsVisChunk, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7xmmsapi_XmmsVisChunk, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7xmmsapi_XmmsVisChunk, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsCore __pyx_vtable_7xmmsapi_XmmsCore;

static PyObject *__pyx_tp_new_7xmmsapi_XmmsCore(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7xmmsapi_XmmsCore *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_7xmmsapi_XmmsCore *)o);
  p->__pyx_vtab = __pyx_vtabptr_7xmmsapi_XmmsCore;
  p->disconnect_fun = Py_None; Py_INCREF(Py_None);
  p->needout_fun = Py_None; Py_INCREF(Py_None);
  p->source_preference = ((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)Py_None); Py_INCREF(Py_None);
  p->result_tracker = ((struct __pyx_obj_7xmmsapi_XmmsResultTracker *)Py_None); Py_INCREF(Py_None);
  p->clientname = Py_None; Py_INCREF(Py_None);
  if (__pyx_pf_7xmmsapi_8XmmsCore___cinit__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7xmmsapi_XmmsCore(PyObject *o) {
  struct __pyx_obj_7xmmsapi_XmmsCore *p = (struct __pyx_obj_7xmmsapi_XmmsCore *)o;
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pf_7xmmsapi_8XmmsCore_1__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_XDECREF(p->disconnect_fun);
  Py_XDECREF(p->needout_fun);
  Py_XDECREF(((PyObject *)p->source_preference));
  Py_XDECREF(((PyObject *)p->result_tracker));
  Py_XDECREF(p->clientname);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7xmmsapi_XmmsCore(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7xmmsapi_XmmsCore *p = (struct __pyx_obj_7xmmsapi_XmmsCore *)o;
  if (p->disconnect_fun) {
    e = (*v)(p->disconnect_fun, a); if (e) return e;
  }
  if (p->needout_fun) {
    e = (*v)(p->needout_fun, a); if (e) return e;
  }
  if (p->source_preference) {
    e = (*v)(((PyObject*)p->source_preference), a); if (e) return e;
  }
  if (p->result_tracker) {
    e = (*v)(((PyObject*)p->result_tracker), a); if (e) return e;
  }
  if (p->clientname) {
    e = (*v)(p->clientname, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7xmmsapi_XmmsCore(PyObject *o) {
  struct __pyx_obj_7xmmsapi_XmmsCore *p = (struct __pyx_obj_7xmmsapi_XmmsCore *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->disconnect_fun);
  p->disconnect_fun = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->needout_fun);
  p->needout_fun = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->source_preference);
  p->source_preference = ((struct __pyx_obj_7xmmsapi_XmmsSourcePreference *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->result_tracker);
  p->result_tracker = ((struct __pyx_obj_7xmmsapi_XmmsResultTracker *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->clientname);
  p->clientname = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7xmmsapi_8XmmsCore_source_preference(PyObject *o, void *x) {
  return __pyx_pf_7xmmsapi_8XmmsCore_17source_preference___get__(o);
}

static PyObject *__pyx_getprop_7xmmsapi_8XmmsCore_clientname(PyObject *o, void *x) {
  return __pyx_pf_7xmmsapi_8XmmsCore_10clientname___get__(o);
}

static PyMethodDef __pyx_methods_7xmmsapi_XmmsCore[] = {
  {__Pyx_NAMESTR("__del__"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_2__del__, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_source_preference"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_3get_source_preference, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_source_preference"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_4set_source_preference, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_needout_cb"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_5_needout_cb, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_disconnect_cb"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_6_disconnect_cb, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("disconnect"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_7disconnect, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("ioin"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_8ioin, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_8XmmsCore_8ioin)},
  {__Pyx_NAMESTR("ioout"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_9ioout, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_8XmmsCore_9ioout)},
  {__Pyx_NAMESTR("want_ioout"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_10want_ioout, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_8XmmsCore_10want_ioout)},
  {__Pyx_NAMESTR("set_need_out_fun"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_11set_need_out_fun, METH_O, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_8XmmsCore_11set_need_out_fun)},
  {__Pyx_NAMESTR("get_fd"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_12get_fd, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_8XmmsCore_12get_fd)},
  {__Pyx_NAMESTR("connect"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_13connect, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_8XmmsCore_13connect)},
  {__Pyx_NAMESTR("is_connected"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsCore_14is_connected, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7xmmsapi_XmmsCore[] = {
  {(char *)"source_preference", __pyx_getprop_7xmmsapi_8XmmsCore_source_preference, 0, 0, 0},
  {(char *)"clientname", __pyx_getprop_7xmmsapi_8XmmsCore_clientname, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_XmmsCore = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_XmmsCore = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_XmmsCore = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_XmmsCore = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_7xmmsapi_XmmsCore = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsapi.XmmsCore"), /*tp_name*/
  sizeof(struct __pyx_obj_7xmmsapi_XmmsCore), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7xmmsapi_XmmsCore, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_XmmsCore, /*tp_as_number*/
  &__pyx_tp_as_sequence_XmmsCore, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_XmmsCore, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_XmmsCore, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\n\tThis is the class representing the XMMS2 client itself. The methods in\n\tthis class may be used to control and interact with XMMS2.\n\t"), /*tp_doc*/
  __pyx_tp_traverse_7xmmsapi_XmmsCore, /*tp_traverse*/
  __pyx_tp_clear_7xmmsapi_XmmsCore, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7xmmsapi_XmmsCore, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7xmmsapi_XmmsCore, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7xmmsapi_XmmsCore, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsApi __pyx_vtable_7xmmsapi_XmmsApi;

static PyObject *__pyx_tp_new_7xmmsapi_XmmsApi(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7xmmsapi_XmmsApi *p;
  PyObject *o = __pyx_tp_new_7xmmsapi_XmmsCore(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_7xmmsapi_XmmsApi *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7xmmsapi_XmmsCore*)__pyx_vtabptr_7xmmsapi_XmmsApi;
  return o;
}

static PyMethodDef __pyx_methods_7xmmsapi_XmmsApi[] = {
  {__Pyx_NAMESTR("quit"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_quit, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_quit)},
  {__Pyx_NAMESTR("plugin_list"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_1plugin_list, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_1plugin_list)},
  {__Pyx_NAMESTR("playback_start"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_2playback_start, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_2playback_start)},
  {__Pyx_NAMESTR("playback_stop"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_3playback_stop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_3playback_stop)},
  {__Pyx_NAMESTR("playback_tickle"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_4playback_tickle, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_4playback_tickle)},
  {__Pyx_NAMESTR("playback_pause"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_5playback_pause, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_5playback_pause)},
  {__Pyx_NAMESTR("playback_current_id"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_6playback_current_id, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_6playback_current_id)},
  {__Pyx_NAMESTR("playback_seek_ms"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_7playback_seek_ms, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_7playback_seek_ms)},
  {__Pyx_NAMESTR("playback_seek_ms_rel"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_8playback_seek_ms_rel, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_8playback_seek_ms_rel)},
  {__Pyx_NAMESTR("playback_seek_samples"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_9playback_seek_samples, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_9playback_seek_samples)},
  {__Pyx_NAMESTR("playback_seek_samples_rel"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_10playback_seek_samples_rel, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_10playback_seek_samples_rel)},
  {__Pyx_NAMESTR("playback_status"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_11playback_status, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_11playback_status)},
  {__Pyx_NAMESTR("broadcast_playback_status"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_12broadcast_playback_status, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_12broadcast_playback_status)},
  {__Pyx_NAMESTR("broadcast_playback_current_id"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_13broadcast_playback_current_id, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_13broadcast_playback_current_id)},
  {__Pyx_NAMESTR("playback_playtime"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_14playback_playtime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_14playback_playtime)},
  {__Pyx_NAMESTR("signal_playback_playtime"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_15signal_playback_playtime, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_15signal_playback_playtime)},
  {__Pyx_NAMESTR("playback_volume_set"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_16playback_volume_set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_16playback_volume_set)},
  {__Pyx_NAMESTR("playback_volume_get"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_17playback_volume_get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_17playback_volume_get)},
  {__Pyx_NAMESTR("broadcast_playback_volume_changed"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_18broadcast_playback_volume_changed, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_18broadcast_playback_volume_changed)},
  {__Pyx_NAMESTR("broadcast_playlist_loaded"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_19broadcast_playlist_loaded, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_19broadcast_playlist_loaded)},
  {__Pyx_NAMESTR("playlist_load"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_20playlist_load, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_20playlist_load)},
  {__Pyx_NAMESTR("playlist_list"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_21playlist_list, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_21playlist_list)},
  {__Pyx_NAMESTR("playlist_remove"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_22playlist_remove, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_22playlist_remove)},
  {__Pyx_NAMESTR("playlist_shuffle"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_23playlist_shuffle, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_23playlist_shuffle)},
  {__Pyx_NAMESTR("playlist_rinsert"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_24playlist_rinsert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_24playlist_rinsert)},
  {__Pyx_NAMESTR("playlist_rinsert_encoded"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_25playlist_rinsert_encoded, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_25playlist_rinsert_encoded)},
  {__Pyx_NAMESTR("playlist_insert_url"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_26playlist_insert_url, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_26playlist_insert_url)},
  {__Pyx_NAMESTR("playlist_insert_encoded"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_27playlist_insert_encoded, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_27playlist_insert_encoded)},
  {__Pyx_NAMESTR("playlist_insert_id"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_28playlist_insert_id, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_28playlist_insert_id)},
  {__Pyx_NAMESTR("playlist_insert_collection"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_29playlist_insert_collection, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_29playlist_insert_collection)},
  {__Pyx_NAMESTR("playlist_radd"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_30playlist_radd, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_30playlist_radd)},
  {__Pyx_NAMESTR("playlist_radd_encoded"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_31playlist_radd_encoded, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_31playlist_radd_encoded)},
  {__Pyx_NAMESTR("playlist_add_url"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_32playlist_add_url, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_32playlist_add_url)},
  {__Pyx_NAMESTR("playlist_add_encoded"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_33playlist_add_encoded, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_33playlist_add_encoded)},
  {__Pyx_NAMESTR("playlist_add_id"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_34playlist_add_id, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_34playlist_add_id)},
  {__Pyx_NAMESTR("playlist_add_collection"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_35playlist_add_collection, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_35playlist_add_collection)},
  {__Pyx_NAMESTR("playlist_remove_entry"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_36playlist_remove_entry, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_36playlist_remove_entry)},
  {__Pyx_NAMESTR("playlist_clear"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_37playlist_clear, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_37playlist_clear)},
  {__Pyx_NAMESTR("playlist_list_entries"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_38playlist_list_entries, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_38playlist_list_entries)},
  {__Pyx_NAMESTR("playlist_sort"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_39playlist_sort, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_39playlist_sort)},
  {__Pyx_NAMESTR("playlist_set_next_rel"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_40playlist_set_next_rel, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_40playlist_set_next_rel)},
  {__Pyx_NAMESTR("playlist_set_next"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_41playlist_set_next, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_41playlist_set_next)},
  {__Pyx_NAMESTR("playlist_move"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_42playlist_move, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_42playlist_move)},
  {__Pyx_NAMESTR("playlist_create"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_43playlist_create, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_43playlist_create)},
  {__Pyx_NAMESTR("playlist_current_pos"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_44playlist_current_pos, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_44playlist_current_pos)},
  {__Pyx_NAMESTR("playlist_current_active"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_45playlist_current_active, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_45playlist_current_active)},
  {__Pyx_NAMESTR("broadcast_playlist_current_pos"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_46broadcast_playlist_current_pos, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_46broadcast_playlist_current_pos)},
  {__Pyx_NAMESTR("broadcast_playlist_changed"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_47broadcast_playlist_changed, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_47broadcast_playlist_changed)},
  {__Pyx_NAMESTR("broadcast_config_value_changed"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_48broadcast_config_value_changed, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_48broadcast_config_value_changed)},
  {__Pyx_NAMESTR("broadcast_configval_changed"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_49broadcast_configval_changed, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_49broadcast_configval_changed)},
  {__Pyx_NAMESTR("config_set_value"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_50config_set_value, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_50config_set_value)},
  {__Pyx_NAMESTR("configval_set"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_51configval_set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_51configval_set)},
  {__Pyx_NAMESTR("config_get_value"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_52config_get_value, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_52config_get_value)},
  {__Pyx_NAMESTR("configval_get"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_53configval_get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_53configval_get)},
  {__Pyx_NAMESTR("config_list_values"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_54config_list_values, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_54config_list_values)},
  {__Pyx_NAMESTR("configval_list"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_55configval_list, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_55configval_list)},
  {__Pyx_NAMESTR("config_register_value"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_56config_register_value, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_56config_register_value)},
  {__Pyx_NAMESTR("configval_register"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_57configval_register, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_57configval_register)},
  {__Pyx_NAMESTR("medialib_add_entry"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_58medialib_add_entry, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_58medialib_add_entry)},
  {__Pyx_NAMESTR("medialib_add_entry_encoded"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_59medialib_add_entry_encoded, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_59medialib_add_entry_encoded)},
  {__Pyx_NAMESTR("medialib_remove_entry"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_60medialib_remove_entry, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_60medialib_remove_entry)},
  {__Pyx_NAMESTR("medialib_move_entry"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_61medialib_move_entry, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_61medialib_move_entry)},
  {__Pyx_NAMESTR("medialib_get_info"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_62medialib_get_info, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_62medialib_get_info)},
  {__Pyx_NAMESTR("medialib_rehash"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_63medialib_rehash, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_63medialib_rehash)},
  {__Pyx_NAMESTR("medialib_get_id"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_64medialib_get_id, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_64medialib_get_id)},
  {__Pyx_NAMESTR("medialib_import_path"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_65medialib_import_path, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_65medialib_import_path)},
  {__Pyx_NAMESTR("medialib_path_import"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_66medialib_path_import, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_66medialib_path_import)},
  {__Pyx_NAMESTR("medialib_path_import_encoded"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_67medialib_path_import_encoded, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_67medialib_path_import_encoded)},
  {__Pyx_NAMESTR("medialib_property_set"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_68medialib_property_set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_68medialib_property_set)},
  {__Pyx_NAMESTR("medialib_property_remove"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_69medialib_property_remove, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_69medialib_property_remove)},
  {__Pyx_NAMESTR("broadcast_medialib_entry_added"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_70broadcast_medialib_entry_added, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_70broadcast_medialib_entry_added)},
  {__Pyx_NAMESTR("broadcast_medialib_entry_changed"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_71broadcast_medialib_entry_changed, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_71broadcast_medialib_entry_changed)},
  {__Pyx_NAMESTR("broadcast_collection_changed"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_72broadcast_collection_changed, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_72broadcast_collection_changed)},
  {__Pyx_NAMESTR("signal_mediainfo_reader_unindexed"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_73signal_mediainfo_reader_unindexed, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_73signal_mediainfo_reader_unindexed)},
  {__Pyx_NAMESTR("broadcast_mediainfo_reader_status"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_74broadcast_mediainfo_reader_status, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_74broadcast_mediainfo_reader_status)},
  {__Pyx_NAMESTR("xform_media_browse"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_75xform_media_browse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_75xform_media_browse)},
  {__Pyx_NAMESTR("xform_media_browse_encoded"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_76xform_media_browse_encoded, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_76xform_media_browse_encoded)},
  {__Pyx_NAMESTR("coll_get"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_77coll_get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_77coll_get)},
  {__Pyx_NAMESTR("coll_list"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_78coll_list, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_78coll_list)},
  {__Pyx_NAMESTR("coll_save"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_79coll_save, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_79coll_save)},
  {__Pyx_NAMESTR("coll_remove"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_80coll_remove, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_80coll_remove)},
  {__Pyx_NAMESTR("coll_rename"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_81coll_rename, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_81coll_rename)},
  {__Pyx_NAMESTR("coll_idlist_from_playlist_file"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_82coll_idlist_from_playlist_file, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_82coll_idlist_from_playlist_file)},
  {__Pyx_NAMESTR("coll_query_ids"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_83coll_query_ids, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_83coll_query_ids)},
  {__Pyx_NAMESTR("coll_query_infos"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_84coll_query_infos, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_84coll_query_infos)},
  {__Pyx_NAMESTR("bindata_add"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_85bindata_add, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_85bindata_add)},
  {__Pyx_NAMESTR("bindata_retrieve"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_86bindata_retrieve, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_86bindata_retrieve)},
  {__Pyx_NAMESTR("bindata_remove"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_87bindata_remove, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_87bindata_remove)},
  {__Pyx_NAMESTR("bindata_list"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_88bindata_list, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_88bindata_list)},
  {__Pyx_NAMESTR("stats"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_89stats, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_89stats)},
  {__Pyx_NAMESTR("visualization_version"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_90visualization_version, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_90visualization_version)},
  {__Pyx_NAMESTR("visualization_init"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_91visualization_init, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_91visualization_init)},
  {__Pyx_NAMESTR("visualization_start"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_92visualization_start, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_92visualization_start)},
  {__Pyx_NAMESTR("visualization_started"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_93visualization_started, METH_O, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_93visualization_started)},
  {__Pyx_NAMESTR("visualization_errored"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_94visualization_errored, METH_O, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_94visualization_errored)},
  {__Pyx_NAMESTR("visualization_property_set"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_95visualization_property_set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_95visualization_property_set)},
  {__Pyx_NAMESTR("visualization_properties_set"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_96visualization_properties_set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_96visualization_properties_set)},
  {__Pyx_NAMESTR("visualization_chunk_get"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_97visualization_chunk_get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_97visualization_chunk_get)},
  {__Pyx_NAMESTR("visualization_shutdown"), (PyCFunction)__pyx_pf_7xmmsapi_7XmmsApi_98visualization_shutdown, METH_O, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_7XmmsApi_98visualization_shutdown)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_XmmsApi = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_XmmsApi = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_XmmsApi = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_XmmsApi = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_7xmmsapi_XmmsApi = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsapi.XmmsApi"), /*tp_name*/
  sizeof(struct __pyx_obj_7xmmsapi_XmmsApi), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7xmmsapi_XmmsCore, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_XmmsApi, /*tp_as_number*/
  &__pyx_tp_as_sequence_XmmsApi, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_XmmsApi, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_XmmsApi, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7xmmsapi_XmmsCore, /*tp_traverse*/
  __pyx_tp_clear_7xmmsapi_XmmsCore, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7xmmsapi_XmmsApi, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7xmmsapi_XmmsApi, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_7xmmsapi_XmmsLoop __pyx_vtable_7xmmsapi_XmmsLoop;

static PyObject *__pyx_tp_new_7xmmsapi_XmmsLoop(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7xmmsapi_XmmsLoop *p;
  PyObject *o = __pyx_tp_new_7xmmsapi_XmmsCore(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_7xmmsapi_XmmsLoop *)o);
  p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7xmmsapi_XmmsCore*)__pyx_vtabptr_7xmmsapi_XmmsLoop;
  p->wakeup = Py_None; Py_INCREF(Py_None);
  if (__pyx_pf_7xmmsapi_8XmmsLoop___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_7xmmsapi_XmmsLoop(PyObject *o) {
  struct __pyx_obj_7xmmsapi_XmmsLoop *p = (struct __pyx_obj_7xmmsapi_XmmsLoop *)o;
  Py_XDECREF(p->wakeup);
  __pyx_tp_dealloc_7xmmsapi_XmmsCore(o);
}

static int __pyx_tp_traverse_7xmmsapi_XmmsLoop(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7xmmsapi_XmmsLoop *p = (struct __pyx_obj_7xmmsapi_XmmsLoop *)o;
  e = __pyx_tp_traverse_7xmmsapi_XmmsCore(o, v, a); if (e) return e;
  if (p->wakeup) {
    e = (*v)(p->wakeup, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7xmmsapi_XmmsLoop(PyObject *o) {
  struct __pyx_obj_7xmmsapi_XmmsLoop *p = (struct __pyx_obj_7xmmsapi_XmmsLoop *)o;
  PyObject* tmp;
  __pyx_tp_clear_7xmmsapi_XmmsCore(o);
  tmp = ((PyObject*)p->wakeup);
  p->wakeup = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_7xmmsapi_XmmsLoop[] = {
  {__Pyx_NAMESTR("_loop_set_wakeup"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsLoop_1_loop_set_wakeup, METH_O, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_8XmmsLoop_1_loop_set_wakeup)},
  {__Pyx_NAMESTR("_loop_get_wakeup"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsLoop_2_loop_get_wakeup, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_8XmmsLoop_2_loop_get_wakeup)},
  {__Pyx_NAMESTR("exit_loop"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsLoop_3exit_loop, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_8XmmsLoop_3exit_loop)},
  {__Pyx_NAMESTR("loop_tickle"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsLoop_4loop_tickle, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("loop_iter"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsLoop_5loop_iter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_8XmmsLoop_5loop_iter)},
  {__Pyx_NAMESTR("loop"), (PyCFunction)__pyx_pf_7xmmsapi_8XmmsLoop_6loop, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_8XmmsLoop_6loop)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_XmmsLoop = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_XmmsLoop = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_XmmsLoop = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_XmmsLoop = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_7xmmsapi_XmmsLoop = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsapi.XmmsLoop"), /*tp_name*/
  sizeof(struct __pyx_obj_7xmmsapi_XmmsLoop), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7xmmsapi_XmmsLoop, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_XmmsLoop, /*tp_as_number*/
  &__pyx_tp_as_sequence_XmmsLoop, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_XmmsLoop, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_XmmsLoop, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7xmmsapi_XmmsLoop, /*tp_traverse*/
  __pyx_tp_clear_7xmmsapi_XmmsLoop, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7xmmsapi_XmmsLoop, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7xmmsapi_XmmsLoop, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_7xmmsapi___pyx_scope_struct__deprecated(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *)o);
  p->__pyx_v_f = 0;
  return o;
}

static void __pyx_tp_dealloc_7xmmsapi___pyx_scope_struct__deprecated(PyObject *o) {
  struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *p = (struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *)o;
  Py_XDECREF(p->__pyx_v_f);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7xmmsapi___pyx_scope_struct__deprecated(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *p = (struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *)o;
  if (p->__pyx_v_f) {
    e = (*v)(p->__pyx_v_f, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7xmmsapi___pyx_scope_struct__deprecated(PyObject *o) {
  struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *p = (struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_f);
  p->__pyx_v_f = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_7xmmsapi___pyx_scope_struct__deprecated[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct__deprecated = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct__deprecated = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct__deprecated = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct__deprecated = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_7xmmsapi___pyx_scope_struct__deprecated = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsapi.__pyx_scope_struct__deprecated"), /*tp_name*/
  sizeof(struct __pyx_obj_7xmmsapi___pyx_scope_struct__deprecated), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7xmmsapi___pyx_scope_struct__deprecated, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number___pyx_scope_struct__deprecated, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct__deprecated, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct__deprecated, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct__deprecated, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7xmmsapi___pyx_scope_struct__deprecated, /*tp_traverse*/
  __pyx_tp_clear_7xmmsapi___pyx_scope_struct__deprecated, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7xmmsapi___pyx_scope_struct__deprecated, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7xmmsapi___pyx_scope_struct__deprecated, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {__Pyx_NAMESTR("userconfdir_get"), (PyCFunction)__pyx_pf_7xmmsapi_1userconfdir_get, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_7xmmsapi_1userconfdir_get)},
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("xmmsapi"),
    __Pyx_DOCSTR(__pyx_k_88), /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
  {&__pyx_n_s_100, __pyx_k_100, sizeof(__pyx_k_100), 0, 0, 1, 1},
  {&__pyx_n_s_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 1, 1},
  {&__pyx_n_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 1},
  {&__pyx_n_s_103, __pyx_k_103, sizeof(__pyx_k_103), 0, 0, 1, 1},
  {&__pyx_n_s_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 1, 1},
  {&__pyx_n_s_105, __pyx_k_105, sizeof(__pyx_k_105), 0, 0, 1, 1},
  {&__pyx_n_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 1},
  {&__pyx_n_s_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 0, 1, 1},
  {&__pyx_n_s_108, __pyx_k_108, sizeof(__pyx_k_108), 0, 0, 1, 1},
  {&__pyx_n_s_109, __pyx_k_109, sizeof(__pyx_k_109), 0, 0, 1, 1},
  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
  {&__pyx_n_s_110, __pyx_k_110, sizeof(__pyx_k_110), 0, 0, 1, 1},
  {&__pyx_n_s_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 1, 1},
  {&__pyx_n_s_113, __pyx_k_113, sizeof(__pyx_k_113), 0, 0, 1, 1},
  {&__pyx_n_s_114, __pyx_k_114, sizeof(__pyx_k_114), 0, 0, 1, 1},
  {&__pyx_n_s_115, __pyx_k_115, sizeof(__pyx_k_115), 0, 0, 1, 1},
  {&__pyx_n_s_116, __pyx_k_116, sizeof(__pyx_k_116), 0, 0, 1, 1},
  {&__pyx_n_s_117, __pyx_k_117, sizeof(__pyx_k_117), 0, 0, 1, 1},
  {&__pyx_n_s_118, __pyx_k_118, sizeof(__pyx_k_118), 0, 0, 1, 1},
  {&__pyx_n_s_119, __pyx_k_119, sizeof(__pyx_k_119), 0, 0, 1, 1},
  {&__pyx_n_s_120, __pyx_k_120, sizeof(__pyx_k_120), 0, 0, 1, 1},
  {&__pyx_n_s_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 0, 1, 1},
  {&__pyx_n_s_122, __pyx_k_122, sizeof(__pyx_k_122), 0, 0, 1, 1},
  {&__pyx_n_s_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 0, 1, 1},
  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
  {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0},
  {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0},
  {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
  {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0},
  {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
  {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0},
  {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
  {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0},
  {&__pyx_n_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 1},
  {&__pyx_n_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 1},
  {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0},
  {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0},
  {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
  {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0},
  {&__pyx_n_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 1},
  {&__pyx_n_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 1},
  {&__pyx_n_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 1},
  {&__pyx_n_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 1},
  {&__pyx_n_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 1},
  {&__pyx_n_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 1},
  {&__pyx_n_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 1},
  {&__pyx_n_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 1},
  {&__pyx_n_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 1},
  {&__pyx_n_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 1},
  {&__pyx_n_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 1},
  {&__pyx_n_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 1},
  {&__pyx_n_s_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 1, 1},
  {&__pyx_n_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 1},
  {&__pyx_n_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 1},
  {&__pyx_n_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 1},
  {&__pyx_n_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 1},
  {&__pyx_n_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 1},
  {&__pyx_n_s_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 1},
  {&__pyx_n_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 1},
  {&__pyx_n_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 1},
  {&__pyx_n_s_65, __pyx_k_65, sizeof(__pyx_k_65), 0, 0, 1, 1},
  {&__pyx_n_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 1},
  {&__pyx_n_s_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 0, 1, 1},
  {&__pyx_n_s_68, __pyx_k_68, sizeof(__pyx_k_68), 0, 0, 1, 1},
  {&__pyx_n_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 1},
  {&__pyx_n_s_70, __pyx_k_70, sizeof(__pyx_k_70), 0, 0, 1, 1},
  {&__pyx_n_s_72, __pyx_k_72, sizeof(__pyx_k_72), 0, 0, 1, 1},
  {&__pyx_n_s_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 0, 1, 1},
  {&__pyx_n_s_74, __pyx_k_74, sizeof(__pyx_k_74), 0, 0, 1, 1},
  {&__pyx_n_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 1},
  {&__pyx_n_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 1},
  {&__pyx_n_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 1},
  {&__pyx_n_s_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 1},
  {&__pyx_kp_s_80, __pyx_k_80, sizeof(__pyx_k_80), 0, 0, 1, 0},
  {&__pyx_n_s_82, __pyx_k_82, sizeof(__pyx_k_82), 0, 0, 1, 1},
  {&__pyx_n_s_84, __pyx_k_84, sizeof(__pyx_k_84), 0, 0, 1, 1},
  {&__pyx_kp_s_86, __pyx_k_86, sizeof(__pyx_k_86), 0, 0, 1, 0},
  {&__pyx_n_s_89, __pyx_k_89, sizeof(__pyx_k_89), 0, 0, 1, 1},
  {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
  {&__pyx_n_s_90, __pyx_k_90, sizeof(__pyx_k_90), 0, 0, 1, 1},
  {&__pyx_n_s_91, __pyx_k_91, sizeof(__pyx_k_91), 0, 0, 1, 1},
  {&__pyx_n_s_92, __pyx_k_92, sizeof(__pyx_k_92), 0, 0, 1, 1},
  {&__pyx_n_s_93, __pyx_k_93, sizeof(__pyx_k_93), 0, 0, 1, 1},
  {&__pyx_n_s_94, __pyx_k_94, sizeof(__pyx_k_94), 0, 0, 1, 1},
  {&__pyx_n_s_95, __pyx_k_95, sizeof(__pyx_k_95), 0, 0, 1, 1},
  {&__pyx_n_s_96, __pyx_k_96, sizeof(__pyx_k_96), 0, 0, 1, 1},
  {&__pyx_n_s_97, __pyx_k_97, sizeof(__pyx_k_97), 0, 0, 1, 1},
  {&__pyx_n_s_98, __pyx_k_98, sizeof(__pyx_k_98), 0, 0, 1, 1},
  {&__pyx_n_s_99, __pyx_k_99, sizeof(__pyx_k_99), 0, 0, 1, 1},
  {&__pyx_kp_s__1, __pyx_k__1, sizeof(__pyx_k__1), 0, 0, 1, 0},
  {&__pyx_n_s__ACTIVE_PLAYLIST, __pyx_k__ACTIVE_PLAYLIST, sizeof(__pyx_k__ACTIVE_PLAYLIST), 0, 0, 1, 1},
  {&__pyx_n_s__COLLECTION_NS_ALL, __pyx_k__COLLECTION_NS_ALL, sizeof(__pyx_k__COLLECTION_NS_ALL), 0, 0, 1, 1},
  {&__pyx_n_s__Collections, __pyx_k__Collections, sizeof(__pyx_k__Collections), 0, 0, 1, 1},
  {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1},
  {&__pyx_n_s__IOError, __pyx_k__IOError, sizeof(__pyx_k__IOError), 0, 0, 1, 1},
  {&__pyx_n_s__ImportError, __pyx_k__ImportError, sizeof(__pyx_k__ImportError), 0, 0, 1, 1},
  {&__pyx_n_s__PLAYBACK_SEEK_CUR, __pyx_k__PLAYBACK_SEEK_CUR, sizeof(__pyx_k__PLAYBACK_SEEK_CUR), 0, 0, 1, 1},
  {&__pyx_n_s__PLAYBACK_SEEK_SET, __pyx_k__PLAYBACK_SEEK_SET, sizeof(__pyx_k__PLAYBACK_SEEK_SET), 0, 0, 1, 1},
  {&__pyx_n_s__PLUGIN_TYPE_ALL, __pyx_k__PLUGIN_TYPE_ALL, sizeof(__pyx_k__PLUGIN_TYPE_ALL), 0, 0, 1, 1},
  {&__pyx_n_s__PLUGIN_TYPE_OUTPUT, __pyx_k__PLUGIN_TYPE_OUTPUT, sizeof(__pyx_k__PLUGIN_TYPE_OUTPUT), 0, 0, 1, 1},
  {&__pyx_n_s__PLUGIN_TYPE_XFORM, __pyx_k__PLUGIN_TYPE_XFORM, sizeof(__pyx_k__PLUGIN_TYPE_XFORM), 0, 0, 1, 1},
  {&__pyx_n_s__Playlists, __pyx_k__Playlists, sizeof(__pyx_k__Playlists), 0, 0, 1, 1},
  {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
  {&__pyx_n_s__UnnamedPythonClient, __pyx_k__UnnamedPythonClient, sizeof(__pyx_k__UnnamedPythonClient), 0, 0, 1, 1},
  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
  {&__pyx_n_s__VisualizationError, __pyx_k__VisualizationError, sizeof(__pyx_k__VisualizationError), 0, 0, 1, 1},
  {&__pyx_n_s__XMMS, __pyx_k__XMMS, sizeof(__pyx_k__XMMS), 0, 0, 1, 1},
  {&__pyx_n_s__XMMSResult, __pyx_k__XMMSResult, sizeof(__pyx_k__XMMSResult), 0, 0, 1, 1},
  {&__pyx_n_s____call__, __pyx_k____call__, sizeof(__pyx_k____call__), 0, 0, 1, 1},
  {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____name__, __pyx_k____name__, sizeof(__pyx_k____name__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s___callback, __pyx_k___callback, sizeof(__pyx_k___callback), 0, 0, 1, 1},
  {&__pyx_n_s___disconnect_cb, __pyx_k___disconnect_cb, sizeof(__pyx_k___disconnect_cb), 0, 0, 1, 1},
  {&__pyx_n_s___loop_get_wakeup, __pyx_k___loop_get_wakeup, sizeof(__pyx_k___loop_get_wakeup), 0, 0, 1, 1},
  {&__pyx_n_s___loop_set_wakeup, __pyx_k___loop_set_wakeup, sizeof(__pyx_k___loop_set_wakeup), 0, 0, 1, 1},
  {&__pyx_n_s___needout_cb, __pyx_k___needout_cb, sizeof(__pyx_k___needout_cb), 0, 0, 1, 1},
  {&__pyx_n_s___value, __pyx_k___value, sizeof(__pyx_k___value), 0, 0, 1, 1},
  {&__pyx_n_s__ascii, __pyx_k__ascii, sizeof(__pyx_k__ascii), 0, 0, 1, 1},
  {&__pyx_n_s__bindata_add, __pyx_k__bindata_add, sizeof(__pyx_k__bindata_add), 0, 0, 1, 1},
  {&__pyx_n_s__bindata_list, __pyx_k__bindata_list, sizeof(__pyx_k__bindata_list), 0, 0, 1, 1},
  {&__pyx_n_s__bindata_remove, __pyx_k__bindata_remove, sizeof(__pyx_k__bindata_remove), 0, 0, 1, 1},
  {&__pyx_n_s__bindata_retrieve, __pyx_k__bindata_retrieve, sizeof(__pyx_k__bindata_retrieve), 0, 0, 1, 1},
  {&__pyx_n_s__blocking, __pyx_k__blocking, sizeof(__pyx_k__blocking), 0, 0, 1, 1},
  {&__pyx_n_s__callback, __pyx_k__callback, sizeof(__pyx_k__callback), 0, 0, 1, 1},
  {&__pyx_n_s__cb, __pyx_k__cb, sizeof(__pyx_k__cb), 0, 0, 1, 1},
  {&__pyx_n_s__channel, __pyx_k__channel, sizeof(__pyx_k__channel), 0, 0, 1, 1},
  {&__pyx_n_s__clientname, __pyx_k__clientname, sizeof(__pyx_k__clientname), 0, 0, 1, 1},
  {&__pyx_n_s__coll, __pyx_k__coll, sizeof(__pyx_k__coll), 0, 0, 1, 1},
  {&__pyx_n_s__coll_get, __pyx_k__coll_get, sizeof(__pyx_k__coll_get), 0, 0, 1, 1},
  {&__pyx_n_s__coll_list, __pyx_k__coll_list, sizeof(__pyx_k__coll_list), 0, 0, 1, 1},
  {&__pyx_n_s__coll_query_ids, __pyx_k__coll_query_ids, sizeof(__pyx_k__coll_query_ids), 0, 0, 1, 1},
  {&__pyx_n_s__coll_query_infos, __pyx_k__coll_query_infos, sizeof(__pyx_k__coll_query_infos), 0, 0, 1, 1},
  {&__pyx_n_s__coll_remove, __pyx_k__coll_remove, sizeof(__pyx_k__coll_remove), 0, 0, 1, 1},
  {&__pyx_n_s__coll_rename, __pyx_k__coll_rename, sizeof(__pyx_k__coll_rename), 0, 0, 1, 1},
  {&__pyx_n_s__coll_save, __pyx_k__coll_save, sizeof(__pyx_k__coll_save), 0, 0, 1, 1},
  {&__pyx_n_s__config_get_value, __pyx_k__config_get_value, sizeof(__pyx_k__config_get_value), 0, 0, 1, 1},
  {&__pyx_n_s__config_list_values, __pyx_k__config_list_values, sizeof(__pyx_k__config_list_values), 0, 0, 1, 1},
  {&__pyx_n_s__config_set_value, __pyx_k__config_set_value, sizeof(__pyx_k__config_set_value), 0, 0, 1, 1},
  {&__pyx_n_s__configval_get, __pyx_k__configval_get, sizeof(__pyx_k__configval_get), 0, 0, 1, 1},
  {&__pyx_n_s__configval_list, __pyx_k__configval_list, sizeof(__pyx_k__configval_list), 0, 0, 1, 1},
  {&__pyx_n_s__configval_register, __pyx_k__configval_register, sizeof(__pyx_k__configval_register), 0, 0, 1, 1},
  {&__pyx_n_s__configval_set, __pyx_k__configval_set, sizeof(__pyx_k__configval_set), 0, 0, 1, 1},
  {&__pyx_n_s__connect, __pyx_k__connect, sizeof(__pyx_k__connect), 0, 0, 1, 1},
  {&__pyx_n_s__cur_pos, __pyx_k__cur_pos, sizeof(__pyx_k__cur_pos), 0, 0, 1, 1},
  {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
  {&__pyx_n_s__defaultvalue, __pyx_k__defaultvalue, sizeof(__pyx_k__defaultvalue), 0, 0, 1, 1},
  {&__pyx_n_s__deprecated, __pyx_k__deprecated, sizeof(__pyx_k__deprecated), 0, 0, 1, 1},
  {&__pyx_n_s__disconnect, __pyx_k__disconnect, sizeof(__pyx_k__disconnect), 0, 0, 1, 1},
  {&__pyx_n_s__disconnect_func, __pyx_k__disconnect_func, sizeof(__pyx_k__disconnect_func), 0, 0, 1, 1},
  {&__pyx_n_s__drawtime, __pyx_k__drawtime, sizeof(__pyx_k__drawtime), 0, 0, 1, 1},
  {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1},
  {&__pyx_n_s__encoded, __pyx_k__encoded, sizeof(__pyx_k__encoded), 0, 0, 1, 1},
  {&__pyx_n_s__enforce_unicode, __pyx_k__enforce_unicode, sizeof(__pyx_k__enforce_unicode), 0, 0, 1, 1},
  {&__pyx_n_s__errfd, __pyx_k__errfd, sizeof(__pyx_k__errfd), 0, 0, 1, 1},
  {&__pyx_n_s__exc_info, __pyx_k__exc_info, sizeof(__pyx_k__exc_info), 0, 0, 1, 1},
  {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1},
  {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1},
  {&__pyx_n_s__get_buffer, __pyx_k__get_buffer, sizeof(__pyx_k__get_buffer), 0, 0, 1, 1},
  {&__pyx_n_s__get_data, __pyx_k__get_data, sizeof(__pyx_k__get_data), 0, 0, 1, 1},
  {&__pyx_n_s__get_fd, __pyx_k__get_fd, sizeof(__pyx_k__get_fd), 0, 0, 1, 1},
  {&__pyx_n_s__getenv, __pyx_k__getenv, sizeof(__pyx_k__getenv), 0, 0, 1, 1},
  {&__pyx_n_s__groupby, __pyx_k__groupby, sizeof(__pyx_k__groupby), 0, 0, 1, 1},
  {&__pyx_n_s__handle, __pyx_k__handle, sizeof(__pyx_k__handle), 0, 0, 1, 1},
  {&__pyx_n_s__hash, __pyx_k__hash, sizeof(__pyx_k__hash), 0, 0, 1, 1},
  {&__pyx_n_s__id, __pyx_k__id, sizeof(__pyx_k__id), 0, 0, 1, 1},
  {&__pyx_n_s__infd, __pyx_k__infd, sizeof(__pyx_k__infd), 0, 0, 1, 1},
  {&__pyx_n_s__ioin, __pyx_k__ioin, sizeof(__pyx_k__ioin), 0, 0, 1, 1},
  {&__pyx_n_s__ioout, __pyx_k__ioout, sizeof(__pyx_k__ioout), 0, 0, 1, 1},
  {&__pyx_n_s__is_error, __pyx_k__is_error, sizeof(__pyx_k__is_error), 0, 0, 1, 1},
  {&__pyx_n_s__iserror, __pyx_k__iserror, sizeof(__pyx_k__iserror), 0, 0, 1, 1},
  {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1},
  {&__pyx_n_s__leng, __pyx_k__leng, sizeof(__pyx_k__leng), 0, 0, 1, 1},
  {&__pyx_n_s__loop_iter, __pyx_k__loop_iter, sizeof(__pyx_k__loop_iter), 0, 0, 1, 1},
  {&__pyx_n_s__loop_tickle, __pyx_k__loop_tickle, sizeof(__pyx_k__loop_tickle), 0, 0, 1, 1},
  {&__pyx_n_s__map, __pyx_k__map, sizeof(__pyx_k__map), 0, 0, 1, 1},
  {&__pyx_n_s__medialib_add_entry, __pyx_k__medialib_add_entry, sizeof(__pyx_k__medialib_add_entry), 0, 0, 1, 1},
  {&__pyx_n_s__medialib_get_id, __pyx_k__medialib_get_id, sizeof(__pyx_k__medialib_get_id), 0, 0, 1, 1},
  {&__pyx_n_s__medialib_get_info, __pyx_k__medialib_get_info, sizeof(__pyx_k__medialib_get_info), 0, 0, 1, 1},
  {&__pyx_n_s__medialib_move_entry, __pyx_k__medialib_move_entry, sizeof(__pyx_k__medialib_move_entry), 0, 0, 1, 1},
  {&__pyx_n_s__medialib_rehash, __pyx_k__medialib_rehash, sizeof(__pyx_k__medialib_rehash), 0, 0, 1, 1},
  {&__pyx_n_s__ms, __pyx_k__ms, sizeof(__pyx_k__ms), 0, 0, 1, 1},
  {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1},
  {&__pyx_n_s__new_pos, __pyx_k__new_pos, sizeof(__pyx_k__new_pos), 0, 0, 1, 1},
  {&__pyx_n_s__newname, __pyx_k__newname, sizeof(__pyx_k__newname), 0, 0, 1, 1},
  {&__pyx_n_s__ns, __pyx_k__ns, sizeof(__pyx_k__ns), 0, 0, 1, 1},
  {&__pyx_n_s__oldname, __pyx_k__oldname, sizeof(__pyx_k__oldname), 0, 0, 1, 1},
  {&__pyx_n_s__order, __pyx_k__order, sizeof(__pyx_k__order), 0, 0, 1, 1},
  {&__pyx_n_s__os, __pyx_k__os, sizeof(__pyx_k__os), 0, 0, 1, 1},
  {&__pyx_n_s__outfd, __pyx_k__outfd, sizeof(__pyx_k__outfd), 0, 0, 1, 1},
  {&__pyx_n_s__path, __pyx_k__path, sizeof(__pyx_k__path), 0, 0, 1, 1},
  {&__pyx_n_s__pipe, __pyx_k__pipe, sizeof(__pyx_k__pipe), 0, 0, 1, 1},
  {&__pyx_n_s__playback_current_id, __pyx_k__playback_current_id, sizeof(__pyx_k__playback_current_id), 0, 0, 1, 1},
  {&__pyx_n_s__playback_pause, __pyx_k__playback_pause, sizeof(__pyx_k__playback_pause), 0, 0, 1, 1},
  {&__pyx_n_s__playback_playtime, __pyx_k__playback_playtime, sizeof(__pyx_k__playback_playtime), 0, 0, 1, 1},
  {&__pyx_n_s__playback_seek_ms, __pyx_k__playback_seek_ms, sizeof(__pyx_k__playback_seek_ms), 0, 0, 1, 1},
  {&__pyx_n_s__playback_start, __pyx_k__playback_start, sizeof(__pyx_k__playback_start), 0, 0, 1, 1},
  {&__pyx_n_s__playback_status, __pyx_k__playback_status, sizeof(__pyx_k__playback_status), 0, 0, 1, 1},
  {&__pyx_n_s__playback_stop, __pyx_k__playback_stop, sizeof(__pyx_k__playback_stop), 0, 0, 1, 1},
  {&__pyx_n_s__playback_tickle, __pyx_k__playback_tickle, sizeof(__pyx_k__playback_tickle), 0, 0, 1, 1},
  {&__pyx_n_s__playback_volume_get, __pyx_k__playback_volume_get, sizeof(__pyx_k__playback_volume_get), 0, 0, 1, 1},
  {&__pyx_n_s__playback_volume_set, __pyx_k__playback_volume_set, sizeof(__pyx_k__playback_volume_set), 0, 0, 1, 1},
  {&__pyx_n_s__playlist, __pyx_k__playlist, sizeof(__pyx_k__playlist), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_add_id, __pyx_k__playlist_add_id, sizeof(__pyx_k__playlist_add_id), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_add_url, __pyx_k__playlist_add_url, sizeof(__pyx_k__playlist_add_url), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_clear, __pyx_k__playlist_clear, sizeof(__pyx_k__playlist_clear), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_create, __pyx_k__playlist_create, sizeof(__pyx_k__playlist_create), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_insert_id, __pyx_k__playlist_insert_id, sizeof(__pyx_k__playlist_insert_id), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_insert_url, __pyx_k__playlist_insert_url, sizeof(__pyx_k__playlist_insert_url), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_list, __pyx_k__playlist_list, sizeof(__pyx_k__playlist_list), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_load, __pyx_k__playlist_load, sizeof(__pyx_k__playlist_load), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_move, __pyx_k__playlist_move, sizeof(__pyx_k__playlist_move), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_radd, __pyx_k__playlist_radd, sizeof(__pyx_k__playlist_radd), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_remove, __pyx_k__playlist_remove, sizeof(__pyx_k__playlist_remove), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_rinsert, __pyx_k__playlist_rinsert, sizeof(__pyx_k__playlist_rinsert), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_set_next, __pyx_k__playlist_set_next, sizeof(__pyx_k__playlist_set_next), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_shuffle, __pyx_k__playlist_shuffle, sizeof(__pyx_k__playlist_shuffle), 0, 0, 1, 1},
  {&__pyx_n_s__playlist_sort, __pyx_k__playlist_sort, sizeof(__pyx_k__playlist_sort), 0, 0, 1, 1},
  {&__pyx_n_s__plugin_list, __pyx_k__plugin_list, sizeof(__pyx_k__plugin_list), 0, 0, 1, 1},
  {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1},
  {&__pyx_n_s__position, __pyx_k__position, sizeof(__pyx_k__position), 0, 0, 1, 1},
  {&__pyx_n_s__print_exception, __pyx_k__print_exception, sizeof(__pyx_k__print_exception), 0, 0, 1, 1},
  {&__pyx_n_s__props, __pyx_k__props, sizeof(__pyx_k__props), 0, 0, 1, 1},
  {&__pyx_n_s__pyval, __pyx_k__pyval, sizeof(__pyx_k__pyval), 0, 0, 1, 1},
  {&__pyx_n_s__quit, __pyx_k__quit, sizeof(__pyx_k__quit), 0, 0, 1, 1},
  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
  {&__pyx_n_s__read, __pyx_k__read, sizeof(__pyx_k__read), 0, 0, 1, 1},
  {&__pyx_n_s__remove, __pyx_k__remove, sizeof(__pyx_k__remove), 0, 0, 1, 1},
  {&__pyx_n_s__samples, __pyx_k__samples, sizeof(__pyx_k__samples), 0, 0, 1, 1},
  {&__pyx_n_s__select, __pyx_k__select, sizeof(__pyx_k__select), 0, 0, 1, 1},
  {&__pyx_n_s__server, __pyx_k__server, sizeof(__pyx_k__server), 0, 0, 1, 1},
  {&__pyx_n_s__set, __pyx_k__set, sizeof(__pyx_k__set), 0, 0, 1, 1},
  {&__pyx_n_s__set_need_out_fun, __pyx_k__set_need_out_fun, sizeof(__pyx_k__set_need_out_fun), 0, 0, 1, 1},
  {&__pyx_n_s__source, __pyx_k__source, sizeof(__pyx_k__source), 0, 0, 1, 1},
  {&__pyx_n_s__sources, __pyx_k__sources, sizeof(__pyx_k__sources), 0, 0, 1, 1},
  {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1},
  {&__pyx_n_s__stats, __pyx_k__stats, sizeof(__pyx_k__stats), 0, 0, 1, 1},
  {&__pyx_n_s__stderr, __pyx_k__stderr, sizeof(__pyx_k__stderr), 0, 0, 1, 1},
  {&__pyx_n_s__sys, __pyx_k__sys, sizeof(__pyx_k__sys), 0, 0, 1, 1},
  {&__pyx_n_s__timeout, __pyx_k__timeout, sizeof(__pyx_k__timeout), 0, 0, 1, 1},
  {&__pyx_n_s__traceback, __pyx_k__traceback, sizeof(__pyx_k__traceback), 0, 0, 1, 1},
  {&__pyx_n_s__typ, __pyx_k__typ, sizeof(__pyx_k__typ), 0, 0, 1, 1},
  {&__pyx_n_s__unquote_plus, __pyx_k__unquote_plus, sizeof(__pyx_k__unquote_plus), 0, 0, 1, 1},
  {&__pyx_n_s__url, __pyx_k__url, sizeof(__pyx_k__url), 0, 0, 1, 1},
  {&__pyx_n_s__urllib, __pyx_k__urllib, sizeof(__pyx_k__urllib), 0, 0, 1, 1},
  {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1},
  {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1},
  {&__pyx_n_s__valuename, __pyx_k__valuename, sizeof(__pyx_k__valuename), 0, 0, 1, 1},
  {&__pyx_n_s__visualization_init, __pyx_k__visualization_init, sizeof(__pyx_k__visualization_init), 0, 0, 1, 1},
  {&__pyx_n_s__visualization_start, __pyx_k__visualization_start, sizeof(__pyx_k__visualization_start), 0, 0, 1, 1},
  {&__pyx_n_s__volume, __pyx_k__volume, sizeof(__pyx_k__volume), 0, 0, 1, 1},
  {&__pyx_n_s__wait, __pyx_k__wait, sizeof(__pyx_k__wait), 0, 0, 1, 1},
  {&__pyx_n_s__want_ioout, __pyx_k__want_ioout, sizeof(__pyx_k__want_ioout), 0, 0, 1, 1},
  {&__pyx_n_s__whence, __pyx_k__whence, sizeof(__pyx_k__whence), 0, 0, 1, 1},
  {&__pyx_n_s__write, __pyx_k__write, sizeof(__pyx_k__write), 0, 0, 1, 1},
  {&__pyx_n_s__xform_media_browse, __pyx_k__xform_media_browse, sizeof(__pyx_k__xform_media_browse), 0, 0, 1, 1},
  {&__pyx_n_s__xmmsapi, __pyx_k__xmmsapi, sizeof(__pyx_k__xmmsapi), 0, 0, 1, 1},
  {&__pyx_n_s__xmmsvalue, __pyx_k__xmmsvalue, sizeof(__pyx_k__xmmsvalue), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Exception = __Pyx_GetName(__pyx_b, __pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_n_s__map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_IOError = __Pyx_GetName(__pyx_b, __pyx_n_s__IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ImportError = __Pyx_GetName(__pyx_b, __pyx_n_s__ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants");

  /* "xmmsapi.pyx":214
 * 		"""
 * 		if self.res == NULL:
 * 			raise RuntimeError("Uninitialized result")             # <<<<<<<<<<<<<<
 * 
 * 		xmmsc_result_wait(self.res)
 */
  __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_4));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
  PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));

  /* "xmmsapi.pyx":236
 * 		cdef xmmsv_t *value
 * 		if self.res == NULL:
 * 			raise RuntimeError("Uninitialized result")             # <<<<<<<<<<<<<<
 * 		value = xmmsc_result_get_value(self.res)
 * 		obj = XmmsValue(self.source_pref.get())
 */
  __pyx_k_tuple_5 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_5));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
  PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, ((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));

  /* "xmmsapi.pyx":285
 * 		if self._val is None:
 * 			if self.res == NULL:
 * 				raise RuntimeError("Uninitialized result")             # <<<<<<<<<<<<<<
 * 			hid = xmmsc_visualization_init_handle(self.res)
 * 			if hid == -1:
 */
  __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_7));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
  PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7));

  /* "xmmsapi.pyx":296
 * 		if self._val is None:
 * 			if self.res == NULL:
 * 				raise RuntimeError("Uninitialized result")             # <<<<<<<<<<<<<<
 * 			xval = XmmsResult.xmmsvalue(self)
 * 			if xval.is_error():
 */
  __pyx_k_tuple_8 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_8));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
  PyTuple_SET_ITEM(__pyx_k_tuple_8, 0, ((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_8));

  /* "xmmsapi.pyx":301
 * 				self._val = xval
 * 			elif self.conn == NULL:
 * 				raise RuntimeError("Internal connection reference not set")             # <<<<<<<<<<<<<<
 * 			else:
 * 				xmmsc_visualization_start_handle(self.conn, self.res)
 */
  __pyx_k_tuple_10 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_10));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
  PyTuple_SET_ITEM(__pyx_k_tuple_10, 0, ((PyObject *)__pyx_kp_s_9));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));

  /* "xmmsapi.pyx":334
 * 		self.data = <short *>PyMem_Malloc(sizeof (short) * sample_count)
 * 		if self.data == NULL:
 * 			raise RuntimeError("Failed to initialize chunk data")             # <<<<<<<<<<<<<<
 * 		for i in range(sample_count):
 * 			self.data[i] = data[i]
 */
  __pyx_k_tuple_12 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_12));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
  PyTuple_SET_ITEM(__pyx_k_tuple_12, 0, ((PyObject *)__pyx_kp_s_11));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));

  /* "xmmsapi.pyx":351
 * 		"""
 * 		if self.data == NULL:
 * 			raise RuntimeError("chunk data not initialized")             # <<<<<<<<<<<<<<
 * 		return PyBytes_FromStringAndSize(<char *>self.data, sizeof (short) * self.sample_count)
 * 
 */
  __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_14));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
  PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_kp_s_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));

  /* "xmmsapi.pyx":363
 * 		"""
 * 		if self.data == NULL:
 * 			raise RuntimeError("chunk data not initialized")             # <<<<<<<<<<<<<<
 * 		return [<int>self.data[i] for i in range(self.sample_count)]
 * 
 */
  __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_15));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
  PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_kp_s_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));

  /* "xmmsapi.pyx":450
 * 		self.conn = xmmsc_init(<char *>cn)
 * 		if self.conn == NULL:
 * 			raise ValueError("Failed to initialize xmmsclient library! Probably due to broken name.")             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_source_preference(self):
 */
  __pyx_k_tuple_23 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_23));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_22));
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_kp_s_22));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_22));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));

  /* "xmmsapi.pyx":546
 * 
 * 		if not ret:
 * 			raise IOError("Couldn't connect to the server")             # <<<<<<<<<<<<<<
 * 		self.isconnected = 1
 * 
 */
  __pyx_k_tuple_27 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_27));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_26));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 0, ((PyObject *)__pyx_kp_s_26));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_26));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27));

  /* "xmmsapi.pyx":559
 * 		cdef XmmsResult ret
 * 		if res == NULL:
 * 			raise RuntimeError("xmmsc_result_t couldn't be allocated")             # <<<<<<<<<<<<<<
 * 		ret = Cls()
 * 		ret.set_sourcepref(self.source_preference)
 */
  __pyx_k_tuple_29 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_29));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_29, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));

  /* "xmmsapi.pyx":659
 * 			return self.create_result(cb, xmmsc_playback_seek_ms(self.conn, ms, whence))
 * 		else:
 * 			raise ValueError("Bad whence parameter")             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __pyx_k_tuple_32 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_32));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_31));
  PyTuple_SET_ITEM(__pyx_k_tuple_32, 0, ((PyObject *)__pyx_kp_s_31));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));

  /* "xmmsapi.pyx":685
 * 			return self.create_result(cb, xmmsc_playback_seek_samples(self.conn, samples, whence))
 * 		else:
 * 			raise ValueError("Bad whence parameter")             # <<<<<<<<<<<<<<
 * 
 * 	@deprecated
 */
  __pyx_k_tuple_35 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_35));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_31));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_kp_s_31));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));

  /* "xmmsapi.pyx":1764
 * 		if size < 0:
 * 			PyMem_Free(buf)
 * 			raise VisualizationError("Unrecoverable error in visualization")             # <<<<<<<<<<<<<<
 * 		chunk = XmmsVisChunk()
 * 		chunk.set_data(buf, size)
 */
  __pyx_k_tuple_81 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_81)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_81));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_80));
  PyTuple_SET_ITEM(__pyx_k_tuple_81, 0, ((PyObject *)__pyx_kp_s_80));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_80));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_81));

  /* "xmmsapi.pyx":1824
 * 		w = self._loop_get_wakeup()
 * 		if w is not None:
 * 			write(w, "1".encode('ascii'))             # <<<<<<<<<<<<<<
 * 
 * 	def loop_iter(self, infd=None, outfd=None, errfd=None, timeout=-1):
 */
  __pyx_k_tuple_83 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_83)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_83));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascii));
  PyTuple_SET_ITEM(__pyx_k_tuple_83, 0, ((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascii));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_83));

  /* "xmmsapi.pyx":1886
 * 				self.do_loop = False
 * 
 * 		self._loop_set_wakeup(None)             # <<<<<<<<<<<<<<
 * 
 * # Compatibility
 */
  __pyx_k_tuple_85 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_85));
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_k_tuple_85, 0, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85));

  /* "xmmsapi.pxd":17
 * 		n = <char *>XMMS_COLLECTION_NS_ALL
 * 	else:
 * 		raise ValueError("Bad namespace")             # <<<<<<<<<<<<<<
 * 	return n
 * 
 */
  __pyx_k_tuple_87 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_87));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_86));
  PyTuple_SET_ITEM(__pyx_k_tuple_87, 0, ((PyObject *)__pyx_kp_s_86));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_86));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_87));

  /* "xmmsapi.pyx":57
 * cdef int show_deprecated = 0
 * from os import getenv
 * if getenv('XMMS_PYTHON_SHOW_DEPRECATED'):             # <<<<<<<<<<<<<<
 * 	show_deprecated = 1
 * del getenv
 */
  __pyx_k_tuple_112 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_112)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_112));
  __Pyx_INCREF(((PyObject *)__pyx_n_s_111));
  PyTuple_SET_ITEM(__pyx_k_tuple_112, 0, ((PyObject *)__pyx_n_s_111));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s_111));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_112));
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initxmmsapi(void); /*proto*/
PyMODINIT_FUNC initxmmsapi(void)
#else
PyMODINIT_FUNC PyInit_xmmsapi(void); /*proto*/
PyMODINIT_FUNC PyInit_xmmsapi(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  xmms_playback_seek_mode_t __pyx_t_6;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_xmmsapi(void)");
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __pyx_binding_PyCFunctionType_USED
  if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("xmmsapi"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_88), 0, PYTHON_API_VERSION);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (!__pyx_m) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  #if PY_MAJOR_VERSION < 3
  Py_INCREF(__pyx_m);
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
  if (!__pyx_b) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_module_is_main_xmmsapi) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  __pyx_v_7xmmsapi_select = Py_None; Py_INCREF(Py_None);
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("ResultNotifier", (void (*)(void))__pyx_f_7xmmsapi_ResultNotifier, "int (xmmsv_t *, void *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("ResultDestroyNotifier", (void (*)(void))__pyx_f_7xmmsapi_ResultDestroyNotifier, "void (void *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("python_need_out_fun", (void (*)(void))__pyx_f_7xmmsapi_python_need_out_fun, "void (int, void *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("python_disconnect_fun", (void (*)(void))__pyx_f_7xmmsapi_python_disconnect_fun, "void (void *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("userconfdir_get", (void (*)(void))__pyx_f_7xmmsapi_userconfdir_get, "PyObject *(int __pyx_skip_dispatch)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_7xmmsapi_XmmsSourcePreference) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "XmmsSourcePreference", (PyObject *)&__pyx_type_7xmmsapi_XmmsSourcePreference) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7xmmsapi_XmmsSourcePreference = &__pyx_type_7xmmsapi_XmmsSourcePreference;
  __pyx_vtabptr_7xmmsapi_XmmsResult = &__pyx_vtable_7xmmsapi_XmmsResult;
  __pyx_vtable_7xmmsapi_XmmsResult.set_sourcepref = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResult *, struct __pyx_obj_7xmmsapi_XmmsSourcePreference *))__pyx_f_7xmmsapi_10XmmsResult_set_sourcepref;
  __pyx_vtable_7xmmsapi_XmmsResult.set_result = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResult *, xmmsc_result_t *))__pyx_f_7xmmsapi_10XmmsResult_set_result;
  __pyx_vtable_7xmmsapi_XmmsResult.set_callback = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResult *, struct __pyx_obj_7xmmsapi_XmmsResultTracker *, PyObject *))__pyx_f_7xmmsapi_10XmmsResult_set_callback;
  __pyx_vtable_7xmmsapi_XmmsResult.disconnect = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_10XmmsResult_disconnect;
  __pyx_vtable_7xmmsapi_XmmsResult.wait = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_10XmmsResult_wait;
  __pyx_vtable_7xmmsapi_XmmsResult.is_error = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_10XmmsResult_is_error;
  __pyx_vtable_7xmmsapi_XmmsResult.iserror = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_10XmmsResult_iserror;
  __pyx_vtable_7xmmsapi_XmmsResult.xmmsvalue = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_10XmmsResult_xmmsvalue;
  __pyx_vtable_7xmmsapi_XmmsResult._value = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_10XmmsResult__value;
  __pyx_vtable_7xmmsapi_XmmsResult.value = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_10XmmsResult_value;
  if (PyType_Ready(&__pyx_type_7xmmsapi_XmmsResult) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_7xmmsapi_XmmsResult.tp_dict, __pyx_vtabptr_7xmmsapi_XmmsResult) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "XmmsResult", (PyObject *)&__pyx_type_7xmmsapi_XmmsResult) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7xmmsapi_XmmsResult = &__pyx_type_7xmmsapi_XmmsResult;
  __pyx_vtabptr_7xmmsapi_XmmsResultTracker = &__pyx_vtable_7xmmsapi_XmmsResultTracker;
  __pyx_vtable_7xmmsapi_XmmsResultTracker.track_result = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResultTracker *, struct __pyx_obj_7xmmsapi_XmmsResult *))__pyx_f_7xmmsapi_17XmmsResultTracker_track_result;
  __pyx_vtable_7xmmsapi_XmmsResultTracker.release_result = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResultTracker *, struct __pyx_obj_7xmmsapi_XmmsResult *))__pyx_f_7xmmsapi_17XmmsResultTracker_release_result;
  __pyx_vtable_7xmmsapi_XmmsResultTracker.disconnect_all = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResultTracker *, int))__pyx_f_7xmmsapi_17XmmsResultTracker_disconnect_all;
  if (PyType_Ready(&__pyx_type_7xmmsapi_XmmsResultTracker) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_7xmmsapi_XmmsResultTracker.tp_dict, __pyx_vtabptr_7xmmsapi_XmmsResultTracker) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "XmmsResultTracker", (PyObject *)&__pyx_type_7xmmsapi_XmmsResultTracker) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7xmmsapi_XmmsResultTracker = &__pyx_type_7xmmsapi_XmmsResultTracker;
  __pyx_vtabptr_7xmmsapi_XmmsVisResult = &__pyx_vtable_7xmmsapi_XmmsVisResult;
  __pyx_vtable_7xmmsapi_XmmsVisResult.__pyx_base = *__pyx_vtabptr_7xmmsapi_XmmsResult;
  __pyx_vtable_7xmmsapi_XmmsVisResult.__pyx_base.xmmsvalue = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsResult *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_13XmmsVisResult_xmmsvalue;
  __pyx_vtable_7xmmsapi_XmmsVisResult.set_command = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsVisResult *, __pyx_t_7xmmsapi_VisResultCommand, xmmsc_connection_t *))__pyx_f_7xmmsapi_13XmmsVisResult_set_command;
  __pyx_vtable_7xmmsapi_XmmsVisResult.retrieve_error = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsVisResult *))__pyx_f_7xmmsapi_13XmmsVisResult_retrieve_error;
  __pyx_vtable_7xmmsapi_XmmsVisResult._init_xmmsvalue = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsVisResult *))__pyx_f_7xmmsapi_13XmmsVisResult__init_xmmsvalue;
  __pyx_vtable_7xmmsapi_XmmsVisResult._start_xmmsvalue = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsVisResult *))__pyx_f_7xmmsapi_13XmmsVisResult__start_xmmsvalue;
  __pyx_type_7xmmsapi_XmmsVisResult.tp_base = __pyx_ptype_7xmmsapi_XmmsResult;
  if (PyType_Ready(&__pyx_type_7xmmsapi_XmmsVisResult) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_7xmmsapi_XmmsVisResult.tp_dict, __pyx_vtabptr_7xmmsapi_XmmsVisResult) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "XmmsVisResult", (PyObject *)&__pyx_type_7xmmsapi_XmmsVisResult) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7xmmsapi_XmmsVisResult = &__pyx_type_7xmmsapi_XmmsVisResult;
  __pyx_vtabptr_7xmmsapi_XmmsVisChunk = &__pyx_vtable_7xmmsapi_XmmsVisChunk;
  __pyx_vtable_7xmmsapi_XmmsVisChunk.set_data = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsVisChunk *, short *, int))__pyx_f_7xmmsapi_12XmmsVisChunk_set_data;
  __pyx_vtable_7xmmsapi_XmmsVisChunk.get_buffer = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsVisChunk *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_12XmmsVisChunk_get_buffer;
  __pyx_vtable_7xmmsapi_XmmsVisChunk.get_data = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsVisChunk *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_12XmmsVisChunk_get_data;
  if (PyType_Ready(&__pyx_type_7xmmsapi_XmmsVisChunk) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_7xmmsapi_XmmsVisChunk.tp_dict, __pyx_vtabptr_7xmmsapi_XmmsVisChunk) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "XmmsVisChunk", (PyObject *)&__pyx_type_7xmmsapi_XmmsVisChunk) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7xmmsapi_XmmsVisChunk = &__pyx_type_7xmmsapi_XmmsVisChunk;
  __pyx_vtabptr_7xmmsapi_XmmsCore = &__pyx_vtable_7xmmsapi_XmmsCore;
  __pyx_vtable_7xmmsapi_XmmsCore.new_connection = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *))__pyx_f_7xmmsapi_8XmmsCore_new_connection;
  __pyx_vtable_7xmmsapi_XmmsCore.get_source_preference = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_8XmmsCore_get_source_preference;
  __pyx_vtable_7xmmsapi_XmmsCore.set_source_preference = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_8XmmsCore_set_source_preference;
  __pyx_vtable_7xmmsapi_XmmsCore._needout_cb = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, int, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_8XmmsCore__needout_cb;
  __pyx_vtable_7xmmsapi_XmmsCore._disconnect_cb = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_8XmmsCore__disconnect_cb;
  __pyx_vtable_7xmmsapi_XmmsCore.disconnect = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_8XmmsCore_disconnect;
  __pyx_vtable_7xmmsapi_XmmsCore.ioin = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_8XmmsCore_ioin;
  __pyx_vtable_7xmmsapi_XmmsCore.ioout = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_8XmmsCore_ioout;
  __pyx_vtable_7xmmsapi_XmmsCore.want_ioout = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_8XmmsCore_want_ioout;
  __pyx_vtable_7xmmsapi_XmmsCore.set_need_out_fun = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, PyObject *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_8XmmsCore_set_need_out_fun;
  __pyx_vtable_7xmmsapi_XmmsCore.get_fd = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_8XmmsCore_get_fd;
  __pyx_vtable_7xmmsapi_XmmsCore.connect = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_8XmmsCore_connect *__pyx_optional_args))__pyx_f_7xmmsapi_8XmmsCore_connect;
  __pyx_vtable_7xmmsapi_XmmsCore._create_result = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, PyObject *, xmmsc_result_t *, PyObject *))__pyx_f_7xmmsapi_8XmmsCore__create_result;
  __pyx_vtable_7xmmsapi_XmmsCore.create_result = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, PyObject *, xmmsc_result_t *))__pyx_f_7xmmsapi_8XmmsCore_create_result;
  __pyx_vtable_7xmmsapi_XmmsCore.create_vis_result = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsCore *, PyObject *, xmmsc_result_t *, __pyx_t_7xmmsapi_VisResultCommand))__pyx_f_7xmmsapi_8XmmsCore_create_vis_result;
  if (PyType_Ready(&__pyx_type_7xmmsapi_XmmsCore) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_7xmmsapi_XmmsCore.tp_dict, __pyx_vtabptr_7xmmsapi_XmmsCore) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "XmmsCore", (PyObject *)&__pyx_type_7xmmsapi_XmmsCore) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7xmmsapi_XmmsCore = &__pyx_type_7xmmsapi_XmmsCore;
  __pyx_vtabptr_7xmmsapi_XmmsApi = &__pyx_vtable_7xmmsapi_XmmsApi;
  __pyx_vtable_7xmmsapi_XmmsApi.__pyx_base = *__pyx_vtabptr_7xmmsapi_XmmsCore;
  __pyx_vtable_7xmmsapi_XmmsApi.quit = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_quit *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_quit;
  __pyx_vtable_7xmmsapi_XmmsApi.plugin_list = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_plugin_list *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_plugin_list;
  __pyx_vtable_7xmmsapi_XmmsApi.playback_start = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_start *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playback_start;
  __pyx_vtable_7xmmsapi_XmmsApi.playback_stop = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_stop *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playback_stop;
  __pyx_vtable_7xmmsapi_XmmsApi.playback_tickle = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_tickle *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playback_tickle;
  __pyx_vtable_7xmmsapi_XmmsApi.playback_pause = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_pause *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playback_pause;
  __pyx_vtable_7xmmsapi_XmmsApi.playback_current_id = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_current_id *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playback_current_id;
  __pyx_vtable_7xmmsapi_XmmsApi.playback_seek_ms = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_seek_ms *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playback_seek_ms;
  __pyx_vtable_7xmmsapi_XmmsApi.playback_seek_samples = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_seek_samples *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playback_seek_samples;
  __pyx_vtable_7xmmsapi_XmmsApi.playback_status = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_status *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playback_status;
  __pyx_vtable_7xmmsapi_XmmsApi.broadcast_playback_status = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_status *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_broadcast_playback_status;
  __pyx_vtable_7xmmsapi_XmmsApi.broadcast_playback_current_id = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_current_id *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_broadcast_playback_current_id;
  __pyx_vtable_7xmmsapi_XmmsApi.playback_playtime = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_playtime *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playback_playtime;
  __pyx_vtable_7xmmsapi_XmmsApi.signal_playback_playtime = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_signal_playback_playtime *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_signal_playback_playtime;
  __pyx_vtable_7xmmsapi_XmmsApi.playback_volume_set = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_volume_set *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playback_volume_set;
  __pyx_vtable_7xmmsapi_XmmsApi.playback_volume_get = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playback_volume_get *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playback_volume_get;
  __pyx_vtable_7xmmsapi_XmmsApi.broadcast_playback_volume_changed = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playback_volume_changed *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_broadcast_playback_volume_changed;
  __pyx_vtable_7xmmsapi_XmmsApi.broadcast_playlist_loaded = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_loaded *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_broadcast_playlist_loaded;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_load = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_load *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_load;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_list = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_list *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_list;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_remove = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_remove *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_remove;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_shuffle = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_shuffle *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_shuffle;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_rinsert = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_rinsert *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_rinsert;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_insert_url = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_url *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_insert_url;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_insert_id = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_id *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_insert_id;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_insert_collection = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, struct __pyx_obj_9xmmsvalue_Collection *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_insert_collection *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_insert_collection;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_radd = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_radd *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_radd;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_add_url = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_url *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_add_url;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_add_id = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_id *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_add_id;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_add_collection = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, struct __pyx_obj_9xmmsvalue_Collection *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_add_collection *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_add_collection;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_remove_entry = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_remove_entry *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_remove_entry;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_clear = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_clear *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_clear;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_list_entries = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_list_entries *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_list_entries;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_sort = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_sort *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_sort;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_set_next_rel = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_set_next_rel *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_set_next_rel;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_set_next = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_set_next *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_set_next;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_move = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_move *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_move;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_create = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_create *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_create;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_current_pos = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_current_pos *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_current_pos;
  __pyx_vtable_7xmmsapi_XmmsApi.playlist_current_active = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_playlist_current_active *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_playlist_current_active;
  __pyx_vtable_7xmmsapi_XmmsApi.broadcast_playlist_current_pos = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_current_pos *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_broadcast_playlist_current_pos;
  __pyx_vtable_7xmmsapi_XmmsApi.broadcast_playlist_changed = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_playlist_changed *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_broadcast_playlist_changed;
  __pyx_vtable_7xmmsapi_XmmsApi.broadcast_config_value_changed = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_config_value_changed *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_broadcast_config_value_changed;
  __pyx_vtable_7xmmsapi_XmmsApi.config_set_value = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_set_value *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_config_set_value;
  __pyx_vtable_7xmmsapi_XmmsApi.config_get_value = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_get_value *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_config_get_value;
  __pyx_vtable_7xmmsapi_XmmsApi.config_list_values = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_list_values *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_config_list_values;
  __pyx_vtable_7xmmsapi_XmmsApi.config_register_value = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_config_register_value *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_config_register_value;
  __pyx_vtable_7xmmsapi_XmmsApi.medialib_add_entry = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_add_entry *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_medialib_add_entry;
  __pyx_vtable_7xmmsapi_XmmsApi.medialib_remove_entry = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_remove_entry *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_medialib_remove_entry;
  __pyx_vtable_7xmmsapi_XmmsApi.medialib_move_entry = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_move_entry *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_medialib_move_entry;
  __pyx_vtable_7xmmsapi_XmmsApi.medialib_get_info = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_get_info *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_medialib_get_info;
  __pyx_vtable_7xmmsapi_XmmsApi.medialib_rehash = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_rehash *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_medialib_rehash;
  __pyx_vtable_7xmmsapi_XmmsApi.medialib_get_id = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_get_id *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_medialib_get_id;
  __pyx_vtable_7xmmsapi_XmmsApi.medialib_import_path = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_import_path *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_medialib_import_path;
  __pyx_vtable_7xmmsapi_XmmsApi.medialib_property_set = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_property_set *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_medialib_property_set;
  __pyx_vtable_7xmmsapi_XmmsApi.medialib_property_remove = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_medialib_property_remove *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_medialib_property_remove;
  __pyx_vtable_7xmmsapi_XmmsApi.broadcast_medialib_entry_added = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_medialib_entry_added *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_broadcast_medialib_entry_added;
  __pyx_vtable_7xmmsapi_XmmsApi.broadcast_medialib_entry_changed = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_medialib_entry_changed *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_broadcast_medialib_entry_changed;
  __pyx_vtable_7xmmsapi_XmmsApi.broadcast_collection_changed = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_collection_changed *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_broadcast_collection_changed;
  __pyx_vtable_7xmmsapi_XmmsApi.signal_mediainfo_reader_unindexed = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_signal_mediainfo_reader_unindexed *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_signal_mediainfo_reader_unindexed;
  __pyx_vtable_7xmmsapi_XmmsApi.broadcast_mediainfo_reader_status = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_broadcast_mediainfo_reader_status *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_broadcast_mediainfo_reader_status;
  __pyx_vtable_7xmmsapi_XmmsApi.xform_media_browse = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_xform_media_browse *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_xform_media_browse;
  __pyx_vtable_7xmmsapi_XmmsApi.coll_get = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_get *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_coll_get;
  __pyx_vtable_7xmmsapi_XmmsApi.coll_list = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_list *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_coll_list;
  __pyx_vtable_7xmmsapi_XmmsApi.coll_save = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, struct __pyx_obj_9xmmsvalue_Collection *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_save *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_coll_save;
  __pyx_vtable_7xmmsapi_XmmsApi.coll_remove = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_remove *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_coll_remove;
  __pyx_vtable_7xmmsapi_XmmsApi.coll_rename = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_rename *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_coll_rename;
  __pyx_vtable_7xmmsapi_XmmsApi.coll_idlist_from_playlist_file = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_idlist_from_playlist_file *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_coll_idlist_from_playlist_file;
  __pyx_vtable_7xmmsapi_XmmsApi.coll_query_ids = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, struct __pyx_obj_9xmmsvalue_Collection *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_query_ids *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_coll_query_ids;
  __pyx_vtable_7xmmsapi_XmmsApi.coll_query_infos = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, struct __pyx_obj_9xmmsvalue_Collection *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_coll_query_infos *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_coll_query_infos;
  __pyx_vtable_7xmmsapi_XmmsApi.bindata_add = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_add *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_bindata_add;
  __pyx_vtable_7xmmsapi_XmmsApi.bindata_retrieve = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_retrieve *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_bindata_retrieve;
  __pyx_vtable_7xmmsapi_XmmsApi.bindata_remove = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_remove *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_bindata_remove;
  __pyx_vtable_7xmmsapi_XmmsApi.bindata_list = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_bindata_list *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_bindata_list;
  __pyx_vtable_7xmmsapi_XmmsApi.stats = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_stats *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_stats;
  __pyx_vtable_7xmmsapi_XmmsApi.visualization_version = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_version *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_visualization_version;
  __pyx_vtable_7xmmsapi_XmmsApi.visualization_init = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_init *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_visualization_init;
  __pyx_vtable_7xmmsapi_XmmsApi.visualization_start = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_start *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_visualization_start;
  __pyx_vtable_7xmmsapi_XmmsApi.visualization_started = (int (*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_7XmmsApi_visualization_started;
  __pyx_vtable_7xmmsapi_XmmsApi.visualization_errored = (int (*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_7XmmsApi_visualization_errored;
  __pyx_vtable_7xmmsapi_XmmsApi.visualization_property_set = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_property_set *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_visualization_property_set;
  __pyx_vtable_7xmmsapi_XmmsApi.visualization_properties_set = (struct __pyx_obj_7xmmsapi_XmmsResult *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_properties_set *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_visualization_properties_set;
  __pyx_vtable_7xmmsapi_XmmsApi.visualization_chunk_get = (struct __pyx_obj_7xmmsapi_XmmsVisChunk *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch, struct __pyx_opt_args_7xmmsapi_7XmmsApi_visualization_chunk_get *__pyx_optional_args))__pyx_f_7xmmsapi_7XmmsApi_visualization_chunk_get;
  __pyx_vtable_7xmmsapi_XmmsApi.visualization_shutdown = (PyObject *(*)(struct __pyx_obj_7xmmsapi_XmmsApi *, int, int __pyx_skip_dispatch))__pyx_f_7xmmsapi_7XmmsApi_visualization_shutdown;
  __pyx_type_7xmmsapi_XmmsApi.tp_base = __pyx_ptype_7xmmsapi_XmmsCore;
  if (PyType_Ready(&__pyx_type_7xmmsapi_XmmsApi) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_7xmmsapi_XmmsApi.tp_dict, __pyx_vtabptr_7xmmsapi_XmmsApi) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "XmmsApi", (PyObject *)&__pyx_type_7xmmsapi_XmmsApi) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7xmmsapi_XmmsApi = &__pyx_type_7xmmsapi_XmmsApi;
  __pyx_vtabptr_7xmmsapi_XmmsLoop = &__pyx_vtable_7xmmsapi_XmmsLoop;
  __pyx_vtable_7xmmsapi_XmmsLoop.__pyx_base = *__pyx_vtabptr_7xmmsapi_XmmsApi;
  __pyx_type_7xmmsapi_XmmsLoop.tp_base = __pyx_ptype_7xmmsapi_XmmsApi;
  if (PyType_Ready(&__pyx_type_7xmmsapi_XmmsLoop) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_7xmmsapi_XmmsLoop.tp_dict, __pyx_vtabptr_7xmmsapi_XmmsLoop) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "XmmsLoop", (PyObject *)&__pyx_type_7xmmsapi_XmmsLoop) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7xmmsapi_XmmsLoop = &__pyx_type_7xmmsapi_XmmsLoop;
  if (PyType_Ready(&__pyx_type_7xmmsapi___pyx_scope_struct__deprecated) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7xmmsapi___pyx_scope_struct__deprecated = &__pyx_type_7xmmsapi___pyx_scope_struct__deprecated;
  /*--- Type import code ---*/
  __pyx_ptype_9xmmsvalue_XmmsValue = __Pyx_ImportType("xmmsvalue", "XmmsValue", sizeof(struct __pyx_obj_9xmmsvalue_XmmsValue), 1); if (unlikely(!__pyx_ptype_9xmmsvalue_XmmsValue)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_9xmmsvalue_XmmsValue = (struct __pyx_vtabstruct_9xmmsvalue_XmmsValue*)__Pyx_GetVtable(__pyx_ptype_9xmmsvalue_XmmsValue->tp_dict); if (unlikely(!__pyx_vtabptr_9xmmsvalue_XmmsValue)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_XmmsListIter = __Pyx_ImportType("xmmsvalue", "XmmsListIter", sizeof(struct __pyx_obj_9xmmsvalue_XmmsListIter), 1); if (unlikely(!__pyx_ptype_9xmmsvalue_XmmsListIter)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_XmmsDictIter = __Pyx_ImportType("xmmsvalue", "XmmsDictIter", sizeof(struct __pyx_obj_9xmmsvalue_XmmsDictIter), 1); if (unlikely(!__pyx_ptype_9xmmsvalue_XmmsDictIter)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_CollectionRef = __Pyx_ImportType("xmmsvalue", "CollectionRef", sizeof(struct __pyx_obj_9xmmsvalue_CollectionRef), 1); if (unlikely(!__pyx_ptype_9xmmsvalue_CollectionRef)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_9xmmsvalue_CollectionRef = (struct __pyx_vtabstruct_9xmmsvalue_CollectionRef*)__Pyx_GetVtable(__pyx_ptype_9xmmsvalue_CollectionRef->tp_dict); if (unlikely(!__pyx_vtabptr_9xmmsvalue_CollectionRef)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_Collection = __Pyx_ImportType("xmmsvalue", "Collection", sizeof(struct __pyx_obj_9xmmsvalue_Collection), 1); if (unlikely(!__pyx_ptype_9xmmsvalue_Collection)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_9xmmsvalue_Collection = (struct __pyx_vtabstruct_9xmmsvalue_Collection*)__Pyx_GetVtable(__pyx_ptype_9xmmsvalue_Collection->tp_dict); if (unlikely(!__pyx_vtabptr_9xmmsvalue_Collection)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_CollectionAttributes = __Pyx_ImportType("xmmsvalue", "CollectionAttributes", sizeof(struct __pyx_obj_9xmmsvalue_CollectionAttributes), 1); if (unlikely(!__pyx_ptype_9xmmsvalue_CollectionAttributes)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_9xmmsvalue_CollectionAttributes = (struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes*)__Pyx_GetVtable(__pyx_ptype_9xmmsvalue_CollectionAttributes->tp_dict); if (unlikely(!__pyx_vtabptr_9xmmsvalue_CollectionAttributes)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_AttributesIterator = __Pyx_ImportType("xmmsvalue", "AttributesIterator", sizeof(struct __pyx_obj_9xmmsvalue_AttributesIterator), 1); if (unlikely(!__pyx_ptype_9xmmsvalue_AttributesIterator)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_9xmmsvalue_AttributesIterator = (struct __pyx_vtabstruct_9xmmsvalue_AttributesIterator*)__Pyx_GetVtable(__pyx_ptype_9xmmsvalue_AttributesIterator->tp_dict); if (unlikely(!__pyx_vtabptr_9xmmsvalue_AttributesIterator)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_CollectionOperands = __Pyx_ImportType("xmmsvalue", "CollectionOperands", sizeof(struct __pyx_obj_9xmmsvalue_CollectionOperands), 1); if (unlikely(!__pyx_ptype_9xmmsvalue_CollectionOperands)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_9xmmsvalue_CollectionOperands = (struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands*)__Pyx_GetVtable(__pyx_ptype_9xmmsvalue_CollectionOperands->tp_dict); if (unlikely(!__pyx_vtabptr_9xmmsvalue_CollectionOperands)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_CollectionIDList = __Pyx_ImportType("xmmsvalue", "CollectionIDList", sizeof(struct __pyx_obj_9xmmsvalue_CollectionIDList), 1); if (unlikely(!__pyx_ptype_9xmmsvalue_CollectionIDList)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_9xmmsvalue_CollectionIDList = (struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList*)__Pyx_GetVtable(__pyx_ptype_9xmmsvalue_CollectionIDList->tp_dict); if (unlikely(!__pyx_vtabptr_9xmmsvalue_CollectionIDList)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  __pyx_t_1 = __Pyx_ImportModule("xmmsvalue"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportFunction(__pyx_t_1, "create_coll", (void (**)(void))&__pyx_f_9xmmsvalue_create_coll, "PyObject *(xmmsv_coll_t *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ImportFunction(__pyx_t_1, "create_native_value", (void (**)(void))&__pyx_f_9xmmsvalue_create_native_value, "xmmsv_t *(PyObject *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  /*--- Execution code ---*/

  /* "xmmsapi.pyx":16
 * # The following constants are meant for interpreting the return value of
 * # XMMS.playback_status ()
 * PLAYBACK_STATUS_STOP  = XMMS_PLAYBACK_STATUS_STOP             # <<<<<<<<<<<<<<
 * PLAYBACK_STATUS_PLAY  = XMMS_PLAYBACK_STATUS_PLAY
 * PLAYBACK_STATUS_PAUSE = XMMS_PLAYBACK_STATUS_PAUSE
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYBACK_STATUS_STOP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_89, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":17
 * # XMMS.playback_status ()
 * PLAYBACK_STATUS_STOP  = XMMS_PLAYBACK_STATUS_STOP
 * PLAYBACK_STATUS_PLAY  = XMMS_PLAYBACK_STATUS_PLAY             # <<<<<<<<<<<<<<
 * PLAYBACK_STATUS_PAUSE = XMMS_PLAYBACK_STATUS_PAUSE
 * 
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYBACK_STATUS_PLAY); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_90, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":18
 * PLAYBACK_STATUS_STOP  = XMMS_PLAYBACK_STATUS_STOP
 * PLAYBACK_STATUS_PLAY  = XMMS_PLAYBACK_STATUS_PLAY
 * PLAYBACK_STATUS_PAUSE = XMMS_PLAYBACK_STATUS_PAUSE             # <<<<<<<<<<<<<<
 * 
 * PLAYLIST_CHANGED_ADD     = XMMS_PLAYLIST_CHANGED_ADD
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYBACK_STATUS_PAUSE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_91, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":20
 * PLAYBACK_STATUS_PAUSE = XMMS_PLAYBACK_STATUS_PAUSE
 * 
 * PLAYLIST_CHANGED_ADD     = XMMS_PLAYLIST_CHANGED_ADD             # <<<<<<<<<<<<<<
 * PLAYLIST_CHANGED_INSERT  = XMMS_PLAYLIST_CHANGED_INSERT
 * PLAYLIST_CHANGED_SHUFFLE = XMMS_PLAYLIST_CHANGED_SHUFFLE
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYLIST_CHANGED_ADD); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_92, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":21
 * 
 * PLAYLIST_CHANGED_ADD     = XMMS_PLAYLIST_CHANGED_ADD
 * PLAYLIST_CHANGED_INSERT  = XMMS_PLAYLIST_CHANGED_INSERT             # <<<<<<<<<<<<<<
 * PLAYLIST_CHANGED_SHUFFLE = XMMS_PLAYLIST_CHANGED_SHUFFLE
 * PLAYLIST_CHANGED_REMOVE  = XMMS_PLAYLIST_CHANGED_REMOVE
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYLIST_CHANGED_INSERT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_93, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":22
 * PLAYLIST_CHANGED_ADD     = XMMS_PLAYLIST_CHANGED_ADD
 * PLAYLIST_CHANGED_INSERT  = XMMS_PLAYLIST_CHANGED_INSERT
 * PLAYLIST_CHANGED_SHUFFLE = XMMS_PLAYLIST_CHANGED_SHUFFLE             # <<<<<<<<<<<<<<
 * PLAYLIST_CHANGED_REMOVE  = XMMS_PLAYLIST_CHANGED_REMOVE
 * PLAYLIST_CHANGED_CLEAR   = XMMS_PLAYLIST_CHANGED_CLEAR
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYLIST_CHANGED_SHUFFLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_94, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":23
 * PLAYLIST_CHANGED_INSERT  = XMMS_PLAYLIST_CHANGED_INSERT
 * PLAYLIST_CHANGED_SHUFFLE = XMMS_PLAYLIST_CHANGED_SHUFFLE
 * PLAYLIST_CHANGED_REMOVE  = XMMS_PLAYLIST_CHANGED_REMOVE             # <<<<<<<<<<<<<<
 * PLAYLIST_CHANGED_CLEAR   = XMMS_PLAYLIST_CHANGED_CLEAR
 * PLAYLIST_CHANGED_MOVE    = XMMS_PLAYLIST_CHANGED_MOVE
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYLIST_CHANGED_REMOVE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_95, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":24
 * PLAYLIST_CHANGED_SHUFFLE = XMMS_PLAYLIST_CHANGED_SHUFFLE
 * PLAYLIST_CHANGED_REMOVE  = XMMS_PLAYLIST_CHANGED_REMOVE
 * PLAYLIST_CHANGED_CLEAR   = XMMS_PLAYLIST_CHANGED_CLEAR             # <<<<<<<<<<<<<<
 * PLAYLIST_CHANGED_MOVE    = XMMS_PLAYLIST_CHANGED_MOVE
 * PLAYLIST_CHANGED_SORT    = XMMS_PLAYLIST_CHANGED_SORT
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYLIST_CHANGED_CLEAR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_96, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":25
 * PLAYLIST_CHANGED_REMOVE  = XMMS_PLAYLIST_CHANGED_REMOVE
 * PLAYLIST_CHANGED_CLEAR   = XMMS_PLAYLIST_CHANGED_CLEAR
 * PLAYLIST_CHANGED_MOVE    = XMMS_PLAYLIST_CHANGED_MOVE             # <<<<<<<<<<<<<<
 * PLAYLIST_CHANGED_SORT    = XMMS_PLAYLIST_CHANGED_SORT
 * PLAYLIST_CHANGED_UPDATE  = XMMS_PLAYLIST_CHANGED_UPDATE
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYLIST_CHANGED_MOVE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_97, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":26
 * PLAYLIST_CHANGED_CLEAR   = XMMS_PLAYLIST_CHANGED_CLEAR
 * PLAYLIST_CHANGED_MOVE    = XMMS_PLAYLIST_CHANGED_MOVE
 * PLAYLIST_CHANGED_SORT    = XMMS_PLAYLIST_CHANGED_SORT             # <<<<<<<<<<<<<<
 * PLAYLIST_CHANGED_UPDATE  = XMMS_PLAYLIST_CHANGED_UPDATE
 * 
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYLIST_CHANGED_SORT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_98, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":27
 * PLAYLIST_CHANGED_MOVE    = XMMS_PLAYLIST_CHANGED_MOVE
 * PLAYLIST_CHANGED_SORT    = XMMS_PLAYLIST_CHANGED_SORT
 * PLAYLIST_CHANGED_UPDATE  = XMMS_PLAYLIST_CHANGED_UPDATE             # <<<<<<<<<<<<<<
 * 
 * PLUGIN_TYPE_ALL    = XMMS_PLUGIN_TYPE_ALL
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYLIST_CHANGED_UPDATE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_99, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":29
 * PLAYLIST_CHANGED_UPDATE  = XMMS_PLAYLIST_CHANGED_UPDATE
 * 
 * PLUGIN_TYPE_ALL    = XMMS_PLUGIN_TYPE_ALL             # <<<<<<<<<<<<<<
 * PLUGIN_TYPE_XFORM  = XMMS_PLUGIN_TYPE_XFORM
 * PLUGIN_TYPE_OUTPUT = XMMS_PLUGIN_TYPE_OUTPUT
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLUGIN_TYPE_ALL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PLUGIN_TYPE_ALL, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":30
 * 
 * PLUGIN_TYPE_ALL    = XMMS_PLUGIN_TYPE_ALL
 * PLUGIN_TYPE_XFORM  = XMMS_PLUGIN_TYPE_XFORM             # <<<<<<<<<<<<<<
 * PLUGIN_TYPE_OUTPUT = XMMS_PLUGIN_TYPE_OUTPUT
 * 
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLUGIN_TYPE_XFORM); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PLUGIN_TYPE_XFORM, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":31
 * PLUGIN_TYPE_ALL    = XMMS_PLUGIN_TYPE_ALL
 * PLUGIN_TYPE_XFORM  = XMMS_PLUGIN_TYPE_XFORM
 * PLUGIN_TYPE_OUTPUT = XMMS_PLUGIN_TYPE_OUTPUT             # <<<<<<<<<<<<<<
 * 
 * MEDIALIB_ENTRY_STATUS_NEW           = XMMS_MEDIALIB_ENTRY_STATUS_NEW
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLUGIN_TYPE_OUTPUT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PLUGIN_TYPE_OUTPUT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":33
 * PLUGIN_TYPE_OUTPUT = XMMS_PLUGIN_TYPE_OUTPUT
 * 
 * MEDIALIB_ENTRY_STATUS_NEW           = XMMS_MEDIALIB_ENTRY_STATUS_NEW             # <<<<<<<<<<<<<<
 * MEDIALIB_ENTRY_STATUS_OK            = XMMS_MEDIALIB_ENTRY_STATUS_OK
 * MEDIALIB_ENTRY_STATUS_RESOLVING     = XMMS_MEDIALIB_ENTRY_STATUS_RESOLVING
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_MEDIALIB_ENTRY_STATUS_NEW); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_100, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":34
 * 
 * MEDIALIB_ENTRY_STATUS_NEW           = XMMS_MEDIALIB_ENTRY_STATUS_NEW
 * MEDIALIB_ENTRY_STATUS_OK            = XMMS_MEDIALIB_ENTRY_STATUS_OK             # <<<<<<<<<<<<<<
 * MEDIALIB_ENTRY_STATUS_RESOLVING     = XMMS_MEDIALIB_ENTRY_STATUS_RESOLVING
 * MEDIALIB_ENTRY_STATUS_NOT_AVAILABLE = XMMS_MEDIALIB_ENTRY_STATUS_NOT_AVAILABLE
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_MEDIALIB_ENTRY_STATUS_OK); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_101, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":35
 * MEDIALIB_ENTRY_STATUS_NEW           = XMMS_MEDIALIB_ENTRY_STATUS_NEW
 * MEDIALIB_ENTRY_STATUS_OK            = XMMS_MEDIALIB_ENTRY_STATUS_OK
 * MEDIALIB_ENTRY_STATUS_RESOLVING     = XMMS_MEDIALIB_ENTRY_STATUS_RESOLVING             # <<<<<<<<<<<<<<
 * MEDIALIB_ENTRY_STATUS_NOT_AVAILABLE = XMMS_MEDIALIB_ENTRY_STATUS_NOT_AVAILABLE
 * MEDIALIB_ENTRY_STATUS_REHASH        = XMMS_MEDIALIB_ENTRY_STATUS_REHASH
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_MEDIALIB_ENTRY_STATUS_RESOLVING); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_102, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":36
 * MEDIALIB_ENTRY_STATUS_OK            = XMMS_MEDIALIB_ENTRY_STATUS_OK
 * MEDIALIB_ENTRY_STATUS_RESOLVING     = XMMS_MEDIALIB_ENTRY_STATUS_RESOLVING
 * MEDIALIB_ENTRY_STATUS_NOT_AVAILABLE = XMMS_MEDIALIB_ENTRY_STATUS_NOT_AVAILABLE             # <<<<<<<<<<<<<<
 * MEDIALIB_ENTRY_STATUS_REHASH        = XMMS_MEDIALIB_ENTRY_STATUS_REHASH
 * 
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_MEDIALIB_ENTRY_STATUS_NOT_AVAILABLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_103, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":37
 * MEDIALIB_ENTRY_STATUS_RESOLVING     = XMMS_MEDIALIB_ENTRY_STATUS_RESOLVING
 * MEDIALIB_ENTRY_STATUS_NOT_AVAILABLE = XMMS_MEDIALIB_ENTRY_STATUS_NOT_AVAILABLE
 * MEDIALIB_ENTRY_STATUS_REHASH        = XMMS_MEDIALIB_ENTRY_STATUS_REHASH             # <<<<<<<<<<<<<<
 * 
 * COLLECTION_CHANGED_ADD    = XMMS_COLLECTION_CHANGED_ADD
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_MEDIALIB_ENTRY_STATUS_REHASH); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_104, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":39
 * MEDIALIB_ENTRY_STATUS_REHASH        = XMMS_MEDIALIB_ENTRY_STATUS_REHASH
 * 
 * COLLECTION_CHANGED_ADD    = XMMS_COLLECTION_CHANGED_ADD             # <<<<<<<<<<<<<<
 * COLLECTION_CHANGED_UPDATE = XMMS_COLLECTION_CHANGED_UPDATE
 * COLLECTION_CHANGED_RENAME = XMMS_COLLECTION_CHANGED_RENAME
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_COLLECTION_CHANGED_ADD); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_105, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":40
 * 
 * COLLECTION_CHANGED_ADD    = XMMS_COLLECTION_CHANGED_ADD
 * COLLECTION_CHANGED_UPDATE = XMMS_COLLECTION_CHANGED_UPDATE             # <<<<<<<<<<<<<<
 * COLLECTION_CHANGED_RENAME = XMMS_COLLECTION_CHANGED_RENAME
 * COLLECTION_CHANGED_REMOVE = XMMS_COLLECTION_CHANGED_REMOVE
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_COLLECTION_CHANGED_UPDATE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_106, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":41
 * COLLECTION_CHANGED_ADD    = XMMS_COLLECTION_CHANGED_ADD
 * COLLECTION_CHANGED_UPDATE = XMMS_COLLECTION_CHANGED_UPDATE
 * COLLECTION_CHANGED_RENAME = XMMS_COLLECTION_CHANGED_RENAME             # <<<<<<<<<<<<<<
 * COLLECTION_CHANGED_REMOVE = XMMS_COLLECTION_CHANGED_REMOVE
 * 
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_COLLECTION_CHANGED_RENAME); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_107, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":42
 * COLLECTION_CHANGED_UPDATE = XMMS_COLLECTION_CHANGED_UPDATE
 * COLLECTION_CHANGED_RENAME = XMMS_COLLECTION_CHANGED_RENAME
 * COLLECTION_CHANGED_REMOVE = XMMS_COLLECTION_CHANGED_REMOVE             # <<<<<<<<<<<<<<
 * 
 * PLAYBACK_SEEK_CUR = XMMS_PLAYBACK_SEEK_CUR
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_COLLECTION_CHANGED_REMOVE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_108, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":44
 * COLLECTION_CHANGED_REMOVE = XMMS_COLLECTION_CHANGED_REMOVE
 * 
 * PLAYBACK_SEEK_CUR = XMMS_PLAYBACK_SEEK_CUR             # <<<<<<<<<<<<<<
 * PLAYBACK_SEEK_SET = XMMS_PLAYBACK_SEEK_SET
 * 
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYBACK_SEEK_CUR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PLAYBACK_SEEK_CUR, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":45
 * 
 * PLAYBACK_SEEK_CUR = XMMS_PLAYBACK_SEEK_CUR
 * PLAYBACK_SEEK_SET = XMMS_PLAYBACK_SEEK_SET             # <<<<<<<<<<<<<<
 * 
 * COLLECTION_NS_COLLECTIONS = <char *>XMMS_COLLECTION_NS_COLLECTIONS
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_PLAYBACK_SEEK_SET); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PLAYBACK_SEEK_SET, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":47
 * PLAYBACK_SEEK_SET = XMMS_PLAYBACK_SEEK_SET
 * 
 * COLLECTION_NS_COLLECTIONS = <char *>XMMS_COLLECTION_NS_COLLECTIONS             # <<<<<<<<<<<<<<
 * COLLECTION_NS_PLAYLISTS = <char *>XMMS_COLLECTION_NS_PLAYLISTS
 * COLLECTION_NS_ALL = <char *>XMMS_COLLECTION_NS_ALL
 */
  __pyx_t_2 = PyBytes_FromString(((char *)XMMS_COLLECTION_NS_COLLECTIONS)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_109, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":48
 * 
 * COLLECTION_NS_COLLECTIONS = <char *>XMMS_COLLECTION_NS_COLLECTIONS
 * COLLECTION_NS_PLAYLISTS = <char *>XMMS_COLLECTION_NS_PLAYLISTS             # <<<<<<<<<<<<<<
 * COLLECTION_NS_ALL = <char *>XMMS_COLLECTION_NS_ALL
 * 
 */
  __pyx_t_2 = PyBytes_FromString(((char *)XMMS_COLLECTION_NS_PLAYLISTS)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_110, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":49
 * COLLECTION_NS_COLLECTIONS = <char *>XMMS_COLLECTION_NS_COLLECTIONS
 * COLLECTION_NS_PLAYLISTS = <char *>XMMS_COLLECTION_NS_PLAYLISTS
 * COLLECTION_NS_ALL = <char *>XMMS_COLLECTION_NS_ALL             # <<<<<<<<<<<<<<
 * 
 * ACTIVE_PLAYLIST = <char *>XMMS_ACTIVE_PLAYLIST
 */
  __pyx_t_2 = PyBytes_FromString(((char *)XMMS_COLLECTION_NS_ALL)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__COLLECTION_NS_ALL, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":51
 * COLLECTION_NS_ALL = <char *>XMMS_COLLECTION_NS_ALL
 * 
 * ACTIVE_PLAYLIST = <char *>XMMS_ACTIVE_PLAYLIST             # <<<<<<<<<<<<<<
 * 
 * #####################################################################
 */
  __pyx_t_2 = PyBytes_FromString(((char *)XMMS_ACTIVE_PLAYLIST)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ACTIVE_PLAYLIST, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":55
 * #####################################################################
 * 
 * cdef int show_deprecated = 0             # <<<<<<<<<<<<<<
 * from os import getenv
 * if getenv('XMMS_PYTHON_SHOW_DEPRECATED'):
 */
  __pyx_v_7xmmsapi_show_deprecated = 0;

  /* "xmmsapi.pyx":56
 * 
 * cdef int show_deprecated = 0
 * from os import getenv             # <<<<<<<<<<<<<<
 * if getenv('XMMS_PYTHON_SHOW_DEPRECATED'):
 * 	show_deprecated = 1
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__getenv));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__getenv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__getenv));
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__os), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__getenv); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__getenv, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "xmmsapi.pyx":57
 * cdef int show_deprecated = 0
 * from os import getenv
 * if getenv('XMMS_PYTHON_SHOW_DEPRECATED'):             # <<<<<<<<<<<<<<
 * 	show_deprecated = 1
 * del getenv
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__getenv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_112), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "xmmsapi.pyx":58
 * from os import getenv
 * if getenv('XMMS_PYTHON_SHOW_DEPRECATED'):
 * 	show_deprecated = 1             # <<<<<<<<<<<<<<
 * del getenv
 * 
 */
    __pyx_v_7xmmsapi_show_deprecated = 1;
    goto __pyx_L2;
  }
  __pyx_L2:;

  /* "xmmsapi.pyx":59
 * if getenv('XMMS_PYTHON_SHOW_DEPRECATED'):
 * 	show_deprecated = 1
 * del getenv             # <<<<<<<<<<<<<<
 * 
 * def deprecated(f):
 */
  if (__Pyx_DelAttrString(__pyx_m, "getenv") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsapi.pyx":61
 * del getenv
 * 
 * def deprecated(f):             # <<<<<<<<<<<<<<
 * 	def deprecated_decorator(*a, **kw):
 * 		if show_deprecated:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7xmmsapi_deprecated, NULL, __pyx_n_s__xmmsapi); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__deprecated, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":76
 * 	from select import select as _sel
 * 	select = _sel
 * _install_select()             # <<<<<<<<<<<<<<
 * 
 * cdef bint ResultNotifier(xmmsv_t *res, void *o):
 */
  __pyx_t_2 = __pyx_f_7xmmsapi__install_select(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsapi.pyx":187
 * 
 * 	# XXX Kept for compatibility.
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def _callback(self):
 * 		"""
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "xmmsapi.pyx":188
 * 	# XXX Kept for compatibility.
 * 	@deprecated
 * 	def _callback(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_3 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsResult, __pyx_n_s___callback); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsResult->tp_dict, __pyx_n_s___callback, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsResult);

  /* "xmmsapi.pyx":366
 * 		return [<int>self.data[i] for i in range(self.sample_count)]
 * 
 * class VisualizationError(Exception):             # <<<<<<<<<<<<<<
 * 	pass
 * 
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __Pyx_INCREF(__pyx_builtin_Exception);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_Exception);
  __Pyx_GIVEREF(__pyx_builtin_Exception);
  __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3), __pyx_n_s__VisualizationError, __pyx_n_s__xmmsapi); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VisualizationError, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

  /* "xmmsapi.pyx":392
 * 	return path
 * 
 * def enforce_unicode(object o):             # <<<<<<<<<<<<<<
 * 	if isinstance(o, unicode):
 * 		s = o
 */
  __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_7xmmsapi_2enforce_unicode, NULL, __pyx_n_s__xmmsapi); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__enforce_unicode, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "xmmsapi.pyx":648
 * 		return self.create_result(cb, xmmsc_playback_current_id(self.conn))
 * 
 * 	cpdef XmmsResult playback_seek_ms(self, int ms, xmms_playback_seek_mode_t whence = PLAYBACK_SEEK_SET, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_seek_ms(ms, whence=PLAYBACK_SEEK_SET, cb=None) -> XmmsResult
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__PLAYBACK_SEEK_SET); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = ((xmms_playback_seek_mode_t)PyInt_AsLong(__pyx_t_3)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_k_30 = __pyx_t_6;

  /* "xmmsapi.pyx":661
 * 			raise ValueError("Bad whence parameter")
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def playback_seek_ms_rel(self, int ms, cb = None):
 * 		"""
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);

  /* "xmmsapi.pyx":662
 * 
 * 	@deprecated
 * 	def playback_seek_ms_rel(self, int ms, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s_113); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s_113, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":674
 * 		return self.playback_seek_ms(ms, PLAYBACK_SEEK_CUR, cb=cb)
 * 
 * 	cpdef XmmsResult playback_seek_samples(self, int samples, xmms_playback_seek_mode_t whence=PLAYBACK_SEEK_SET, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playback_seek_samples(samples, cb=None) -> XmmsResult
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__PLAYBACK_SEEK_SET); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = ((xmms_playback_seek_mode_t)PyInt_AsLong(__pyx_t_2)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_k_33 = __pyx_t_6;

  /* "xmmsapi.pyx":687
 * 			raise ValueError("Bad whence parameter")
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def playback_seek_samples_rel(self, int samples, cb = None):
 * 		"""
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "xmmsapi.pyx":688
 * 
 * 	@deprecated
 * 	def playback_seek_samples_rel(self, int samples, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s_114); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s_114, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":835
 * 		return self.create_result(cb, xmmsc_playlist_shuffle(self.conn, <char *>p))
 * 
 * 	cpdef XmmsResult playlist_rinsert(self, int pos, url, playlist = None, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_rinsert(pos, url, playlist=None, cb=None, encoded=False) -> XmmsResult
 */
  __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_41 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "xmmsapi.pyx":855
 * 		return self.create_result(cb, res)
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def playlist_rinsert_encoded(self, int pos, url, playlist = None, cb = None):
 * 		"""
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);

  /* "xmmsapi.pyx":856
 * 
 * 	@deprecated
 * 	def playlist_rinsert_encoded(self, int pos, url, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_3 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s_115); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s_115, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":863
 * 		return self.playlist_rinsert(pos, url, playlist, cb=cb, encoded=True)
 * 
 * 	cpdef XmmsResult playlist_insert_url(self, int pos, url, playlist = None, cb = None, encoded = False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_insert_url(pos, url, playlist=None, cb=None, encoded=False) -> XmmsResult
 */
  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_42 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "xmmsapi.pyx":884
 * 		return self.create_result(cb, res)
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def playlist_insert_encoded(self, int pos, url, playlist = None, cb = None):
 * 		"""
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);

  /* "xmmsapi.pyx":885
 * 
 * 	@deprecated
 * 	def playlist_insert_encoded(self, int pos, url, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s_116); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s_116, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":926
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult playlist_radd(self, url, playlist = None, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_radd(url, playlist=None, cb=None, encoded=False) -> XmmsResult
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k_44 = __pyx_t_2;
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "xmmsapi.pyx":945
 * 		return self.create_result(cb, res)
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def playlist_radd_encoded(self, url, playlist = None, cb = None):
 * 		"""
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "xmmsapi.pyx":946
 * 
 * 	@deprecated
 * 	def playlist_radd_encoded(self, url, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s_117); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s_117, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":953
 * 		return self.playlist_radd(url, playlist, cb = cb, encoded=True)
 * 
 * 	cpdef XmmsResult playlist_add_url(self, url, playlist = None, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		playlist_add_url(url, playlist=None, cb=None, encoded=False) -> XmmsResult
 */
  __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_45 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "xmmsapi.pyx":973
 * 		return self.create_result(cb, res)
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def playlist_add_encoded(self, url, playlist = None, cb = None):
 * 		"""
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);

  /* "xmmsapi.pyx":974
 * 
 * 	@deprecated
 * 	def playlist_add_encoded(self, url, playlist = None, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_3 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s_118); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s_118, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":1163
 * 		return self.create_result(cb, xmmsc_broadcast_config_value_changed(self.conn))
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def broadcast_configval_changed(self, cb = None):
 * 		"""
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);

  /* "xmmsapi.pyx":1164
 * 
 * 	@deprecated
 * 	def broadcast_configval_changed(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s_119); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s_119, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":1183
 * 		return self.create_result(cb, xmmsc_config_set_value(self.conn, <char *>k, <char *>v))
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def configval_set(self, key, val, cb = None):
 * 		"""
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "xmmsapi.pyx":1184
 * 
 * 	@deprecated
 * 	def configval_set(self, key, val, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s__configval_set); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s__configval_set, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":1202
 * 		return self.create_result(cb, xmmsc_config_get_value(self.conn, <char *>k))
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def configval_get(self, key, cb = None):
 * 		"""
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);

  /* "xmmsapi.pyx":1203
 * 
 * 	@deprecated
 * 	def configval_get(self, key, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_3 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s__configval_get); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s__configval_get, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":1222
 * 		return self.create_result(cb, xmmsc_config_list_values(self.conn))
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def configval_list(self, cb = None):
 * 		"""
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);

  /* "xmmsapi.pyx":1223
 * 
 * 	@deprecated
 * 	def configval_list(self, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s__configval_list); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s__configval_list, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":1244
 * 		return self.create_result(cb, xmmsc_config_register_value(self.conn, <char *>v, <char *>dv))
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def configval_register(self, valuename, defaultvalue, cb = None):
 * 		"""
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "xmmsapi.pyx":1245
 * 
 * 	@deprecated
 * 	def configval_register(self, valuename, defaultvalue, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s__configval_register); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s__configval_register, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":1252
 * 		return self.config_register_value(valuename, defaultvalue, cb)
 * 
 * 	cpdef XmmsResult medialib_add_entry(self, path, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_add_entry(file, cb=None, encoded=False) -> XmmsResult
 */
  __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_56 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "xmmsapi.pyx":1268
 * 		return self.create_result(cb, res)
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def medialib_add_entry_encoded(self, path, cb = None):
 * 		"""
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);

  /* "xmmsapi.pyx":1269
 * 
 * 	@deprecated
 * 	def medialib_add_entry_encoded(self, path, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_3 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s_120); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s_120, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":1286
 * 		return self.create_result(cb, xmmsc_medialib_remove_entry(self.conn, id))
 * 
 * 	cpdef XmmsResult medialib_move_entry(self, int id,  url, cb = None, encoded = False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_move_entry(id, url, cb=None, encoded=False) -> XmmsResult
 */
  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_58 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "xmmsapi.pyx":1327
 * 		return self.create_result(cb, xmmsc_medialib_rehash(self.conn, id))
 * 
 * 	cpdef XmmsResult medialib_get_id(self, url, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_get_id(url, cb=None, encoded=False) -> XmmsResult
 */
  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_60 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "xmmsapi.pyx":1344
 * 		return self.create_result(cb, res)
 * 
 * 	cpdef XmmsResult medialib_import_path(self, path, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		medialib_import_path(path, cb=None, encoded=False) -> XmmsResult
 */
  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_61 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "xmmsapi.pyx":1362
 * 
 * 	@deprecated
 * 	def medialib_path_import(self, path, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k_63 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "xmmsapi.pyx":1361
 * 		return self.create_result(cb, res)
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def medialib_path_import(self, path, cb = None, encoded=False):
 * 		"""
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);

  /* "xmmsapi.pyx":1362
 * 
 * 	@deprecated
 * 	def medialib_path_import(self, path, cb = None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s_121); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s_121, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":1369
 * 		return self.medialib_import_path(self, path, cb=cb, encoded=encoded)
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def medialib_path_import_encoded(self, path, cb = None):
 * 		"""
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "xmmsapi.pyx":1370
 * 
 * 	@deprecated
 * 	def medialib_path_import_encoded(self, path, cb = None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_5 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s_122); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s_122, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":1471
 * 		return self.create_result(cb, xmmsc_broadcast_mediainfo_reader_status(self.conn))
 * 
 * 	cpdef XmmsResult xform_media_browse(self, url, cb=None, encoded=False):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xform_media_browse(url, cb=None, encoded=False) -> XmmsResult
 */
  __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_71 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "xmmsapi.pyx":1487
 * 		return self.create_result(cb, res)
 * 
 * 	@deprecated             # <<<<<<<<<<<<<<
 * 	def xform_media_browse_encoded(self, url, cb=None):
 * 		"""
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__deprecated); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);

  /* "xmmsapi.pyx":1488
 * 
 * 	@deprecated
 * 	def xform_media_browse_encoded(self, url, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */
  __pyx_t_3 = __Pyx_GetName((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi, __pyx_n_s_123); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_7xmmsapi_XmmsApi->tp_dict, __pyx_n_s_123, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_7xmmsapi_XmmsApi);

  /* "xmmsapi.pyx":1732
 * 		return self.create_result(cb, xmmsc_visualization_property_set(self.conn, handle, <char *>k, <char *>v))
 * 
 * 	cpdef XmmsResult visualization_properties_set(self, int handle, props={}, cb=None):             # <<<<<<<<<<<<<<
 * 		"""
 * 		xmmsc_visualization_properties_set(handle, props={}, cb=None) -> XmmsResult
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_k_77 = ((PyObject *)__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "xmmsapi.pyx":1780
 * 
 * 
 * class XmmsDisconnectException(Exception):             # <<<<<<<<<<<<<<
 * 	pass
 * 
 */
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_builtin_Exception);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_Exception);
  __Pyx_GIVEREF(__pyx_builtin_Exception);
  __pyx_t_5 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3), __pyx_n_s_84, __pyx_n_s__xmmsapi); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_84, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

  /* "xmmsapi.pyx":1783
 * 	pass
 * 
 * from os import write             # <<<<<<<<<<<<<<
 * cdef class XmmsLoop(XmmsApi):
 * 	#cdef bint do_loop
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__write));
  PyList_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_s__write));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__write));
  __pyx_t_5 = __Pyx_Import(((PyObject *)__pyx_n_s__os), ((PyObject *)__pyx_t_3), -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__write); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__write, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "xmmsapi.pyx":1889
 * 
 * # Compatibility
 * XMMS = XmmsLoop             # <<<<<<<<<<<<<<
 * XMMSResult = XmmsResult
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__XMMS, ((PyObject *)((PyObject*)__pyx_ptype_7xmmsapi_XmmsLoop))) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsapi.pyx":1890
 * # Compatibility
 * XMMS = XmmsLoop
 * XMMSResult = XmmsResult             # <<<<<<<<<<<<<<
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__XMMSResult, ((PyObject *)((PyObject*)__pyx_ptype_7xmmsapi_XmmsResult))) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsapi.pyx":1
 * """             # <<<<<<<<<<<<<<
 * Python bindings for XMMS2.
 * """
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;

  /* "xmmsapi.pxd":8
 * cdef void ResultDestroyNotifier(void *o)
 * 
 * cdef inline char *check_namespace(object ns, bint can_be_all) except NULL:             # <<<<<<<<<<<<<<
 * 	cdef char *n
 * 	if ns == "Collections":
 */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  if (__pyx_m) {
    __Pyx_AddTraceback("init xmmsapi", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init xmmsapi");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */

#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result) {
        if (dict != __pyx_b) {
            PyErr_Clear();
            result = PyObject_GetAttr(__pyx_b, name);
        }
        if (!result) {
            PyErr_SetObject(PyExc_NameError, name);
        }
    }
    return result;
}

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #else
        if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key)))
        #endif
            goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
    if (unlikely(tstate->curexc_type))
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
        goto bad;
    #endif
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
    Py_INCREF(local_type);
    Py_INCREF(local_value);
    Py_INCREF(local_tb);
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    /* Make sure tstate is in a consistent state when we XDECREF
       these objects (XDECREF may run arbitrary code). */
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}


static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AS_STRING(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;

    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
        } else {
            #if PY_MAJOR_VERSION < 3
            if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
            #else
            if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
            #endif
                goto invalid_keyword_type;
            } else {
                for (name = first_kw_arg; *name; name++) {
                    #if PY_MAJOR_VERSION >= 3
                    if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                        PyUnicode_Compare(**name, key) == 0) break;
                    #else
                    if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                        _PyString_Eq(**name, key)) break;
                    #endif
                }
                if (*name) {
                    values[name-argnames] = value;
                } else {
                    /* unexpected keyword found */
                    for (name=argnames; name != first_kw_arg; name++) {
                        if (**name == key) goto arg_passed_twice;
                        #if PY_MAJOR_VERSION >= 3
                        if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                            PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
                        #else
                        if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                            _PyString_Eq(**name, key)) goto arg_passed_twice;
                        #endif
                    }
                    if (kwds2) {
                        if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                    } else {
                        goto invalid_keyword;
                    }
                }
            }
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, **name);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;

    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%s() takes %s %"PY_FORMAT_SIZE_T"d positional argument%s (%"PY_FORMAT_SIZE_T"d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();

    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}

static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;

    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}


#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    /* cause is unused */
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    #if PY_VERSION_HEX < 0x02050000
    if (!PyClass_Check(type))
    #else
    if (!PyType_Check(type))
    #endif
    {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        /* Normalize to raise <class>, <instance> */
        Py_DECREF(value);
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                type = 0;
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            type = (PyObject*) Py_TYPE(type);
            Py_INCREF(type);
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception class must be a subclass of BaseException");
                goto raise_error;
            }
        #endif
    }

    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}

#else /* Python 3+ */

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;

    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (!PyExceptionClass_Check(type)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }

    if (cause) {
        PyObject *fixed_cause;
        if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        }
        else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        }
        else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        if (!value) {
            value = PyObject_CallObject(type, NULL);
        }
        PyException_SetCause(value, fixed_cause);
    }

    PyErr_SetObject(type, value);

    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }

bad:
    return;
}
#endif


static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is unsubscriptable");
}

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (Py_TYPE(obj) == type) return 1;
    }
    else {
        if (PyObject_TypeCheck(obj, type)) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%s' has incorrect type (expected %s, got %s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %"PY_FORMAT_SIZE_T"d value%s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %"PY_FORMAT_SIZE_T"d)", expected);
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else if (PyErr_Occurred()) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
}

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
    if (s1 == s2) {   /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        if (PyBytes_GET_SIZE(s1) != PyBytes_GET_SIZE(s2)) {
            return (equals == Py_NE);
        } else if (PyBytes_GET_SIZE(s1) == 1) {
            if (equals == Py_EQ)
                return (PyBytes_AS_STRING(s1)[0] == PyBytes_AS_STRING(s2)[0]);
            else
                return (PyBytes_AS_STRING(s1)[0] != PyBytes_AS_STRING(s2)[0]);
        } else {
            int result = memcmp(PyBytes_AS_STRING(s1), PyBytes_AS_STRING(s2), (size_t)PyBytes_GET_SIZE(s1));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
}

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
    if (s1 == s2) {   /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */
        return (equals == Py_EQ);
    } else if (PyUnicode_CheckExact(s1) & PyUnicode_CheckExact(s2)) {
        if (PyUnicode_GET_SIZE(s1) != PyUnicode_GET_SIZE(s2)) {
            return (equals == Py_NE);
        } else if (PyUnicode_GET_SIZE(s1) == 1) {
            if (equals == Py_EQ)
                return (PyUnicode_AS_UNICODE(s1)[0] == PyUnicode_AS_UNICODE(s2)[0]);
            else
                return (PyUnicode_AS_UNICODE(s1)[0] != PyUnicode_AS_UNICODE(s2)[0]);
        } else {
            int result = PyUnicode_Compare(s1, s2);
            if ((result == -1) && unlikely(PyErr_Occurred()))
                return -1;
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyUnicode_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyUnicode_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}

static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
    PyObject *py_import = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!py_import)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    #if PY_VERSION_HEX >= 0x02050000
    {
        PyObject *py_level = PyInt_FromLong(level);
        if (!py_level)
            goto bad;
        module = PyObject_CallFunctionObjArgs(py_import,
            name, global_dict, empty_dict, list, py_level, NULL);
        Py_DECREF(py_level);
    }
    #else
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(py_import);
    Py_XDECREF(empty_dict);
    return module;
}

static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
    PyObject *metaclass;
    /* Default metaclass */
#if PY_MAJOR_VERSION < 3
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = PyObject_GetAttrString(base, (char *)"__class__");
        if (!metaclass) {
            PyErr_Clear();
            metaclass = (PyObject*) Py_TYPE(base);
        }
    } else {
        metaclass = (PyObject *) &PyClass_Type;
    }
#else
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = (PyObject*) Py_TYPE(base);
    } else {
        metaclass = (PyObject *) &PyType_Type;
    }
#endif
    Py_INCREF(metaclass);
    return metaclass;
}

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                   PyObject *modname) {
    PyObject *result;
    PyObject *metaclass;

    if (PyDict_SetItemString(dict, "__module__", modname) < 0)
        return NULL;

    /* Python2 __metaclass__ */
    metaclass = PyDict_GetItemString(dict, "__metaclass__");
    if (metaclass) {
        Py_INCREF(metaclass);
    } else {
        metaclass = __Pyx_FindPy2Metaclass(bases);
    }
    result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
    Py_DECREF(metaclass);
    return result;
}


static PyObject *__pyx_binding_PyCFunctionType_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module) {
    __pyx_binding_PyCFunctionType_object *op = PyObject_GC_New(__pyx_binding_PyCFunctionType_object, __pyx_binding_PyCFunctionType);
    if (op == NULL)
        return NULL;
    op->func.m_ml = ml;
    Py_XINCREF(self);
    op->func.m_self = self;
    Py_XINCREF(module);
    op->func.m_module = module;
    PyObject_GC_Track(op);
    return (PyObject *)op;
}

static void __pyx_binding_PyCFunctionType_dealloc(__pyx_binding_PyCFunctionType_object *m) {
    PyObject_GC_UnTrack(m);
    Py_XDECREF(m->func.m_self);
    Py_XDECREF(m->func.m_module);
    PyObject_GC_Del(m);
}

static PyObject *__pyx_binding_PyCFunctionType_descr_get(PyObject *func, PyObject *obj, PyObject *type) {
    if (obj == Py_None)
            obj = NULL;
    return PyMethod_New(func, obj, type);
}

static int __pyx_binding_PyCFunctionType_init(void) {
    __pyx_binding_PyCFunctionType_type = PyCFunction_Type;
    __pyx_binding_PyCFunctionType_type.tp_name = __Pyx_NAMESTR("cython_binding_builtin_function_or_method");
    __pyx_binding_PyCFunctionType_type.tp_dealloc = (destructor)__pyx_binding_PyCFunctionType_dealloc;
    __pyx_binding_PyCFunctionType_type.tp_descr_get = __pyx_binding_PyCFunctionType_descr_get;
    if (PyType_Ready(&__pyx_binding_PyCFunctionType_type) < 0) {
        return -1;
    }
    __pyx_binding_PyCFunctionType = &__pyx_binding_PyCFunctionType_type;
    return 0;

}

#if PY_MAJOR_VERSION < 3
static PyObject *__Pyx_GetStdout(void) {
    PyObject *f = PySys_GetObject((char *)"stdout");
    if (!f) {
        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
    }
    return f;
}

static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
    PyObject* v;
    int i;

    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
        if (PyFile_SoftSpace(f, 1)) {
            if (PyFile_WriteString(" ", f) < 0)
                return -1;
        }
        v = PyTuple_GET_ITEM(arg_tuple, i);
        if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
            return -1;
        if (PyString_Check(v)) {
            char *s = PyString_AsString(v);
            Py_ssize_t len = PyString_Size(v);
            if (len > 0 &&
                isspace(Py_CHARMASK(s[len-1])) &&
                s[len-1] != ' ')
                    PyFile_SoftSpace(f, 0);
        }
    }
    if (newline) {
        if (PyFile_WriteString("\n", f) < 0)
            return -1;
        PyFile_SoftSpace(f, 0);
    }
    return 0;
}

#else /* Python 3 has a print function */

static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
    PyObject* kwargs = 0;
    PyObject* result = 0;
    PyObject* end_string;
    if (unlikely(!__pyx_print)) {
        __pyx_print = __Pyx_GetAttrString(__pyx_b, "print");
        if (!__pyx_print)
            return -1;
    }
    if (stream) {
        kwargs = PyDict_New();
        if (unlikely(!kwargs))
            return -1;
        if (unlikely(PyDict_SetItemString(kwargs, "file", stream) < 0))
            goto bad;
        if (!newline) {
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                goto bad;
            if (PyDict_SetItemString(kwargs, "end", end_string) < 0) {
                Py_DECREF(end_string);
                goto bad;
            }
            Py_DECREF(end_string);
        }
    } else if (!newline) {
        if (unlikely(!__pyx_print_kwargs)) {
            __pyx_print_kwargs = PyDict_New();
            if (unlikely(!__pyx_print_kwargs))
                return -1;
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                return -1;
            if (PyDict_SetItemString(__pyx_print_kwargs, "end", end_string) < 0) {
                Py_DECREF(end_string);
                return -1;
            }
            Py_DECREF(end_string);
        }
        kwargs = __pyx_print_kwargs;
    }
    result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
    if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
        Py_DECREF(kwargs);
    if (!result)
        return -1;
    Py_DECREF(result);
    return 0;
bad:
    if (kwargs != __pyx_print_kwargs)
        Py_XDECREF(kwargs);
    return -1;
}

#endif

#if PY_MAJOR_VERSION < 3

static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    if (PyFile_SoftSpace(f, 0)) {
        if (PyFile_WriteString(" ", f) < 0)
            return -1;
    }
    if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
        return -1;
    if (PyFile_WriteString("\n", f) < 0)
        return -1;
    return 0;
    /* the line below is just to avoid compiler
     * compiler warnings about unused functions */
    return __Pyx_Print(f, NULL, 0);
}

#else /* Python 3 has a print function */

static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
    int res;
    PyObject* arg_tuple = PyTuple_New(1);
    if (unlikely(!arg_tuple))
        return -1;
    Py_INCREF(o);
    PyTuple_SET_ITEM(arg_tuple, 0, o);
    res = __Pyx_Print(stream, arg_tuple, 1);
    Py_DECREF(arg_tuple);
    return res;
}

#endif

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;

    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];

    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    #if PY_MAJOR_VERSION < 3
    py_name = PyString_FromString(class_name);
    #else
    py_name = PyUnicode_FromString(class_name);
    #endif
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%s.%s is not a type object",
            module_name, class_name);
        goto bad;
    }
    if (!strict && ((PyTypeObject *)result)->tp_basicsize > (Py_ssize_t)size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility",
            module_name, class_name);
        #if PY_VERSION_HEX < 0x02050000
        if (PyErr_Warn(NULL, warning) < 0) goto bad;
        #else
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
        #endif
    }
    else if (((PyTypeObject *)result)->tp_basicsize != (Py_ssize_t)size) {
        PyErr_Format(PyExc_ValueError,
            "%s.%s has the wrong size, try recompiling",
            module_name, class_name);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;

    #if PY_MAJOR_VERSION < 3
    py_name = PyString_FromString(name);
    #else
    py_name = PyUnicode_FromString(name);
    #endif
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

static void* __Pyx_GetVtable(PyObject *dict) {
    void* ptr;
    PyObject *ob = PyMapping_GetItemString(dict, (char *)"__pyx_vtable__");
    if (!ob)
        goto bad;
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    ptr = PyCapsule_GetPointer(ob, 0);
#else
    ptr = PyCObject_AsVoidPtr(ob);
#endif
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

#ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;

    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%s does not export expected C function %s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %s.%s has wrong signature (expected %s, got %s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C function %s.%s has wrong signature (expected %s, got %s)",
             PyModule_GetName(module), funcname, sig, desc);
        goto bad;
    }
    tmp.p = PyCObject_AsVoidPtr(cobj);}
#endif
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(const char *funcname, int __pyx_clineno,
                               int __pyx_lineno, const char *__pyx_filename) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;

    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(__pyx_filename);
    #else
    py_srcfile = PyUnicode_FromString(__pyx_filename);
    #endif
    if (!py_srcfile) goto bad;
    if (__pyx_clineno) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        #if PY_MAJOR_VERSION >= 3
        0,            /*int kwonlyargcount,*/
        #endif
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple,  /*PyObject *consts,*/
        __pyx_empty_tuple,  /*PyObject *names,*/
        __pyx_empty_tuple,  /*PyObject *varnames,*/
        __pyx_empty_tuple,  /*PyObject *freevars,*/
        __pyx_empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

/* Type Conversion Functions */

static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}

static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_VERSION_HEX < 0x03000000
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_VERSION_HEX < 0x03000000
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}

static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}

static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
       return (size_t)-1;
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
