From 478bf6ae0ef2b24617fa70796ef46a9bea0a7b7a Mon Sep 17 00:00:00 2001 From: Hubert Figuiere Date: Tue, 30 Aug 2005 20:40:29 +0000 Subject: [PATCH] this is an autogenerated file git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8230 67ed7778-7388-44ab-90cf-0a291f65f57c --- bindings/python/gphoto2.c | 2659 ------------------------------------- 1 file changed, 2659 deletions(-) delete mode 100644 bindings/python/gphoto2.c diff --git a/bindings/python/gphoto2.c b/bindings/python/gphoto2.c deleted file mode 100644 index 4674ea4d1..000000000 --- a/bindings/python/gphoto2.c +++ /dev/null @@ -1,2659 +0,0 @@ -/* Generated by Pyrex 0.9.3 on Sun Feb 27 11:47:16 2005 */ - -#include "Python.h" -#include "structmember.h" -#ifndef PY_LONG_LONG - #define PY_LONG_LONG LONG_LONG -#endif -#include "time.h" -#include "gphoto2-port-version.h" -#include "gphoto2-version.h" -#include "gphoto2-context.h" -#include "gphoto2-port-info-list.h" -#include "gphoto2-port.h" -#include "gphoto2-port-log.h" -#include "gphoto2-port-result.h" -#include "gphoto2-widget.h" -#include "gphoto2-file.h" -#include "gphoto2-list.h" -#include "gphoto2-filesys.h" -#include "gphoto2-abilities-list.h" -#include "gphoto2-camera.h" -#include "gphoto2-library.h" -#include "gphoto2-setting.h" - - -typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ -typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ -static PyObject *__Pyx_UnpackItem(PyObject *, int); /*proto*/ -static int __Pyx_EndUnpack(PyObject *, int); /*proto*/ -static int __Pyx_PrintItem(PyObject *); /*proto*/ -static int __Pyx_PrintNewline(void); /*proto*/ -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static void __Pyx_ReRaise(void); /*proto*/ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ -static PyObject *__Pyx_GetExcValue(void); /*proto*/ -static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/ -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ -static int __Pyx_GetStarArgs(PyObject **args, PyObject **kwds, char *kwd_list[], int nargs, PyObject **args2, PyObject **kwds2); /*proto*/ -static void __Pyx_WriteUnraisable(char *name); /*proto*/ -static void __Pyx_AddTraceback(char *funcname); /*proto*/ -static PyTypeObject *__Pyx_ImportType(char *module_name, char *class_name, long size); /*proto*/ -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ -static int __Pyx_GetVtable(PyObject *dict, void *vtabptr); /*proto*/ -static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/ -static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ - -static PyObject *__pyx_m; -static PyObject *__pyx_b; -static int __pyx_lineno; -static char *__pyx_filename; -staticforward char **__pyx_f; - -/* Declarations from gphoto2 */ - -staticforward PyTypeObject __pyx_type_7gphoto2_portInfo; - -struct __pyx_obj_7gphoto2_portInfo { - PyObject_HEAD - GPPortInfo info; -}; - -staticforward PyTypeObject __pyx_type_7gphoto2_ports; - -struct __pyx_obj_7gphoto2_ports { - PyObject_HEAD - GPPortInfoList (*portInfoList); -}; - -staticforward PyTypeObject __pyx_type_7gphoto2_cameraList; - -struct __pyx_obj_7gphoto2_cameraList { - PyObject_HEAD - CameraList (*liste); -}; - -staticforward PyTypeObject __pyx_type_7gphoto2_cameraAbilities; - -struct __pyx_obj_7gphoto2_cameraAbilities { - PyObject_HEAD - CameraAbilities abilitie; -}; - -staticforward PyTypeObject __pyx_type_7gphoto2_abilities_list; - -struct __pyx_obj_7gphoto2_abilities_list { - PyObject_HEAD - CameraAbilitiesList (*abilitiesList); -}; - -staticforward PyTypeObject __pyx_type_7gphoto2_camera; - -struct __pyx_obj_7gphoto2_camera { - PyObject_HEAD - Camera (*camera); -}; - -static PyTypeObject *__pyx_ptype_7gphoto2_portInfo = 0; -static PyTypeObject *__pyx_ptype_7gphoto2_ports = 0; -static PyTypeObject *__pyx_ptype_7gphoto2_cameraList = 0; -static PyTypeObject *__pyx_ptype_7gphoto2_cameraAbilities = 0; -static PyTypeObject *__pyx_ptype_7gphoto2_abilities_list = 0; -static PyTypeObject *__pyx_ptype_7gphoto2_camera = 0; -static PyObject *__pyx_k1; -static PyObject *(__pyx_f_7gphoto2_check(PyObject *)); /*proto*/ - -/* Implementation of gphoto2 */ - -static PyObject *__pyx_n_version; -static PyObject *__pyx_n_False; - -static PyObject *__pyx_f_7gphoto2_version(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_7gphoto2_version(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_verbose = 0; - char (*(*__pyx_v_cText)); - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - int __pyx_2; - static char *__pyx_argnames[] = {"verbose",0}; - __pyx_v_verbose = __pyx_k1; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_verbose)) return 0; - Py_INCREF(__pyx_v_verbose); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":759 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} - if (PyObject_Cmp(__pyx_v_verbose, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; goto __pyx_L1;} - __pyx_2 = __pyx_2 == 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (__pyx_2) { - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":760 */ - __pyx_v_cText = ((char (*(*)))gp_library_version(GP_VERSION_SHORT)); - goto __pyx_L2; - } - /*else*/ { - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":762 */ - __pyx_v_cText = ((char (*(*)))gp_library_version(GP_VERSION_VERBOSE)); - } - __pyx_L2:; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":763 */ - __pyx_1 = PyString_FromString((__pyx_v_cText[0])); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.version"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_verbose); - return __pyx_r; -} - -static PyObject *__pyx_n_Exception; -static PyObject *__pyx_n_str; - -static PyObject *__pyx_k2p; -static PyObject *__pyx_k3p; - -static char (__pyx_k2[]) = "Erreur ("; -static char (__pyx_k3[]) = ") : "; - -static PyObject *__pyx_f_7gphoto2_check(PyObject *__pyx_v_result) { - PyObject *__pyx_v_txt; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - int __pyx_2; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - PyObject *__pyx_5 = 0; - Py_INCREF(__pyx_v_result); - __pyx_v_txt = Py_None; Py_INCREF(__pyx_v_txt); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":766 */ - __pyx_1 = PyInt_FromLong(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; goto __pyx_L1;} - if (PyObject_Cmp(__pyx_v_result, __pyx_1, &__pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; goto __pyx_L1;} - __pyx_2 = __pyx_2 != 0; - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (__pyx_2) { - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":767 */ - __pyx_2 = PyInt_AsLong(__pyx_v_result); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; goto __pyx_L1;} - __pyx_1 = PyString_FromString(gp_result_as_string(__pyx_2)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; goto __pyx_L1;} - Py_DECREF(__pyx_v_txt); - __pyx_v_txt = __pyx_1; - __pyx_1 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":768 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;} - __pyx_3 = __Pyx_GetName(__pyx_b, __pyx_n_str); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;} - __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;} - Py_INCREF(__pyx_v_result); - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_v_result); - __pyx_5 = PyObject_CallObject(__pyx_3, __pyx_4); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyNumber_Add(__pyx_k2p, __pyx_5); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;} - Py_DECREF(__pyx_5); __pyx_5 = 0; - __pyx_4 = PyNumber_Add(__pyx_3, __pyx_k3p); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;} - Py_DECREF(__pyx_3); __pyx_3 = 0; - __pyx_5 = PyNumber_Add(__pyx_4, __pyx_v_txt); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;} - Py_DECREF(__pyx_4); __pyx_4 = 0; - __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_5); - __pyx_5 = 0; - __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - __Pyx_Raise(__pyx_4, 0, 0); - Py_DECREF(__pyx_4); __pyx_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; goto __pyx_L1;} - goto __pyx_L2; - } - __pyx_L2:; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_5); - __Pyx_AddTraceback("gphoto2.check"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_txt); - Py_DECREF(__pyx_v_result); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_8portInfo___repr__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_8portInfo___repr__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":774 */ - __pyx_1 = PyString_FromString(((struct __pyx_obj_7gphoto2_portInfo *)__pyx_v_self)->info.name); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.portInfo.__repr__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static int __pyx_f_7gphoto2_5ports___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_f_7gphoto2_5ports___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - int __pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":780 */ - __pyx_1 = PyInt_FromLong(gp_port_info_list_new((&((struct __pyx_obj_7gphoto2_ports *)__pyx_v_self)->portInfoList))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.ports.__new__"); - __pyx_r = -1; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static void __pyx_f_7gphoto2_5ports___dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_f_7gphoto2_5ports___dealloc__(PyObject *__pyx_v_self) { - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":783 */ - __pyx_1 = PyInt_FromLong(gp_port_info_list_free(((struct __pyx_obj_7gphoto2_ports *)__pyx_v_self)->portInfoList)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.ports.__dealloc__"); - __pyx_L0:; - Py_DECREF(__pyx_v_self); -} - -static PyObject *__pyx_f_7gphoto2_5ports_load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_7gphoto2_5ports_load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":786 */ - __pyx_1 = PyInt_FromLong(gp_port_info_list_load(((struct __pyx_obj_7gphoto2_ports *)__pyx_v_self)->portInfoList)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.ports.load"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_5ports_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_7gphoto2_5ports_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":789 */ - __pyx_1 = PyInt_FromLong(gp_port_info_list_count(((struct __pyx_obj_7gphoto2_ports *)__pyx_v_self)->portInfoList)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.ports.count"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_5ports___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_num); /*proto*/ -static PyObject *__pyx_f_7gphoto2_5ports___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_num) { - struct __pyx_obj_7gphoto2_portInfo *__pyx_v_info; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - int __pyx_3; - Py_INCREF(__pyx_v_self); - Py_INCREF(__pyx_v_num); - ((PyObject*)__pyx_v_info) = Py_None; Py_INCREF(((PyObject*)__pyx_v_info)); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":793 */ - __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;} - __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_7gphoto2_portInfo), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_7gphoto2_portInfo)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_v_info)); - ((PyObject *)__pyx_v_info) = __pyx_2; - __pyx_2 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":794 */ - __pyx_3 = PyInt_AsLong(__pyx_v_num); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; goto __pyx_L1;} - __pyx_1 = PyInt_FromLong(gp_port_info_list_get_info(((struct __pyx_obj_7gphoto2_ports *)__pyx_v_self)->portInfoList,__pyx_3,(&__pyx_v_info->info))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":795 */ - Py_INCREF(((PyObject *)__pyx_v_info)); - __pyx_r = ((PyObject *)__pyx_v_info); - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.ports.__getitem__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_info); - Py_DECREF(__pyx_v_self); - Py_DECREF(__pyx_v_num); - return __pyx_r; -} - -static int __pyx_f_7gphoto2_10cameraList___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_f_7gphoto2_10cameraList___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - int __pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":801 */ - __pyx_1 = PyInt_FromLong(gp_list_new((&((struct __pyx_obj_7gphoto2_cameraList *)__pyx_v_self)->liste))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.cameraList.__new__"); - __pyx_r = -1; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static void __pyx_f_7gphoto2_10cameraList___dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_f_7gphoto2_10cameraList___dealloc__(PyObject *__pyx_v_self) { - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":804 */ - __pyx_1 = PyInt_FromLong(gp_list_free(((struct __pyx_obj_7gphoto2_cameraList *)__pyx_v_self)->liste)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.cameraList.__dealloc__"); - __pyx_L0:; - Py_DECREF(__pyx_v_self); -} - -static PyObject *__pyx_f_7gphoto2_10cameraList_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_7gphoto2_10cameraList_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":807 */ - __pyx_1 = PyInt_FromLong(gp_list_count(((struct __pyx_obj_7gphoto2_cameraList *)__pyx_v_self)->liste)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraList.count"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_10cameraList___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/ -static PyObject *__pyx_f_7gphoto2_10cameraList___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) { - char (*__pyx_v_name); - char (*__pyx_v_value); - PyObject *__pyx_r; - int __pyx_1; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - Py_INCREF(__pyx_v_self); - Py_INCREF(__pyx_v_index); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":812 */ - __pyx_1 = PyInt_AsLong(__pyx_v_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;} - __pyx_2 = PyInt_FromLong(gp_list_get_name(((struct __pyx_obj_7gphoto2_cameraList *)__pyx_v_self)->liste,__pyx_1,(&__pyx_v_name))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;} - __pyx_3 = __pyx_f_7gphoto2_check(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":813 */ - __pyx_1 = PyInt_AsLong(__pyx_v_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;} - __pyx_2 = PyInt_FromLong(gp_list_get_value(((struct __pyx_obj_7gphoto2_cameraList *)__pyx_v_self)->liste,__pyx_1,(&__pyx_v_value))); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;} - __pyx_3 = __pyx_f_7gphoto2_check(__pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; goto __pyx_L1;} - Py_DECREF(__pyx_2); __pyx_2 = 0; - Py_DECREF(__pyx_3); __pyx_3 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":814 */ - __pyx_2 = PyString_FromString(__pyx_v_name); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;} - __pyx_3 = PyString_FromString(__pyx_v_value); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;} - __pyx_4 = PyTuple_New(2); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2); - PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3); - __pyx_2 = 0; - __pyx_3 = 0; - __pyx_r = __pyx_4; - __pyx_4 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - __Pyx_AddTraceback("gphoto2.cameraList.__getitem__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - Py_DECREF(__pyx_v_index); - return __pyx_r; -} - -static int __pyx_f_7gphoto2_15cameraAbilities___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_f_7gphoto2_15cameraAbilities___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - int __pyx_r; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":820 */ - - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1:; - __Pyx_AddTraceback("gphoto2.cameraAbilities.__new__"); - __pyx_r = -1; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_k4p; - -static char (__pyx_k4[]) = "Model : %s\nStatus : %d\nPort : %d\nOperations : %d\nFile Operations : %d\nFolder Operations : %d\nUSB (vendor/product) : %d/%d\nUSB class : %d/%d/%d\nLibrary : %s\nId : %s\n"; - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities___repr__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities___repr__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - PyObject *__pyx_4 = 0; - PyObject *__pyx_5 = 0; - PyObject *__pyx_6 = 0; - PyObject *__pyx_7 = 0; - PyObject *__pyx_8 = 0; - PyObject *__pyx_9 = 0; - PyObject *__pyx_10 = 0; - PyObject *__pyx_11 = 0; - PyObject *__pyx_12 = 0; - PyObject *__pyx_13 = 0; - PyObject *__pyx_14 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":823 */ - __pyx_1 = PyString_FromString(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.model); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_2 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.status); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_3 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.port); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_4 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.operations); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_5 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.file_operations); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_6 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.folder_operations); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_7 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.usb_vendor); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_8 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.usb_product); if (!__pyx_8) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_9 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.usb_class); if (!__pyx_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_10 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.usb_subclass); if (!__pyx_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_11 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.usb_protocol); if (!__pyx_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_12 = PyString_FromString(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.library); if (!__pyx_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_13 = PyString_FromString(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.id); if (!__pyx_13) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - __pyx_14 = PyTuple_New(13); if (!__pyx_14) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_14, 0, __pyx_1); - PyTuple_SET_ITEM(__pyx_14, 1, __pyx_2); - PyTuple_SET_ITEM(__pyx_14, 2, __pyx_3); - PyTuple_SET_ITEM(__pyx_14, 3, __pyx_4); - PyTuple_SET_ITEM(__pyx_14, 4, __pyx_5); - PyTuple_SET_ITEM(__pyx_14, 5, __pyx_6); - PyTuple_SET_ITEM(__pyx_14, 6, __pyx_7); - PyTuple_SET_ITEM(__pyx_14, 7, __pyx_8); - PyTuple_SET_ITEM(__pyx_14, 8, __pyx_9); - PyTuple_SET_ITEM(__pyx_14, 9, __pyx_10); - PyTuple_SET_ITEM(__pyx_14, 10, __pyx_11); - PyTuple_SET_ITEM(__pyx_14, 11, __pyx_12); - PyTuple_SET_ITEM(__pyx_14, 12, __pyx_13); - __pyx_1 = 0; - __pyx_2 = 0; - __pyx_3 = 0; - __pyx_4 = 0; - __pyx_5 = 0; - __pyx_6 = 0; - __pyx_7 = 0; - __pyx_8 = 0; - __pyx_9 = 0; - __pyx_10 = 0; - __pyx_11 = 0; - __pyx_12 = 0; - __pyx_13 = 0; - __pyx_1 = PyNumber_Remainder(__pyx_k4p, __pyx_14); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; goto __pyx_L1;} - Py_DECREF(__pyx_14); __pyx_14 = 0; - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - Py_XDECREF(__pyx_4); - Py_XDECREF(__pyx_5); - Py_XDECREF(__pyx_6); - Py_XDECREF(__pyx_7); - Py_XDECREF(__pyx_8); - Py_XDECREF(__pyx_9); - Py_XDECREF(__pyx_10); - Py_XDECREF(__pyx_11); - Py_XDECREF(__pyx_12); - Py_XDECREF(__pyx_13); - Py_XDECREF(__pyx_14); - __Pyx_AddTraceback("gphoto2.cameraAbilities.__repr__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_5model___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_5model___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":827 */ - __pyx_1 = PyString_FromString(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.model); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.model.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_6status___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_6status___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":831 */ - __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.status); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.status.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_4port___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_4port___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":835 */ - __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.port); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.port.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_10operations___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_10operations___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":839 */ - __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.operations); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.operations.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_15file_operations___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_15file_operations___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":843 */ - __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.file_operations); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.file_operations.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_17folder_operations___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_17folder_operations___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":847 */ - __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.folder_operations); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.folder_operations.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_10usb_vendor___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_10usb_vendor___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":851 */ - __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.usb_vendor); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.usb_vendor.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_11usb_product___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_11usb_product___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":855 */ - __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.usb_product); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.usb_product.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_9usb_class___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_9usb_class___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":859 */ - __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.usb_class); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.usb_class.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_12usb_subclass___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_12usb_subclass___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":863 */ - __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.usb_subclass); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.usb_subclass.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_12usb_protocol___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_12usb_protocol___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":867 */ - __pyx_1 = PyInt_FromLong(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.usb_protocol); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.usb_protocol.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_7library___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_7library___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":871 */ - __pyx_1 = PyString_FromString(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.library); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.library.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_2id___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_15cameraAbilities_2id___get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":875 */ - __pyx_1 = PyString_FromString(((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_self)->abilitie.id); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.cameraAbilities.id.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static int __pyx_f_7gphoto2_14abilities_list___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_f_7gphoto2_14abilities_list___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - int __pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":881 */ - __pyx_1 = PyInt_FromLong(gp_abilities_list_new((&((struct __pyx_obj_7gphoto2_abilities_list *)__pyx_v_self)->abilitiesList))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.abilities_list.__new__"); - __pyx_r = -1; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static void __pyx_f_7gphoto2_14abilities_list___dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_f_7gphoto2_14abilities_list___dealloc__(PyObject *__pyx_v_self) { - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":884 */ - __pyx_1 = PyInt_FromLong(gp_abilities_list_free(((struct __pyx_obj_7gphoto2_abilities_list *)__pyx_v_self)->abilitiesList)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.abilities_list.__dealloc__"); - __pyx_L0:; - Py_DECREF(__pyx_v_self); -} - -static PyObject *__pyx_f_7gphoto2_14abilities_list_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_7gphoto2_14abilities_list_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":887 */ - __pyx_1 = PyInt_FromLong(gp_abilities_list_count(((struct __pyx_obj_7gphoto2_abilities_list *)__pyx_v_self)->abilitiesList)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2.abilities_list.count"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_14abilities_list_load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_7gphoto2_14abilities_list_load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":890 */ - __pyx_1 = PyInt_FromLong(gp_abilities_list_load(((struct __pyx_obj_7gphoto2_abilities_list *)__pyx_v_self)->abilitiesList,0)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.abilities_list.load"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_14abilities_list___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/ -static PyObject *__pyx_f_7gphoto2_14abilities_list___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) { - struct __pyx_obj_7gphoto2_cameraAbilities *__pyx_v_ab; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - int __pyx_3; - Py_INCREF(__pyx_v_self); - Py_INCREF(__pyx_v_index); - ((PyObject*)__pyx_v_ab) = Py_None; Py_INCREF(((PyObject*)__pyx_v_ab)); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":894 */ - __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;} - __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_7gphoto2_cameraAbilities), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_7gphoto2_cameraAbilities)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_v_ab)); - ((PyObject *)__pyx_v_ab) = __pyx_2; - __pyx_2 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":895 */ - __pyx_3 = PyInt_AsLong(__pyx_v_index); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} - __pyx_1 = PyInt_FromLong(gp_abilities_list_get_abilities(((struct __pyx_obj_7gphoto2_abilities_list *)__pyx_v_self)->abilitiesList,__pyx_3,(&__pyx_v_ab->abilitie))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":896 */ - Py_INCREF(((PyObject *)__pyx_v_ab)); - __pyx_r = ((PyObject *)__pyx_v_ab); - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.abilities_list.__getitem__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_ab); - Py_DECREF(__pyx_v_self); - Py_DECREF(__pyx_v_index); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_14abilities_list_lookup_model(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_7gphoto2_14abilities_list_lookup_model(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_model = 0; - PyObject *__pyx_v_ret; - PyObject *__pyx_r; - char (*__pyx_1); - PyObject *__pyx_2 = 0; - static char *__pyx_argnames[] = {"model",0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_model)) return 0; - Py_INCREF(__pyx_v_self); - Py_INCREF(__pyx_v_model); - __pyx_v_ret = Py_None; Py_INCREF(__pyx_v_ret); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":899 */ - __pyx_1 = PyString_AsString(__pyx_v_model); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;} - __pyx_2 = PyInt_FromLong(gp_abilities_list_lookup_model(((struct __pyx_obj_7gphoto2_abilities_list *)__pyx_v_self)->abilitiesList,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; goto __pyx_L1;} - Py_DECREF(__pyx_v_ret); - __pyx_v_ret = __pyx_2; - __pyx_2 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":900 */ - Py_INCREF(__pyx_v_ret); - __pyx_r = __pyx_v_ret; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.abilities_list.lookup_model"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_ret); - Py_DECREF(__pyx_v_self); - Py_DECREF(__pyx_v_model); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_14abilities_list_detect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_7gphoto2_14abilities_list_detect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - struct __pyx_obj_7gphoto2_ports *__pyx_v_p = 0; - struct __pyx_obj_7gphoto2_cameraList *__pyx_v_l; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - static char *__pyx_argnames[] = {"p",0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_p)) return 0; - Py_INCREF(__pyx_v_self); - Py_INCREF(__pyx_v_p); - ((PyObject*)__pyx_v_l) = Py_None; Py_INCREF(((PyObject*)__pyx_v_l)); - if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_p), __pyx_ptype_7gphoto2_ports, 1, "p")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; goto __pyx_L1;} - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":904 */ - __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;} - __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_7gphoto2_cameraList), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_7gphoto2_cameraList)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_v_l)); - ((PyObject *)__pyx_v_l) = __pyx_2; - __pyx_2 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":905 */ - __pyx_1 = PyInt_FromLong(gp_abilities_list_detect(((struct __pyx_obj_7gphoto2_abilities_list *)__pyx_v_self)->abilitiesList,__pyx_v_p->portInfoList,__pyx_v_l->liste,0)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":906 */ - Py_INCREF(((PyObject *)__pyx_v_l)); - __pyx_r = ((PyObject *)__pyx_v_l); - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.abilities_list.detect"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_l); - Py_DECREF(__pyx_v_self); - Py_DECREF(__pyx_v_p); - return __pyx_r; -} - -static int __pyx_f_7gphoto2_6camera___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_f_7gphoto2_6camera___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - int __pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return -1; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":912 */ - __pyx_1 = PyInt_FromLong(gp_camera_new((&((struct __pyx_obj_7gphoto2_camera *)__pyx_v_self)->camera))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.camera.__new__"); - __pyx_r = -1; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_6camera_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_7gphoto2_6camera_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":915 */ - __pyx_1 = PyInt_FromLong(gp_camera_init(((struct __pyx_obj_7gphoto2_camera *)__pyx_v_self)->camera,0)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.camera.init"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static void __pyx_f_7gphoto2_6camera___dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_f_7gphoto2_6camera___dealloc__(PyObject *__pyx_v_self) { - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":918 */ - __pyx_1 = PyInt_FromLong(gp_camera_free(((struct __pyx_obj_7gphoto2_camera *)__pyx_v_self)->camera)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.camera.__dealloc__"); - __pyx_L0:; - Py_DECREF(__pyx_v_self); -} - -static int __pyx_f_7gphoto2_6camera_9abilities___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_ab); /*proto*/ -static int __pyx_f_7gphoto2_6camera_9abilities___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_ab) { - int __pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - Py_INCREF(__pyx_v_self); - Py_INCREF(__pyx_v_ab); - if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ab), __pyx_ptype_7gphoto2_cameraAbilities, 1, "ab")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; goto __pyx_L1;} - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":922 */ - __pyx_1 = PyInt_FromLong(gp_camera_set_abilities(((struct __pyx_obj_7gphoto2_camera *)__pyx_v_self)->camera,((struct __pyx_obj_7gphoto2_cameraAbilities *)__pyx_v_ab)->abilitie)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.camera.abilities.__set__"); - __pyx_r = -1; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - Py_DECREF(__pyx_v_ab); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_6camera_9abilities___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_6camera_9abilities___get__(PyObject *__pyx_v_self) { - struct __pyx_obj_7gphoto2_cameraAbilities *__pyx_v_ab; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - Py_INCREF(__pyx_v_self); - ((PyObject*)__pyx_v_ab) = Py_None; Py_INCREF(((PyObject*)__pyx_v_ab)); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":925 */ - __pyx_1 = PyTuple_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; goto __pyx_L1;} - __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_7gphoto2_cameraAbilities), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - if (!__Pyx_TypeTest(__pyx_2, __pyx_ptype_7gphoto2_cameraAbilities)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; goto __pyx_L1;} - Py_DECREF(((PyObject *)__pyx_v_ab)); - ((PyObject *)__pyx_v_ab) = __pyx_2; - __pyx_2 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":926 */ - __pyx_1 = PyInt_FromLong(gp_camera_get_abilities(((struct __pyx_obj_7gphoto2_camera *)__pyx_v_self)->camera,(&__pyx_v_ab->abilitie))); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":927 */ - Py_INCREF(((PyObject *)__pyx_v_ab)); - __pyx_r = ((PyObject *)__pyx_v_ab); - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.camera.abilities.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_ab); - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_6camera_7summary___get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_f_7gphoto2_6camera_7summary___get__(PyObject *__pyx_v_self) { - CameraText __pyx_v_txt; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":932 */ - __pyx_1 = PyInt_FromLong(gp_camera_get_summary(((struct __pyx_obj_7gphoto2_camera *)__pyx_v_self)->camera,(&__pyx_v_txt),0)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":933 */ - __pyx_1 = PyString_FromString(__pyx_v_txt.text); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; goto __pyx_L1;} - __pyx_r = __pyx_1; - __pyx_1 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - __Pyx_AddTraceback("gphoto2.camera.summary.__get__"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static PyObject *__pyx_f_7gphoto2_6camera_capture_image(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_f_7gphoto2_6camera_capture_image(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - CameraFilePath __pyx_v_path; - PyObject *__pyx_r; - PyObject *__pyx_1 = 0; - PyObject *__pyx_2 = 0; - PyObject *__pyx_3 = 0; - static char *__pyx_argnames[] = {0}; - if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; - Py_INCREF(__pyx_v_self); - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":937 */ - __pyx_1 = PyInt_FromLong(gp_camera_capture(((struct __pyx_obj_7gphoto2_camera *)__pyx_v_self)->camera,GP_CAPTURE_IMAGE,(&__pyx_v_path),0)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; goto __pyx_L1;} - __pyx_2 = __pyx_f_7gphoto2_check(__pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; goto __pyx_L1;} - Py_DECREF(__pyx_1); __pyx_1 = 0; - Py_DECREF(__pyx_2); __pyx_2 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":938 */ - __pyx_1 = PyString_FromString(__pyx_v_path.folder); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; goto __pyx_L1;} - __pyx_2 = PyString_FromString(__pyx_v_path.name); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; goto __pyx_L1;} - __pyx_3 = PyTuple_New(2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; goto __pyx_L1;} - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); - PyTuple_SET_ITEM(__pyx_3, 1, __pyx_2); - __pyx_1 = 0; - __pyx_2 = 0; - __pyx_r = __pyx_3; - __pyx_3 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; Py_INCREF(__pyx_r); - goto __pyx_L0; - __pyx_L1:; - Py_XDECREF(__pyx_1); - Py_XDECREF(__pyx_2); - Py_XDECREF(__pyx_3); - __Pyx_AddTraceback("gphoto2.camera.capture_image"); - __pyx_r = 0; - __pyx_L0:; - Py_DECREF(__pyx_v_self); - return __pyx_r; -} - -static __Pyx_InternTabEntry __pyx_intern_tab[] = { - {&__pyx_n_Exception, "Exception"}, - {&__pyx_n_False, "False"}, - {&__pyx_n_str, "str"}, - {&__pyx_n_version, "version"}, - {0, 0} -}; - -static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_k2p, __pyx_k2, sizeof(__pyx_k2)}, - {&__pyx_k3p, __pyx_k3, sizeof(__pyx_k3)}, - {&__pyx_k4p, __pyx_k4, sizeof(__pyx_k4)}, - {0, 0, 0} -}; - -static PyObject *__pyx_tp_new_7gphoto2_portInfo(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_7gphoto2_portInfo *p = (struct __pyx_obj_7gphoto2_portInfo *)o; - return o; -} - -static void __pyx_tp_dealloc_7gphoto2_portInfo(PyObject *o) { - struct __pyx_obj_7gphoto2_portInfo *p = (struct __pyx_obj_7gphoto2_portInfo *)o; - (*o->ob_type->tp_free)(o); -} - -static int __pyx_tp_traverse_7gphoto2_portInfo(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_7gphoto2_portInfo *p = (struct __pyx_obj_7gphoto2_portInfo *)o; - return 0; -} - -static int __pyx_tp_clear_7gphoto2_portInfo(PyObject *o) { - struct __pyx_obj_7gphoto2_portInfo *p = (struct __pyx_obj_7gphoto2_portInfo *)o; - return 0; -} - -static struct PyMethodDef __pyx_methods_7gphoto2_portInfo[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_portInfo = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - 0, /*nb_divide*/ - 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*/ - 0, /*nb_coerce*/ - 0, /*nb_int*/ - 0, /*nb_long*/ - 0, /*nb_float*/ - 0, /*nb_oct*/ - 0, /*nb_hex*/ - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - 0, /*nb_inplace_divide*/ - 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*/ -}; - -static PySequenceMethods __pyx_tp_as_sequence_portInfo = { - 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_portInfo = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_portInfo = { - 0, /*bf_getreadbuffer*/ - 0, /*bf_getwritebuffer*/ - 0, /*bf_getsegcount*/ - 0, /*bf_getcharbuffer*/ -}; - -statichere PyTypeObject __pyx_type_7gphoto2_portInfo = { - PyObject_HEAD_INIT(0) - 0, /*ob_size*/ - "gphoto2.portInfo", /*tp_name*/ - sizeof(struct __pyx_obj_7gphoto2_portInfo), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_7gphoto2_portInfo, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - __pyx_f_7gphoto2_8portInfo___repr__, /*tp_repr*/ - &__pyx_tp_as_number_portInfo, /*tp_as_number*/ - &__pyx_tp_as_sequence_portInfo, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_portInfo, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_portInfo, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - __pyx_tp_traverse_7gphoto2_portInfo, /*tp_traverse*/ - __pyx_tp_clear_7gphoto2_portInfo, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_7gphoto2_portInfo, /*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_7gphoto2_portInfo, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ -}; - -static PyObject *__pyx_tp_new_7gphoto2_ports(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_7gphoto2_ports *p = (struct __pyx_obj_7gphoto2_ports *)o; - if (__pyx_f_7gphoto2_5ports___new__(o, a, k) < 0) { - Py_DECREF(o); o = 0; - } - return o; -} - -static void __pyx_tp_dealloc_7gphoto2_ports(PyObject *o) { - struct __pyx_obj_7gphoto2_ports *p = (struct __pyx_obj_7gphoto2_ports *)o; - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++o->ob_refcnt; - __pyx_f_7gphoto2_5ports___dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --o->ob_refcnt; - PyErr_Restore(etype, eval, etb); - } - (*o->ob_type->tp_free)(o); -} - -static int __pyx_tp_traverse_7gphoto2_ports(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_7gphoto2_ports *p = (struct __pyx_obj_7gphoto2_ports *)o; - return 0; -} - -static int __pyx_tp_clear_7gphoto2_ports(PyObject *o) { - struct __pyx_obj_7gphoto2_ports *p = (struct __pyx_obj_7gphoto2_ports *)o; - return 0; -} -static PyObject *__pyx_sq_item_7gphoto2_ports(PyObject *o, int i) { - PyObject *r; - PyObject *x = PyInt_FromLong(i); if(!x) return 0; - r = o->ob_type->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; -} - -static struct PyMethodDef __pyx_methods_7gphoto2_ports[] = { - {"load", (PyCFunction)__pyx_f_7gphoto2_5ports_load, METH_VARARGS|METH_KEYWORDS, 0}, - {"count", (PyCFunction)__pyx_f_7gphoto2_5ports_count, METH_VARARGS|METH_KEYWORDS, 0}, - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_ports = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - 0, /*nb_divide*/ - 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*/ - 0, /*nb_coerce*/ - 0, /*nb_int*/ - 0, /*nb_long*/ - 0, /*nb_float*/ - 0, /*nb_oct*/ - 0, /*nb_hex*/ - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - 0, /*nb_inplace_divide*/ - 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*/ -}; - -static PySequenceMethods __pyx_tp_as_sequence_ports = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_7gphoto2_ports, /*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_ports = { - 0, /*mp_length*/ - __pyx_f_7gphoto2_5ports___getitem__, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_ports = { - 0, /*bf_getreadbuffer*/ - 0, /*bf_getwritebuffer*/ - 0, /*bf_getsegcount*/ - 0, /*bf_getcharbuffer*/ -}; - -statichere PyTypeObject __pyx_type_7gphoto2_ports = { - PyObject_HEAD_INIT(0) - 0, /*ob_size*/ - "gphoto2.ports", /*tp_name*/ - sizeof(struct __pyx_obj_7gphoto2_ports), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_7gphoto2_ports, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - &__pyx_tp_as_number_ports, /*tp_as_number*/ - &__pyx_tp_as_sequence_ports, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_ports, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_ports, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - __pyx_tp_traverse_7gphoto2_ports, /*tp_traverse*/ - __pyx_tp_clear_7gphoto2_ports, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_7gphoto2_ports, /*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_7gphoto2_ports, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ -}; - -static PyObject *__pyx_tp_new_7gphoto2_cameraList(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_7gphoto2_cameraList *p = (struct __pyx_obj_7gphoto2_cameraList *)o; - if (__pyx_f_7gphoto2_10cameraList___new__(o, a, k) < 0) { - Py_DECREF(o); o = 0; - } - return o; -} - -static void __pyx_tp_dealloc_7gphoto2_cameraList(PyObject *o) { - struct __pyx_obj_7gphoto2_cameraList *p = (struct __pyx_obj_7gphoto2_cameraList *)o; - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++o->ob_refcnt; - __pyx_f_7gphoto2_10cameraList___dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --o->ob_refcnt; - PyErr_Restore(etype, eval, etb); - } - (*o->ob_type->tp_free)(o); -} - -static int __pyx_tp_traverse_7gphoto2_cameraList(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_7gphoto2_cameraList *p = (struct __pyx_obj_7gphoto2_cameraList *)o; - return 0; -} - -static int __pyx_tp_clear_7gphoto2_cameraList(PyObject *o) { - struct __pyx_obj_7gphoto2_cameraList *p = (struct __pyx_obj_7gphoto2_cameraList *)o; - return 0; -} -static PyObject *__pyx_sq_item_7gphoto2_cameraList(PyObject *o, int i) { - PyObject *r; - PyObject *x = PyInt_FromLong(i); if(!x) return 0; - r = o->ob_type->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; -} - -static struct PyMethodDef __pyx_methods_7gphoto2_cameraList[] = { - {"count", (PyCFunction)__pyx_f_7gphoto2_10cameraList_count, METH_VARARGS|METH_KEYWORDS, 0}, - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_cameraList = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - 0, /*nb_divide*/ - 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*/ - 0, /*nb_coerce*/ - 0, /*nb_int*/ - 0, /*nb_long*/ - 0, /*nb_float*/ - 0, /*nb_oct*/ - 0, /*nb_hex*/ - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - 0, /*nb_inplace_divide*/ - 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*/ -}; - -static PySequenceMethods __pyx_tp_as_sequence_cameraList = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_7gphoto2_cameraList, /*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_cameraList = { - 0, /*mp_length*/ - __pyx_f_7gphoto2_10cameraList___getitem__, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_cameraList = { - 0, /*bf_getreadbuffer*/ - 0, /*bf_getwritebuffer*/ - 0, /*bf_getsegcount*/ - 0, /*bf_getcharbuffer*/ -}; - -statichere PyTypeObject __pyx_type_7gphoto2_cameraList = { - PyObject_HEAD_INIT(0) - 0, /*ob_size*/ - "gphoto2.cameraList", /*tp_name*/ - sizeof(struct __pyx_obj_7gphoto2_cameraList), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_7gphoto2_cameraList, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - &__pyx_tp_as_number_cameraList, /*tp_as_number*/ - &__pyx_tp_as_sequence_cameraList, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_cameraList, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_cameraList, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - __pyx_tp_traverse_7gphoto2_cameraList, /*tp_traverse*/ - __pyx_tp_clear_7gphoto2_cameraList, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_7gphoto2_cameraList, /*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_7gphoto2_cameraList, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ -}; - -static PyObject *__pyx_tp_new_7gphoto2_cameraAbilities(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_7gphoto2_cameraAbilities *p = (struct __pyx_obj_7gphoto2_cameraAbilities *)o; - if (__pyx_f_7gphoto2_15cameraAbilities___new__(o, a, k) < 0) { - Py_DECREF(o); o = 0; - } - return o; -} - -static void __pyx_tp_dealloc_7gphoto2_cameraAbilities(PyObject *o) { - struct __pyx_obj_7gphoto2_cameraAbilities *p = (struct __pyx_obj_7gphoto2_cameraAbilities *)o; - (*o->ob_type->tp_free)(o); -} - -static int __pyx_tp_traverse_7gphoto2_cameraAbilities(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_7gphoto2_cameraAbilities *p = (struct __pyx_obj_7gphoto2_cameraAbilities *)o; - return 0; -} - -static int __pyx_tp_clear_7gphoto2_cameraAbilities(PyObject *o) { - struct __pyx_obj_7gphoto2_cameraAbilities *p = (struct __pyx_obj_7gphoto2_cameraAbilities *)o; - return 0; -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_model(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_5model___get__(o); -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_status(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_6status___get__(o); -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_port(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_4port___get__(o); -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_operations(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_10operations___get__(o); -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_file_operations(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_15file_operations___get__(o); -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_folder_operations(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_17folder_operations___get__(o); -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_usb_vendor(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_10usb_vendor___get__(o); -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_usb_product(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_11usb_product___get__(o); -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_usb_class(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_9usb_class___get__(o); -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_usb_subclass(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_12usb_subclass___get__(o); -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_usb_protocol(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_12usb_protocol___get__(o); -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_library(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_7library___get__(o); -} - -static PyObject *__pyx_getprop_7gphoto2_15cameraAbilities_id(PyObject *o, void *x) { - return __pyx_f_7gphoto2_15cameraAbilities_2id___get__(o); -} - -static struct PyMethodDef __pyx_methods_7gphoto2_cameraAbilities[] = { - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_7gphoto2_cameraAbilities[] = { - {"model", __pyx_getprop_7gphoto2_15cameraAbilities_model, 0, 0, 0}, - {"status", __pyx_getprop_7gphoto2_15cameraAbilities_status, 0, 0, 0}, - {"port", __pyx_getprop_7gphoto2_15cameraAbilities_port, 0, 0, 0}, - {"operations", __pyx_getprop_7gphoto2_15cameraAbilities_operations, 0, 0, 0}, - {"file_operations", __pyx_getprop_7gphoto2_15cameraAbilities_file_operations, 0, 0, 0}, - {"folder_operations", __pyx_getprop_7gphoto2_15cameraAbilities_folder_operations, 0, 0, 0}, - {"usb_vendor", __pyx_getprop_7gphoto2_15cameraAbilities_usb_vendor, 0, 0, 0}, - {"usb_product", __pyx_getprop_7gphoto2_15cameraAbilities_usb_product, 0, 0, 0}, - {"usb_class", __pyx_getprop_7gphoto2_15cameraAbilities_usb_class, 0, 0, 0}, - {"usb_subclass", __pyx_getprop_7gphoto2_15cameraAbilities_usb_subclass, 0, 0, 0}, - {"usb_protocol", __pyx_getprop_7gphoto2_15cameraAbilities_usb_protocol, 0, 0, 0}, - {"library", __pyx_getprop_7gphoto2_15cameraAbilities_library, 0, 0, 0}, - {"id", __pyx_getprop_7gphoto2_15cameraAbilities_id, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_cameraAbilities = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - 0, /*nb_divide*/ - 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*/ - 0, /*nb_coerce*/ - 0, /*nb_int*/ - 0, /*nb_long*/ - 0, /*nb_float*/ - 0, /*nb_oct*/ - 0, /*nb_hex*/ - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - 0, /*nb_inplace_divide*/ - 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*/ -}; - -static PySequenceMethods __pyx_tp_as_sequence_cameraAbilities = { - 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_cameraAbilities = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_cameraAbilities = { - 0, /*bf_getreadbuffer*/ - 0, /*bf_getwritebuffer*/ - 0, /*bf_getsegcount*/ - 0, /*bf_getcharbuffer*/ -}; - -statichere PyTypeObject __pyx_type_7gphoto2_cameraAbilities = { - PyObject_HEAD_INIT(0) - 0, /*ob_size*/ - "gphoto2.cameraAbilities", /*tp_name*/ - sizeof(struct __pyx_obj_7gphoto2_cameraAbilities), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_7gphoto2_cameraAbilities, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - __pyx_f_7gphoto2_15cameraAbilities___repr__, /*tp_repr*/ - &__pyx_tp_as_number_cameraAbilities, /*tp_as_number*/ - &__pyx_tp_as_sequence_cameraAbilities, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_cameraAbilities, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_cameraAbilities, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - __pyx_tp_traverse_7gphoto2_cameraAbilities, /*tp_traverse*/ - __pyx_tp_clear_7gphoto2_cameraAbilities, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_7gphoto2_cameraAbilities, /*tp_methods*/ - 0, /*tp_members*/ - __pyx_getsets_7gphoto2_cameraAbilities, /*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_7gphoto2_cameraAbilities, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ -}; - -static PyObject *__pyx_tp_new_7gphoto2_abilities_list(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_7gphoto2_abilities_list *p = (struct __pyx_obj_7gphoto2_abilities_list *)o; - if (__pyx_f_7gphoto2_14abilities_list___new__(o, a, k) < 0) { - Py_DECREF(o); o = 0; - } - return o; -} - -static void __pyx_tp_dealloc_7gphoto2_abilities_list(PyObject *o) { - struct __pyx_obj_7gphoto2_abilities_list *p = (struct __pyx_obj_7gphoto2_abilities_list *)o; - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++o->ob_refcnt; - __pyx_f_7gphoto2_14abilities_list___dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --o->ob_refcnt; - PyErr_Restore(etype, eval, etb); - } - (*o->ob_type->tp_free)(o); -} - -static int __pyx_tp_traverse_7gphoto2_abilities_list(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_7gphoto2_abilities_list *p = (struct __pyx_obj_7gphoto2_abilities_list *)o; - return 0; -} - -static int __pyx_tp_clear_7gphoto2_abilities_list(PyObject *o) { - struct __pyx_obj_7gphoto2_abilities_list *p = (struct __pyx_obj_7gphoto2_abilities_list *)o; - return 0; -} -static PyObject *__pyx_sq_item_7gphoto2_abilities_list(PyObject *o, int i) { - PyObject *r; - PyObject *x = PyInt_FromLong(i); if(!x) return 0; - r = o->ob_type->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; -} - -static struct PyMethodDef __pyx_methods_7gphoto2_abilities_list[] = { - {"count", (PyCFunction)__pyx_f_7gphoto2_14abilities_list_count, METH_VARARGS|METH_KEYWORDS, 0}, - {"load", (PyCFunction)__pyx_f_7gphoto2_14abilities_list_load, METH_VARARGS|METH_KEYWORDS, 0}, - {"lookup_model", (PyCFunction)__pyx_f_7gphoto2_14abilities_list_lookup_model, METH_VARARGS|METH_KEYWORDS, 0}, - {"detect", (PyCFunction)__pyx_f_7gphoto2_14abilities_list_detect, METH_VARARGS|METH_KEYWORDS, 0}, - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_abilities_list = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - 0, /*nb_divide*/ - 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*/ - 0, /*nb_coerce*/ - 0, /*nb_int*/ - 0, /*nb_long*/ - 0, /*nb_float*/ - 0, /*nb_oct*/ - 0, /*nb_hex*/ - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - 0, /*nb_inplace_divide*/ - 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*/ -}; - -static PySequenceMethods __pyx_tp_as_sequence_abilities_list = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_7gphoto2_abilities_list, /*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_abilities_list = { - 0, /*mp_length*/ - __pyx_f_7gphoto2_14abilities_list___getitem__, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_abilities_list = { - 0, /*bf_getreadbuffer*/ - 0, /*bf_getwritebuffer*/ - 0, /*bf_getsegcount*/ - 0, /*bf_getcharbuffer*/ -}; - -statichere PyTypeObject __pyx_type_7gphoto2_abilities_list = { - PyObject_HEAD_INIT(0) - 0, /*ob_size*/ - "gphoto2.abilities_list", /*tp_name*/ - sizeof(struct __pyx_obj_7gphoto2_abilities_list), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_7gphoto2_abilities_list, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - &__pyx_tp_as_number_abilities_list, /*tp_as_number*/ - &__pyx_tp_as_sequence_abilities_list, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_abilities_list, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_abilities_list, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - __pyx_tp_traverse_7gphoto2_abilities_list, /*tp_traverse*/ - __pyx_tp_clear_7gphoto2_abilities_list, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_7gphoto2_abilities_list, /*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_7gphoto2_abilities_list, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ -}; - -static PyObject *__pyx_tp_new_7gphoto2_camera(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = (*t->tp_alloc)(t, 0); - struct __pyx_obj_7gphoto2_camera *p = (struct __pyx_obj_7gphoto2_camera *)o; - if (__pyx_f_7gphoto2_6camera___new__(o, a, k) < 0) { - Py_DECREF(o); o = 0; - } - return o; -} - -static void __pyx_tp_dealloc_7gphoto2_camera(PyObject *o) { - struct __pyx_obj_7gphoto2_camera *p = (struct __pyx_obj_7gphoto2_camera *)o; - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++o->ob_refcnt; - __pyx_f_7gphoto2_6camera___dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --o->ob_refcnt; - PyErr_Restore(etype, eval, etb); - } - (*o->ob_type->tp_free)(o); -} - -static int __pyx_tp_traverse_7gphoto2_camera(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_7gphoto2_camera *p = (struct __pyx_obj_7gphoto2_camera *)o; - return 0; -} - -static int __pyx_tp_clear_7gphoto2_camera(PyObject *o) { - struct __pyx_obj_7gphoto2_camera *p = (struct __pyx_obj_7gphoto2_camera *)o; - return 0; -} - -static PyObject *__pyx_getprop_7gphoto2_6camera_abilities(PyObject *o, void *x) { - return __pyx_f_7gphoto2_6camera_9abilities___get__(o); -} - -static int __pyx_setprop_7gphoto2_6camera_abilities(PyObject *o, PyObject *v, void *x) { - if (v) { - return __pyx_f_7gphoto2_6camera_9abilities___set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_7gphoto2_6camera_summary(PyObject *o, void *x) { - return __pyx_f_7gphoto2_6camera_7summary___get__(o); -} - -static struct PyMethodDef __pyx_methods_7gphoto2_camera[] = { - {"init", (PyCFunction)__pyx_f_7gphoto2_6camera_init, METH_VARARGS|METH_KEYWORDS, 0}, - {"capture_image", (PyCFunction)__pyx_f_7gphoto2_6camera_capture_image, METH_VARARGS|METH_KEYWORDS, 0}, - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_7gphoto2_camera[] = { - {"abilities", __pyx_getprop_7gphoto2_6camera_abilities, __pyx_setprop_7gphoto2_6camera_abilities, 0, 0}, - {"summary", __pyx_getprop_7gphoto2_6camera_summary, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_camera = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - 0, /*nb_divide*/ - 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*/ - 0, /*nb_coerce*/ - 0, /*nb_int*/ - 0, /*nb_long*/ - 0, /*nb_float*/ - 0, /*nb_oct*/ - 0, /*nb_hex*/ - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - 0, /*nb_inplace_divide*/ - 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*/ -}; - -static PySequenceMethods __pyx_tp_as_sequence_camera = { - 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_camera = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_camera = { - 0, /*bf_getreadbuffer*/ - 0, /*bf_getwritebuffer*/ - 0, /*bf_getsegcount*/ - 0, /*bf_getcharbuffer*/ -}; - -statichere PyTypeObject __pyx_type_7gphoto2_camera = { - PyObject_HEAD_INIT(0) - 0, /*ob_size*/ - "gphoto2.camera", /*tp_name*/ - sizeof(struct __pyx_obj_7gphoto2_camera), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_7gphoto2_camera, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - &__pyx_tp_as_number_camera, /*tp_as_number*/ - &__pyx_tp_as_sequence_camera, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_camera, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_camera, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - __pyx_tp_traverse_7gphoto2_camera, /*tp_traverse*/ - __pyx_tp_clear_7gphoto2_camera, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_7gphoto2_camera, /*tp_methods*/ - 0, /*tp_members*/ - __pyx_getsets_7gphoto2_camera, /*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_7gphoto2_camera, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ -}; - -static struct PyMethodDef __pyx_methods[] = { - {"version", (PyCFunction)__pyx_f_7gphoto2_version, METH_VARARGS|METH_KEYWORDS, 0}, - {0, 0, 0, 0} -}; - -DL_EXPORT(void) initgphoto2(void); /*proto*/ -DL_EXPORT(void) initgphoto2(void) { - PyObject *__pyx_1 = 0; - __pyx_m = Py_InitModule4("gphoto2", __pyx_methods, 0, 0, PYTHON_API_VERSION); - if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}; - __pyx_b = PyImport_AddModule("__builtin__"); - if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}; - if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}; - if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}; - if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; goto __pyx_L1;}; - if (PyType_Ready(&__pyx_type_7gphoto2_portInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "portInfo", (PyObject *)&__pyx_type_7gphoto2_portInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; goto __pyx_L1;} - __pyx_ptype_7gphoto2_portInfo = &__pyx_type_7gphoto2_portInfo; - if (PyType_Ready(&__pyx_type_7gphoto2_ports) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "ports", (PyObject *)&__pyx_type_7gphoto2_ports) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; goto __pyx_L1;} - __pyx_ptype_7gphoto2_ports = &__pyx_type_7gphoto2_ports; - if (PyType_Ready(&__pyx_type_7gphoto2_cameraList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "cameraList", (PyObject *)&__pyx_type_7gphoto2_cameraList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; goto __pyx_L1;} - __pyx_ptype_7gphoto2_cameraList = &__pyx_type_7gphoto2_cameraList; - if (PyType_Ready(&__pyx_type_7gphoto2_cameraAbilities) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "cameraAbilities", (PyObject *)&__pyx_type_7gphoto2_cameraAbilities) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; goto __pyx_L1;} - __pyx_ptype_7gphoto2_cameraAbilities = &__pyx_type_7gphoto2_cameraAbilities; - if (PyType_Ready(&__pyx_type_7gphoto2_abilities_list) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "abilities_list", (PyObject *)&__pyx_type_7gphoto2_abilities_list) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; goto __pyx_L1;} - __pyx_ptype_7gphoto2_abilities_list = &__pyx_type_7gphoto2_abilities_list; - if (PyType_Ready(&__pyx_type_7gphoto2_camera) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; goto __pyx_L1;} - if (PyObject_SetAttrString(__pyx_m, "camera", (PyObject *)&__pyx_type_7gphoto2_camera) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; goto __pyx_L1;} - __pyx_ptype_7gphoto2_camera = &__pyx_type_7gphoto2_camera; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":757 */ - __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; goto __pyx_L1;} - __pyx_k1 = __pyx_1; - __pyx_1 = 0; - - /* "/home/david/Desktop/gphoto2/dist/gphoto2.pyx":935 */ - return; - __pyx_L1:; - Py_XDECREF(__pyx_1); - __Pyx_AddTraceback("gphoto2"); -} - -static char *__pyx_filenames[] = { - "gphoto2.pyx", -}; -statichere char **__pyx_f = __pyx_filenames; - -/* Runtime support code */ - -static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) { - if (!type) { - PyErr_Format(PyExc_SystemError, "Missing type object"); - return 0; - } - if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type)) - return 1; - PyErr_Format(PyExc_TypeError, - "Argument '%s' has incorrect type (expected %s, got %s)", - name, type->tp_name, obj->ob_type->tp_name); - return 0; -} - -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { - PyObject *result; - result = PyObject_GetAttr(dict, name); - if (!result) - PyErr_SetObject(PyExc_NameError, name); - return result; -} - -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { - 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); - } - /* Next, repeatedly, replace a tuple exception with its first item */ - while (PyTuple_Check(type) && PyTuple_Size(type) > 0) { - PyObject *tmp = type; - type = PyTuple_GET_ITEM(type, 0); - Py_INCREF(type); - Py_DECREF(tmp); - } - if (PyString_Check(type)) - ; - else if (PyClass_Check(type)) - ; /*PyErr_NormalizeException(&type, &value, &tb);*/ - else if (PyInstance_Check(type)) { - /* 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; - } - else { - /* Normalize to raise , */ - Py_DECREF(value); - value = type; - type = (PyObject*) ((PyInstanceObject*)type)->in_class; - Py_INCREF(type); - } - } - else { - /* Not something you can raise. You get an exception - anyway, just not what you specified :-) */ - PyErr_Format(PyExc_TypeError, - "exceptions must be strings, classes, or " - "instances, not %s", type->ob_type->tp_name); - goto raise_error; - } - PyErr_Restore(type, value, tb); - return; -raise_error: - Py_XDECREF(value); - Py_XDECREF(type); - Py_XDECREF(tb); - return; -} - -static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { - if (!type) { - PyErr_Format(PyExc_SystemError, "Missing type object"); - return 0; - } - if (obj == Py_None || PyObject_TypeCheck(obj, type)) - return 1; - PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s", - obj->ob_type->tp_name, type->tp_name); - return 0; -} - -static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) { - while (t->p) { - *t->p = PyString_InternFromString(t->s); - if (!*t->p) - return -1; - ++t; - } - return 0; -} - -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { - while (t->p) { - *t->p = PyString_FromStringAndSize(t->s, t->n - 1); - if (!*t->p) - return -1; - ++t; - } - return 0; -} - -#include "compile.h" -#include "frameobject.h" -#include "traceback.h" - -static void __Pyx_AddTraceback(char *funcname) { - PyObject *py_srcfile = 0; - PyObject *py_funcname = 0; - PyObject *py_globals = 0; - PyObject *empty_tuple = 0; - PyObject *empty_string = 0; - PyCodeObject *py_code = 0; - PyFrameObject *py_frame = 0; - - py_srcfile = PyString_FromString(__pyx_filename); - if (!py_srcfile) goto bad; - py_funcname = PyString_FromString(funcname); - if (!py_funcname) goto bad; - py_globals = PyModule_GetDict(__pyx_m); - if (!py_globals) goto bad; - empty_tuple = PyTuple_New(0); - if (!empty_tuple) goto bad; - empty_string = PyString_FromString(""); - if (!empty_string) goto bad; - py_code = PyCode_New( - 0, /*int argcount,*/ - 0, /*int nlocals,*/ - 0, /*int stacksize,*/ - 0, /*int flags,*/ - empty_string, /*PyObject *code,*/ - empty_tuple, /*PyObject *consts,*/ - empty_tuple, /*PyObject *names,*/ - empty_tuple, /*PyObject *varnames,*/ - empty_tuple, /*PyObject *freevars,*/ - empty_tuple, /*PyObject *cellvars,*/ - py_srcfile, /*PyObject *filename,*/ - py_funcname, /*PyObject *name,*/ - __pyx_lineno, /*int firstlineno,*/ - empty_string /*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(empty_tuple); - Py_XDECREF(empty_string); - Py_XDECREF(py_code); - Py_XDECREF(py_frame); -}