From 791252d6a907e8728f38d6f524b2bffec0f6d496 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Thu, 15 Feb 2024 08:49:25 +0000 Subject: [PATCH 01/29] Add graphviz to ReadTheDocs config --- .readthedocs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 4101119..fc2a48c 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,6 +9,8 @@ build: os: ubuntu-22.04 tools: python: "3.11" + apt_packages: + - graphviz # Build documentation in the "docs/" directory with Sphinx sphinx: From bce8a1519c91d82bfc5d9c01653c245e4f47e849 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Thu, 15 Feb 2024 09:26:55 +0000 Subject: [PATCH 02/29] Add change log to ReadTheDocs docs --- src/doc/index.rst | 1 + src/doc/misc/changelog.rst | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 src/doc/misc/changelog.rst diff --git a/src/doc/index.rst b/src/doc/index.rst index 03b2769..39a8626 100644 --- a/src/doc/index.rst +++ b/src/doc/index.rst @@ -11,5 +11,6 @@ Python-exiv2 documentation misc/readme misc/install misc/usage + misc/changelog misc/api diff --git a/src/doc/misc/changelog.rst b/src/doc/misc/changelog.rst new file mode 100644 index 0000000..8d66e96 --- /dev/null +++ b/src/doc/misc/changelog.rst @@ -0,0 +1,10 @@ +.. This is part of the python-exiv2 documentation. + Copyright (C) 2024 Jim Easterbrook. + +Release history +=============== + +.. literalinclude:: ../../../CHANGELOG.txt + :language: none + :start-after: licenses/> + :end-before: Changes in v0.4.0 From 13b8f1a48a38d7321df90d6fa3a9cf99506a7510 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Thu, 15 Feb 2024 10:01:05 +0000 Subject: [PATCH 03/29] Reinstate "abstract" Key base class --- README.rst | 2 +- src/doc/requirements.txt | 2 +- src/interface/metadatum.i | 5 +- src/swig-0_27_3/__init__.py | 4 +- src/swig-0_27_3/datasets_wrap.cxx | 13 +- src/swig-0_27_3/exif_wrap.cxx | 98 ++-- src/swig-0_27_3/image_wrap.cxx | 124 +++--- src/swig-0_27_3/iptc_wrap.cxx | 100 +++-- src/swig-0_27_3/metadatum_wrap.cxx | 632 +++++++++++++++++++++++--- src/swig-0_27_3/preview_wrap.cxx | 130 +++--- src/swig-0_27_3/properties_wrap.cxx | 13 +- src/swig-0_27_3/tags_wrap.cxx | 13 +- src/swig-0_27_3/xmp_wrap.cxx | 112 ++--- src/swig-0_27_7/__init__.py | 4 +- src/swig-0_27_7/datasets_wrap.cxx | 13 +- src/swig-0_27_7/exif_wrap.cxx | 98 ++-- src/swig-0_27_7/image_wrap.cxx | 124 +++--- src/swig-0_27_7/iptc_wrap.cxx | 100 +++-- src/swig-0_27_7/metadatum_wrap.cxx | 632 +++++++++++++++++++++++--- src/swig-0_27_7/preview_wrap.cxx | 130 +++--- src/swig-0_27_7/properties_wrap.cxx | 13 +- src/swig-0_27_7/tags_wrap.cxx | 13 +- src/swig-0_27_7/xmp_wrap.cxx | 112 ++--- src/swig-0_28_2/__init__.py | 4 +- src/swig-0_28_2/datasets_wrap.cxx | 13 +- src/swig-0_28_2/exif_wrap.cxx | 98 ++-- src/swig-0_28_2/image_wrap.cxx | 124 +++--- src/swig-0_28_2/iptc_wrap.cxx | 100 +++-- src/swig-0_28_2/metadatum_wrap.cxx | 662 +++++++++++++++++++++++++--- src/swig-0_28_2/preview_wrap.cxx | 130 +++--- src/swig-0_28_2/properties_wrap.cxx | 13 +- src/swig-0_28_2/tags_wrap.cxx | 13 +- src/swig-0_28_2/xmp_wrap.cxx | 112 ++--- 33 files changed, 2769 insertions(+), 987 deletions(-) diff --git a/README.rst b/README.rst index 2a3ac76..c66f2dc 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -python-exiv2 v\ 0.16.3 +python-exiv2 v\ 0.16.4 ====================== python-exiv2 is a low level interface (or binding) to the exiv2_ C++ library. diff --git a/src/doc/requirements.txt b/src/doc/requirements.txt index d5cb23a..8d8865b 100644 --- a/src/doc/requirements.txt +++ b/src/doc/requirements.txt @@ -1,3 +1,3 @@ -exiv2 <= 0.16.3 +exiv2 <= 0.16.4 sphinx == 7.2.6 sphinx-rtd-theme == 2.0.0 diff --git a/src/interface/metadatum.i b/src/interface/metadatum.i index 268f19b..6d1abf8 100644 --- a/src/interface/metadatum.i +++ b/src/interface/metadatum.i @@ -51,6 +51,8 @@ UNIQUE_PTR(key_type); %feature("python:slot", "tp_str", functype="reprfunc") key_type::key; %enddef // EXTEND_KEY +EXTEND_KEY(Exiv2::Key); + // Macro for Metadatum subclasses %define EXTEND_METADATUM(datum_type) // Turn off exception checking for methods that are guaranteed not to throw @@ -128,8 +130,9 @@ static PyObject* set_value_from_py(datum_type* datum, PyObject* py_value) { } } -%ignore Exiv2::Key; +%ignore Exiv2::Key::~Key; %ignore Exiv2::Key::operator=; +%ignore Exiv2::Key::write; %ignore Exiv2::Metadatum::~Metadatum; %ignore Exiv2::Metadatum::operator=; %ignore Exiv2::Metadatum::write; diff --git a/src/swig-0_27_3/__init__.py b/src/swig-0_27_3/__init__.py index 8e57b0d..85c136a 100644 --- a/src/swig-0_27_3/__init__.py +++ b/src/swig-0_27_3/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.3" +__version__ = "0.16.4" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 3)) +__version_tuple__ = tuple((0, 16, 4)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/src/swig-0_27_3/datasets_wrap.cxx b/src/swig-0_27_3/datasets_wrap.cxx index 7efef7a..03c1742 100644 --- a/src/swig-0_27_3/datasets_wrap.cxx +++ b/src/swig-0_27_3/datasets_wrap.cxx @@ -6997,7 +6997,7 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -static PyTypeObject *builtin_bases[2]; +static PyTypeObject *builtin_bases[3]; /* ----------------------------------------------------------------------------- * Type initialization: @@ -7596,6 +7596,17 @@ SWIG_init(void) { SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; + builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); + if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { + builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; + } else { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcKey' as base 'Exiv2::Key' has not been initialized.\n"); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } builtin_bases[builtin_base_count] = NULL; SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); diff --git a/src/swig-0_27_3/exif_wrap.cxx b/src/swig-0_27_3/exif_wrap.cxx index e651827..0eea5d0 100644 --- a/src/swig-0_27_3/exif_wrap.cxx +++ b/src/swig-0_27_3/exif_wrap.cxx @@ -3937,51 +3937,52 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__ExifThumbC swig_types[10] #define SWIGTYPE_p_Exiv2__Exifdatum swig_types[11] #define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[13] -#define SWIGTYPE_p_Exiv2__Metadatum swig_types[14] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[15] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[16] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[17] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[18] -#define SWIGTYPE_p_Exiv2__Value swig_types[19] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[20] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[21] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[22] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[23] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[24] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[25] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[27] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[28] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[29] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[30] -#define SWIGTYPE_p_SwigPyObject swig_types[31] -#define SWIGTYPE_p_ValueType swig_types[32] -#define SWIGTYPE_p_allocator_type swig_types[33] -#define SWIGTYPE_p_char swig_types[34] -#define SWIGTYPE_p_const_iterator swig_types[35] -#define SWIGTYPE_p_difference_type swig_types[36] -#define SWIGTYPE_p_first_type swig_types[37] -#define SWIGTYPE_p_int swig_types[38] -#define SWIGTYPE_p_iterator swig_types[39] -#define SWIGTYPE_p_key_type swig_types[40] -#define SWIGTYPE_p_long_long swig_types[41] -#define SWIGTYPE_p_mapped_type swig_types[42] -#define SWIGTYPE_p_second_type swig_types[43] -#define SWIGTYPE_p_short swig_types[44] -#define SWIGTYPE_p_signed_char swig_types[45] -#define SWIGTYPE_p_size_type swig_types[46] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[47] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t__iterator swig_types[48] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[49] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[50] -#define SWIGTYPE_p_unsigned_char swig_types[51] -#define SWIGTYPE_p_unsigned_int swig_types[52] -#define SWIGTYPE_p_unsigned_long_long swig_types[53] -#define SWIGTYPE_p_unsigned_short swig_types[54] -#define SWIGTYPE_p_value_type swig_types[55] -static swig_type_info *swig_types[57]; -static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[13] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[14] +#define SWIGTYPE_p_Exiv2__Metadatum swig_types[15] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[16] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[17] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[18] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[19] +#define SWIGTYPE_p_Exiv2__Value swig_types[20] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[21] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[22] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[23] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[24] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[25] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[28] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[29] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[30] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[31] +#define SWIGTYPE_p_SwigPyObject swig_types[32] +#define SWIGTYPE_p_ValueType swig_types[33] +#define SWIGTYPE_p_allocator_type swig_types[34] +#define SWIGTYPE_p_char swig_types[35] +#define SWIGTYPE_p_const_iterator swig_types[36] +#define SWIGTYPE_p_difference_type swig_types[37] +#define SWIGTYPE_p_first_type swig_types[38] +#define SWIGTYPE_p_int swig_types[39] +#define SWIGTYPE_p_iterator swig_types[40] +#define SWIGTYPE_p_key_type swig_types[41] +#define SWIGTYPE_p_long_long swig_types[42] +#define SWIGTYPE_p_mapped_type swig_types[43] +#define SWIGTYPE_p_second_type swig_types[44] +#define SWIGTYPE_p_short swig_types[45] +#define SWIGTYPE_p_signed_char swig_types[46] +#define SWIGTYPE_p_size_type swig_types[47] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[48] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t__iterator swig_types[49] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[50] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[51] +#define SWIGTYPE_p_unsigned_char swig_types[52] +#define SWIGTYPE_p_unsigned_int swig_types[53] +#define SWIGTYPE_p_unsigned_long_long swig_types[54] +#define SWIGTYPE_p_unsigned_short swig_types[55] +#define SWIGTYPE_p_value_type swig_types[56] +static swig_type_info *swig_types[58]; +static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -11814,6 +11815,9 @@ static void *_p_ExifData_iteratorTo_p_ExifData_iterator_base(void *x, int *SWIGU static void *_p_Exiv2__ExifThumbTo_p_Exiv2__ExifThumbC(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::ExifThumbC *) ((Exiv2::ExifThumb *) x)); } +static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); +} static void *_p_Exiv2__ExifdatumTo_p_Exiv2__Metadatum(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Metadatum *) ((Exiv2::Exifdatum *) x)); } @@ -11905,6 +11909,7 @@ static swig_type_info _swigt__p_Exiv2__ExifThumb = {"_p_Exiv2__ExifThumb", "Exiv static swig_type_info _swigt__p_Exiv2__ExifThumbC = {"_p_Exiv2__ExifThumbC", "Exiv2::ExifThumbC *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__ExifThumbC_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__Exifdatum = {"_p_Exiv2__Exifdatum", "Exiv2::Exifdatum *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Exifdatum_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__GroupInfo = {"_p_Exiv2__GroupInfo", "Exiv2::GroupInfo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Metadatum = {"_p_Exiv2__Metadatum", "Exiv2::Metadatum *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; @@ -11963,6 +11968,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__ExifThumbC, &_swigt__p_Exiv2__Exifdatum, &_swigt__p_Exiv2__GroupInfo, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__Metadatum, &_swigt__p_Exiv2__StringValue, @@ -12021,6 +12027,7 @@ static swig_cast_info _swigc__p_Exiv2__ExifThumb[] = { {&_swigt__p_Exiv2__ExifT static swig_cast_info _swigc__p_Exiv2__ExifThumbC[] = { {&_swigt__p_Exiv2__ExifThumbC, 0, 0, 0}, {&_swigt__p_Exiv2__ExifThumb, _p_Exiv2__ExifThumbTo_p_Exiv2__ExifThumbC, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Exifdatum[] = { {&_swigt__p_Exiv2__Exifdatum, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__GroupInfo[] = { {&_swigt__p_Exiv2__GroupInfo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Metadatum[] = { {&_swigt__p_Exiv2__Metadatum, 0, 0, 0}, {&_swigt__p_Exiv2__Exifdatum, _p_Exiv2__ExifdatumTo_p_Exiv2__Metadatum, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -12079,6 +12086,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__ExifThumbC, _swigc__p_Exiv2__Exifdatum, _swigc__p_Exiv2__GroupInfo, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__Metadatum, _swigc__p_Exiv2__StringValue, diff --git a/src/swig-0_27_3/image_wrap.cxx b/src/swig-0_27_3/image_wrap.cxx index 3953151..3aeeb0b 100644 --- a/src/swig-0_27_3/image_wrap.cxx +++ b/src/swig-0_27_3/image_wrap.cxx @@ -3943,61 +3943,62 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__ImageFactory swig_types[15] #define SWIGTYPE_p_Exiv2__IptcData swig_types[16] #define SWIGTYPE_p_Exiv2__IptcKey swig_types[17] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[18] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[19] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[20] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[21] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[22] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[23] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[24] -#define SWIGTYPE_p_Exiv2__Value swig_types[25] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[34] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[35] -#define SWIGTYPE_p_Exiv2__XmpData swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[40] -#define SWIGTYPE_p_IptcData_iterator swig_types[41] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[42] -#define SWIGTYPE_p_SwigPyObject swig_types[43] -#define SWIGTYPE_p_ValueType swig_types[44] -#define SWIGTYPE_p_XmpData_iterator swig_types[45] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[46] -#define SWIGTYPE_p_allocator_type swig_types[47] -#define SWIGTYPE_p_char swig_types[48] -#define SWIGTYPE_p_const_iterator swig_types[49] -#define SWIGTYPE_p_difference_type swig_types[50] -#define SWIGTYPE_p_first_type swig_types[51] -#define SWIGTYPE_p_int swig_types[52] -#define SWIGTYPE_p_iterator swig_types[53] -#define SWIGTYPE_p_key_type swig_types[54] -#define SWIGTYPE_p_long_long swig_types[55] -#define SWIGTYPE_p_mapped_type swig_types[56] -#define SWIGTYPE_p_second_type swig_types[57] -#define SWIGTYPE_p_short swig_types[58] -#define SWIGTYPE_p_signed_char swig_types[59] -#define SWIGTYPE_p_size_type swig_types[60] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[61] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[62] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[63] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[65] -#define SWIGTYPE_p_unsigned_char swig_types[66] -#define SWIGTYPE_p_unsigned_int swig_types[67] -#define SWIGTYPE_p_unsigned_long_long swig_types[68] -#define SWIGTYPE_p_unsigned_short swig_types[69] -#define SWIGTYPE_p_value_type swig_types[70] -static swig_type_info *swig_types[72]; -static swig_module_info swig_module = {swig_types, 71, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[18] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[19] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[20] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] +#define SWIGTYPE_p_Exiv2__Value swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpData swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] +#define SWIGTYPE_p_IptcData_iterator swig_types[42] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] +#define SWIGTYPE_p_SwigPyObject swig_types[44] +#define SWIGTYPE_p_ValueType swig_types[45] +#define SWIGTYPE_p_XmpData_iterator swig_types[46] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] +#define SWIGTYPE_p_allocator_type swig_types[48] +#define SWIGTYPE_p_char swig_types[49] +#define SWIGTYPE_p_const_iterator swig_types[50] +#define SWIGTYPE_p_difference_type swig_types[51] +#define SWIGTYPE_p_first_type swig_types[52] +#define SWIGTYPE_p_int swig_types[53] +#define SWIGTYPE_p_iterator swig_types[54] +#define SWIGTYPE_p_key_type swig_types[55] +#define SWIGTYPE_p_long_long swig_types[56] +#define SWIGTYPE_p_mapped_type swig_types[57] +#define SWIGTYPE_p_second_type swig_types[58] +#define SWIGTYPE_p_short swig_types[59] +#define SWIGTYPE_p_signed_char swig_types[60] +#define SWIGTYPE_p_size_type swig_types[61] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] +#define SWIGTYPE_p_unsigned_char swig_types[67] +#define SWIGTYPE_p_unsigned_int swig_types[68] +#define SWIGTYPE_p_unsigned_long_long swig_types[69] +#define SWIGTYPE_p_unsigned_short swig_types[70] +#define SWIGTYPE_p_value_type swig_types[71] +static swig_type_info *swig_types[73]; +static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -7802,6 +7803,15 @@ static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(n static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } +static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); +} +static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::IptcKey *) x)); +} +static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } @@ -7898,6 +7908,7 @@ static swig_type_info _swigt__p_Exiv2__Image = {"_p_Exiv2__Image", "Exiv2::Image static swig_type_info _swigt__p_Exiv2__ImageFactory = {"_p_Exiv2__ImageFactory", "Exiv2::ImageFactory *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__ImageFactory_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__IptcData = {"_p_Exiv2__IptcData", "Exiv2::IptcData *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)0, 0}; @@ -7971,6 +7982,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__ImageFactory, &_swigt__p_Exiv2__IptcData, &_swigt__p_Exiv2__IptcKey, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__MemIo, &_swigt__p_Exiv2__RemoteIo, @@ -8044,6 +8056,7 @@ static swig_cast_info _swigc__p_Exiv2__Image[] = { {&_swigt__p_Exiv2__Image, 0, static swig_cast_info _swigc__p_Exiv2__ImageFactory[] = { {&_swigt__p_Exiv2__ImageFactory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcData[] = { {&_swigt__p_Exiv2__IptcData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; @@ -8117,6 +8130,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__ImageFactory, _swigc__p_Exiv2__IptcData, _swigc__p_Exiv2__IptcKey, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__MemIo, _swigc__p_Exiv2__RemoteIo, diff --git a/src/swig-0_27_3/iptc_wrap.cxx b/src/swig-0_27_3/iptc_wrap.cxx index 8078d4d..a44bc7c 100644 --- a/src/swig-0_27_3/iptc_wrap.cxx +++ b/src/swig-0_27_3/iptc_wrap.cxx @@ -3934,52 +3934,53 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__IptcData swig_types[7] #define SWIGTYPE_p_Exiv2__IptcKey swig_types[8] #define SWIGTYPE_p_Exiv2__Iptcdatum swig_types[9] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[10] -#define SWIGTYPE_p_Exiv2__Metadatum swig_types[11] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[12] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[13] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[14] -#define SWIGTYPE_p_Exiv2__Value swig_types[15] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[16] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[17] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[18] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[19] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[20] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[21] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[22] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[23] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[24] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[25] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[26] -#define SWIGTYPE_p_IptcData_iterator swig_types[27] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[28] -#define SWIGTYPE_p_SwigPyObject swig_types[29] -#define SWIGTYPE_p_ValueType swig_types[30] -#define SWIGTYPE_p_allocator_type swig_types[31] -#define SWIGTYPE_p_char swig_types[32] -#define SWIGTYPE_p_const_iterator swig_types[33] -#define SWIGTYPE_p_difference_type swig_types[34] -#define SWIGTYPE_p_first_type swig_types[35] -#define SWIGTYPE_p_int swig_types[36] -#define SWIGTYPE_p_iterator swig_types[37] -#define SWIGTYPE_p_key_type swig_types[38] -#define SWIGTYPE_p_long_long swig_types[39] -#define SWIGTYPE_p_mapped_type swig_types[40] -#define SWIGTYPE_p_second_type swig_types[41] -#define SWIGTYPE_p_short swig_types[42] -#define SWIGTYPE_p_signed_char swig_types[43] -#define SWIGTYPE_p_size_type swig_types[44] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[45] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[46] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[47] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t__iterator swig_types[48] -#define SWIGTYPE_p_unsigned_char swig_types[49] -#define SWIGTYPE_p_unsigned_int swig_types[50] -#define SWIGTYPE_p_unsigned_long_long swig_types[51] -#define SWIGTYPE_p_unsigned_short swig_types[52] -#define SWIGTYPE_p_value_type swig_types[53] -static swig_type_info *swig_types[55]; -static swig_module_info swig_module = {swig_types, 54, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[10] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[11] +#define SWIGTYPE_p_Exiv2__Metadatum swig_types[12] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[13] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[14] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[15] +#define SWIGTYPE_p_Exiv2__Value swig_types[16] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[17] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[18] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[19] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[20] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[21] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[22] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[23] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[24] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[25] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[26] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[27] +#define SWIGTYPE_p_IptcData_iterator swig_types[28] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[29] +#define SWIGTYPE_p_SwigPyObject swig_types[30] +#define SWIGTYPE_p_ValueType swig_types[31] +#define SWIGTYPE_p_allocator_type swig_types[32] +#define SWIGTYPE_p_char swig_types[33] +#define SWIGTYPE_p_const_iterator swig_types[34] +#define SWIGTYPE_p_difference_type swig_types[35] +#define SWIGTYPE_p_first_type swig_types[36] +#define SWIGTYPE_p_int swig_types[37] +#define SWIGTYPE_p_iterator swig_types[38] +#define SWIGTYPE_p_key_type swig_types[39] +#define SWIGTYPE_p_long_long swig_types[40] +#define SWIGTYPE_p_mapped_type swig_types[41] +#define SWIGTYPE_p_second_type swig_types[42] +#define SWIGTYPE_p_short swig_types[43] +#define SWIGTYPE_p_signed_char swig_types[44] +#define SWIGTYPE_p_size_type swig_types[45] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[46] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[47] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[48] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t__iterator swig_types[49] +#define SWIGTYPE_p_unsigned_char swig_types[50] +#define SWIGTYPE_p_unsigned_int swig_types[51] +#define SWIGTYPE_p_unsigned_long_long swig_types[52] +#define SWIGTYPE_p_unsigned_short swig_types[53] +#define SWIGTYPE_p_value_type swig_types[54] +static swig_type_info *swig_types[56]; +static swig_module_info swig_module = {swig_types, 55, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -10324,6 +10325,9 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcData_clientdata = {0, 0, 0 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::IptcKey *) x)); +} static void *_p_Exiv2__IptcdatumTo_p_Exiv2__Metadatum(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Metadatum *) ((Exiv2::Iptcdatum *) x)); } @@ -10415,6 +10419,7 @@ static swig_type_info _swigt__p_Exiv2__ExifData = {"_p_Exiv2__ExifData", "Exiv2: static swig_type_info _swigt__p_Exiv2__IptcData = {"_p_Exiv2__IptcData", "Exiv2::IptcData *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__IptcData_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Iptcdatum = {"_p_Exiv2__Iptcdatum", "Exiv2::Iptcdatum *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Iptcdatum_clientdata, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Metadatum = {"_p_Exiv2__Metadatum", "Exiv2::Metadatum *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; @@ -10471,6 +10476,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__IptcData, &_swigt__p_Exiv2__IptcKey, &_swigt__p_Exiv2__Iptcdatum, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__Metadatum, &_swigt__p_Exiv2__StringValue, @@ -10527,6 +10533,7 @@ static swig_cast_info _swigc__p_Exiv2__ExifData[] = { {&_swigt__p_Exiv2__ExifDa static swig_cast_info _swigc__p_Exiv2__IptcData[] = { {&_swigt__p_Exiv2__IptcData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Iptcdatum[] = { {&_swigt__p_Exiv2__Iptcdatum, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Metadatum[] = { {&_swigt__p_Exiv2__Metadatum, 0, 0, 0}, {&_swigt__p_Exiv2__Iptcdatum, _p_Exiv2__IptcdatumTo_p_Exiv2__Metadatum, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -10583,6 +10590,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__IptcData, _swigc__p_Exiv2__IptcKey, _swigc__p_Exiv2__Iptcdatum, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__Metadatum, _swigc__p_Exiv2__StringValue, diff --git a/src/swig-0_27_3/metadatum_wrap.cxx b/src/swig-0_27_3/metadatum_wrap.cxx index 97984e1..13a3ec3 100644 --- a/src/swig-0_27_3/metadatum_wrap.cxx +++ b/src/swig-0_27_3/metadatum_wrap.cxx @@ -3930,48 +3930,49 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__DataValue swig_types[3] #define SWIGTYPE_p_Exiv2__DateValue swig_types[4] #define SWIGTYPE_p_Exiv2__ExifData swig_types[5] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[6] -#define SWIGTYPE_p_Exiv2__Metadatum swig_types[7] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[8] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[9] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[10] -#define SWIGTYPE_p_Exiv2__Value swig_types[11] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[12] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[13] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[14] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[15] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[16] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[17] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[18] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[19] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[20] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[21] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[22] -#define SWIGTYPE_p_SwigPyObject swig_types[23] -#define SWIGTYPE_p_ValueType swig_types[24] -#define SWIGTYPE_p_allocator_type swig_types[25] -#define SWIGTYPE_p_char swig_types[26] -#define SWIGTYPE_p_const_iterator swig_types[27] -#define SWIGTYPE_p_difference_type swig_types[28] -#define SWIGTYPE_p_first_type swig_types[29] -#define SWIGTYPE_p_int swig_types[30] -#define SWIGTYPE_p_iterator swig_types[31] -#define SWIGTYPE_p_key_type swig_types[32] -#define SWIGTYPE_p_long_long swig_types[33] -#define SWIGTYPE_p_mapped_type swig_types[34] -#define SWIGTYPE_p_second_type swig_types[35] -#define SWIGTYPE_p_short swig_types[36] -#define SWIGTYPE_p_signed_char swig_types[37] -#define SWIGTYPE_p_size_type swig_types[38] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[39] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[40] -#define SWIGTYPE_p_unsigned_char swig_types[41] -#define SWIGTYPE_p_unsigned_int swig_types[42] -#define SWIGTYPE_p_unsigned_long_long swig_types[43] -#define SWIGTYPE_p_unsigned_short swig_types[44] -#define SWIGTYPE_p_value_type swig_types[45] -static swig_type_info *swig_types[47]; -static swig_module_info swig_module = {swig_types, 46, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[6] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[7] +#define SWIGTYPE_p_Exiv2__Metadatum swig_types[8] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[9] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[10] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[11] +#define SWIGTYPE_p_Exiv2__Value swig_types[12] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[13] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[14] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[15] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[16] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[17] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[18] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[19] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[20] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[21] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[22] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[23] +#define SWIGTYPE_p_SwigPyObject swig_types[24] +#define SWIGTYPE_p_ValueType swig_types[25] +#define SWIGTYPE_p_allocator_type swig_types[26] +#define SWIGTYPE_p_char swig_types[27] +#define SWIGTYPE_p_const_iterator swig_types[28] +#define SWIGTYPE_p_difference_type swig_types[29] +#define SWIGTYPE_p_first_type swig_types[30] +#define SWIGTYPE_p_int swig_types[31] +#define SWIGTYPE_p_iterator swig_types[32] +#define SWIGTYPE_p_key_type swig_types[33] +#define SWIGTYPE_p_long_long swig_types[34] +#define SWIGTYPE_p_mapped_type swig_types[35] +#define SWIGTYPE_p_second_type swig_types[36] +#define SWIGTYPE_p_short swig_types[37] +#define SWIGTYPE_p_signed_char swig_types[38] +#define SWIGTYPE_p_size_type swig_types[39] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[40] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[41] +#define SWIGTYPE_p_unsigned_char swig_types[42] +#define SWIGTYPE_p_unsigned_int swig_types[43] +#define SWIGTYPE_p_unsigned_long_long swig_types[44] +#define SWIGTYPE_p_unsigned_short swig_types[45] +#define SWIGTYPE_p_value_type swig_types[46] +static swig_type_info *swig_types[48]; +static swig_module_info swig_module = {swig_types, 47, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4249,6 +4250,31 @@ static void _set_python_exception() { }; +SWIGINTERNINLINE PyObject * +SWIG_From_std_string (const std::string& s) +{ + return SWIG_FromCharPtrAndSize(s.data(), s.size()); +} + + + #define SWIG_From_long PyInt_FromLong + + +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_unsigned_SS_short (unsigned short value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + /* Return string from Python obj. NOTE: obj must remain in scope in order to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */ SWIGINTERN int @@ -4374,13 +4400,6 @@ SWIGINTERNINLINE PyObject* } -SWIGINTERNINLINE PyObject * -SWIG_From_std_string (const std::string& s) -{ - return SWIG_FromCharPtrAndSize(s.data(), s.size()); -} - - static PyObject* PyEnum_Exiv2_ByteOrder = NULL; @@ -4395,24 +4414,6 @@ static PyObject* get_enum_typeobject_Exiv2_ByteOrder() { static PyObject* Py_IntEnum = NULL; - #define SWIG_From_long PyInt_FromLong - - -SWIGINTERNINLINE PyObject* -SWIG_From_unsigned_SS_long (unsigned long value) -{ - return (value > LONG_MAX) ? - PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_unsigned_SS_short (unsigned short value) -{ - return SWIG_From_unsigned_SS_long (value); -} - - static PyObject* PyEnum_Exiv2_TypeId = NULL; @@ -5133,6 +5134,213 @@ SWIGINTERN std::string Exiv2_Metadatum___str__(Exiv2::Metadatum *self){ #ifdef __cplusplus extern "C" { #endif +SWIGINTERN PyObject *_wrap_Key_key(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_key takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_key" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->key(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_familyName(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_familyName takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_familyName" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = (char *)((Exiv2::Key const *)arg1)->familyName(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_groupName(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_groupName takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_groupName" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->groupName(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_tagName(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_tagName takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_tagName" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->tagName(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_tagLabel(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_tagLabel takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_tagLabel" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->tagLabel(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_tag(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint16_t result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_tag takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_tag" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = (uint16_t)((Exiv2::Key const *)arg1)->tag(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_clone(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Exiv2::Key::AutoPtr result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_clone takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_clone" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->clone(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj((&result)->release(), SWIGTYPE_p_Exiv2__Key, SWIG_POINTER_OWN | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGPY_REPRFUNC_CLOSURE(_wrap_Key_key) /* defines _wrap_Key_key_reprfunc_closure */ + SWIGINTERN PyObject *_wrap_Metadatum_setValue__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Metadatum *arg1 = (Exiv2::Metadatum *) 0 ; @@ -6032,6 +6240,269 @@ static PyMethodDef SwigMethods[] = { { NULL, NULL, 0, NULL } }; +static SwigPyGetSet Key___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Key_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" + "Return the key of the metadatum as a string. The key is of the\n" + " form 'familyName.groupName.tagName'. Note however that the\n" + " key is not necessarily unique, e.g., an ExifData may contain\n" + " multiple metadata with the same key.\n" + "", &Key___dict___getset }, + { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ +}; + +SWIGINTERN PyObject * +SwigPyBuiltin__Exiv2__Key_richcompare(PyObject *self, PyObject *other, int op) { + PyObject *result = NULL; + PyObject *tuple = PyTuple_New(1); + assert(tuple); + PyTuple_SET_ITEM(tuple, 0, other); + Py_XINCREF(other); + if (!result && !PyErr_Occurred()) { + if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { + result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); + } else { + result = Py_NotImplemented; + Py_INCREF(result); + } + } + Py_DECREF(tuple); + return result; +} + +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Key_methods[] = { + { "key", _wrap_Key_key, METH_VARARGS, "\n" + "Return the key of the metadatum as a string. The key is of the\n" + " form 'familyName.groupName.tagName'. Note however that the\n" + " key is not necessarily unique, e.g., an ExifData may contain\n" + " multiple metadata with the same key.\n" + "" }, + { "familyName", _wrap_Key_familyName, METH_VARARGS, " Return an identifier for the type of metadata (the first part of the key)" }, + { "groupName", _wrap_Key_groupName, METH_VARARGS, " Return the name of the group (the second part of the key)" }, + { "tagName", _wrap_Key_tagName, METH_VARARGS, " Return the name of the tag (which is also the third part of the key)" }, + { "tagLabel", _wrap_Key_tagLabel, METH_VARARGS, " Return a label for the tag" }, + { "tag", _wrap_Key_tag, METH_VARARGS, " Return the tag number" }, + { "clone", _wrap_Key_clone, METH_VARARGS, "\n" + "Return an auto-pointer to a copy of itself (deep copy).\n" + " The caller owns this copy and the auto-pointer ensures that it\n" + " will be deleted.\n" + "" }, + { NULL, NULL, 0, NULL } /* Sentinel */ +}; + +static PyHeapTypeObject SwigPyBuiltin__Exiv2__Key_type = { + { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "exiv2.metadatum.Key", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 + (printfunc) 0, /* tp_print */ +#else + (Py_ssize_t) 0, /* tp_vectorcall_offset */ +#endif + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Key_type.as_number,/* tp_as_number */ + &SwigPyBuiltin__Exiv2__Key_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Key_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_Key_key_reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Key_type.as_buffer,/* tp_as_buffer */ +#if PY_VERSION_HEX >= 0x03000000 + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ +#else + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ +#endif + "\n" + "Abstract base class defining the %Key of a metadatum.\n" + " Keys are used to identify and group metadata.\n" + "",/* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Key_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Key_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Key_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + (destructor) 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + (vectorcallfunc) 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#if PY_VERSION_HEX >= 0x030c0000 + (char) 0, /* tp_watched */ +#endif +#ifdef COUNT_ALLOCS + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ +#endif + }, +#if PY_VERSION_HEX >= 0x03050000 + { + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ +# if PY_VERSION_HEX >= 0x030a0000 + (sendfunc) 0, /* am_send */ +# endif + }, +#endif + { + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ +#if PY_VERSION_HEX < 0x03000000 + (coercion) 0, /* nb_coerce */ +#endif + (unaryfunc) 0, /* nb_int */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* nb_reserved */ +#else + (unaryfunc) 0, /* nb_long */ +#endif + (unaryfunc) 0, /* nb_float */ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ +#endif + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ +#if PY_VERSION_HEX >= 0x03050000 + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ +#endif + }, + { + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ + }, + { + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* was_sq_slice */ +#else + (ssizessizeargfunc) 0, /* sq_slice */ +#endif + (ssizeobjargproc) 0, /* sq_ass_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* was_sq_ass_slice */ +#else + (ssizessizeobjargproc) 0, /* sq_ass_slice */ +#endif + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ + }, + { +#if PY_VERSION_HEX < 0x03000000 + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ +#endif + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ + }, + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ +#if PY_VERSION_HEX >= 0x03030000 + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ +#endif +#if PY_VERSION_HEX >= 0x03090000 + (PyObject *) 0, /* ht_module */ +#endif +#if PY_VERSION_HEX >= 0x030b0000 + (char *) 0, /* _ht_tpname */ + { + (PyObject *) 0, /* getitem */ +#if PY_VERSION_HEX >= 0x030c0000 + (uint32_t) 0, /* getitem_version */ +#endif + } +#endif +}; + +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Key_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Key_type}; + static SwigPyGetSet Metadatum___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Metadatum_getset[] = { { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" @@ -6478,6 +6949,7 @@ static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::D static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DateValue = {"_p_Exiv2__DateValue", "Exiv2::DateValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifData = {"_p_Exiv2__ExifData", "Exiv2::ExifData *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Key_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Metadatum = {"_p_Exiv2__Metadatum", "Exiv2::Metadatum *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Metadatum_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; @@ -6526,6 +6998,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__DataValue, &_swigt__p_Exiv2__DateValue, &_swigt__p_Exiv2__ExifData, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__Metadatum, &_swigt__p_Exiv2__StringValue, @@ -6574,6 +7047,7 @@ static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DateValue[] = { {&_swigt__p_Exiv2__DateValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifData[] = { {&_swigt__p_Exiv2__ExifData, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Metadatum[] = { {&_swigt__p_Exiv2__Metadatum, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -6622,6 +7096,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__DataValue, _swigc__p_Exiv2__DateValue, _swigc__p_Exiv2__ExifData, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__Metadatum, _swigc__p_Exiv2__StringValue, @@ -7146,6 +7621,29 @@ SWIG_init(void) { } + /* type 'Exiv2::Key' */ + builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Key_type; + builtin_pytype->tp_dict = d = PyDict_New(); + SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); + builtin_pytype->tp_new = PyType_GenericNew; + builtin_base_count = 0; + builtin_bases[builtin_base_count] = NULL; + SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); + PyDict_SetItemString(d, "this", this_descr); + PyDict_SetItemString(d, "thisown", thisown_descr); + if (PyType_Ready(builtin_pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Key'."); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } + Py_INCREF(builtin_pytype); + PyModule_AddObject(m, "Key", (PyObject *)builtin_pytype); + SwigPyBuiltin_AddPublicSymbol(public_interface, "Key"); + d = md; + /* type 'Exiv2::Metadatum' */ builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Metadatum_type; builtin_pytype->tp_dict = d = PyDict_New(); diff --git a/src/swig-0_27_3/preview_wrap.cxx b/src/swig-0_27_3/preview_wrap.cxx index decc371..400b541 100644 --- a/src/swig-0_27_3/preview_wrap.cxx +++ b/src/swig-0_27_3/preview_wrap.cxx @@ -3942,64 +3942,65 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__HttpIo swig_types[12] #define SWIGTYPE_p_Exiv2__Image swig_types[13] #define SWIGTYPE_p_Exiv2__IptcKey swig_types[14] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[15] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[16] -#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[17] -#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[18] -#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[19] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[20] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[21] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[22] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[23] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[24] -#define SWIGTYPE_p_Exiv2__Value swig_types[25] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[34] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[35] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[39] -#define SWIGTYPE_p_IptcData_iterator swig_types[40] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[41] -#define SWIGTYPE_p_SwigPyObject swig_types[42] -#define SWIGTYPE_p_ValueType swig_types[43] -#define SWIGTYPE_p_XmpData_iterator swig_types[44] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[45] -#define SWIGTYPE_p_allocator_type swig_types[46] -#define SWIGTYPE_p_char swig_types[47] -#define SWIGTYPE_p_const_iterator swig_types[48] -#define SWIGTYPE_p_difference_type swig_types[49] -#define SWIGTYPE_p_first_type swig_types[50] -#define SWIGTYPE_p_int swig_types[51] -#define SWIGTYPE_p_iterator swig_types[52] -#define SWIGTYPE_p_key_type swig_types[53] -#define SWIGTYPE_p_long_long swig_types[54] -#define SWIGTYPE_p_mapped_type swig_types[55] -#define SWIGTYPE_p_second_type swig_types[56] -#define SWIGTYPE_p_short swig_types[57] -#define SWIGTYPE_p_signed_char swig_types[58] -#define SWIGTYPE_p_size_type swig_types[59] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[60] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[61] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[62] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[63] -#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[65] -#define SWIGTYPE_p_unsigned_char swig_types[66] -#define SWIGTYPE_p_unsigned_int swig_types[67] -#define SWIGTYPE_p_unsigned_long_long swig_types[68] -#define SWIGTYPE_p_unsigned_short swig_types[69] -#define SWIGTYPE_p_value_type swig_types[70] -static swig_type_info *swig_types[72]; -static swig_module_info swig_module = {swig_types, 71, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[15] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[16] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[17] +#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[18] +#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[19] +#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[20] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] +#define SWIGTYPE_p_Exiv2__Value swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[40] +#define SWIGTYPE_p_IptcData_iterator swig_types[41] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[42] +#define SWIGTYPE_p_SwigPyObject swig_types[43] +#define SWIGTYPE_p_ValueType swig_types[44] +#define SWIGTYPE_p_XmpData_iterator swig_types[45] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[46] +#define SWIGTYPE_p_allocator_type swig_types[47] +#define SWIGTYPE_p_char swig_types[48] +#define SWIGTYPE_p_const_iterator swig_types[49] +#define SWIGTYPE_p_difference_type swig_types[50] +#define SWIGTYPE_p_first_type swig_types[51] +#define SWIGTYPE_p_int swig_types[52] +#define SWIGTYPE_p_iterator swig_types[53] +#define SWIGTYPE_p_key_type swig_types[54] +#define SWIGTYPE_p_long_long swig_types[55] +#define SWIGTYPE_p_mapped_type swig_types[56] +#define SWIGTYPE_p_second_type swig_types[57] +#define SWIGTYPE_p_short swig_types[58] +#define SWIGTYPE_p_signed_char swig_types[59] +#define SWIGTYPE_p_size_type swig_types[60] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[61] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[62] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[63] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] +#define SWIGTYPE_p_unsigned_char swig_types[67] +#define SWIGTYPE_p_unsigned_int swig_types[68] +#define SWIGTYPE_p_unsigned_long_long swig_types[69] +#define SWIGTYPE_p_unsigned_short swig_types[70] +#define SWIGTYPE_p_value_type swig_types[71] +static swig_type_info *swig_types[73]; +static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -7444,6 +7445,15 @@ static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(n static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } +static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); +} +static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::IptcKey *) x)); +} +static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } @@ -7537,6 +7547,7 @@ static swig_type_info _swigt__p_Exiv2__GroupInfo = {"_p_Exiv2__GroupInfo", "Exiv static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Image = {"_p_Exiv2__Image", "Exiv2::Image *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__PreviewImage = {"_p_Exiv2__PreviewImage", "Exiv2::PreviewImage *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__PreviewImage_clientdata, 0}; @@ -7610,6 +7621,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__HttpIo, &_swigt__p_Exiv2__Image, &_swigt__p_Exiv2__IptcKey, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__MemIo, &_swigt__p_Exiv2__PreviewImage, @@ -7683,6 +7695,7 @@ static swig_cast_info _swigc__p_Exiv2__GroupInfo[] = { {&_swigt__p_Exiv2__Group static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Image[] = { {&_swigt__p_Exiv2__Image, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewImage[] = { {&_swigt__p_Exiv2__PreviewImage, 0, 0, 0},{0, 0, 0, 0}}; @@ -7756,6 +7769,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__HttpIo, _swigc__p_Exiv2__Image, _swigc__p_Exiv2__IptcKey, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__MemIo, _swigc__p_Exiv2__PreviewImage, diff --git a/src/swig-0_27_3/properties_wrap.cxx b/src/swig-0_27_3/properties_wrap.cxx index 5ad7e8e..c48945d 100644 --- a/src/swig-0_27_3/properties_wrap.cxx +++ b/src/swig-0_27_3/properties_wrap.cxx @@ -7634,7 +7634,7 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -static PyTypeObject *builtin_bases[2]; +static PyTypeObject *builtin_bases[3]; /* ----------------------------------------------------------------------------- * Type initialization: @@ -8195,6 +8195,17 @@ SWIG_init(void) { SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; + builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); + if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { + builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; + } else { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpKey' as base 'Exiv2::Key' has not been initialized.\n"); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } builtin_bases[builtin_base_count] = NULL; SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); diff --git a/src/swig-0_27_3/tags_wrap.cxx b/src/swig-0_27_3/tags_wrap.cxx index f5aa5ac..f2e29e4 100644 --- a/src/swig-0_27_3/tags_wrap.cxx +++ b/src/swig-0_27_3/tags_wrap.cxx @@ -7754,7 +7754,7 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -static PyTypeObject *builtin_bases[2]; +static PyTypeObject *builtin_bases[3]; /* ----------------------------------------------------------------------------- * Type initialization: @@ -8325,6 +8325,17 @@ SWIG_init(void) { SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; + builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); + if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { + builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; + } else { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifKey' as base 'Exiv2::Key' has not been initialized.\n"); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } builtin_bases[builtin_base_count] = NULL; SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); diff --git a/src/swig-0_27_3/xmp_wrap.cxx b/src/swig-0_27_3/xmp_wrap.cxx index 7f33ffe..d9a574e 100644 --- a/src/swig-0_27_3/xmp_wrap.cxx +++ b/src/swig-0_27_3/xmp_wrap.cxx @@ -3930,58 +3930,59 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__DataValue swig_types[3] #define SWIGTYPE_p_Exiv2__DateValue swig_types[4] #define SWIGTYPE_p_Exiv2__ExifData swig_types[5] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[6] -#define SWIGTYPE_p_Exiv2__Metadatum swig_types[7] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[8] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[9] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[10] -#define SWIGTYPE_p_Exiv2__Value swig_types[11] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[12] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[13] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[14] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[15] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[16] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[17] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[18] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[19] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[20] -#define SWIGTYPE_p_Exiv2__XmpData swig_types[21] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[22] -#define SWIGTYPE_p_Exiv2__XmpParser swig_types[23] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[24] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[25] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[26] -#define SWIGTYPE_p_Exiv2__Xmpdatum swig_types[27] -#define SWIGTYPE_p_SwigPyObject swig_types[28] -#define SWIGTYPE_p_ValueType swig_types[29] -#define SWIGTYPE_p_XmpData_iterator swig_types[30] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[31] -#define SWIGTYPE_p_allocator_type swig_types[32] -#define SWIGTYPE_p_char swig_types[33] -#define SWIGTYPE_p_const_iterator swig_types[34] -#define SWIGTYPE_p_difference_type swig_types[35] -#define SWIGTYPE_p_f_p_void_bool__void swig_types[36] -#define SWIGTYPE_p_first_type swig_types[37] -#define SWIGTYPE_p_int swig_types[38] -#define SWIGTYPE_p_iterator swig_types[39] -#define SWIGTYPE_p_key_type swig_types[40] -#define SWIGTYPE_p_long_long swig_types[41] -#define SWIGTYPE_p_mapped_type swig_types[42] -#define SWIGTYPE_p_second_type swig_types[43] -#define SWIGTYPE_p_short swig_types[44] -#define SWIGTYPE_p_signed_char swig_types[45] -#define SWIGTYPE_p_size_type swig_types[46] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[47] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[48] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[49] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t__iterator swig_types[50] -#define SWIGTYPE_p_unsigned_char swig_types[51] -#define SWIGTYPE_p_unsigned_int swig_types[52] -#define SWIGTYPE_p_unsigned_long_long swig_types[53] -#define SWIGTYPE_p_unsigned_short swig_types[54] -#define SWIGTYPE_p_value_type swig_types[55] -static swig_type_info *swig_types[57]; -static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[6] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[7] +#define SWIGTYPE_p_Exiv2__Metadatum swig_types[8] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[9] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[10] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[11] +#define SWIGTYPE_p_Exiv2__Value swig_types[12] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[13] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[14] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[15] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[16] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[17] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[18] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[19] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[20] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[21] +#define SWIGTYPE_p_Exiv2__XmpData swig_types[22] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[23] +#define SWIGTYPE_p_Exiv2__XmpParser swig_types[24] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[25] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[26] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[27] +#define SWIGTYPE_p_Exiv2__Xmpdatum swig_types[28] +#define SWIGTYPE_p_SwigPyObject swig_types[29] +#define SWIGTYPE_p_ValueType swig_types[30] +#define SWIGTYPE_p_XmpData_iterator swig_types[31] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[32] +#define SWIGTYPE_p_allocator_type swig_types[33] +#define SWIGTYPE_p_char swig_types[34] +#define SWIGTYPE_p_const_iterator swig_types[35] +#define SWIGTYPE_p_difference_type swig_types[36] +#define SWIGTYPE_p_f_p_void_bool__void swig_types[37] +#define SWIGTYPE_p_first_type swig_types[38] +#define SWIGTYPE_p_int swig_types[39] +#define SWIGTYPE_p_iterator swig_types[40] +#define SWIGTYPE_p_key_type swig_types[41] +#define SWIGTYPE_p_long_long swig_types[42] +#define SWIGTYPE_p_mapped_type swig_types[43] +#define SWIGTYPE_p_second_type swig_types[44] +#define SWIGTYPE_p_short swig_types[45] +#define SWIGTYPE_p_signed_char swig_types[46] +#define SWIGTYPE_p_size_type swig_types[47] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[48] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[49] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[50] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t__iterator swig_types[51] +#define SWIGTYPE_p_unsigned_char swig_types[52] +#define SWIGTYPE_p_unsigned_int swig_types[53] +#define SWIGTYPE_p_unsigned_long_long swig_types[54] +#define SWIGTYPE_p_unsigned_short swig_types[55] +#define SWIGTYPE_p_value_type swig_types[56] +static swig_type_info *swig_types[58]; +static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -10641,6 +10642,9 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpParser_clientdata = {0, 0, /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); +} static void *_p_Exiv2__XmpdatumTo_p_Exiv2__Metadatum(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Metadatum *) ((Exiv2::Xmpdatum *) x)); } @@ -10728,6 +10732,7 @@ static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::D static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DateValue = {"_p_Exiv2__DateValue", "Exiv2::DateValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifData = {"_p_Exiv2__ExifData", "Exiv2::ExifData *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Metadatum = {"_p_Exiv2__Metadatum", "Exiv2::Metadatum *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; @@ -10786,6 +10791,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__DataValue, &_swigt__p_Exiv2__DateValue, &_swigt__p_Exiv2__ExifData, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__Metadatum, &_swigt__p_Exiv2__StringValue, @@ -10844,6 +10850,7 @@ static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DateValue[] = { {&_swigt__p_Exiv2__DateValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifData[] = { {&_swigt__p_Exiv2__ExifData, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Metadatum[] = { {&_swigt__p_Exiv2__Metadatum, 0, 0, 0}, {&_swigt__p_Exiv2__Xmpdatum, _p_Exiv2__XmpdatumTo_p_Exiv2__Metadatum, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -10902,6 +10909,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__DataValue, _swigc__p_Exiv2__DateValue, _swigc__p_Exiv2__ExifData, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__Metadatum, _swigc__p_Exiv2__StringValue, diff --git a/src/swig-0_27_7/__init__.py b/src/swig-0_27_7/__init__.py index 8e57b0d..85c136a 100644 --- a/src/swig-0_27_7/__init__.py +++ b/src/swig-0_27_7/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.3" +__version__ = "0.16.4" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 3)) +__version_tuple__ = tuple((0, 16, 4)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/src/swig-0_27_7/datasets_wrap.cxx b/src/swig-0_27_7/datasets_wrap.cxx index 7efef7a..03c1742 100644 --- a/src/swig-0_27_7/datasets_wrap.cxx +++ b/src/swig-0_27_7/datasets_wrap.cxx @@ -6997,7 +6997,7 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -static PyTypeObject *builtin_bases[2]; +static PyTypeObject *builtin_bases[3]; /* ----------------------------------------------------------------------------- * Type initialization: @@ -7596,6 +7596,17 @@ SWIG_init(void) { SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; + builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); + if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { + builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; + } else { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcKey' as base 'Exiv2::Key' has not been initialized.\n"); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } builtin_bases[builtin_base_count] = NULL; SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); diff --git a/src/swig-0_27_7/exif_wrap.cxx b/src/swig-0_27_7/exif_wrap.cxx index e651827..0eea5d0 100644 --- a/src/swig-0_27_7/exif_wrap.cxx +++ b/src/swig-0_27_7/exif_wrap.cxx @@ -3937,51 +3937,52 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__ExifThumbC swig_types[10] #define SWIGTYPE_p_Exiv2__Exifdatum swig_types[11] #define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[13] -#define SWIGTYPE_p_Exiv2__Metadatum swig_types[14] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[15] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[16] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[17] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[18] -#define SWIGTYPE_p_Exiv2__Value swig_types[19] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[20] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[21] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[22] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[23] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[24] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[25] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[27] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[28] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[29] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[30] -#define SWIGTYPE_p_SwigPyObject swig_types[31] -#define SWIGTYPE_p_ValueType swig_types[32] -#define SWIGTYPE_p_allocator_type swig_types[33] -#define SWIGTYPE_p_char swig_types[34] -#define SWIGTYPE_p_const_iterator swig_types[35] -#define SWIGTYPE_p_difference_type swig_types[36] -#define SWIGTYPE_p_first_type swig_types[37] -#define SWIGTYPE_p_int swig_types[38] -#define SWIGTYPE_p_iterator swig_types[39] -#define SWIGTYPE_p_key_type swig_types[40] -#define SWIGTYPE_p_long_long swig_types[41] -#define SWIGTYPE_p_mapped_type swig_types[42] -#define SWIGTYPE_p_second_type swig_types[43] -#define SWIGTYPE_p_short swig_types[44] -#define SWIGTYPE_p_signed_char swig_types[45] -#define SWIGTYPE_p_size_type swig_types[46] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[47] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t__iterator swig_types[48] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[49] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[50] -#define SWIGTYPE_p_unsigned_char swig_types[51] -#define SWIGTYPE_p_unsigned_int swig_types[52] -#define SWIGTYPE_p_unsigned_long_long swig_types[53] -#define SWIGTYPE_p_unsigned_short swig_types[54] -#define SWIGTYPE_p_value_type swig_types[55] -static swig_type_info *swig_types[57]; -static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[13] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[14] +#define SWIGTYPE_p_Exiv2__Metadatum swig_types[15] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[16] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[17] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[18] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[19] +#define SWIGTYPE_p_Exiv2__Value swig_types[20] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[21] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[22] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[23] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[24] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[25] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[28] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[29] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[30] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[31] +#define SWIGTYPE_p_SwigPyObject swig_types[32] +#define SWIGTYPE_p_ValueType swig_types[33] +#define SWIGTYPE_p_allocator_type swig_types[34] +#define SWIGTYPE_p_char swig_types[35] +#define SWIGTYPE_p_const_iterator swig_types[36] +#define SWIGTYPE_p_difference_type swig_types[37] +#define SWIGTYPE_p_first_type swig_types[38] +#define SWIGTYPE_p_int swig_types[39] +#define SWIGTYPE_p_iterator swig_types[40] +#define SWIGTYPE_p_key_type swig_types[41] +#define SWIGTYPE_p_long_long swig_types[42] +#define SWIGTYPE_p_mapped_type swig_types[43] +#define SWIGTYPE_p_second_type swig_types[44] +#define SWIGTYPE_p_short swig_types[45] +#define SWIGTYPE_p_signed_char swig_types[46] +#define SWIGTYPE_p_size_type swig_types[47] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[48] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t__iterator swig_types[49] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[50] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[51] +#define SWIGTYPE_p_unsigned_char swig_types[52] +#define SWIGTYPE_p_unsigned_int swig_types[53] +#define SWIGTYPE_p_unsigned_long_long swig_types[54] +#define SWIGTYPE_p_unsigned_short swig_types[55] +#define SWIGTYPE_p_value_type swig_types[56] +static swig_type_info *swig_types[58]; +static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -11814,6 +11815,9 @@ static void *_p_ExifData_iteratorTo_p_ExifData_iterator_base(void *x, int *SWIGU static void *_p_Exiv2__ExifThumbTo_p_Exiv2__ExifThumbC(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::ExifThumbC *) ((Exiv2::ExifThumb *) x)); } +static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); +} static void *_p_Exiv2__ExifdatumTo_p_Exiv2__Metadatum(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Metadatum *) ((Exiv2::Exifdatum *) x)); } @@ -11905,6 +11909,7 @@ static swig_type_info _swigt__p_Exiv2__ExifThumb = {"_p_Exiv2__ExifThumb", "Exiv static swig_type_info _swigt__p_Exiv2__ExifThumbC = {"_p_Exiv2__ExifThumbC", "Exiv2::ExifThumbC *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__ExifThumbC_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__Exifdatum = {"_p_Exiv2__Exifdatum", "Exiv2::Exifdatum *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Exifdatum_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__GroupInfo = {"_p_Exiv2__GroupInfo", "Exiv2::GroupInfo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Metadatum = {"_p_Exiv2__Metadatum", "Exiv2::Metadatum *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; @@ -11963,6 +11968,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__ExifThumbC, &_swigt__p_Exiv2__Exifdatum, &_swigt__p_Exiv2__GroupInfo, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__Metadatum, &_swigt__p_Exiv2__StringValue, @@ -12021,6 +12027,7 @@ static swig_cast_info _swigc__p_Exiv2__ExifThumb[] = { {&_swigt__p_Exiv2__ExifT static swig_cast_info _swigc__p_Exiv2__ExifThumbC[] = { {&_swigt__p_Exiv2__ExifThumbC, 0, 0, 0}, {&_swigt__p_Exiv2__ExifThumb, _p_Exiv2__ExifThumbTo_p_Exiv2__ExifThumbC, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Exifdatum[] = { {&_swigt__p_Exiv2__Exifdatum, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__GroupInfo[] = { {&_swigt__p_Exiv2__GroupInfo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Metadatum[] = { {&_swigt__p_Exiv2__Metadatum, 0, 0, 0}, {&_swigt__p_Exiv2__Exifdatum, _p_Exiv2__ExifdatumTo_p_Exiv2__Metadatum, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -12079,6 +12086,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__ExifThumbC, _swigc__p_Exiv2__Exifdatum, _swigc__p_Exiv2__GroupInfo, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__Metadatum, _swigc__p_Exiv2__StringValue, diff --git a/src/swig-0_27_7/image_wrap.cxx b/src/swig-0_27_7/image_wrap.cxx index 3953151..3aeeb0b 100644 --- a/src/swig-0_27_7/image_wrap.cxx +++ b/src/swig-0_27_7/image_wrap.cxx @@ -3943,61 +3943,62 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__ImageFactory swig_types[15] #define SWIGTYPE_p_Exiv2__IptcData swig_types[16] #define SWIGTYPE_p_Exiv2__IptcKey swig_types[17] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[18] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[19] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[20] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[21] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[22] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[23] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[24] -#define SWIGTYPE_p_Exiv2__Value swig_types[25] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[34] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[35] -#define SWIGTYPE_p_Exiv2__XmpData swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[40] -#define SWIGTYPE_p_IptcData_iterator swig_types[41] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[42] -#define SWIGTYPE_p_SwigPyObject swig_types[43] -#define SWIGTYPE_p_ValueType swig_types[44] -#define SWIGTYPE_p_XmpData_iterator swig_types[45] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[46] -#define SWIGTYPE_p_allocator_type swig_types[47] -#define SWIGTYPE_p_char swig_types[48] -#define SWIGTYPE_p_const_iterator swig_types[49] -#define SWIGTYPE_p_difference_type swig_types[50] -#define SWIGTYPE_p_first_type swig_types[51] -#define SWIGTYPE_p_int swig_types[52] -#define SWIGTYPE_p_iterator swig_types[53] -#define SWIGTYPE_p_key_type swig_types[54] -#define SWIGTYPE_p_long_long swig_types[55] -#define SWIGTYPE_p_mapped_type swig_types[56] -#define SWIGTYPE_p_second_type swig_types[57] -#define SWIGTYPE_p_short swig_types[58] -#define SWIGTYPE_p_signed_char swig_types[59] -#define SWIGTYPE_p_size_type swig_types[60] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[61] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[62] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[63] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[65] -#define SWIGTYPE_p_unsigned_char swig_types[66] -#define SWIGTYPE_p_unsigned_int swig_types[67] -#define SWIGTYPE_p_unsigned_long_long swig_types[68] -#define SWIGTYPE_p_unsigned_short swig_types[69] -#define SWIGTYPE_p_value_type swig_types[70] -static swig_type_info *swig_types[72]; -static swig_module_info swig_module = {swig_types, 71, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[18] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[19] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[20] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] +#define SWIGTYPE_p_Exiv2__Value swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpData swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] +#define SWIGTYPE_p_IptcData_iterator swig_types[42] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] +#define SWIGTYPE_p_SwigPyObject swig_types[44] +#define SWIGTYPE_p_ValueType swig_types[45] +#define SWIGTYPE_p_XmpData_iterator swig_types[46] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] +#define SWIGTYPE_p_allocator_type swig_types[48] +#define SWIGTYPE_p_char swig_types[49] +#define SWIGTYPE_p_const_iterator swig_types[50] +#define SWIGTYPE_p_difference_type swig_types[51] +#define SWIGTYPE_p_first_type swig_types[52] +#define SWIGTYPE_p_int swig_types[53] +#define SWIGTYPE_p_iterator swig_types[54] +#define SWIGTYPE_p_key_type swig_types[55] +#define SWIGTYPE_p_long_long swig_types[56] +#define SWIGTYPE_p_mapped_type swig_types[57] +#define SWIGTYPE_p_second_type swig_types[58] +#define SWIGTYPE_p_short swig_types[59] +#define SWIGTYPE_p_signed_char swig_types[60] +#define SWIGTYPE_p_size_type swig_types[61] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] +#define SWIGTYPE_p_unsigned_char swig_types[67] +#define SWIGTYPE_p_unsigned_int swig_types[68] +#define SWIGTYPE_p_unsigned_long_long swig_types[69] +#define SWIGTYPE_p_unsigned_short swig_types[70] +#define SWIGTYPE_p_value_type swig_types[71] +static swig_type_info *swig_types[73]; +static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -7802,6 +7803,15 @@ static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(n static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } +static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); +} +static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::IptcKey *) x)); +} +static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } @@ -7898,6 +7908,7 @@ static swig_type_info _swigt__p_Exiv2__Image = {"_p_Exiv2__Image", "Exiv2::Image static swig_type_info _swigt__p_Exiv2__ImageFactory = {"_p_Exiv2__ImageFactory", "Exiv2::ImageFactory *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__ImageFactory_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__IptcData = {"_p_Exiv2__IptcData", "Exiv2::IptcData *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)0, 0}; @@ -7971,6 +7982,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__ImageFactory, &_swigt__p_Exiv2__IptcData, &_swigt__p_Exiv2__IptcKey, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__MemIo, &_swigt__p_Exiv2__RemoteIo, @@ -8044,6 +8056,7 @@ static swig_cast_info _swigc__p_Exiv2__Image[] = { {&_swigt__p_Exiv2__Image, 0, static swig_cast_info _swigc__p_Exiv2__ImageFactory[] = { {&_swigt__p_Exiv2__ImageFactory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcData[] = { {&_swigt__p_Exiv2__IptcData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; @@ -8117,6 +8130,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__ImageFactory, _swigc__p_Exiv2__IptcData, _swigc__p_Exiv2__IptcKey, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__MemIo, _swigc__p_Exiv2__RemoteIo, diff --git a/src/swig-0_27_7/iptc_wrap.cxx b/src/swig-0_27_7/iptc_wrap.cxx index 8078d4d..a44bc7c 100644 --- a/src/swig-0_27_7/iptc_wrap.cxx +++ b/src/swig-0_27_7/iptc_wrap.cxx @@ -3934,52 +3934,53 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__IptcData swig_types[7] #define SWIGTYPE_p_Exiv2__IptcKey swig_types[8] #define SWIGTYPE_p_Exiv2__Iptcdatum swig_types[9] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[10] -#define SWIGTYPE_p_Exiv2__Metadatum swig_types[11] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[12] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[13] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[14] -#define SWIGTYPE_p_Exiv2__Value swig_types[15] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[16] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[17] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[18] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[19] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[20] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[21] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[22] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[23] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[24] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[25] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[26] -#define SWIGTYPE_p_IptcData_iterator swig_types[27] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[28] -#define SWIGTYPE_p_SwigPyObject swig_types[29] -#define SWIGTYPE_p_ValueType swig_types[30] -#define SWIGTYPE_p_allocator_type swig_types[31] -#define SWIGTYPE_p_char swig_types[32] -#define SWIGTYPE_p_const_iterator swig_types[33] -#define SWIGTYPE_p_difference_type swig_types[34] -#define SWIGTYPE_p_first_type swig_types[35] -#define SWIGTYPE_p_int swig_types[36] -#define SWIGTYPE_p_iterator swig_types[37] -#define SWIGTYPE_p_key_type swig_types[38] -#define SWIGTYPE_p_long_long swig_types[39] -#define SWIGTYPE_p_mapped_type swig_types[40] -#define SWIGTYPE_p_second_type swig_types[41] -#define SWIGTYPE_p_short swig_types[42] -#define SWIGTYPE_p_signed_char swig_types[43] -#define SWIGTYPE_p_size_type swig_types[44] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[45] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[46] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[47] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t__iterator swig_types[48] -#define SWIGTYPE_p_unsigned_char swig_types[49] -#define SWIGTYPE_p_unsigned_int swig_types[50] -#define SWIGTYPE_p_unsigned_long_long swig_types[51] -#define SWIGTYPE_p_unsigned_short swig_types[52] -#define SWIGTYPE_p_value_type swig_types[53] -static swig_type_info *swig_types[55]; -static swig_module_info swig_module = {swig_types, 54, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[10] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[11] +#define SWIGTYPE_p_Exiv2__Metadatum swig_types[12] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[13] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[14] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[15] +#define SWIGTYPE_p_Exiv2__Value swig_types[16] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[17] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[18] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[19] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[20] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[21] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[22] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[23] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[24] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[25] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[26] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[27] +#define SWIGTYPE_p_IptcData_iterator swig_types[28] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[29] +#define SWIGTYPE_p_SwigPyObject swig_types[30] +#define SWIGTYPE_p_ValueType swig_types[31] +#define SWIGTYPE_p_allocator_type swig_types[32] +#define SWIGTYPE_p_char swig_types[33] +#define SWIGTYPE_p_const_iterator swig_types[34] +#define SWIGTYPE_p_difference_type swig_types[35] +#define SWIGTYPE_p_first_type swig_types[36] +#define SWIGTYPE_p_int swig_types[37] +#define SWIGTYPE_p_iterator swig_types[38] +#define SWIGTYPE_p_key_type swig_types[39] +#define SWIGTYPE_p_long_long swig_types[40] +#define SWIGTYPE_p_mapped_type swig_types[41] +#define SWIGTYPE_p_second_type swig_types[42] +#define SWIGTYPE_p_short swig_types[43] +#define SWIGTYPE_p_signed_char swig_types[44] +#define SWIGTYPE_p_size_type swig_types[45] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[46] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[47] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[48] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t__iterator swig_types[49] +#define SWIGTYPE_p_unsigned_char swig_types[50] +#define SWIGTYPE_p_unsigned_int swig_types[51] +#define SWIGTYPE_p_unsigned_long_long swig_types[52] +#define SWIGTYPE_p_unsigned_short swig_types[53] +#define SWIGTYPE_p_value_type swig_types[54] +static swig_type_info *swig_types[56]; +static swig_module_info swig_module = {swig_types, 55, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -10324,6 +10325,9 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcData_clientdata = {0, 0, 0 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::IptcKey *) x)); +} static void *_p_Exiv2__IptcdatumTo_p_Exiv2__Metadatum(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Metadatum *) ((Exiv2::Iptcdatum *) x)); } @@ -10415,6 +10419,7 @@ static swig_type_info _swigt__p_Exiv2__ExifData = {"_p_Exiv2__ExifData", "Exiv2: static swig_type_info _swigt__p_Exiv2__IptcData = {"_p_Exiv2__IptcData", "Exiv2::IptcData *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__IptcData_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Iptcdatum = {"_p_Exiv2__Iptcdatum", "Exiv2::Iptcdatum *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Iptcdatum_clientdata, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Metadatum = {"_p_Exiv2__Metadatum", "Exiv2::Metadatum *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; @@ -10471,6 +10476,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__IptcData, &_swigt__p_Exiv2__IptcKey, &_swigt__p_Exiv2__Iptcdatum, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__Metadatum, &_swigt__p_Exiv2__StringValue, @@ -10527,6 +10533,7 @@ static swig_cast_info _swigc__p_Exiv2__ExifData[] = { {&_swigt__p_Exiv2__ExifDa static swig_cast_info _swigc__p_Exiv2__IptcData[] = { {&_swigt__p_Exiv2__IptcData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Iptcdatum[] = { {&_swigt__p_Exiv2__Iptcdatum, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Metadatum[] = { {&_swigt__p_Exiv2__Metadatum, 0, 0, 0}, {&_swigt__p_Exiv2__Iptcdatum, _p_Exiv2__IptcdatumTo_p_Exiv2__Metadatum, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -10583,6 +10590,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__IptcData, _swigc__p_Exiv2__IptcKey, _swigc__p_Exiv2__Iptcdatum, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__Metadatum, _swigc__p_Exiv2__StringValue, diff --git a/src/swig-0_27_7/metadatum_wrap.cxx b/src/swig-0_27_7/metadatum_wrap.cxx index 97984e1..13a3ec3 100644 --- a/src/swig-0_27_7/metadatum_wrap.cxx +++ b/src/swig-0_27_7/metadatum_wrap.cxx @@ -3930,48 +3930,49 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__DataValue swig_types[3] #define SWIGTYPE_p_Exiv2__DateValue swig_types[4] #define SWIGTYPE_p_Exiv2__ExifData swig_types[5] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[6] -#define SWIGTYPE_p_Exiv2__Metadatum swig_types[7] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[8] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[9] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[10] -#define SWIGTYPE_p_Exiv2__Value swig_types[11] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[12] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[13] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[14] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[15] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[16] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[17] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[18] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[19] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[20] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[21] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[22] -#define SWIGTYPE_p_SwigPyObject swig_types[23] -#define SWIGTYPE_p_ValueType swig_types[24] -#define SWIGTYPE_p_allocator_type swig_types[25] -#define SWIGTYPE_p_char swig_types[26] -#define SWIGTYPE_p_const_iterator swig_types[27] -#define SWIGTYPE_p_difference_type swig_types[28] -#define SWIGTYPE_p_first_type swig_types[29] -#define SWIGTYPE_p_int swig_types[30] -#define SWIGTYPE_p_iterator swig_types[31] -#define SWIGTYPE_p_key_type swig_types[32] -#define SWIGTYPE_p_long_long swig_types[33] -#define SWIGTYPE_p_mapped_type swig_types[34] -#define SWIGTYPE_p_second_type swig_types[35] -#define SWIGTYPE_p_short swig_types[36] -#define SWIGTYPE_p_signed_char swig_types[37] -#define SWIGTYPE_p_size_type swig_types[38] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[39] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[40] -#define SWIGTYPE_p_unsigned_char swig_types[41] -#define SWIGTYPE_p_unsigned_int swig_types[42] -#define SWIGTYPE_p_unsigned_long_long swig_types[43] -#define SWIGTYPE_p_unsigned_short swig_types[44] -#define SWIGTYPE_p_value_type swig_types[45] -static swig_type_info *swig_types[47]; -static swig_module_info swig_module = {swig_types, 46, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[6] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[7] +#define SWIGTYPE_p_Exiv2__Metadatum swig_types[8] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[9] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[10] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[11] +#define SWIGTYPE_p_Exiv2__Value swig_types[12] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[13] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[14] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[15] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[16] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[17] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[18] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[19] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[20] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[21] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[22] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[23] +#define SWIGTYPE_p_SwigPyObject swig_types[24] +#define SWIGTYPE_p_ValueType swig_types[25] +#define SWIGTYPE_p_allocator_type swig_types[26] +#define SWIGTYPE_p_char swig_types[27] +#define SWIGTYPE_p_const_iterator swig_types[28] +#define SWIGTYPE_p_difference_type swig_types[29] +#define SWIGTYPE_p_first_type swig_types[30] +#define SWIGTYPE_p_int swig_types[31] +#define SWIGTYPE_p_iterator swig_types[32] +#define SWIGTYPE_p_key_type swig_types[33] +#define SWIGTYPE_p_long_long swig_types[34] +#define SWIGTYPE_p_mapped_type swig_types[35] +#define SWIGTYPE_p_second_type swig_types[36] +#define SWIGTYPE_p_short swig_types[37] +#define SWIGTYPE_p_signed_char swig_types[38] +#define SWIGTYPE_p_size_type swig_types[39] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[40] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[41] +#define SWIGTYPE_p_unsigned_char swig_types[42] +#define SWIGTYPE_p_unsigned_int swig_types[43] +#define SWIGTYPE_p_unsigned_long_long swig_types[44] +#define SWIGTYPE_p_unsigned_short swig_types[45] +#define SWIGTYPE_p_value_type swig_types[46] +static swig_type_info *swig_types[48]; +static swig_module_info swig_module = {swig_types, 47, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4249,6 +4250,31 @@ static void _set_python_exception() { }; +SWIGINTERNINLINE PyObject * +SWIG_From_std_string (const std::string& s) +{ + return SWIG_FromCharPtrAndSize(s.data(), s.size()); +} + + + #define SWIG_From_long PyInt_FromLong + + +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_unsigned_SS_short (unsigned short value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + /* Return string from Python obj. NOTE: obj must remain in scope in order to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */ SWIGINTERN int @@ -4374,13 +4400,6 @@ SWIGINTERNINLINE PyObject* } -SWIGINTERNINLINE PyObject * -SWIG_From_std_string (const std::string& s) -{ - return SWIG_FromCharPtrAndSize(s.data(), s.size()); -} - - static PyObject* PyEnum_Exiv2_ByteOrder = NULL; @@ -4395,24 +4414,6 @@ static PyObject* get_enum_typeobject_Exiv2_ByteOrder() { static PyObject* Py_IntEnum = NULL; - #define SWIG_From_long PyInt_FromLong - - -SWIGINTERNINLINE PyObject* -SWIG_From_unsigned_SS_long (unsigned long value) -{ - return (value > LONG_MAX) ? - PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_unsigned_SS_short (unsigned short value) -{ - return SWIG_From_unsigned_SS_long (value); -} - - static PyObject* PyEnum_Exiv2_TypeId = NULL; @@ -5133,6 +5134,213 @@ SWIGINTERN std::string Exiv2_Metadatum___str__(Exiv2::Metadatum *self){ #ifdef __cplusplus extern "C" { #endif +SWIGINTERN PyObject *_wrap_Key_key(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_key takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_key" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->key(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_familyName(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_familyName takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_familyName" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = (char *)((Exiv2::Key const *)arg1)->familyName(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_groupName(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_groupName takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_groupName" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->groupName(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_tagName(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_tagName takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_tagName" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->tagName(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_tagLabel(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_tagLabel takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_tagLabel" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->tagLabel(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_tag(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint16_t result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_tag takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_tag" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = (uint16_t)((Exiv2::Key const *)arg1)->tag(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_clone(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Exiv2::Key::AutoPtr result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_clone takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_clone" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->clone(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj((&result)->release(), SWIGTYPE_p_Exiv2__Key, SWIG_POINTER_OWN | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGPY_REPRFUNC_CLOSURE(_wrap_Key_key) /* defines _wrap_Key_key_reprfunc_closure */ + SWIGINTERN PyObject *_wrap_Metadatum_setValue__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Metadatum *arg1 = (Exiv2::Metadatum *) 0 ; @@ -6032,6 +6240,269 @@ static PyMethodDef SwigMethods[] = { { NULL, NULL, 0, NULL } }; +static SwigPyGetSet Key___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Key_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" + "Return the key of the metadatum as a string. The key is of the\n" + " form 'familyName.groupName.tagName'. Note however that the\n" + " key is not necessarily unique, e.g., an ExifData may contain\n" + " multiple metadata with the same key.\n" + "", &Key___dict___getset }, + { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ +}; + +SWIGINTERN PyObject * +SwigPyBuiltin__Exiv2__Key_richcompare(PyObject *self, PyObject *other, int op) { + PyObject *result = NULL; + PyObject *tuple = PyTuple_New(1); + assert(tuple); + PyTuple_SET_ITEM(tuple, 0, other); + Py_XINCREF(other); + if (!result && !PyErr_Occurred()) { + if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { + result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); + } else { + result = Py_NotImplemented; + Py_INCREF(result); + } + } + Py_DECREF(tuple); + return result; +} + +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Key_methods[] = { + { "key", _wrap_Key_key, METH_VARARGS, "\n" + "Return the key of the metadatum as a string. The key is of the\n" + " form 'familyName.groupName.tagName'. Note however that the\n" + " key is not necessarily unique, e.g., an ExifData may contain\n" + " multiple metadata with the same key.\n" + "" }, + { "familyName", _wrap_Key_familyName, METH_VARARGS, " Return an identifier for the type of metadata (the first part of the key)" }, + { "groupName", _wrap_Key_groupName, METH_VARARGS, " Return the name of the group (the second part of the key)" }, + { "tagName", _wrap_Key_tagName, METH_VARARGS, " Return the name of the tag (which is also the third part of the key)" }, + { "tagLabel", _wrap_Key_tagLabel, METH_VARARGS, " Return a label for the tag" }, + { "tag", _wrap_Key_tag, METH_VARARGS, " Return the tag number" }, + { "clone", _wrap_Key_clone, METH_VARARGS, "\n" + "Return an auto-pointer to a copy of itself (deep copy).\n" + " The caller owns this copy and the auto-pointer ensures that it\n" + " will be deleted.\n" + "" }, + { NULL, NULL, 0, NULL } /* Sentinel */ +}; + +static PyHeapTypeObject SwigPyBuiltin__Exiv2__Key_type = { + { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "exiv2.metadatum.Key", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 + (printfunc) 0, /* tp_print */ +#else + (Py_ssize_t) 0, /* tp_vectorcall_offset */ +#endif + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Key_type.as_number,/* tp_as_number */ + &SwigPyBuiltin__Exiv2__Key_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Key_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_Key_key_reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Key_type.as_buffer,/* tp_as_buffer */ +#if PY_VERSION_HEX >= 0x03000000 + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ +#else + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ +#endif + "\n" + "Abstract base class defining the %Key of a metadatum.\n" + " Keys are used to identify and group metadata.\n" + "",/* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Key_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Key_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Key_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + (destructor) 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + (vectorcallfunc) 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#if PY_VERSION_HEX >= 0x030c0000 + (char) 0, /* tp_watched */ +#endif +#ifdef COUNT_ALLOCS + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ +#endif + }, +#if PY_VERSION_HEX >= 0x03050000 + { + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ +# if PY_VERSION_HEX >= 0x030a0000 + (sendfunc) 0, /* am_send */ +# endif + }, +#endif + { + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ +#if PY_VERSION_HEX < 0x03000000 + (coercion) 0, /* nb_coerce */ +#endif + (unaryfunc) 0, /* nb_int */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* nb_reserved */ +#else + (unaryfunc) 0, /* nb_long */ +#endif + (unaryfunc) 0, /* nb_float */ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ +#endif + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ +#if PY_VERSION_HEX >= 0x03050000 + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ +#endif + }, + { + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ + }, + { + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* was_sq_slice */ +#else + (ssizessizeargfunc) 0, /* sq_slice */ +#endif + (ssizeobjargproc) 0, /* sq_ass_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* was_sq_ass_slice */ +#else + (ssizessizeobjargproc) 0, /* sq_ass_slice */ +#endif + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ + }, + { +#if PY_VERSION_HEX < 0x03000000 + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ +#endif + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ + }, + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ +#if PY_VERSION_HEX >= 0x03030000 + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ +#endif +#if PY_VERSION_HEX >= 0x03090000 + (PyObject *) 0, /* ht_module */ +#endif +#if PY_VERSION_HEX >= 0x030b0000 + (char *) 0, /* _ht_tpname */ + { + (PyObject *) 0, /* getitem */ +#if PY_VERSION_HEX >= 0x030c0000 + (uint32_t) 0, /* getitem_version */ +#endif + } +#endif +}; + +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Key_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Key_type}; + static SwigPyGetSet Metadatum___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Metadatum_getset[] = { { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" @@ -6478,6 +6949,7 @@ static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::D static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DateValue = {"_p_Exiv2__DateValue", "Exiv2::DateValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifData = {"_p_Exiv2__ExifData", "Exiv2::ExifData *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Key_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Metadatum = {"_p_Exiv2__Metadatum", "Exiv2::Metadatum *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Metadatum_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; @@ -6526,6 +6998,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__DataValue, &_swigt__p_Exiv2__DateValue, &_swigt__p_Exiv2__ExifData, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__Metadatum, &_swigt__p_Exiv2__StringValue, @@ -6574,6 +7047,7 @@ static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DateValue[] = { {&_swigt__p_Exiv2__DateValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifData[] = { {&_swigt__p_Exiv2__ExifData, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Metadatum[] = { {&_swigt__p_Exiv2__Metadatum, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -6622,6 +7096,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__DataValue, _swigc__p_Exiv2__DateValue, _swigc__p_Exiv2__ExifData, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__Metadatum, _swigc__p_Exiv2__StringValue, @@ -7146,6 +7621,29 @@ SWIG_init(void) { } + /* type 'Exiv2::Key' */ + builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Key_type; + builtin_pytype->tp_dict = d = PyDict_New(); + SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); + builtin_pytype->tp_new = PyType_GenericNew; + builtin_base_count = 0; + builtin_bases[builtin_base_count] = NULL; + SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); + PyDict_SetItemString(d, "this", this_descr); + PyDict_SetItemString(d, "thisown", thisown_descr); + if (PyType_Ready(builtin_pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Key'."); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } + Py_INCREF(builtin_pytype); + PyModule_AddObject(m, "Key", (PyObject *)builtin_pytype); + SwigPyBuiltin_AddPublicSymbol(public_interface, "Key"); + d = md; + /* type 'Exiv2::Metadatum' */ builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Metadatum_type; builtin_pytype->tp_dict = d = PyDict_New(); diff --git a/src/swig-0_27_7/preview_wrap.cxx b/src/swig-0_27_7/preview_wrap.cxx index decc371..400b541 100644 --- a/src/swig-0_27_7/preview_wrap.cxx +++ b/src/swig-0_27_7/preview_wrap.cxx @@ -3942,64 +3942,65 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__HttpIo swig_types[12] #define SWIGTYPE_p_Exiv2__Image swig_types[13] #define SWIGTYPE_p_Exiv2__IptcKey swig_types[14] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[15] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[16] -#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[17] -#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[18] -#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[19] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[20] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[21] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[22] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[23] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[24] -#define SWIGTYPE_p_Exiv2__Value swig_types[25] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[34] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[35] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[39] -#define SWIGTYPE_p_IptcData_iterator swig_types[40] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[41] -#define SWIGTYPE_p_SwigPyObject swig_types[42] -#define SWIGTYPE_p_ValueType swig_types[43] -#define SWIGTYPE_p_XmpData_iterator swig_types[44] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[45] -#define SWIGTYPE_p_allocator_type swig_types[46] -#define SWIGTYPE_p_char swig_types[47] -#define SWIGTYPE_p_const_iterator swig_types[48] -#define SWIGTYPE_p_difference_type swig_types[49] -#define SWIGTYPE_p_first_type swig_types[50] -#define SWIGTYPE_p_int swig_types[51] -#define SWIGTYPE_p_iterator swig_types[52] -#define SWIGTYPE_p_key_type swig_types[53] -#define SWIGTYPE_p_long_long swig_types[54] -#define SWIGTYPE_p_mapped_type swig_types[55] -#define SWIGTYPE_p_second_type swig_types[56] -#define SWIGTYPE_p_short swig_types[57] -#define SWIGTYPE_p_signed_char swig_types[58] -#define SWIGTYPE_p_size_type swig_types[59] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[60] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[61] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[62] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[63] -#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[65] -#define SWIGTYPE_p_unsigned_char swig_types[66] -#define SWIGTYPE_p_unsigned_int swig_types[67] -#define SWIGTYPE_p_unsigned_long_long swig_types[68] -#define SWIGTYPE_p_unsigned_short swig_types[69] -#define SWIGTYPE_p_value_type swig_types[70] -static swig_type_info *swig_types[72]; -static swig_module_info swig_module = {swig_types, 71, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[15] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[16] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[17] +#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[18] +#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[19] +#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[20] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] +#define SWIGTYPE_p_Exiv2__Value swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[40] +#define SWIGTYPE_p_IptcData_iterator swig_types[41] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[42] +#define SWIGTYPE_p_SwigPyObject swig_types[43] +#define SWIGTYPE_p_ValueType swig_types[44] +#define SWIGTYPE_p_XmpData_iterator swig_types[45] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[46] +#define SWIGTYPE_p_allocator_type swig_types[47] +#define SWIGTYPE_p_char swig_types[48] +#define SWIGTYPE_p_const_iterator swig_types[49] +#define SWIGTYPE_p_difference_type swig_types[50] +#define SWIGTYPE_p_first_type swig_types[51] +#define SWIGTYPE_p_int swig_types[52] +#define SWIGTYPE_p_iterator swig_types[53] +#define SWIGTYPE_p_key_type swig_types[54] +#define SWIGTYPE_p_long_long swig_types[55] +#define SWIGTYPE_p_mapped_type swig_types[56] +#define SWIGTYPE_p_second_type swig_types[57] +#define SWIGTYPE_p_short swig_types[58] +#define SWIGTYPE_p_signed_char swig_types[59] +#define SWIGTYPE_p_size_type swig_types[60] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[61] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[62] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[63] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] +#define SWIGTYPE_p_unsigned_char swig_types[67] +#define SWIGTYPE_p_unsigned_int swig_types[68] +#define SWIGTYPE_p_unsigned_long_long swig_types[69] +#define SWIGTYPE_p_unsigned_short swig_types[70] +#define SWIGTYPE_p_value_type swig_types[71] +static swig_type_info *swig_types[73]; +static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -7444,6 +7445,15 @@ static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(n static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } +static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); +} +static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::IptcKey *) x)); +} +static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } @@ -7537,6 +7547,7 @@ static swig_type_info _swigt__p_Exiv2__GroupInfo = {"_p_Exiv2__GroupInfo", "Exiv static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Image = {"_p_Exiv2__Image", "Exiv2::Image *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__PreviewImage = {"_p_Exiv2__PreviewImage", "Exiv2::PreviewImage *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__PreviewImage_clientdata, 0}; @@ -7610,6 +7621,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__HttpIo, &_swigt__p_Exiv2__Image, &_swigt__p_Exiv2__IptcKey, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__MemIo, &_swigt__p_Exiv2__PreviewImage, @@ -7683,6 +7695,7 @@ static swig_cast_info _swigc__p_Exiv2__GroupInfo[] = { {&_swigt__p_Exiv2__Group static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Image[] = { {&_swigt__p_Exiv2__Image, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewImage[] = { {&_swigt__p_Exiv2__PreviewImage, 0, 0, 0},{0, 0, 0, 0}}; @@ -7756,6 +7769,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__HttpIo, _swigc__p_Exiv2__Image, _swigc__p_Exiv2__IptcKey, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__MemIo, _swigc__p_Exiv2__PreviewImage, diff --git a/src/swig-0_27_7/properties_wrap.cxx b/src/swig-0_27_7/properties_wrap.cxx index 5ad7e8e..c48945d 100644 --- a/src/swig-0_27_7/properties_wrap.cxx +++ b/src/swig-0_27_7/properties_wrap.cxx @@ -7634,7 +7634,7 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -static PyTypeObject *builtin_bases[2]; +static PyTypeObject *builtin_bases[3]; /* ----------------------------------------------------------------------------- * Type initialization: @@ -8195,6 +8195,17 @@ SWIG_init(void) { SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; + builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); + if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { + builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; + } else { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpKey' as base 'Exiv2::Key' has not been initialized.\n"); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } builtin_bases[builtin_base_count] = NULL; SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); diff --git a/src/swig-0_27_7/tags_wrap.cxx b/src/swig-0_27_7/tags_wrap.cxx index f5aa5ac..f2e29e4 100644 --- a/src/swig-0_27_7/tags_wrap.cxx +++ b/src/swig-0_27_7/tags_wrap.cxx @@ -7754,7 +7754,7 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -static PyTypeObject *builtin_bases[2]; +static PyTypeObject *builtin_bases[3]; /* ----------------------------------------------------------------------------- * Type initialization: @@ -8325,6 +8325,17 @@ SWIG_init(void) { SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; + builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); + if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { + builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; + } else { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifKey' as base 'Exiv2::Key' has not been initialized.\n"); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } builtin_bases[builtin_base_count] = NULL; SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); diff --git a/src/swig-0_27_7/xmp_wrap.cxx b/src/swig-0_27_7/xmp_wrap.cxx index 7f33ffe..d9a574e 100644 --- a/src/swig-0_27_7/xmp_wrap.cxx +++ b/src/swig-0_27_7/xmp_wrap.cxx @@ -3930,58 +3930,59 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__DataValue swig_types[3] #define SWIGTYPE_p_Exiv2__DateValue swig_types[4] #define SWIGTYPE_p_Exiv2__ExifData swig_types[5] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[6] -#define SWIGTYPE_p_Exiv2__Metadatum swig_types[7] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[8] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[9] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[10] -#define SWIGTYPE_p_Exiv2__Value swig_types[11] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[12] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[13] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[14] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[15] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[16] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[17] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[18] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[19] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[20] -#define SWIGTYPE_p_Exiv2__XmpData swig_types[21] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[22] -#define SWIGTYPE_p_Exiv2__XmpParser swig_types[23] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[24] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[25] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[26] -#define SWIGTYPE_p_Exiv2__Xmpdatum swig_types[27] -#define SWIGTYPE_p_SwigPyObject swig_types[28] -#define SWIGTYPE_p_ValueType swig_types[29] -#define SWIGTYPE_p_XmpData_iterator swig_types[30] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[31] -#define SWIGTYPE_p_allocator_type swig_types[32] -#define SWIGTYPE_p_char swig_types[33] -#define SWIGTYPE_p_const_iterator swig_types[34] -#define SWIGTYPE_p_difference_type swig_types[35] -#define SWIGTYPE_p_f_p_void_bool__void swig_types[36] -#define SWIGTYPE_p_first_type swig_types[37] -#define SWIGTYPE_p_int swig_types[38] -#define SWIGTYPE_p_iterator swig_types[39] -#define SWIGTYPE_p_key_type swig_types[40] -#define SWIGTYPE_p_long_long swig_types[41] -#define SWIGTYPE_p_mapped_type swig_types[42] -#define SWIGTYPE_p_second_type swig_types[43] -#define SWIGTYPE_p_short swig_types[44] -#define SWIGTYPE_p_signed_char swig_types[45] -#define SWIGTYPE_p_size_type swig_types[46] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[47] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[48] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[49] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t__iterator swig_types[50] -#define SWIGTYPE_p_unsigned_char swig_types[51] -#define SWIGTYPE_p_unsigned_int swig_types[52] -#define SWIGTYPE_p_unsigned_long_long swig_types[53] -#define SWIGTYPE_p_unsigned_short swig_types[54] -#define SWIGTYPE_p_value_type swig_types[55] -static swig_type_info *swig_types[57]; -static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[6] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[7] +#define SWIGTYPE_p_Exiv2__Metadatum swig_types[8] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[9] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[10] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[11] +#define SWIGTYPE_p_Exiv2__Value swig_types[12] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[13] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[14] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[15] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[16] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[17] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[18] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[19] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[20] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[21] +#define SWIGTYPE_p_Exiv2__XmpData swig_types[22] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[23] +#define SWIGTYPE_p_Exiv2__XmpParser swig_types[24] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[25] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[26] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[27] +#define SWIGTYPE_p_Exiv2__Xmpdatum swig_types[28] +#define SWIGTYPE_p_SwigPyObject swig_types[29] +#define SWIGTYPE_p_ValueType swig_types[30] +#define SWIGTYPE_p_XmpData_iterator swig_types[31] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[32] +#define SWIGTYPE_p_allocator_type swig_types[33] +#define SWIGTYPE_p_char swig_types[34] +#define SWIGTYPE_p_const_iterator swig_types[35] +#define SWIGTYPE_p_difference_type swig_types[36] +#define SWIGTYPE_p_f_p_void_bool__void swig_types[37] +#define SWIGTYPE_p_first_type swig_types[38] +#define SWIGTYPE_p_int swig_types[39] +#define SWIGTYPE_p_iterator swig_types[40] +#define SWIGTYPE_p_key_type swig_types[41] +#define SWIGTYPE_p_long_long swig_types[42] +#define SWIGTYPE_p_mapped_type swig_types[43] +#define SWIGTYPE_p_second_type swig_types[44] +#define SWIGTYPE_p_short swig_types[45] +#define SWIGTYPE_p_signed_char swig_types[46] +#define SWIGTYPE_p_size_type swig_types[47] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[48] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[49] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[50] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t__iterator swig_types[51] +#define SWIGTYPE_p_unsigned_char swig_types[52] +#define SWIGTYPE_p_unsigned_int swig_types[53] +#define SWIGTYPE_p_unsigned_long_long swig_types[54] +#define SWIGTYPE_p_unsigned_short swig_types[55] +#define SWIGTYPE_p_value_type swig_types[56] +static swig_type_info *swig_types[58]; +static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -10641,6 +10642,9 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpParser_clientdata = {0, 0, /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); +} static void *_p_Exiv2__XmpdatumTo_p_Exiv2__Metadatum(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Metadatum *) ((Exiv2::Xmpdatum *) x)); } @@ -10728,6 +10732,7 @@ static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::D static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DateValue = {"_p_Exiv2__DateValue", "Exiv2::DateValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifData = {"_p_Exiv2__ExifData", "Exiv2::ExifData *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Metadatum = {"_p_Exiv2__Metadatum", "Exiv2::Metadatum *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; @@ -10786,6 +10791,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__DataValue, &_swigt__p_Exiv2__DateValue, &_swigt__p_Exiv2__ExifData, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__Metadatum, &_swigt__p_Exiv2__StringValue, @@ -10844,6 +10850,7 @@ static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DateValue[] = { {&_swigt__p_Exiv2__DateValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifData[] = { {&_swigt__p_Exiv2__ExifData, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Metadatum[] = { {&_swigt__p_Exiv2__Metadatum, 0, 0, 0}, {&_swigt__p_Exiv2__Xmpdatum, _p_Exiv2__XmpdatumTo_p_Exiv2__Metadatum, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -10902,6 +10909,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__DataValue, _swigc__p_Exiv2__DateValue, _swigc__p_Exiv2__ExifData, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__Metadatum, _swigc__p_Exiv2__StringValue, diff --git a/src/swig-0_28_2/__init__.py b/src/swig-0_28_2/__init__.py index 8e57b0d..85c136a 100644 --- a/src/swig-0_28_2/__init__.py +++ b/src/swig-0_28_2/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.3" +__version__ = "0.16.4" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 3)) +__version_tuple__ = tuple((0, 16, 4)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/src/swig-0_28_2/datasets_wrap.cxx b/src/swig-0_28_2/datasets_wrap.cxx index a8b6914..9d6a1ab 100644 --- a/src/swig-0_28_2/datasets_wrap.cxx +++ b/src/swig-0_28_2/datasets_wrap.cxx @@ -6973,7 +6973,7 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -static PyTypeObject *builtin_bases[2]; +static PyTypeObject *builtin_bases[3]; /* ----------------------------------------------------------------------------- * Type initialization: @@ -7572,6 +7572,17 @@ SWIG_init(void) { SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; + builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); + if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { + builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; + } else { + PyErr_SetString(PyExc_TypeError, "Could not create type 'IptcKey' as base 'Exiv2::Key' has not been initialized.\n"); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } builtin_bases[builtin_base_count] = NULL; SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); diff --git a/src/swig-0_28_2/exif_wrap.cxx b/src/swig-0_28_2/exif_wrap.cxx index 49fe3cc..23da56d 100644 --- a/src/swig-0_28_2/exif_wrap.cxx +++ b/src/swig-0_28_2/exif_wrap.cxx @@ -3937,51 +3937,52 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__ExifThumbC swig_types[10] #define SWIGTYPE_p_Exiv2__Exifdatum swig_types[11] #define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[13] -#define SWIGTYPE_p_Exiv2__Metadatum swig_types[14] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[15] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[16] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[17] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[18] -#define SWIGTYPE_p_Exiv2__Value swig_types[19] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[20] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[21] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[22] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[23] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[24] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[25] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[27] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[28] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[29] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[30] -#define SWIGTYPE_p_SwigPyObject swig_types[31] -#define SWIGTYPE_p_ValueType swig_types[32] -#define SWIGTYPE_p_allocator_type swig_types[33] -#define SWIGTYPE_p_char swig_types[34] -#define SWIGTYPE_p_const_iterator swig_types[35] -#define SWIGTYPE_p_difference_type swig_types[36] -#define SWIGTYPE_p_first_type swig_types[37] -#define SWIGTYPE_p_int swig_types[38] -#define SWIGTYPE_p_iterator swig_types[39] -#define SWIGTYPE_p_key_type swig_types[40] -#define SWIGTYPE_p_long_long swig_types[41] -#define SWIGTYPE_p_mapped_type swig_types[42] -#define SWIGTYPE_p_second_type swig_types[43] -#define SWIGTYPE_p_short swig_types[44] -#define SWIGTYPE_p_signed_char swig_types[45] -#define SWIGTYPE_p_size_type swig_types[46] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[47] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t__iterator swig_types[48] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[49] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[50] -#define SWIGTYPE_p_unsigned_char swig_types[51] -#define SWIGTYPE_p_unsigned_int swig_types[52] -#define SWIGTYPE_p_unsigned_long_long swig_types[53] -#define SWIGTYPE_p_unsigned_short swig_types[54] -#define SWIGTYPE_p_value_type swig_types[55] -static swig_type_info *swig_types[57]; -static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[13] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[14] +#define SWIGTYPE_p_Exiv2__Metadatum swig_types[15] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[16] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[17] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[18] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[19] +#define SWIGTYPE_p_Exiv2__Value swig_types[20] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[21] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[22] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[23] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[24] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[25] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[28] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[29] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[30] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[31] +#define SWIGTYPE_p_SwigPyObject swig_types[32] +#define SWIGTYPE_p_ValueType swig_types[33] +#define SWIGTYPE_p_allocator_type swig_types[34] +#define SWIGTYPE_p_char swig_types[35] +#define SWIGTYPE_p_const_iterator swig_types[36] +#define SWIGTYPE_p_difference_type swig_types[37] +#define SWIGTYPE_p_first_type swig_types[38] +#define SWIGTYPE_p_int swig_types[39] +#define SWIGTYPE_p_iterator swig_types[40] +#define SWIGTYPE_p_key_type swig_types[41] +#define SWIGTYPE_p_long_long swig_types[42] +#define SWIGTYPE_p_mapped_type swig_types[43] +#define SWIGTYPE_p_second_type swig_types[44] +#define SWIGTYPE_p_short swig_types[45] +#define SWIGTYPE_p_signed_char swig_types[46] +#define SWIGTYPE_p_size_type swig_types[47] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[48] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t__iterator swig_types[49] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[50] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[51] +#define SWIGTYPE_p_unsigned_char swig_types[52] +#define SWIGTYPE_p_unsigned_int swig_types[53] +#define SWIGTYPE_p_unsigned_long_long swig_types[54] +#define SWIGTYPE_p_unsigned_short swig_types[55] +#define SWIGTYPE_p_value_type swig_types[56] +static swig_type_info *swig_types[58]; +static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -12021,6 +12022,9 @@ static void *_p_ExifData_iteratorTo_p_ExifData_iterator_base(void *x, int *SWIGU static void *_p_Exiv2__ExifThumbTo_p_Exiv2__ExifThumbC(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::ExifThumbC *) ((Exiv2::ExifThumb *) x)); } +static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); +} static void *_p_Exiv2__ExifdatumTo_p_Exiv2__Metadatum(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Metadatum *) ((Exiv2::Exifdatum *) x)); } @@ -12112,6 +12116,7 @@ static swig_type_info _swigt__p_Exiv2__ExifThumb = {"_p_Exiv2__ExifThumb", "Exiv static swig_type_info _swigt__p_Exiv2__ExifThumbC = {"_p_Exiv2__ExifThumbC", "Exiv2::ExifThumbC *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__ExifThumbC_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__Exifdatum = {"_p_Exiv2__Exifdatum", "Exiv2::Exifdatum *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Exifdatum_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__GroupInfo = {"_p_Exiv2__GroupInfo", "Exiv2::GroupInfo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Metadatum = {"_p_Exiv2__Metadatum", "Exiv2::Metadatum *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; @@ -12170,6 +12175,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__ExifThumbC, &_swigt__p_Exiv2__Exifdatum, &_swigt__p_Exiv2__GroupInfo, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__Metadatum, &_swigt__p_Exiv2__StringValue, @@ -12228,6 +12234,7 @@ static swig_cast_info _swigc__p_Exiv2__ExifThumb[] = { {&_swigt__p_Exiv2__ExifT static swig_cast_info _swigc__p_Exiv2__ExifThumbC[] = { {&_swigt__p_Exiv2__ExifThumbC, 0, 0, 0}, {&_swigt__p_Exiv2__ExifThumb, _p_Exiv2__ExifThumbTo_p_Exiv2__ExifThumbC, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Exifdatum[] = { {&_swigt__p_Exiv2__Exifdatum, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__GroupInfo[] = { {&_swigt__p_Exiv2__GroupInfo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Metadatum[] = { {&_swigt__p_Exiv2__Metadatum, 0, 0, 0}, {&_swigt__p_Exiv2__Exifdatum, _p_Exiv2__ExifdatumTo_p_Exiv2__Metadatum, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -12286,6 +12293,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__ExifThumbC, _swigc__p_Exiv2__Exifdatum, _swigc__p_Exiv2__GroupInfo, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__Metadatum, _swigc__p_Exiv2__StringValue, diff --git a/src/swig-0_28_2/image_wrap.cxx b/src/swig-0_28_2/image_wrap.cxx index 2f10ef3..9a64381 100644 --- a/src/swig-0_28_2/image_wrap.cxx +++ b/src/swig-0_28_2/image_wrap.cxx @@ -3943,61 +3943,62 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__ImageFactory swig_types[15] #define SWIGTYPE_p_Exiv2__IptcData swig_types[16] #define SWIGTYPE_p_Exiv2__IptcKey swig_types[17] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[18] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[19] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[20] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[21] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[22] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[23] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[24] -#define SWIGTYPE_p_Exiv2__Value swig_types[25] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[34] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[35] -#define SWIGTYPE_p_Exiv2__XmpData swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[40] -#define SWIGTYPE_p_IptcData_iterator swig_types[41] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[42] -#define SWIGTYPE_p_SwigPyObject swig_types[43] -#define SWIGTYPE_p_ValueType swig_types[44] -#define SWIGTYPE_p_XmpData_iterator swig_types[45] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[46] -#define SWIGTYPE_p_allocator_type swig_types[47] -#define SWIGTYPE_p_char swig_types[48] -#define SWIGTYPE_p_const_iterator swig_types[49] -#define SWIGTYPE_p_difference_type swig_types[50] -#define SWIGTYPE_p_first_type swig_types[51] -#define SWIGTYPE_p_int swig_types[52] -#define SWIGTYPE_p_iterator swig_types[53] -#define SWIGTYPE_p_key_type swig_types[54] -#define SWIGTYPE_p_long_long swig_types[55] -#define SWIGTYPE_p_mapped_type swig_types[56] -#define SWIGTYPE_p_second_type swig_types[57] -#define SWIGTYPE_p_short swig_types[58] -#define SWIGTYPE_p_signed_char swig_types[59] -#define SWIGTYPE_p_size_type swig_types[60] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[61] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[62] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[63] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[65] -#define SWIGTYPE_p_unsigned_char swig_types[66] -#define SWIGTYPE_p_unsigned_int swig_types[67] -#define SWIGTYPE_p_unsigned_long_long swig_types[68] -#define SWIGTYPE_p_unsigned_short swig_types[69] -#define SWIGTYPE_p_value_type swig_types[70] -static swig_type_info *swig_types[72]; -static swig_module_info swig_module = {swig_types, 71, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[18] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[19] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[20] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] +#define SWIGTYPE_p_Exiv2__Value swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpData swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] +#define SWIGTYPE_p_IptcData_iterator swig_types[42] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] +#define SWIGTYPE_p_SwigPyObject swig_types[44] +#define SWIGTYPE_p_ValueType swig_types[45] +#define SWIGTYPE_p_XmpData_iterator swig_types[46] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] +#define SWIGTYPE_p_allocator_type swig_types[48] +#define SWIGTYPE_p_char swig_types[49] +#define SWIGTYPE_p_const_iterator swig_types[50] +#define SWIGTYPE_p_difference_type swig_types[51] +#define SWIGTYPE_p_first_type swig_types[52] +#define SWIGTYPE_p_int swig_types[53] +#define SWIGTYPE_p_iterator swig_types[54] +#define SWIGTYPE_p_key_type swig_types[55] +#define SWIGTYPE_p_long_long swig_types[56] +#define SWIGTYPE_p_mapped_type swig_types[57] +#define SWIGTYPE_p_second_type swig_types[58] +#define SWIGTYPE_p_short swig_types[59] +#define SWIGTYPE_p_signed_char swig_types[60] +#define SWIGTYPE_p_size_type swig_types[61] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] +#define SWIGTYPE_p_unsigned_char swig_types[67] +#define SWIGTYPE_p_unsigned_int swig_types[68] +#define SWIGTYPE_p_unsigned_long_long swig_types[69] +#define SWIGTYPE_p_unsigned_short swig_types[70] +#define SWIGTYPE_p_value_type swig_types[71] +static swig_type_info *swig_types[73]; +static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -7882,6 +7883,15 @@ static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(n static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } +static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); +} +static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::IptcKey *) x)); +} +static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } @@ -7978,6 +7988,7 @@ static swig_type_info _swigt__p_Exiv2__Image = {"_p_Exiv2__Image", "Exiv2::Image static swig_type_info _swigt__p_Exiv2__ImageFactory = {"_p_Exiv2__ImageFactory", "Exiv2::ImageFactory *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__ImageFactory_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__IptcData = {"_p_Exiv2__IptcData", "Exiv2::IptcData *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)0, 0}; @@ -8051,6 +8062,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__ImageFactory, &_swigt__p_Exiv2__IptcData, &_swigt__p_Exiv2__IptcKey, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__MemIo, &_swigt__p_Exiv2__RemoteIo, @@ -8124,6 +8136,7 @@ static swig_cast_info _swigc__p_Exiv2__Image[] = { {&_swigt__p_Exiv2__Image, 0, static swig_cast_info _swigc__p_Exiv2__ImageFactory[] = { {&_swigt__p_Exiv2__ImageFactory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcData[] = { {&_swigt__p_Exiv2__IptcData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; @@ -8197,6 +8210,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__ImageFactory, _swigc__p_Exiv2__IptcData, _swigc__p_Exiv2__IptcKey, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__MemIo, _swigc__p_Exiv2__RemoteIo, diff --git a/src/swig-0_28_2/iptc_wrap.cxx b/src/swig-0_28_2/iptc_wrap.cxx index 92d675e..0025beb 100644 --- a/src/swig-0_28_2/iptc_wrap.cxx +++ b/src/swig-0_28_2/iptc_wrap.cxx @@ -3934,52 +3934,53 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__IptcData swig_types[7] #define SWIGTYPE_p_Exiv2__IptcKey swig_types[8] #define SWIGTYPE_p_Exiv2__Iptcdatum swig_types[9] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[10] -#define SWIGTYPE_p_Exiv2__Metadatum swig_types[11] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[12] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[13] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[14] -#define SWIGTYPE_p_Exiv2__Value swig_types[15] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[16] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[17] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[18] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[19] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[20] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[21] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[22] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[23] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[24] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[25] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[26] -#define SWIGTYPE_p_IptcData_iterator swig_types[27] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[28] -#define SWIGTYPE_p_SwigPyObject swig_types[29] -#define SWIGTYPE_p_ValueType swig_types[30] -#define SWIGTYPE_p_allocator_type swig_types[31] -#define SWIGTYPE_p_char swig_types[32] -#define SWIGTYPE_p_const_iterator swig_types[33] -#define SWIGTYPE_p_difference_type swig_types[34] -#define SWIGTYPE_p_first_type swig_types[35] -#define SWIGTYPE_p_int swig_types[36] -#define SWIGTYPE_p_iterator swig_types[37] -#define SWIGTYPE_p_key_type swig_types[38] -#define SWIGTYPE_p_long_long swig_types[39] -#define SWIGTYPE_p_mapped_type swig_types[40] -#define SWIGTYPE_p_second_type swig_types[41] -#define SWIGTYPE_p_short swig_types[42] -#define SWIGTYPE_p_signed_char swig_types[43] -#define SWIGTYPE_p_size_type swig_types[44] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[45] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[46] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[47] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t__iterator swig_types[48] -#define SWIGTYPE_p_unsigned_char swig_types[49] -#define SWIGTYPE_p_unsigned_int swig_types[50] -#define SWIGTYPE_p_unsigned_long_long swig_types[51] -#define SWIGTYPE_p_unsigned_short swig_types[52] -#define SWIGTYPE_p_value_type swig_types[53] -static swig_type_info *swig_types[55]; -static swig_module_info swig_module = {swig_types, 54, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[10] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[11] +#define SWIGTYPE_p_Exiv2__Metadatum swig_types[12] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[13] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[14] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[15] +#define SWIGTYPE_p_Exiv2__Value swig_types[16] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[17] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[18] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[19] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[20] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[21] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[22] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[23] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[24] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[25] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[26] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[27] +#define SWIGTYPE_p_IptcData_iterator swig_types[28] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[29] +#define SWIGTYPE_p_SwigPyObject swig_types[30] +#define SWIGTYPE_p_ValueType swig_types[31] +#define SWIGTYPE_p_allocator_type swig_types[32] +#define SWIGTYPE_p_char swig_types[33] +#define SWIGTYPE_p_const_iterator swig_types[34] +#define SWIGTYPE_p_difference_type swig_types[35] +#define SWIGTYPE_p_first_type swig_types[36] +#define SWIGTYPE_p_int swig_types[37] +#define SWIGTYPE_p_iterator swig_types[38] +#define SWIGTYPE_p_key_type swig_types[39] +#define SWIGTYPE_p_long_long swig_types[40] +#define SWIGTYPE_p_mapped_type swig_types[41] +#define SWIGTYPE_p_second_type swig_types[42] +#define SWIGTYPE_p_short swig_types[43] +#define SWIGTYPE_p_signed_char swig_types[44] +#define SWIGTYPE_p_size_type swig_types[45] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[46] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[47] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[48] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t__iterator swig_types[49] +#define SWIGTYPE_p_unsigned_char swig_types[50] +#define SWIGTYPE_p_unsigned_int swig_types[51] +#define SWIGTYPE_p_unsigned_long_long swig_types[52] +#define SWIGTYPE_p_unsigned_short swig_types[53] +#define SWIGTYPE_p_value_type swig_types[54] +static swig_type_info *swig_types[56]; +static swig_module_info swig_module = {swig_types, 55, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -10539,6 +10540,9 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__IptcData_clientdata = {0, 0, 0 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::IptcKey *) x)); +} static void *_p_Exiv2__IptcdatumTo_p_Exiv2__Metadatum(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Metadatum *) ((Exiv2::Iptcdatum *) x)); } @@ -10630,6 +10634,7 @@ static swig_type_info _swigt__p_Exiv2__ExifData = {"_p_Exiv2__ExifData", "Exiv2: static swig_type_info _swigt__p_Exiv2__IptcData = {"_p_Exiv2__IptcData", "Exiv2::IptcData *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__IptcData_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Iptcdatum = {"_p_Exiv2__Iptcdatum", "Exiv2::Iptcdatum *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Iptcdatum_clientdata, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Metadatum = {"_p_Exiv2__Metadatum", "Exiv2::Metadatum *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; @@ -10686,6 +10691,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__IptcData, &_swigt__p_Exiv2__IptcKey, &_swigt__p_Exiv2__Iptcdatum, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__Metadatum, &_swigt__p_Exiv2__StringValue, @@ -10742,6 +10748,7 @@ static swig_cast_info _swigc__p_Exiv2__ExifData[] = { {&_swigt__p_Exiv2__ExifDa static swig_cast_info _swigc__p_Exiv2__IptcData[] = { {&_swigt__p_Exiv2__IptcData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Iptcdatum[] = { {&_swigt__p_Exiv2__Iptcdatum, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Metadatum[] = { {&_swigt__p_Exiv2__Metadatum, 0, 0, 0}, {&_swigt__p_Exiv2__Iptcdatum, _p_Exiv2__IptcdatumTo_p_Exiv2__Metadatum, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -10798,6 +10805,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__IptcData, _swigc__p_Exiv2__IptcKey, _swigc__p_Exiv2__Iptcdatum, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__Metadatum, _swigc__p_Exiv2__StringValue, diff --git a/src/swig-0_28_2/metadatum_wrap.cxx b/src/swig-0_28_2/metadatum_wrap.cxx index ad953f4..5eb4d9a 100644 --- a/src/swig-0_28_2/metadatum_wrap.cxx +++ b/src/swig-0_28_2/metadatum_wrap.cxx @@ -3930,48 +3930,49 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__DataValue swig_types[3] #define SWIGTYPE_p_Exiv2__DateValue swig_types[4] #define SWIGTYPE_p_Exiv2__ExifData swig_types[5] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[6] -#define SWIGTYPE_p_Exiv2__Metadatum swig_types[7] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[8] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[9] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[10] -#define SWIGTYPE_p_Exiv2__Value swig_types[11] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[12] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[13] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[14] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[15] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[16] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[17] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[18] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[19] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[20] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[21] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[22] -#define SWIGTYPE_p_SwigPyObject swig_types[23] -#define SWIGTYPE_p_ValueType swig_types[24] -#define SWIGTYPE_p_allocator_type swig_types[25] -#define SWIGTYPE_p_char swig_types[26] -#define SWIGTYPE_p_const_iterator swig_types[27] -#define SWIGTYPE_p_difference_type swig_types[28] -#define SWIGTYPE_p_first_type swig_types[29] -#define SWIGTYPE_p_int swig_types[30] -#define SWIGTYPE_p_iterator swig_types[31] -#define SWIGTYPE_p_key_type swig_types[32] -#define SWIGTYPE_p_long_long swig_types[33] -#define SWIGTYPE_p_mapped_type swig_types[34] -#define SWIGTYPE_p_second_type swig_types[35] -#define SWIGTYPE_p_short swig_types[36] -#define SWIGTYPE_p_signed_char swig_types[37] -#define SWIGTYPE_p_size_type swig_types[38] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[39] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[40] -#define SWIGTYPE_p_unsigned_char swig_types[41] -#define SWIGTYPE_p_unsigned_int swig_types[42] -#define SWIGTYPE_p_unsigned_long_long swig_types[43] -#define SWIGTYPE_p_unsigned_short swig_types[44] -#define SWIGTYPE_p_value_type swig_types[45] -static swig_type_info *swig_types[47]; -static swig_module_info swig_module = {swig_types, 46, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[6] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[7] +#define SWIGTYPE_p_Exiv2__Metadatum swig_types[8] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[9] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[10] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[11] +#define SWIGTYPE_p_Exiv2__Value swig_types[12] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[13] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[14] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[15] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[16] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[17] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[18] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[19] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[20] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[21] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[22] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[23] +#define SWIGTYPE_p_SwigPyObject swig_types[24] +#define SWIGTYPE_p_ValueType swig_types[25] +#define SWIGTYPE_p_allocator_type swig_types[26] +#define SWIGTYPE_p_char swig_types[27] +#define SWIGTYPE_p_const_iterator swig_types[28] +#define SWIGTYPE_p_difference_type swig_types[29] +#define SWIGTYPE_p_first_type swig_types[30] +#define SWIGTYPE_p_int swig_types[31] +#define SWIGTYPE_p_iterator swig_types[32] +#define SWIGTYPE_p_key_type swig_types[33] +#define SWIGTYPE_p_long_long swig_types[34] +#define SWIGTYPE_p_mapped_type swig_types[35] +#define SWIGTYPE_p_second_type swig_types[36] +#define SWIGTYPE_p_short swig_types[37] +#define SWIGTYPE_p_signed_char swig_types[38] +#define SWIGTYPE_p_size_type swig_types[39] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[40] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[41] +#define SWIGTYPE_p_unsigned_char swig_types[42] +#define SWIGTYPE_p_unsigned_int swig_types[43] +#define SWIGTYPE_p_unsigned_long_long swig_types[44] +#define SWIGTYPE_p_unsigned_short swig_types[45] +#define SWIGTYPE_p_value_type swig_types[46] +static swig_type_info *swig_types[48]; +static swig_module_info swig_module = {swig_types, 47, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4249,6 +4250,31 @@ static void _set_python_exception() { }; +SWIGINTERNINLINE PyObject * +SWIG_From_std_string (const std::string& s) +{ + return SWIG_FromCharPtrAndSize(s.data(), s.size()); +} + + + #define SWIG_From_long PyInt_FromLong + + +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_unsigned_SS_short (unsigned short value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + /* Return string from Python obj. NOTE: obj must remain in scope in order to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */ SWIGINTERN int @@ -4374,13 +4400,6 @@ SWIGINTERNINLINE PyObject* } -SWIGINTERNINLINE PyObject * -SWIG_From_std_string (const std::string& s) -{ - return SWIG_FromCharPtrAndSize(s.data(), s.size()); -} - - static PyObject* PyEnum_Exiv2_ByteOrder = NULL; @@ -4395,17 +4414,6 @@ static PyObject* get_enum_typeobject_Exiv2_ByteOrder() { static PyObject* Py_IntEnum = NULL; - #define SWIG_From_long PyInt_FromLong - - -SWIGINTERNINLINE PyObject* -SWIG_From_unsigned_SS_long (unsigned long value) -{ - return (value > LONG_MAX) ? - PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); -} - - #include #if !defined(SWIG_NO_LLONG_MAX) # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) @@ -4447,13 +4455,6 @@ SWIG_From_size_t (size_t value) } -SWIGINTERNINLINE PyObject * -SWIG_From_unsigned_SS_short (unsigned short value) -{ - return SWIG_From_unsigned_SS_long (value); -} - - static PyObject* PyEnum_Exiv2_TypeId = NULL; @@ -5295,6 +5296,242 @@ SWIGINTERN std::string Exiv2_Metadatum___str__(Exiv2::Metadatum *self){ #ifdef __cplusplus extern "C" { #endif +SWIGINTERN PyObject *_wrap_Key_key(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_key takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_key" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->key(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_familyName(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_familyName takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_familyName" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = (char *)((Exiv2::Key const *)arg1)->familyName(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_groupName(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_groupName takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_groupName" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->groupName(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_tagName(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_tagName takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_tagName" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->tagName(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_tagLabel(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_tagLabel takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_tagLabel" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->tagLabel(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_tagDesc(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_tagDesc takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_tagDesc" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->tagDesc(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_tag(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + uint16_t result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_tag takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_tag" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = (uint16_t)((Exiv2::Key const *)arg1)->tag(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Key_clone(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Exiv2::Key::UniquePtr result; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "Key_clone takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_clone" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + try { + result = ((Exiv2::Key const *)arg1)->clone(); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj((&result)->release(), SWIGTYPE_p_Exiv2__Key, SWIG_POINTER_OWN | 0 ); + + return resultobj; +fail: + return NULL; +} + + +SWIGPY_REPRFUNC_CLOSURE(_wrap_Key_key) /* defines _wrap_Key_key_reprfunc_closure */ + SWIGINTERN PyObject *_wrap_Metadatum_setValue__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Metadatum *arg1 = (Exiv2::Metadatum *) 0 ; @@ -6266,6 +6503,270 @@ static PyMethodDef SwigMethods[] = { { NULL, NULL, 0, NULL } }; +static SwigPyGetSet Key___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Key_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" + "Return the key of the metadatum as a string. The key is of the\n" + " form 'familyName.groupName.tagName'. Note however that the\n" + " key is not necessarily unique, e.g., an ExifData may contain\n" + " multiple metadata with the same key.\n" + "", &Key___dict___getset }, + { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ +}; + +SWIGINTERN PyObject * +SwigPyBuiltin__Exiv2__Key_richcompare(PyObject *self, PyObject *other, int op) { + PyObject *result = NULL; + PyObject *tuple = PyTuple_New(1); + assert(tuple); + PyTuple_SET_ITEM(tuple, 0, other); + Py_XINCREF(other); + if (!result && !PyErr_Occurred()) { + if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { + result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); + } else { + result = Py_NotImplemented; + Py_INCREF(result); + } + } + Py_DECREF(tuple); + return result; +} + +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Key_methods[] = { + { "key", _wrap_Key_key, METH_VARARGS, "\n" + "Return the key of the metadatum as a string. The key is of the\n" + " form 'familyName.groupName.tagName'. Note however that the\n" + " key is not necessarily unique, e.g., an ExifData may contain\n" + " multiple metadata with the same key.\n" + "" }, + { "familyName", _wrap_Key_familyName, METH_VARARGS, " Return an identifier for the type of metadata (the first part of the key)" }, + { "groupName", _wrap_Key_groupName, METH_VARARGS, " Return the name of the group (the second part of the key)" }, + { "tagName", _wrap_Key_tagName, METH_VARARGS, " Return the name of the tag (which is also the third part of the key)" }, + { "tagLabel", _wrap_Key_tagLabel, METH_VARARGS, " Return a label for the tag" }, + { "tagDesc", _wrap_Key_tagDesc, METH_VARARGS, " Return a description for the tag" }, + { "tag", _wrap_Key_tag, METH_VARARGS, " Return the tag number" }, + { "clone", _wrap_Key_clone, METH_VARARGS, "\n" + "Return an auto-pointer to a copy of itself (deep copy).\n" + " The caller owns this copy and the auto-pointer ensures that it\n" + " will be deleted.\n" + "" }, + { NULL, NULL, 0, NULL } /* Sentinel */ +}; + +static PyHeapTypeObject SwigPyBuiltin__Exiv2__Key_type = { + { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "exiv2.metadatum.Key", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 + (printfunc) 0, /* tp_print */ +#else + (Py_ssize_t) 0, /* tp_vectorcall_offset */ +#endif + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__Key_type.as_number,/* tp_as_number */ + &SwigPyBuiltin__Exiv2__Key_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__Key_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + _wrap_Key_key_reprfunc_closure, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__Key_type.as_buffer,/* tp_as_buffer */ +#if PY_VERSION_HEX >= 0x03000000 + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ +#else + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ +#endif + "\n" + "Abstract base class defining the %Key of a metadatum.\n" + " Keys are used to identify and group metadata.\n" + "",/* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__Key_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__Key_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__Key_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + (destructor) 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + (vectorcallfunc) 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#if PY_VERSION_HEX >= 0x030c0000 + (char) 0, /* tp_watched */ +#endif +#ifdef COUNT_ALLOCS + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ +#endif + }, +#if PY_VERSION_HEX >= 0x03050000 + { + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ +# if PY_VERSION_HEX >= 0x030a0000 + (sendfunc) 0, /* am_send */ +# endif + }, +#endif + { + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ +#if PY_VERSION_HEX < 0x03000000 + (coercion) 0, /* nb_coerce */ +#endif + (unaryfunc) 0, /* nb_int */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* nb_reserved */ +#else + (unaryfunc) 0, /* nb_long */ +#endif + (unaryfunc) 0, /* nb_float */ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ +#endif + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ +#if PY_VERSION_HEX >= 0x03050000 + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ +#endif + }, + { + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ + }, + { + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* was_sq_slice */ +#else + (ssizessizeargfunc) 0, /* sq_slice */ +#endif + (ssizeobjargproc) 0, /* sq_ass_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* was_sq_ass_slice */ +#else + (ssizessizeobjargproc) 0, /* sq_ass_slice */ +#endif + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ + }, + { +#if PY_VERSION_HEX < 0x03000000 + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ +#endif + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ + }, + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ +#if PY_VERSION_HEX >= 0x03030000 + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ +#endif +#if PY_VERSION_HEX >= 0x03090000 + (PyObject *) 0, /* ht_module */ +#endif +#if PY_VERSION_HEX >= 0x030b0000 + (char *) 0, /* _ht_tpname */ + { + (PyObject *) 0, /* getitem */ +#if PY_VERSION_HEX >= 0x030c0000 + (uint32_t) 0, /* getitem_version */ +#endif + } +#endif +}; + +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Key_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__Key_type}; + static SwigPyGetSet Metadatum___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__Metadatum_getset[] = { { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" @@ -6714,6 +7215,7 @@ static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::D static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DateValue = {"_p_Exiv2__DateValue", "Exiv2::DateValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifData = {"_p_Exiv2__ExifData", "Exiv2::ExifData *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Key_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Metadatum = {"_p_Exiv2__Metadatum", "Exiv2::Metadatum *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Metadatum_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; @@ -6762,6 +7264,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__DataValue, &_swigt__p_Exiv2__DateValue, &_swigt__p_Exiv2__ExifData, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__Metadatum, &_swigt__p_Exiv2__StringValue, @@ -6810,6 +7313,7 @@ static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DateValue[] = { {&_swigt__p_Exiv2__DateValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifData[] = { {&_swigt__p_Exiv2__ExifData, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Metadatum[] = { {&_swigt__p_Exiv2__Metadatum, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -6858,6 +7362,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__DataValue, _swigc__p_Exiv2__DateValue, _swigc__p_Exiv2__ExifData, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__Metadatum, _swigc__p_Exiv2__StringValue, @@ -7382,6 +7887,29 @@ SWIG_init(void) { } + /* type 'Exiv2::Key' */ + builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Key_type; + builtin_pytype->tp_dict = d = PyDict_New(); + SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); + builtin_pytype->tp_new = PyType_GenericNew; + builtin_base_count = 0; + builtin_bases[builtin_base_count] = NULL; + SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); + PyDict_SetItemString(d, "this", this_descr); + PyDict_SetItemString(d, "thisown", thisown_descr); + if (PyType_Ready(builtin_pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'Key'."); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } + Py_INCREF(builtin_pytype); + PyModule_AddObject(m, "Key", (PyObject *)builtin_pytype); + SwigPyBuiltin_AddPublicSymbol(public_interface, "Key"); + d = md; + /* type 'Exiv2::Metadatum' */ builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__Metadatum_type; builtin_pytype->tp_dict = d = PyDict_New(); diff --git a/src/swig-0_28_2/preview_wrap.cxx b/src/swig-0_28_2/preview_wrap.cxx index f5284fd..0c571db 100644 --- a/src/swig-0_28_2/preview_wrap.cxx +++ b/src/swig-0_28_2/preview_wrap.cxx @@ -3942,64 +3942,65 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__HttpIo swig_types[12] #define SWIGTYPE_p_Exiv2__Image swig_types[13] #define SWIGTYPE_p_Exiv2__IptcKey swig_types[14] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[15] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[16] -#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[17] -#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[18] -#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[19] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[20] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[21] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[22] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[23] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[24] -#define SWIGTYPE_p_Exiv2__Value swig_types[25] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[34] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[35] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[39] -#define SWIGTYPE_p_IptcData_iterator swig_types[40] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[41] -#define SWIGTYPE_p_SwigPyObject swig_types[42] -#define SWIGTYPE_p_ValueType swig_types[43] -#define SWIGTYPE_p_XmpData_iterator swig_types[44] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[45] -#define SWIGTYPE_p_allocator_type swig_types[46] -#define SWIGTYPE_p_char swig_types[47] -#define SWIGTYPE_p_const_iterator swig_types[48] -#define SWIGTYPE_p_difference_type swig_types[49] -#define SWIGTYPE_p_first_type swig_types[50] -#define SWIGTYPE_p_int swig_types[51] -#define SWIGTYPE_p_iterator swig_types[52] -#define SWIGTYPE_p_key_type swig_types[53] -#define SWIGTYPE_p_long_long swig_types[54] -#define SWIGTYPE_p_mapped_type swig_types[55] -#define SWIGTYPE_p_second_type swig_types[56] -#define SWIGTYPE_p_short swig_types[57] -#define SWIGTYPE_p_signed_char swig_types[58] -#define SWIGTYPE_p_size_type swig_types[59] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[60] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[61] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[62] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[63] -#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[65] -#define SWIGTYPE_p_unsigned_char swig_types[66] -#define SWIGTYPE_p_unsigned_int swig_types[67] -#define SWIGTYPE_p_unsigned_long_long swig_types[68] -#define SWIGTYPE_p_unsigned_short swig_types[69] -#define SWIGTYPE_p_value_type swig_types[70] -static swig_type_info *swig_types[72]; -static swig_module_info swig_module = {swig_types, 71, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[15] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[16] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[17] +#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[18] +#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[19] +#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[20] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] +#define SWIGTYPE_p_Exiv2__Value swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[40] +#define SWIGTYPE_p_IptcData_iterator swig_types[41] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[42] +#define SWIGTYPE_p_SwigPyObject swig_types[43] +#define SWIGTYPE_p_ValueType swig_types[44] +#define SWIGTYPE_p_XmpData_iterator swig_types[45] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[46] +#define SWIGTYPE_p_allocator_type swig_types[47] +#define SWIGTYPE_p_char swig_types[48] +#define SWIGTYPE_p_const_iterator swig_types[49] +#define SWIGTYPE_p_difference_type swig_types[50] +#define SWIGTYPE_p_first_type swig_types[51] +#define SWIGTYPE_p_int swig_types[52] +#define SWIGTYPE_p_iterator swig_types[53] +#define SWIGTYPE_p_key_type swig_types[54] +#define SWIGTYPE_p_long_long swig_types[55] +#define SWIGTYPE_p_mapped_type swig_types[56] +#define SWIGTYPE_p_second_type swig_types[57] +#define SWIGTYPE_p_short swig_types[58] +#define SWIGTYPE_p_signed_char swig_types[59] +#define SWIGTYPE_p_size_type swig_types[60] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[61] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[62] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[63] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] +#define SWIGTYPE_p_unsigned_char swig_types[67] +#define SWIGTYPE_p_unsigned_int swig_types[68] +#define SWIGTYPE_p_unsigned_long_long swig_types[69] +#define SWIGTYPE_p_unsigned_short swig_types[70] +#define SWIGTYPE_p_value_type swig_types[71] +static swig_type_info *swig_types[73]; +static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -7444,6 +7445,15 @@ static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(n static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } +static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); +} +static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::IptcKey *) x)); +} +static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } @@ -7537,6 +7547,7 @@ static swig_type_info _swigt__p_Exiv2__GroupInfo = {"_p_Exiv2__GroupInfo", "Exiv static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Image = {"_p_Exiv2__Image", "Exiv2::Image *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__PreviewImage = {"_p_Exiv2__PreviewImage", "Exiv2::PreviewImage *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__PreviewImage_clientdata, 0}; @@ -7610,6 +7621,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__HttpIo, &_swigt__p_Exiv2__Image, &_swigt__p_Exiv2__IptcKey, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__MemIo, &_swigt__p_Exiv2__PreviewImage, @@ -7683,6 +7695,7 @@ static swig_cast_info _swigc__p_Exiv2__GroupInfo[] = { {&_swigt__p_Exiv2__Group static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Image[] = { {&_swigt__p_Exiv2__Image, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewImage[] = { {&_swigt__p_Exiv2__PreviewImage, 0, 0, 0},{0, 0, 0, 0}}; @@ -7756,6 +7769,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__HttpIo, _swigc__p_Exiv2__Image, _swigc__p_Exiv2__IptcKey, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__MemIo, _swigc__p_Exiv2__PreviewImage, diff --git a/src/swig-0_28_2/properties_wrap.cxx b/src/swig-0_28_2/properties_wrap.cxx index 2ebbd37..3a6d456 100644 --- a/src/swig-0_28_2/properties_wrap.cxx +++ b/src/swig-0_28_2/properties_wrap.cxx @@ -7664,7 +7664,7 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -static PyTypeObject *builtin_bases[2]; +static PyTypeObject *builtin_bases[3]; /* ----------------------------------------------------------------------------- * Type initialization: @@ -8225,6 +8225,17 @@ SWIG_init(void) { SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; + builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); + if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { + builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; + } else { + PyErr_SetString(PyExc_TypeError, "Could not create type 'XmpKey' as base 'Exiv2::Key' has not been initialized.\n"); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } builtin_bases[builtin_base_count] = NULL; SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); diff --git a/src/swig-0_28_2/tags_wrap.cxx b/src/swig-0_28_2/tags_wrap.cxx index 95ffefe..54308ae 100644 --- a/src/swig-0_28_2/tags_wrap.cxx +++ b/src/swig-0_28_2/tags_wrap.cxx @@ -7900,7 +7900,7 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -static PyTypeObject *builtin_bases[2]; +static PyTypeObject *builtin_bases[3]; /* ----------------------------------------------------------------------------- * Type initialization: @@ -8489,6 +8489,17 @@ SWIG_init(void) { SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); builtin_pytype->tp_new = PyType_GenericNew; builtin_base_count = 0; + builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__Key"); + if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { + builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; + } else { + PyErr_SetString(PyExc_TypeError, "Could not create type 'ExifKey' as base 'Exiv2::Key' has not been initialized.\n"); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } builtin_bases[builtin_base_count] = NULL; SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); PyDict_SetItemString(d, "this", this_descr); diff --git a/src/swig-0_28_2/xmp_wrap.cxx b/src/swig-0_28_2/xmp_wrap.cxx index 49f8e9d..e56e433 100644 --- a/src/swig-0_28_2/xmp_wrap.cxx +++ b/src/swig-0_28_2/xmp_wrap.cxx @@ -3930,58 +3930,59 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__DataValue swig_types[3] #define SWIGTYPE_p_Exiv2__DateValue swig_types[4] #define SWIGTYPE_p_Exiv2__ExifData swig_types[5] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[6] -#define SWIGTYPE_p_Exiv2__Metadatum swig_types[7] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[8] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[9] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[10] -#define SWIGTYPE_p_Exiv2__Value swig_types[11] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[12] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[13] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[14] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[15] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[16] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[17] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[18] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[19] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[20] -#define SWIGTYPE_p_Exiv2__XmpData swig_types[21] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[22] -#define SWIGTYPE_p_Exiv2__XmpParser swig_types[23] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[24] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[25] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[26] -#define SWIGTYPE_p_Exiv2__Xmpdatum swig_types[27] -#define SWIGTYPE_p_SwigPyObject swig_types[28] -#define SWIGTYPE_p_ValueType swig_types[29] -#define SWIGTYPE_p_XmpData_iterator swig_types[30] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[31] -#define SWIGTYPE_p_allocator_type swig_types[32] -#define SWIGTYPE_p_char swig_types[33] -#define SWIGTYPE_p_const_iterator swig_types[34] -#define SWIGTYPE_p_difference_type swig_types[35] -#define SWIGTYPE_p_f_p_void_bool__void swig_types[36] -#define SWIGTYPE_p_first_type swig_types[37] -#define SWIGTYPE_p_int swig_types[38] -#define SWIGTYPE_p_iterator swig_types[39] -#define SWIGTYPE_p_key_type swig_types[40] -#define SWIGTYPE_p_long_long swig_types[41] -#define SWIGTYPE_p_mapped_type swig_types[42] -#define SWIGTYPE_p_second_type swig_types[43] -#define SWIGTYPE_p_short swig_types[44] -#define SWIGTYPE_p_signed_char swig_types[45] -#define SWIGTYPE_p_size_type swig_types[46] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[47] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[48] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[49] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t__iterator swig_types[50] -#define SWIGTYPE_p_unsigned_char swig_types[51] -#define SWIGTYPE_p_unsigned_int swig_types[52] -#define SWIGTYPE_p_unsigned_long_long swig_types[53] -#define SWIGTYPE_p_unsigned_short swig_types[54] -#define SWIGTYPE_p_value_type swig_types[55] -static swig_type_info *swig_types[57]; -static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__Key swig_types[6] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[7] +#define SWIGTYPE_p_Exiv2__Metadatum swig_types[8] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[9] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[10] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[11] +#define SWIGTYPE_p_Exiv2__Value swig_types[12] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[13] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[14] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[15] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[16] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[17] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[18] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[19] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[20] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[21] +#define SWIGTYPE_p_Exiv2__XmpData swig_types[22] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[23] +#define SWIGTYPE_p_Exiv2__XmpParser swig_types[24] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[25] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[26] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[27] +#define SWIGTYPE_p_Exiv2__Xmpdatum swig_types[28] +#define SWIGTYPE_p_SwigPyObject swig_types[29] +#define SWIGTYPE_p_ValueType swig_types[30] +#define SWIGTYPE_p_XmpData_iterator swig_types[31] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[32] +#define SWIGTYPE_p_allocator_type swig_types[33] +#define SWIGTYPE_p_char swig_types[34] +#define SWIGTYPE_p_const_iterator swig_types[35] +#define SWIGTYPE_p_difference_type swig_types[36] +#define SWIGTYPE_p_f_p_void_bool__void swig_types[37] +#define SWIGTYPE_p_first_type swig_types[38] +#define SWIGTYPE_p_int swig_types[39] +#define SWIGTYPE_p_iterator swig_types[40] +#define SWIGTYPE_p_key_type swig_types[41] +#define SWIGTYPE_p_long_long swig_types[42] +#define SWIGTYPE_p_mapped_type swig_types[43] +#define SWIGTYPE_p_second_type swig_types[44] +#define SWIGTYPE_p_short swig_types[45] +#define SWIGTYPE_p_signed_char swig_types[46] +#define SWIGTYPE_p_size_type swig_types[47] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[48] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[49] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[50] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t__iterator swig_types[51] +#define SWIGTYPE_p_unsigned_char swig_types[52] +#define SWIGTYPE_p_unsigned_int swig_types[53] +#define SWIGTYPE_p_unsigned_long_long swig_types[54] +#define SWIGTYPE_p_unsigned_short swig_types[55] +#define SWIGTYPE_p_value_type swig_types[56] +static swig_type_info *swig_types[58]; +static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -10902,6 +10903,9 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XmpParser_clientdata = {0, 0, /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); +} static void *_p_Exiv2__XmpdatumTo_p_Exiv2__Metadatum(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Metadatum *) ((Exiv2::Xmpdatum *) x)); } @@ -10989,6 +10993,7 @@ static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::D static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DateValue = {"_p_Exiv2__DateValue", "Exiv2::DateValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifData = {"_p_Exiv2__ExifData", "Exiv2::ExifData *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Metadatum = {"_p_Exiv2__Metadatum", "Exiv2::Metadatum *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; @@ -11047,6 +11052,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__DataValue, &_swigt__p_Exiv2__DateValue, &_swigt__p_Exiv2__ExifData, + &_swigt__p_Exiv2__Key, &_swigt__p_Exiv2__LangAltValue, &_swigt__p_Exiv2__Metadatum, &_swigt__p_Exiv2__StringValue, @@ -11105,6 +11111,7 @@ static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DateValue[] = { {&_swigt__p_Exiv2__DateValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifData[] = { {&_swigt__p_Exiv2__ExifData, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Metadatum[] = { {&_swigt__p_Exiv2__Metadatum, 0, 0, 0}, {&_swigt__p_Exiv2__Xmpdatum, _p_Exiv2__XmpdatumTo_p_Exiv2__Metadatum, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -11163,6 +11170,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__DataValue, _swigc__p_Exiv2__DateValue, _swigc__p_Exiv2__ExifData, + _swigc__p_Exiv2__Key, _swigc__p_Exiv2__LangAltValue, _swigc__p_Exiv2__Metadatum, _swigc__p_Exiv2__StringValue, From 38ebd53b171d1bc649984a93286da880232b4c60 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Thu, 15 Feb 2024 10:16:46 +0000 Subject: [PATCH 04/29] Add inheritance diagrams for Key and Metadatum --- src/doc/_templates/module.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/doc/_templates/module.rst b/src/doc/_templates/module.rst index da814ad..ed741f5 100644 --- a/src/doc/_templates/module.rst +++ b/src/doc/_templates/module.rst @@ -20,6 +20,16 @@ :top-classes: exiv2.basicio.BasicIo {% endif %} + {% if fullname in ["exiv2._datasets", "exiv2._metadatum", "exiv2._properties", "exiv2._tags"] %} + .. inheritance-diagram:: exiv2.ExifKey exiv2.IptcKey exiv2.XmpKey + :top-classes: exiv2.metadatum.Key + {% endif %} + + {% if fullname in ["exiv2._exif", "exiv2._iptc", "exiv2._metadatum", "exiv2._xmp"] %} + .. inheritance-diagram:: exiv2.Exifdatum exiv2.Iptcdatum exiv2.Xmpdatum + :top-classes: exiv2.metadatum.Metadatum + {% endif %} + .. autosummary:: {% for item in classes %} {{ item }} From 64e9ca41f513795007fdc778f6030a2a490d38dd Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Thu, 15 Feb 2024 11:24:12 +0000 Subject: [PATCH 05/29] Remove unneeded XmpParser.initialize calls in tests --- tests/test_basicio.py | 1 - tests/test_easyaccess.py | 3 +-- tests/test_exif.py | 1 - tests/test_image.py | 1 - tests/test_iptc.py | 1 - tests/test_preview.py | 1 - tests/test_properties.py | 4 ++++ tests/test_xmp.py | 5 ----- 8 files changed, 5 insertions(+), 12 deletions(-) diff --git a/tests/test_basicio.py b/tests/test_basicio.py index 75fbd08..5f5e639 100644 --- a/tests/test_basicio.py +++ b/tests/test_basicio.py @@ -29,7 +29,6 @@ class TestBasicIoModule(unittest.TestCase): @classmethod def setUpClass(cls): - exiv2.XmpParser.initialize() test_dir = os.path.dirname(__file__) cls.image_path = os.path.join(test_dir, 'image_02.jpg') cls.data = b'The quick brown fox jumps over the lazy dog' diff --git a/tests/test_easyaccess.py b/tests/test_easyaccess.py index 530b408..e979cb2 100644 --- a/tests/test_easyaccess.py +++ b/tests/test_easyaccess.py @@ -1,6 +1,6 @@ ## python-exiv2 - Python interface to libexiv2 ## http://github.com/jim-easterbrook/python-exiv2 -## Copyright (C) 2023 Jim Easterbrook jim@jim-easterbrook.me.uk +## Copyright (C) 2023-24 Jim Easterbrook jim@jim-easterbrook.me.uk ## ## This program is free software: you can redistribute it and/or ## modify it under the terms of the GNU General Public License as @@ -25,7 +25,6 @@ class TestEasyaccessModule(unittest.TestCase): @classmethod def setUpClass(cls): - exiv2.XmpParser.initialize() test_dir = os.path.dirname(__file__) image = exiv2.ImageFactory.open(os.path.join(test_dir, 'image_02.jpg')) image.readMetadata() diff --git a/tests/test_exif.py b/tests/test_exif.py index d410438..934d0e7 100644 --- a/tests/test_exif.py +++ b/tests/test_exif.py @@ -27,7 +27,6 @@ class TestExifModule(unittest.TestCase): @classmethod def setUpClass(cls): - exiv2.XmpParser.initialize() test_dir = os.path.dirname(__file__) # open image in memory so we don't corrupt the file with open(os.path.join(test_dir, 'image_02.jpg'), 'rb') as f: diff --git a/tests/test_image.py b/tests/test_image.py index 77121aa..0d977b8 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -27,7 +27,6 @@ class TestImageModule(unittest.TestCase): @classmethod def setUpClass(cls): - exiv2.XmpParser.initialize() test_dir = os.path.dirname(__file__) cls.image_path = os.path.join(test_dir, 'image_02.jpg') # read image file data into memory diff --git a/tests/test_iptc.py b/tests/test_iptc.py index dcb0901..6b518a1 100644 --- a/tests/test_iptc.py +++ b/tests/test_iptc.py @@ -26,7 +26,6 @@ class TestIptcModule(unittest.TestCase): @classmethod def setUpClass(cls): - exiv2.XmpParser.initialize() test_dir = os.path.dirname(__file__) # open image in memory so we don't corrupt the file with open(os.path.join(test_dir, 'image_02.jpg'), 'rb') as f: diff --git a/tests/test_preview.py b/tests/test_preview.py index f373923..96c679a 100644 --- a/tests/test_preview.py +++ b/tests/test_preview.py @@ -27,7 +27,6 @@ class TestPreviewModule(unittest.TestCase): @classmethod def setUpClass(cls): - exiv2.XmpParser.initialize() test_dir = os.path.dirname(__file__) cls.image_path = os.path.join(test_dir, 'image_02.jpg') # read image file data into memory diff --git a/tests/test_properties.py b/tests/test_properties.py index 6a40d95..50959bd 100644 --- a/tests/test_properties.py +++ b/tests/test_properties.py @@ -34,6 +34,10 @@ class TestPropertiesModule(unittest.TestCase): def setUpClass(cls): exiv2.XmpParser.initialize() + @classmethod + def tearDownClass(cls): + exiv2.XmpParser.terminate() + def check_result(self, result, expected_type, expected_value): self.assertIsInstance(result, expected_type) self.assertEqual(result, expected_value) diff --git a/tests/test_xmp.py b/tests/test_xmp.py index 53c0e60..7af4541 100644 --- a/tests/test_xmp.py +++ b/tests/test_xmp.py @@ -26,16 +26,11 @@ class TestXmpModule(unittest.TestCase): @classmethod def setUpClass(cls): - exiv2.XmpParser.initialize() test_dir = os.path.dirname(__file__) # open image in memory so we don't corrupt the file with open(os.path.join(test_dir, 'image_02.jpg'), 'rb') as f: cls.image = exiv2.ImageFactory.open(f.read()) - @classmethod - def tearDownClass(cls): - exiv2.XmpParser.terminate() - def test_XmpData(self): # empty container data = exiv2.XmpData() From 4b211479b829f5474d6422a26317455b4495ea08 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Thu, 15 Feb 2024 14:43:04 +0000 Subject: [PATCH 06/29] Set English locale for some tests Some tests check strings returned by libexiv2 that may be localised on non-English machines. --- tests/test_error.py | 9 +++++++++ tests/test_exif.py | 5 +++++ tests/test_tags.py | 9 +++++++++ tests/test_types.py | 5 +++++ tests/test_xmp.py | 5 +++++ 5 files changed, 33 insertions(+) diff --git a/tests/test_error.py b/tests/test_error.py index 9434512..48654c7 100644 --- a/tests/test_error.py +++ b/tests/test_error.py @@ -18,12 +18,21 @@ import enum import logging +import os import unittest import exiv2 class TestErrorModule(unittest.TestCase): + @classmethod + def setUpClass(cls): + # clear locale + name = 'en_US.UTF-8' + os.environ['LC_ALL'] = name + os.environ['LANG'] = name + os.environ['LANGUAGE'] = name + def check_result(self, result, expected_type, expected_value): self.assertIsInstance(result, expected_type) self.assertEqual(result, expected_value) diff --git a/tests/test_exif.py b/tests/test_exif.py index 934d0e7..ea4aa97 100644 --- a/tests/test_exif.py +++ b/tests/test_exif.py @@ -31,6 +31,11 @@ def setUpClass(cls): # open image in memory so we don't corrupt the file with open(os.path.join(test_dir, 'image_02.jpg'), 'rb') as f: cls.image = exiv2.ImageFactory.open(f.read()) + # clear locale + name = 'en_US.UTF-8' + os.environ['LC_ALL'] = name + os.environ['LANG'] = name + os.environ['LANGUAGE'] = name def test_ExifData(self): # empty container diff --git a/tests/test_tags.py b/tests/test_tags.py index f7225f4..f5a4700 100644 --- a/tests/test_tags.py +++ b/tests/test_tags.py @@ -16,6 +16,7 @@ ## along with this program. If not, see ## . +import os import unittest import exiv2 @@ -26,6 +27,14 @@ class TestTagsModule(unittest.TestCase): group_name = 'Image' tag = 270 + @classmethod + def setUpClass(cls): + # clear locale + name = 'en_US.UTF-8' + os.environ['LC_ALL'] = name + os.environ['LANG'] = name + os.environ['LANGUAGE'] = name + def check_result(self, result, expected_type, expected_value): self.assertIsInstance(result, expected_type) self.assertEqual(result, expected_value) diff --git a/tests/test_types.py b/tests/test_types.py index f430ba1..9ea9ea1 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -131,6 +131,11 @@ def test_localisation(self): self.skipTest("locale environment ignored") # test localisation self.check_result(exiv2.exvGettext(str_en), str, str_de) + # clear locale + name = 'en_US.UTF-8' + os.environ['LC_ALL'] = name + os.environ['LANG'] = name + os.environ['LANGUAGE'] = name if __name__ == '__main__': diff --git a/tests/test_xmp.py b/tests/test_xmp.py index 7af4541..28c345c 100644 --- a/tests/test_xmp.py +++ b/tests/test_xmp.py @@ -30,6 +30,11 @@ def setUpClass(cls): # open image in memory so we don't corrupt the file with open(os.path.join(test_dir, 'image_02.jpg'), 'rb') as f: cls.image = exiv2.ImageFactory.open(f.read()) + # clear locale + name = 'en_US.UTF-8' + os.environ['LC_ALL'] = name + os.environ['LANG'] = name + os.environ['LANGUAGE'] = name def test_XmpData(self): # empty container From 7715c19209968b72344d7e6666874f63973b2822 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Thu, 15 Feb 2024 14:57:26 +0000 Subject: [PATCH 07/29] Add some more localisation tests --- tests/test_types.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_types.py b/tests/test_types.py index 9ea9ea1..c001021 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -17,6 +17,7 @@ ## . import locale +import logging import os import random import sys @@ -131,6 +132,15 @@ def test_localisation(self): self.skipTest("locale environment ignored") # test localisation self.check_result(exiv2.exvGettext(str_en), str, str_de) + with self.assertLogs(level=logging.WARNING) as cm: + comment = exiv2.CommentValue('charset=invalid Fred') + self.assertEqual(cm.output, + ['WARNING:exiv2:Ungültiger Zeichensatz: "invalid"']) + with self.assertRaises(exiv2.Exiv2Error) as cm: + image = exiv2.ImageFactory.open('non-existing.jpg') + self.assertEqual(cm.exception.message.split(':')[:2], + ['non-existing.jpg', + ' Die Datenquelle konnte nicht geöffnet werden']) # clear locale name = 'en_US.UTF-8' os.environ['LC_ALL'] = name From bd431b33d638682c2b81e0af037ef73e0f4a21ca Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Thu, 15 Feb 2024 16:53:38 +0000 Subject: [PATCH 08/29] Disable localised error message test on v0.28.x Since v0.28.0 libexiv2's error messages have not been localised. See https://github.com/Exiv2/exiv2/pull/2924 --- tests/test_types.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/test_types.py b/tests/test_types.py index c001021..234dac1 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -132,15 +132,16 @@ def test_localisation(self): self.skipTest("locale environment ignored") # test localisation self.check_result(exiv2.exvGettext(str_en), str, str_de) - with self.assertLogs(level=logging.WARNING) as cm: - comment = exiv2.CommentValue('charset=invalid Fred') - self.assertEqual(cm.output, - ['WARNING:exiv2:Ungültiger Zeichensatz: "invalid"']) - with self.assertRaises(exiv2.Exiv2Error) as cm: - image = exiv2.ImageFactory.open('non-existing.jpg') - self.assertEqual(cm.exception.message.split(':')[:2], - ['non-existing.jpg', - ' Die Datenquelle konnte nicht geöffnet werden']) + if not exiv2.testVersion(0, 28, 0): + with self.assertLogs(level=logging.WARNING) as cm: + comment = exiv2.CommentValue('charset=invalid Fred') + self.assertEqual(cm.output, [ + 'WARNING:exiv2:Ungültiger Zeichensatz: "invalid"']) + with self.assertRaises(exiv2.Exiv2Error) as cm: + image = exiv2.ImageFactory.open('non-existing.jpg') + self.assertEqual(cm.exception.message.split(':')[:2], + ['non-existing.jpg', + ' Die Datenquelle konnte nicht geöffnet werden']) # clear locale name = 'en_US.UTF-8' os.environ['LC_ALL'] = name From f5137403825d6926dec62882d8e7f40e8257ee3f Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Thu, 15 Feb 2024 17:04:02 +0000 Subject: [PATCH 09/29] Translate Windows messages from code page to utf-8 --- src/interface/error.i | 10 ++- src/interface/shared/exception.i | 11 +++- src/interface/shared/windows_cp.i | 55 ++++++++++++++++ src/interface/shared/windows_path.i | 55 +++------------- src/swig-0_27_3/basicio_wrap.cxx | 97 +++++++++++++++-------------- src/swig-0_27_3/datasets_wrap.cxx | 40 +++++++++++- src/swig-0_27_3/easyaccess_wrap.cxx | 40 +++++++++++- src/swig-0_27_3/error_wrap.cxx | 44 ++++++++++++- src/swig-0_27_3/exif_wrap.cxx | 83 ++++++++++++------------ src/swig-0_27_3/image_wrap.cxx | 85 ++++++++++++------------- src/swig-0_27_3/iptc_wrap.cxx | 40 +++++++++++- src/swig-0_27_3/metadatum_wrap.cxx | 40 +++++++++++- src/swig-0_27_3/preview_wrap.cxx | 81 ++++++++++++------------ src/swig-0_27_3/properties_wrap.cxx | 40 +++++++++++- src/swig-0_27_3/tags_wrap.cxx | 40 +++++++++++- src/swig-0_27_3/types_wrap.cxx | 40 +++++++++++- src/swig-0_27_3/value_wrap.cxx | 40 +++++++++++- src/swig-0_27_3/version_wrap.cxx | 40 +++++++++++- src/swig-0_27_3/xmp_wrap.cxx | 40 +++++++++++- src/swig-0_27_7/basicio_wrap.cxx | 97 +++++++++++++++-------------- src/swig-0_27_7/datasets_wrap.cxx | 40 +++++++++++- src/swig-0_27_7/easyaccess_wrap.cxx | 40 +++++++++++- src/swig-0_27_7/error_wrap.cxx | 44 ++++++++++++- src/swig-0_27_7/exif_wrap.cxx | 83 ++++++++++++------------ src/swig-0_27_7/image_wrap.cxx | 85 ++++++++++++------------- src/swig-0_27_7/iptc_wrap.cxx | 40 +++++++++++- src/swig-0_27_7/metadatum_wrap.cxx | 40 +++++++++++- src/swig-0_27_7/preview_wrap.cxx | 81 ++++++++++++------------ src/swig-0_27_7/properties_wrap.cxx | 40 +++++++++++- src/swig-0_27_7/tags_wrap.cxx | 40 +++++++++++- src/swig-0_27_7/types_wrap.cxx | 40 +++++++++++- src/swig-0_27_7/value_wrap.cxx | 40 +++++++++++- src/swig-0_27_7/version_wrap.cxx | 40 +++++++++++- src/swig-0_27_7/xmp_wrap.cxx | 40 +++++++++++- src/swig-0_28_2/basicio_wrap.cxx | 95 ++++++++++++++-------------- src/swig-0_28_2/datasets_wrap.cxx | 38 +++++++++++ src/swig-0_28_2/easyaccess_wrap.cxx | 38 +++++++++++ src/swig-0_28_2/error_wrap.cxx | 44 ++++++++++++- src/swig-0_28_2/exif_wrap.cxx | 81 ++++++++++++------------ src/swig-0_28_2/image_wrap.cxx | 83 ++++++++++++------------ src/swig-0_28_2/iptc_wrap.cxx | 38 +++++++++++ src/swig-0_28_2/metadatum_wrap.cxx | 38 +++++++++++ src/swig-0_28_2/preview_wrap.cxx | 79 +++++++++++------------ src/swig-0_28_2/properties_wrap.cxx | 38 +++++++++++ src/swig-0_28_2/tags_wrap.cxx | 38 +++++++++++ src/swig-0_28_2/types_wrap.cxx | 38 +++++++++++ src/swig-0_28_2/value_wrap.cxx | 38 +++++++++++ src/swig-0_28_2/version_wrap.cxx | 38 +++++++++++ src/swig-0_28_2/xmp_wrap.cxx | 38 +++++++++++ 49 files changed, 1883 insertions(+), 590 deletions(-) create mode 100644 src/interface/shared/windows_cp.i diff --git a/src/interface/error.i b/src/interface/error.i index fb1f855..59e637b 100644 --- a/src/interface/error.i +++ b/src/interface/error.i @@ -23,6 +23,7 @@ %include "shared/preamble.i" %include "shared/enum.i" +%include "shared/exception.i" %include "std_except.i" @@ -33,15 +34,18 @@ exiv2_module, "Exiv2Error"); // Set Python logger as Exiv2 log handler +%fragment("utf8_to_wcp"); %{ static PyObject* logger = NULL; static void log_to_python(int level, const char* msg) { - Py_ssize_t len = strlen(msg); - while (len > 0 && msg[len-1] == '\n') + std::string copy = msg; + utf8_to_wcp(©, false); + Py_ssize_t len = copy.size(); + while (len > 0 && copy[len-1] == '\n') len--; PyGILState_STATE gstate = PyGILState_Ensure(); PyObject* res = PyObject_CallMethod( - logger, "log", "(is#)", (level + 1) * 10, msg, len); + logger, "log", "(is#)", (level + 1) * 10, copy.c_str(), len); Py_XDECREF(res); PyGILState_Release(gstate); }; diff --git a/src/interface/shared/exception.i b/src/interface/shared/exception.i index 19ea27f..64d200b 100644 --- a/src/interface/shared/exception.i +++ b/src/interface/shared/exception.i @@ -16,6 +16,7 @@ // along with this program. If not, see . %include "shared/enum.i" +%include "shared/windows_cp.i" %include "exception.i" @@ -35,16 +36,20 @@ static PyObject* PyExc_Exiv2Error = NULL; } // Function that re-raises an exception to handle different types -%fragment("_set_python_exception", "header", fragment="_import_exception", - fragment="py_from_enum"{Exiv2::ErrorCode}) { +%fragment("_set_python_exception", "header", + fragment="_import_exception", + fragment="py_from_enum"{Exiv2::ErrorCode}, + fragment="utf8_to_wcp") { static void _set_python_exception() { try { throw; } #if EXIV2_VERSION_HEX < 0x001c0000 catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/interface/shared/windows_cp.i b/src/interface/shared/windows_cp.i new file mode 100644 index 0000000..6ee6db2 --- /dev/null +++ b/src/interface/shared/windows_cp.i @@ -0,0 +1,55 @@ +// python-exiv2 - Python interface to libexiv2 +// http://github.com/jim-easterbrook/python-exiv2 +// Copyright (C) 2024 Jim Easterbrook jim@jim-easterbrook.me.uk +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + + +// Function to convert utf-8 string to/from current Windows code page +%fragment("utf8_to_wcp", "header") %{ +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; +%} diff --git a/src/interface/shared/windows_path.i b/src/interface/shared/windows_path.i index 634ed4c..0c7ad5f 100644 --- a/src/interface/shared/windows_path.i +++ b/src/interface/shared/windows_path.i @@ -1,6 +1,6 @@ // python-exiv2 - Python interface to libexiv2 // http://github.com/jim-easterbrook/python-exiv2 -// Copyright (C) 2023 Jim Easterbrook jim@jim-easterbrook.me.uk +// Copyright (C) 2023-24 Jim Easterbrook jim@jim-easterbrook.me.uk // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -16,55 +16,18 @@ // along with this program. If not, see . +%include "shared/windows_cp.i" + // If exiv2's wstring methods are available then use them! #ifdef EXV_UNICODE_PATH %include "std_wstring.i" #endif -// Function to convert utf-8 string to/from current code page -%fragment("transcode_path", "header") %{ -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; -%} - // Macro to convert Windows path inputs from utf-8 to current code page %define WINDOWS_PATH(signature) #ifndef EXV_UNICODE_PATH -%typemap(check, fragment="transcode_path") signature { - if (transcode_path($1, true) < 0) { +%typemap(check, fragment="utf8_to_wcp") signature { + if (utf8_to_wcp($1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -74,15 +37,15 @@ static int transcode_path(std::string *path, bool to_cp) { // Macro to convert Windows path outputs from current code page to utf-8 %define WINDOWS_PATH_OUT(function) #ifndef EXV_UNICODE_PATH -%typemap(out, fragment="transcode_path") std::string function { - if (transcode_path(&$1, false) < 0) { +%typemap(out, fragment="utf8_to_wcp") std::string function { + if (utf8_to_wcp(&$1, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } $result = SWIG_From_std_string($1); } -%typemap(out, fragment="transcode_path") const std::string& function { +%typemap(out, fragment="utf8_to_wcp") const std::string& function { std::string copy = *$1; - if (transcode_path(©, false) < 0) { + if (utf8_to_wcp(©, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } $result = SWIG_From_std_string(copy); diff --git a/src/swig-0_27_3/basicio_wrap.cxx b/src/swig-0_27_3/basicio_wrap.cxx index fe1a434..42f689c 100644 --- a/src/swig-0_27_3/basicio_wrap.cxx +++ b/src/swig-0_27_3/basicio_wrap.cxx @@ -4187,14 +4187,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } @@ -4751,43 +4789,6 @@ SWIGINTERNINLINE PyObject* } -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; - - /* Return string from Python obj. NOTE: obj must remain in scope in order to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */ SWIGINTERN int @@ -5734,7 +5735,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::BasicIo * >(argp1); result = ((Exiv2::BasicIo const *)arg1)->path(); { - if (transcode_path(&result, false) < 0) { + if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(result); @@ -5766,7 +5767,7 @@ SWIGINTERN int _wrap_new_FileIo(PyObject *self, PyObject *args, PyObject *kwargs arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6535,7 +6536,7 @@ SWIGINTERN PyObject *_wrap_FileIo_setPath(PyObject *self, PyObject *args) { arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6701,7 +6702,7 @@ SWIGINTERN PyObject *_wrap_FileIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); result = ((Exiv2::FileIo const *)arg1)->path(); { - if (transcode_path(&result, false) < 0) { + if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(result); @@ -7482,7 +7483,7 @@ SWIGINTERN PyObject *_wrap_MemIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); result = ((Exiv2::MemIo const *)arg1)->path(); { - if (transcode_path(&result, false) < 0) { + if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(result); @@ -7518,7 +7519,7 @@ SWIGINTERN int _wrap_new_XPathIo(PyObject *self, PyObject *args, PyObject *kwarg arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -7632,7 +7633,7 @@ SWIGINTERN PyObject *_wrap_XPathIo_writeDataToFile(PyObject *self, PyObject *arg arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -8388,7 +8389,7 @@ SWIGINTERN PyObject *_wrap_RemoteIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); result = ((Exiv2::RemoteIo const *)arg1)->path(); { - if (transcode_path(&result, false) < 0) { + if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(result); @@ -8433,7 +8434,7 @@ SWIGINTERN int _wrap_new_HttpIo__SWIG_0(PyObject *self, PyObject *args, PyObject } arg2 = static_cast< size_t >(val2); { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -8476,7 +8477,7 @@ SWIGINTERN int _wrap_new_HttpIo__SWIG_1(PyObject *self, PyObject *args, PyObject arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } diff --git a/src/swig-0_27_3/datasets_wrap.cxx b/src/swig-0_27_3/datasets_wrap.cxx index 03c1742..527273b 100644 --- a/src/swig-0_27_3/datasets_wrap.cxx +++ b/src/swig-0_27_3/datasets_wrap.cxx @@ -4210,14 +4210,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_3/easyaccess_wrap.cxx b/src/swig-0_27_3/easyaccess_wrap.cxx index cb8cbaf..cfccf97 100644 --- a/src/swig-0_27_3/easyaccess_wrap.cxx +++ b/src/swig-0_27_3/easyaccess_wrap.cxx @@ -4166,14 +4166,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_3/error_wrap.cxx b/src/swig-0_27_3/error_wrap.cxx index 79da71a..091463b 100644 --- a/src/swig-0_27_3/error_wrap.cxx +++ b/src/swig-0_27_3/error_wrap.cxx @@ -4137,14 +4137,52 @@ SWIG_FromCharPtr(const char *cptr) static PyObject* exiv2_module = NULL; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static PyObject* logger = NULL; static void log_to_python(int level, const char* msg) { - Py_ssize_t len = strlen(msg); - while (len > 0 && msg[len-1] == '\n') + std::string copy = msg; + utf8_to_wcp(©, false); + Py_ssize_t len = copy.size(); + while (len > 0 && copy[len-1] == '\n') len--; PyGILState_STATE gstate = PyGILState_Ensure(); PyObject* res = PyObject_CallMethod( - logger, "log", "(is#)", (level + 1) * 10, msg, len); + logger, "log", "(is#)", (level + 1) * 10, copy.c_str(), len); Py_XDECREF(res); PyGILState_Release(gstate); }; diff --git a/src/swig-0_27_3/exif_wrap.cxx b/src/swig-0_27_3/exif_wrap.cxx index 0eea5d0..8196177 100644 --- a/src/swig-0_27_3/exif_wrap.cxx +++ b/src/swig-0_27_3/exif_wrap.cxx @@ -4225,14 +4225,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } @@ -5253,43 +5291,6 @@ SWIGINTERN std::string Exiv2_Exifdatum__print(Exiv2::Exifdatum const *self,Exiv2 return self->print(pMetadata); } -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; - - SWIGINTERN int SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) { @@ -8513,7 +8514,7 @@ SWIGINTERN PyObject *_wrap_ExifThumbC_writeFile(PyObject *self, PyObject *args) arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -8721,7 +8722,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_0(PyObject *self, Py } arg5 = static_cast< uint16_t >(val5); { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -8850,7 +8851,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_2(PyObject *self, Py arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } diff --git a/src/swig-0_27_3/image_wrap.cxx b/src/swig-0_27_3/image_wrap.cxx index 3aeeb0b..44aa5da 100644 --- a/src/swig-0_27_3/image_wrap.cxx +++ b/src/swig-0_27_3/image_wrap.cxx @@ -4238,14 +4238,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } @@ -4805,43 +4843,6 @@ static PyObject* py_from_enum_Exiv2_ImageType(long value) { return result; }; - -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; - #ifdef __cplusplus extern "C" { #endif @@ -6244,7 +6245,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo(PyObject *self, PyObject *args) arg2 = static_cast< bool >(val2); } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6302,7 +6303,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_open__SWIG_0(PyObject *self, Py_ssize_t arg2 = static_cast< bool >(val2); } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6450,7 +6451,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_create__SWIG_0(PyObject *self, Py_ssize_ arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6567,7 +6568,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_getType__SWIG_0(PyObject *self, Py_ssize arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } diff --git a/src/swig-0_27_3/iptc_wrap.cxx b/src/swig-0_27_3/iptc_wrap.cxx index a44bc7c..3541698 100644 --- a/src/swig-0_27_3/iptc_wrap.cxx +++ b/src/swig-0_27_3/iptc_wrap.cxx @@ -4223,14 +4223,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_3/metadatum_wrap.cxx b/src/swig-0_27_3/metadatum_wrap.cxx index 13a3ec3..fe819f0 100644 --- a/src/swig-0_27_3/metadatum_wrap.cxx +++ b/src/swig-0_27_3/metadatum_wrap.cxx @@ -4209,14 +4209,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_3/preview_wrap.cxx b/src/swig-0_27_3/preview_wrap.cxx index 400b541..bb0405c 100644 --- a/src/swig-0_27_3/preview_wrap.cxx +++ b/src/swig-0_27_3/preview_wrap.cxx @@ -4393,14 +4393,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } @@ -5543,43 +5581,6 @@ SWIGINTERN PyObject *Exiv2_PreviewProperties___setitem__(Exiv2::PreviewPropertie return SWIG_Py_Void(); } -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; - - #define SWIG_From_long PyInt_FromLong SWIGINTERN size_t Exiv2_PreviewImage___len__(Exiv2::PreviewImage *self){ @@ -6346,7 +6347,7 @@ SWIGINTERN PyObject *_wrap_PreviewImage_writeFile(PyObject *self, PyObject *args arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6404,7 +6405,7 @@ SWIGINTERN PyObject *_wrap_PreviewImage_extension(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::PreviewImage * >(argp1); result = ((Exiv2::PreviewImage const *)arg1)->extension(); { - if (transcode_path(&result, false) < 0) { + if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(result); diff --git a/src/swig-0_27_3/properties_wrap.cxx b/src/swig-0_27_3/properties_wrap.cxx index c48945d..e8a6f83 100644 --- a/src/swig-0_27_3/properties_wrap.cxx +++ b/src/swig-0_27_3/properties_wrap.cxx @@ -4212,14 +4212,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_3/tags_wrap.cxx b/src/swig-0_27_3/tags_wrap.cxx index f2e29e4..be4999a 100644 --- a/src/swig-0_27_3/tags_wrap.cxx +++ b/src/swig-0_27_3/tags_wrap.cxx @@ -4212,14 +4212,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_3/types_wrap.cxx b/src/swig-0_27_3/types_wrap.cxx index 72bb990..37ddab4 100644 --- a/src/swig-0_27_3/types_wrap.cxx +++ b/src/swig-0_27_3/types_wrap.cxx @@ -4198,14 +4198,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_3/value_wrap.cxx b/src/swig-0_27_3/value_wrap.cxx index bb960a2..0ad5168 100644 --- a/src/swig-0_27_3/value_wrap.cxx +++ b/src/swig-0_27_3/value_wrap.cxx @@ -4381,14 +4381,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_3/version_wrap.cxx b/src/swig-0_27_3/version_wrap.cxx index 2724de1..ced3e77 100644 --- a/src/swig-0_27_3/version_wrap.cxx +++ b/src/swig-0_27_3/version_wrap.cxx @@ -4178,14 +4178,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_3/xmp_wrap.cxx b/src/swig-0_27_3/xmp_wrap.cxx index d9a574e..da0dbf7 100644 --- a/src/swig-0_27_3/xmp_wrap.cxx +++ b/src/swig-0_27_3/xmp_wrap.cxx @@ -4225,14 +4225,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_7/basicio_wrap.cxx b/src/swig-0_27_7/basicio_wrap.cxx index fe1a434..42f689c 100644 --- a/src/swig-0_27_7/basicio_wrap.cxx +++ b/src/swig-0_27_7/basicio_wrap.cxx @@ -4187,14 +4187,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } @@ -4751,43 +4789,6 @@ SWIGINTERNINLINE PyObject* } -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; - - /* Return string from Python obj. NOTE: obj must remain in scope in order to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */ SWIGINTERN int @@ -5734,7 +5735,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::BasicIo * >(argp1); result = ((Exiv2::BasicIo const *)arg1)->path(); { - if (transcode_path(&result, false) < 0) { + if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(result); @@ -5766,7 +5767,7 @@ SWIGINTERN int _wrap_new_FileIo(PyObject *self, PyObject *args, PyObject *kwargs arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6535,7 +6536,7 @@ SWIGINTERN PyObject *_wrap_FileIo_setPath(PyObject *self, PyObject *args) { arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6701,7 +6702,7 @@ SWIGINTERN PyObject *_wrap_FileIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); result = ((Exiv2::FileIo const *)arg1)->path(); { - if (transcode_path(&result, false) < 0) { + if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(result); @@ -7482,7 +7483,7 @@ SWIGINTERN PyObject *_wrap_MemIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); result = ((Exiv2::MemIo const *)arg1)->path(); { - if (transcode_path(&result, false) < 0) { + if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(result); @@ -7518,7 +7519,7 @@ SWIGINTERN int _wrap_new_XPathIo(PyObject *self, PyObject *args, PyObject *kwarg arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -7632,7 +7633,7 @@ SWIGINTERN PyObject *_wrap_XPathIo_writeDataToFile(PyObject *self, PyObject *arg arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -8388,7 +8389,7 @@ SWIGINTERN PyObject *_wrap_RemoteIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); result = ((Exiv2::RemoteIo const *)arg1)->path(); { - if (transcode_path(&result, false) < 0) { + if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(result); @@ -8433,7 +8434,7 @@ SWIGINTERN int _wrap_new_HttpIo__SWIG_0(PyObject *self, PyObject *args, PyObject } arg2 = static_cast< size_t >(val2); { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -8476,7 +8477,7 @@ SWIGINTERN int _wrap_new_HttpIo__SWIG_1(PyObject *self, PyObject *args, PyObject arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } diff --git a/src/swig-0_27_7/datasets_wrap.cxx b/src/swig-0_27_7/datasets_wrap.cxx index 03c1742..527273b 100644 --- a/src/swig-0_27_7/datasets_wrap.cxx +++ b/src/swig-0_27_7/datasets_wrap.cxx @@ -4210,14 +4210,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_7/easyaccess_wrap.cxx b/src/swig-0_27_7/easyaccess_wrap.cxx index 2d40292..f3990b8 100644 --- a/src/swig-0_27_7/easyaccess_wrap.cxx +++ b/src/swig-0_27_7/easyaccess_wrap.cxx @@ -4166,14 +4166,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_7/error_wrap.cxx b/src/swig-0_27_7/error_wrap.cxx index 79da71a..091463b 100644 --- a/src/swig-0_27_7/error_wrap.cxx +++ b/src/swig-0_27_7/error_wrap.cxx @@ -4137,14 +4137,52 @@ SWIG_FromCharPtr(const char *cptr) static PyObject* exiv2_module = NULL; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static PyObject* logger = NULL; static void log_to_python(int level, const char* msg) { - Py_ssize_t len = strlen(msg); - while (len > 0 && msg[len-1] == '\n') + std::string copy = msg; + utf8_to_wcp(©, false); + Py_ssize_t len = copy.size(); + while (len > 0 && copy[len-1] == '\n') len--; PyGILState_STATE gstate = PyGILState_Ensure(); PyObject* res = PyObject_CallMethod( - logger, "log", "(is#)", (level + 1) * 10, msg, len); + logger, "log", "(is#)", (level + 1) * 10, copy.c_str(), len); Py_XDECREF(res); PyGILState_Release(gstate); }; diff --git a/src/swig-0_27_7/exif_wrap.cxx b/src/swig-0_27_7/exif_wrap.cxx index 0eea5d0..8196177 100644 --- a/src/swig-0_27_7/exif_wrap.cxx +++ b/src/swig-0_27_7/exif_wrap.cxx @@ -4225,14 +4225,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } @@ -5253,43 +5291,6 @@ SWIGINTERN std::string Exiv2_Exifdatum__print(Exiv2::Exifdatum const *self,Exiv2 return self->print(pMetadata); } -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; - - SWIGINTERN int SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) { @@ -8513,7 +8514,7 @@ SWIGINTERN PyObject *_wrap_ExifThumbC_writeFile(PyObject *self, PyObject *args) arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -8721,7 +8722,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_0(PyObject *self, Py } arg5 = static_cast< uint16_t >(val5); { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -8850,7 +8851,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_2(PyObject *self, Py arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } diff --git a/src/swig-0_27_7/image_wrap.cxx b/src/swig-0_27_7/image_wrap.cxx index 3aeeb0b..44aa5da 100644 --- a/src/swig-0_27_7/image_wrap.cxx +++ b/src/swig-0_27_7/image_wrap.cxx @@ -4238,14 +4238,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } @@ -4805,43 +4843,6 @@ static PyObject* py_from_enum_Exiv2_ImageType(long value) { return result; }; - -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; - #ifdef __cplusplus extern "C" { #endif @@ -6244,7 +6245,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo(PyObject *self, PyObject *args) arg2 = static_cast< bool >(val2); } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6302,7 +6303,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_open__SWIG_0(PyObject *self, Py_ssize_t arg2 = static_cast< bool >(val2); } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6450,7 +6451,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_create__SWIG_0(PyObject *self, Py_ssize_ arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6567,7 +6568,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_getType__SWIG_0(PyObject *self, Py_ssize arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } diff --git a/src/swig-0_27_7/iptc_wrap.cxx b/src/swig-0_27_7/iptc_wrap.cxx index a44bc7c..3541698 100644 --- a/src/swig-0_27_7/iptc_wrap.cxx +++ b/src/swig-0_27_7/iptc_wrap.cxx @@ -4223,14 +4223,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_7/metadatum_wrap.cxx b/src/swig-0_27_7/metadatum_wrap.cxx index 13a3ec3..fe819f0 100644 --- a/src/swig-0_27_7/metadatum_wrap.cxx +++ b/src/swig-0_27_7/metadatum_wrap.cxx @@ -4209,14 +4209,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_7/preview_wrap.cxx b/src/swig-0_27_7/preview_wrap.cxx index 400b541..bb0405c 100644 --- a/src/swig-0_27_7/preview_wrap.cxx +++ b/src/swig-0_27_7/preview_wrap.cxx @@ -4393,14 +4393,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } @@ -5543,43 +5581,6 @@ SWIGINTERN PyObject *Exiv2_PreviewProperties___setitem__(Exiv2::PreviewPropertie return SWIG_Py_Void(); } -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; - - #define SWIG_From_long PyInt_FromLong SWIGINTERN size_t Exiv2_PreviewImage___len__(Exiv2::PreviewImage *self){ @@ -6346,7 +6347,7 @@ SWIGINTERN PyObject *_wrap_PreviewImage_writeFile(PyObject *self, PyObject *args arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6404,7 +6405,7 @@ SWIGINTERN PyObject *_wrap_PreviewImage_extension(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::PreviewImage * >(argp1); result = ((Exiv2::PreviewImage const *)arg1)->extension(); { - if (transcode_path(&result, false) < 0) { + if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(result); diff --git a/src/swig-0_27_7/properties_wrap.cxx b/src/swig-0_27_7/properties_wrap.cxx index c48945d..e8a6f83 100644 --- a/src/swig-0_27_7/properties_wrap.cxx +++ b/src/swig-0_27_7/properties_wrap.cxx @@ -4212,14 +4212,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_7/tags_wrap.cxx b/src/swig-0_27_7/tags_wrap.cxx index f2e29e4..be4999a 100644 --- a/src/swig-0_27_7/tags_wrap.cxx +++ b/src/swig-0_27_7/tags_wrap.cxx @@ -4212,14 +4212,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_7/types_wrap.cxx b/src/swig-0_27_7/types_wrap.cxx index 72bb990..37ddab4 100644 --- a/src/swig-0_27_7/types_wrap.cxx +++ b/src/swig-0_27_7/types_wrap.cxx @@ -4198,14 +4198,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_7/value_wrap.cxx b/src/swig-0_27_7/value_wrap.cxx index bb960a2..0ad5168 100644 --- a/src/swig-0_27_7/value_wrap.cxx +++ b/src/swig-0_27_7/value_wrap.cxx @@ -4381,14 +4381,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_7/version_wrap.cxx b/src/swig-0_27_7/version_wrap.cxx index 2724de1..ced3e77 100644 --- a/src/swig-0_27_7/version_wrap.cxx +++ b/src/swig-0_27_7/version_wrap.cxx @@ -4178,14 +4178,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_27_7/xmp_wrap.cxx b/src/swig-0_27_7/xmp_wrap.cxx index d9a574e..da0dbf7 100644 --- a/src/swig-0_27_7/xmp_wrap.cxx +++ b/src/swig-0_27_7/xmp_wrap.cxx @@ -4225,14 +4225,52 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; } catch(Exiv2::AnyError const& e) { + std::string msg = e.what(); + utf8_to_wcp(&msg, false); PyObject* args = Py_BuildValue( - "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), e.what()); + "Ns", py_from_enum((Exiv2::ErrorCode)e.code()), msg.c_str()); PyErr_SetObject(PyExc_Exiv2Error, args); Py_DECREF(args); } diff --git a/src/swig-0_28_2/basicio_wrap.cxx b/src/swig-0_28_2/basicio_wrap.cxx index ad94cd9..1f615ac 100644 --- a/src/swig-0_28_2/basicio_wrap.cxx +++ b/src/swig-0_28_2/basicio_wrap.cxx @@ -4188,6 +4188,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4200,6 +4236,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); @@ -4856,43 +4894,6 @@ SWIGINTERNINLINE PyObject* } -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; - - /* Return string from Python obj. NOTE: obj must remain in scope in order to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */ SWIGINTERN int @@ -5940,7 +5941,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_path(PyObject *self, PyObject *args) { result = (std::string *) &((Exiv2::BasicIo const *)arg1)->path(); { std::string copy = *result; - if (transcode_path(©, false) < 0) { + if (utf8_to_wcp(©, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(copy); @@ -5972,7 +5973,7 @@ SWIGINTERN int _wrap_new_FileIo(PyObject *self, PyObject *args, PyObject *kwargs arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6741,7 +6742,7 @@ SWIGINTERN PyObject *_wrap_FileIo_setPath(PyObject *self, PyObject *args) { arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6908,7 +6909,7 @@ SWIGINTERN PyObject *_wrap_FileIo_path(PyObject *self, PyObject *args) { result = (std::string *) &((Exiv2::FileIo const *)arg1)->path(); { std::string copy = *result; - if (transcode_path(©, false) < 0) { + if (utf8_to_wcp(©, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(copy); @@ -7690,7 +7691,7 @@ SWIGINTERN PyObject *_wrap_MemIo_path(PyObject *self, PyObject *args) { result = (std::string *) &((Exiv2::MemIo const *)arg1)->path(); { std::string copy = *result; - if (transcode_path(©, false) < 0) { + if (utf8_to_wcp(©, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(copy); @@ -7726,7 +7727,7 @@ SWIGINTERN int _wrap_new_XPathIo(PyObject *self, PyObject *args, PyObject *kwarg arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -7840,7 +7841,7 @@ SWIGINTERN PyObject *_wrap_XPathIo_writeDataToFile(PyObject *self, PyObject *arg arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -8619,7 +8620,7 @@ SWIGINTERN PyObject *_wrap_RemoteIo_path(PyObject *self, PyObject *args) { result = (std::string *) &((Exiv2::RemoteIo const *)arg1)->path(); { std::string copy = *result; - if (transcode_path(©, false) < 0) { + if (utf8_to_wcp(©, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(copy); @@ -8664,7 +8665,7 @@ SWIGINTERN int _wrap_new_HttpIo__SWIG_0(PyObject *self, PyObject *args, PyObject } arg2 = static_cast< size_t >(val2); { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -8707,7 +8708,7 @@ SWIGINTERN int _wrap_new_HttpIo__SWIG_1(PyObject *self, PyObject *args, PyObject arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } diff --git a/src/swig-0_28_2/datasets_wrap.cxx b/src/swig-0_28_2/datasets_wrap.cxx index 9d6a1ab..3454efd 100644 --- a/src/swig-0_28_2/datasets_wrap.cxx +++ b/src/swig-0_28_2/datasets_wrap.cxx @@ -4210,6 +4210,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4222,6 +4258,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); diff --git a/src/swig-0_28_2/easyaccess_wrap.cxx b/src/swig-0_28_2/easyaccess_wrap.cxx index c77c97b..f11661b 100644 --- a/src/swig-0_28_2/easyaccess_wrap.cxx +++ b/src/swig-0_28_2/easyaccess_wrap.cxx @@ -4166,6 +4166,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4178,6 +4214,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); diff --git a/src/swig-0_28_2/error_wrap.cxx b/src/swig-0_28_2/error_wrap.cxx index 594b810..8ce3b75 100644 --- a/src/swig-0_28_2/error_wrap.cxx +++ b/src/swig-0_28_2/error_wrap.cxx @@ -4137,14 +4137,52 @@ SWIG_FromCharPtr(const char *cptr) static PyObject* exiv2_module = NULL; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static PyObject* logger = NULL; static void log_to_python(int level, const char* msg) { - Py_ssize_t len = strlen(msg); - while (len > 0 && msg[len-1] == '\n') + std::string copy = msg; + utf8_to_wcp(©, false); + Py_ssize_t len = copy.size(); + while (len > 0 && copy[len-1] == '\n') len--; PyGILState_STATE gstate = PyGILState_Ensure(); PyObject* res = PyObject_CallMethod( - logger, "log", "(is#)", (level + 1) * 10, msg, len); + logger, "log", "(is#)", (level + 1) * 10, copy.c_str(), len); Py_XDECREF(res); PyGILState_Release(gstate); }; diff --git a/src/swig-0_28_2/exif_wrap.cxx b/src/swig-0_28_2/exif_wrap.cxx index 23da56d..61c32ae 100644 --- a/src/swig-0_28_2/exif_wrap.cxx +++ b/src/swig-0_28_2/exif_wrap.cxx @@ -4225,6 +4225,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4237,6 +4273,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); @@ -5415,43 +5453,6 @@ SWIGINTERN std::string Exiv2_Exifdatum__print(Exiv2::Exifdatum const *self,Exiv2 return self->print(pMetadata); } -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; - - SWIGINTERN int SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) { @@ -8717,7 +8718,7 @@ SWIGINTERN PyObject *_wrap_ExifThumbC_writeFile(PyObject *self, PyObject *args) arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -8925,7 +8926,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_0(PyObject *self, Py } arg5 = static_cast< uint16_t >(val5); { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -9054,7 +9055,7 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_2(PyObject *self, Py arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } diff --git a/src/swig-0_28_2/image_wrap.cxx b/src/swig-0_28_2/image_wrap.cxx index 9a64381..8b257bc 100644 --- a/src/swig-0_28_2/image_wrap.cxx +++ b/src/swig-0_28_2/image_wrap.cxx @@ -4238,6 +4238,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4250,6 +4286,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); @@ -4806,43 +4844,6 @@ static PyObject* py_from_enum_Exiv2_ImageType(long value) { }; -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; - - #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) # define SWIG_LONG_LONG_AVAILABLE #endif @@ -6311,7 +6312,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo(PyObject *self, PyObject *args) arg2 = static_cast< bool >(val2); } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6369,7 +6370,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_open__SWIG_0(PyObject *self, Py_ssize_t arg2 = static_cast< bool >(val2); } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6517,7 +6518,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_create__SWIG_0(PyObject *self, Py_ssize_ arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6634,7 +6635,7 @@ SWIGINTERN PyObject *_wrap_ImageFactory_getType__SWIG_0(PyObject *self, Py_ssize arg1 = ptr; } { - if (transcode_path(arg1, true) < 0) { + if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } diff --git a/src/swig-0_28_2/iptc_wrap.cxx b/src/swig-0_28_2/iptc_wrap.cxx index 0025beb..1c4e863 100644 --- a/src/swig-0_28_2/iptc_wrap.cxx +++ b/src/swig-0_28_2/iptc_wrap.cxx @@ -4223,6 +4223,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4235,6 +4271,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); diff --git a/src/swig-0_28_2/metadatum_wrap.cxx b/src/swig-0_28_2/metadatum_wrap.cxx index 5eb4d9a..cf4a98e 100644 --- a/src/swig-0_28_2/metadatum_wrap.cxx +++ b/src/swig-0_28_2/metadatum_wrap.cxx @@ -4209,6 +4209,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4221,6 +4257,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); diff --git a/src/swig-0_28_2/preview_wrap.cxx b/src/swig-0_28_2/preview_wrap.cxx index 0c571db..5fef28c 100644 --- a/src/swig-0_28_2/preview_wrap.cxx +++ b/src/swig-0_28_2/preview_wrap.cxx @@ -4393,6 +4393,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4405,6 +4441,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); @@ -5594,43 +5632,6 @@ SWIGINTERNINLINE PyObject* return PyInt_FromSize_t((size_t) value); } - -#ifdef _WIN32 -#include -#endif - -static int transcode_path(std::string *path, bool to_cp) { -#ifdef _WIN32 - UINT cp_in = CP_UTF8; - UINT cp_out = GetACP(); - if (cp_out == cp_in) - return 0; - if (!to_cp) { - cp_in = cp_out; - cp_out = CP_UTF8; - } - // Convert utf-8 path to active code page, via widechar version - int size = MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - NULL, 0); - if (!size) - return -1; - std::wstring wide_str; - wide_str.resize(size); - if (!MultiByteToWideChar(cp_in, 0, &(*path)[0], (int)path->size(), - &wide_str[0], size)) - return -1; - size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - NULL, 0, NULL, NULL); - if (!size) - return -1; - path->resize(size); - if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), - &(*path)[0], size, NULL, NULL)) - return -1; -#endif - return 0; -}; - SWIGINTERN size_t Exiv2_PreviewImage___len__(Exiv2::PreviewImage *self){ return self->size(); } @@ -6346,7 +6347,7 @@ SWIGINTERN PyObject *_wrap_PreviewImage_writeFile(PyObject *self, PyObject *args arg2 = ptr; } { - if (transcode_path(arg2, true) < 0) { + if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } } @@ -6404,7 +6405,7 @@ SWIGINTERN PyObject *_wrap_PreviewImage_extension(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::PreviewImage * >(argp1); result = ((Exiv2::PreviewImage const *)arg1)->extension(); { - if (transcode_path(&result, false) < 0) { + if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } resultobj = SWIG_From_std_string(result); diff --git a/src/swig-0_28_2/properties_wrap.cxx b/src/swig-0_28_2/properties_wrap.cxx index 3a6d456..a79ef1e 100644 --- a/src/swig-0_28_2/properties_wrap.cxx +++ b/src/swig-0_28_2/properties_wrap.cxx @@ -4212,6 +4212,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4224,6 +4260,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); diff --git a/src/swig-0_28_2/tags_wrap.cxx b/src/swig-0_28_2/tags_wrap.cxx index 54308ae..0f257b1 100644 --- a/src/swig-0_28_2/tags_wrap.cxx +++ b/src/swig-0_28_2/tags_wrap.cxx @@ -4212,6 +4212,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4224,6 +4260,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); diff --git a/src/swig-0_28_2/types_wrap.cxx b/src/swig-0_28_2/types_wrap.cxx index 3b73c10..f144edd 100644 --- a/src/swig-0_28_2/types_wrap.cxx +++ b/src/swig-0_28_2/types_wrap.cxx @@ -4198,6 +4198,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4210,6 +4246,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); diff --git a/src/swig-0_28_2/value_wrap.cxx b/src/swig-0_28_2/value_wrap.cxx index c461856..afb1aa9 100644 --- a/src/swig-0_28_2/value_wrap.cxx +++ b/src/swig-0_28_2/value_wrap.cxx @@ -4381,6 +4381,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4393,6 +4429,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); diff --git a/src/swig-0_28_2/version_wrap.cxx b/src/swig-0_28_2/version_wrap.cxx index 60b22a0..4fbe615 100644 --- a/src/swig-0_28_2/version_wrap.cxx +++ b/src/swig-0_28_2/version_wrap.cxx @@ -4178,6 +4178,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4190,6 +4226,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); diff --git a/src/swig-0_28_2/xmp_wrap.cxx b/src/swig-0_28_2/xmp_wrap.cxx index e56e433..79c430e 100644 --- a/src/swig-0_28_2/xmp_wrap.cxx +++ b/src/swig-0_28_2/xmp_wrap.cxx @@ -4225,6 +4225,42 @@ static PyObject* py_from_enum(Exiv2::ErrorCode value) { }; +#ifdef _WIN32 +#include +#endif + +static int utf8_to_wcp(std::string *str, bool to_cp) { +#ifdef _WIN32 + UINT cp_in = CP_UTF8; + UINT cp_out = GetACP(); + if (cp_out == cp_in) + return 0; + if (!to_cp) { + cp_in = cp_out; + cp_out = CP_UTF8; + } + int size = MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + NULL, 0); + if (!size) + return -1; + std::wstring wide_str; + wide_str.resize(size); + if (!MultiByteToWideChar(cp_in, 0, &(*str)[0], (int)str->size(), + &wide_str[0], size)) + return -1; + size = WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + NULL, 0, NULL, NULL); + if (!size) + return -1; + str->resize(size); + if (!WideCharToMultiByte(cp_out, 0, &wide_str[0], (int)wide_str.size(), + &(*str)[0], size, NULL, NULL)) + return -1; +#endif + return 0; +}; + + static void _set_python_exception() { try { throw; @@ -4237,6 +4273,8 @@ static void _set_python_exception() { + + catch(Exiv2::Error const& e) { PyObject* args = Py_BuildValue( "Ns", py_from_enum(e.code()), e.what()); From e704cbb7b11d8e6ee06b6e4748d05c3535c21df4 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Thu, 15 Feb 2024 17:06:03 +0000 Subject: [PATCH 10/29] Restore tests in Windows build action --- .github/workflows/build-windows-27.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-27.yml b/.github/workflows/build-windows-27.yml index f46ceea..d4e787a 100644 --- a/.github/workflows/build-windows-27.yml +++ b/.github/workflows/build-windows-27.yml @@ -46,7 +46,8 @@ jobs: EXIV2_ROOT=libexiv2/build-msvc/install PATH="$PATH;$(pwd)\\gettext\\bin" CIBW_TEST_COMMAND: > - python -m exiv2 -v + python -m exiv2 -v && + python -m unittest discover {project}/tests -v CIBW_BEFORE_ALL: > pip install conan==1.59.0 && cd libexiv2 && From 228e35d12e76d792d5baa2c3b910ee3478467a10 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Thu, 15 Feb 2024 18:28:07 +0000 Subject: [PATCH 11/29] Temporarily reduce version number Adding a 'build' number allows uploading a bug-fix to PyPI. --- README.rst | 4 ++-- src/doc/requirements.txt | 2 +- src/swig-0_27_3/__init__.py | 4 ++-- src/swig-0_27_7/__init__.py | 4 ++-- src/swig-0_28_2/__init__.py | 4 ++-- utils/build_swig.py | 3 ++- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index c66f2dc..008f0cd 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ -python-exiv2 v\ 0.16.4 -====================== +python-exiv2 v\ 0.16.3-1 +======================== python-exiv2 is a low level interface (or binding) to the exiv2_ C++ library. It is built using SWIG_ to automatically generate the interface code. diff --git a/src/doc/requirements.txt b/src/doc/requirements.txt index 8d8865b..063ad0a 100644 --- a/src/doc/requirements.txt +++ b/src/doc/requirements.txt @@ -1,3 +1,3 @@ -exiv2 <= 0.16.4 +exiv2 <= 0.16.3-1 sphinx == 7.2.6 sphinx-rtd-theme == 2.0.0 diff --git a/src/swig-0_27_3/__init__.py b/src/swig-0_27_3/__init__.py index 85c136a..f0aad96 100644 --- a/src/swig-0_27_3/__init__.py +++ b/src/swig-0_27_3/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.4" +__version__ = "0.16.3-1" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 4)) +__version_tuple__ = tuple((0, 16, 3, 1)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/src/swig-0_27_7/__init__.py b/src/swig-0_27_7/__init__.py index 85c136a..f0aad96 100644 --- a/src/swig-0_27_7/__init__.py +++ b/src/swig-0_27_7/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.4" +__version__ = "0.16.3-1" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 4)) +__version_tuple__ = tuple((0, 16, 3, 1)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/src/swig-0_28_2/__init__.py b/src/swig-0_28_2/__init__.py index 85c136a..f0aad96 100644 --- a/src/swig-0_28_2/__init__.py +++ b/src/swig-0_28_2/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.4" +__version__ = "0.16.3-1" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 4)) +__version_tuple__ = tuple((0, 16, 3, 1)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/utils/build_swig.py b/utils/build_swig.py index d1f05d2..052535d 100644 --- a/utils/build_swig.py +++ b/utils/build_swig.py @@ -16,6 +16,7 @@ # along with this program. If not, see . import os +import re import shutil import subprocess import sys @@ -193,7 +194,7 @@ def __init__(self, code, message): #: python-exiv2 version as a string __version__ = "{py_exiv2_version}" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple(({', '.join(py_exiv2_version.split('.'))})) +__version_tuple__ = tuple(({', '.join(re.split(r'[-.]', py_exiv2_version))})) __all__ = ["Exiv2Error"] ''') From 90eb530e9528c917cf76a5c6d9cbfac156763769 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Thu, 15 Feb 2024 18:43:55 +0000 Subject: [PATCH 12/29] Further reduce version number --- README.rst | 2 +- src/doc/requirements.txt | 2 +- src/swig-0_27_3/__init__.py | 4 ++-- src/swig-0_27_7/__init__.py | 4 ++-- src/swig-0_28_2/__init__.py | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 008f0cd..373ebb6 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -python-exiv2 v\ 0.16.3-1 +python-exiv2 v\ 0.16.2-1 ======================== python-exiv2 is a low level interface (or binding) to the exiv2_ C++ library. diff --git a/src/doc/requirements.txt b/src/doc/requirements.txt index 063ad0a..e7ba64b 100644 --- a/src/doc/requirements.txt +++ b/src/doc/requirements.txt @@ -1,3 +1,3 @@ -exiv2 <= 0.16.3-1 +exiv2 <= 0.16.2-1 sphinx == 7.2.6 sphinx-rtd-theme == 2.0.0 diff --git a/src/swig-0_27_3/__init__.py b/src/swig-0_27_3/__init__.py index f0aad96..630d324 100644 --- a/src/swig-0_27_3/__init__.py +++ b/src/swig-0_27_3/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.3-1" +__version__ = "0.16.2-1" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 3, 1)) +__version_tuple__ = tuple((0, 16, 2, 1)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/src/swig-0_27_7/__init__.py b/src/swig-0_27_7/__init__.py index f0aad96..630d324 100644 --- a/src/swig-0_27_7/__init__.py +++ b/src/swig-0_27_7/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.3-1" +__version__ = "0.16.2-1" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 3, 1)) +__version_tuple__ = tuple((0, 16, 2, 1)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/src/swig-0_28_2/__init__.py b/src/swig-0_28_2/__init__.py index f0aad96..630d324 100644 --- a/src/swig-0_28_2/__init__.py +++ b/src/swig-0_28_2/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.3-1" +__version__ = "0.16.2-1" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 3, 1)) +__version_tuple__ = tuple((0, 16, 2, 1)) __all__ = ["Exiv2Error"] from exiv2.basicio import * From b9b35b588f7b4e79f630537ee1cb47d71e7a160d Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Fri, 16 Feb 2024 09:48:36 +0000 Subject: [PATCH 13/29] Rename build actions' result files --- .github/workflows/build-linux-27.yml | 2 +- .github/workflows/build-linux-28.yml | 2 +- .github/workflows/build-macos-27.yml | 2 +- .github/workflows/build-macos-28.yml | 2 +- .github/workflows/build-macos-arm-27.yml | 2 +- .github/workflows/build-macos-arm-28.yml | 2 +- .github/workflows/build-windows-27.yml | 2 +- .github/workflows/build-windows-28.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-linux-27.yml b/.github/workflows/build-linux-27.yml index 8476f30..7ba88e7 100644 --- a/.github/workflows/build-linux-27.yml +++ b/.github/workflows/build-linux-27.yml @@ -52,5 +52,5 @@ jobs: - name: Store results uses: actions/upload-artifact@v3 with: - name: manylinux-wheel + name: linux-27-wheels path: wheelhouse/*.whl diff --git a/.github/workflows/build-linux-28.yml b/.github/workflows/build-linux-28.yml index 06bec11..17ee40d 100644 --- a/.github/workflows/build-linux-28.yml +++ b/.github/workflows/build-linux-28.yml @@ -62,5 +62,5 @@ jobs: - name: Store results uses: actions/upload-artifact@v3 with: - name: manylinux-wheel + name: linux-28-wheels path: wheelhouse/*.whl diff --git a/.github/workflows/build-macos-27.yml b/.github/workflows/build-macos-27.yml index 0dd68d8..3849bd9 100644 --- a/.github/workflows/build-macos-27.yml +++ b/.github/workflows/build-macos-27.yml @@ -51,5 +51,5 @@ jobs: - name: Store results uses: actions/upload-artifact@v3 with: - name: macos-wheel + name: macos-27-wheels path: wheelhouse/*.whl diff --git a/.github/workflows/build-macos-28.yml b/.github/workflows/build-macos-28.yml index 30d9766..a78d09b 100644 --- a/.github/workflows/build-macos-28.yml +++ b/.github/workflows/build-macos-28.yml @@ -46,5 +46,5 @@ jobs: - name: Store results uses: actions/upload-artifact@v3 with: - name: macos-wheel + name: macos-28-wheels path: wheelhouse/*.whl diff --git a/.github/workflows/build-macos-arm-27.yml b/.github/workflows/build-macos-arm-27.yml index 8f0c3ab..e390801 100644 --- a/.github/workflows/build-macos-arm-27.yml +++ b/.github/workflows/build-macos-arm-27.yml @@ -56,5 +56,5 @@ jobs: - name: Store results uses: actions/upload-artifact@v3 with: - name: macos-wheel + name: macos-arm-27-wheels path: wheelhouse/*.whl diff --git a/.github/workflows/build-macos-arm-28.yml b/.github/workflows/build-macos-arm-28.yml index 902e5bb..f1e2eb9 100644 --- a/.github/workflows/build-macos-arm-28.yml +++ b/.github/workflows/build-macos-arm-28.yml @@ -51,5 +51,5 @@ jobs: - name: Store results uses: actions/upload-artifact@v3 with: - name: macos-wheel + name: macos-arm-28-wheels path: wheelhouse/*.whl diff --git a/.github/workflows/build-windows-27.yml b/.github/workflows/build-windows-27.yml index d4e787a..4f1f541 100644 --- a/.github/workflows/build-windows-27.yml +++ b/.github/workflows/build-windows-27.yml @@ -71,5 +71,5 @@ jobs: - name: Store results uses: actions/upload-artifact@v3 with: - name: windows-wheel + name: windows-27-wheels path: wheelhouse/*.whl diff --git a/.github/workflows/build-windows-28.yml b/.github/workflows/build-windows-28.yml index 897060f..9d8ec07 100644 --- a/.github/workflows/build-windows-28.yml +++ b/.github/workflows/build-windows-28.yml @@ -64,5 +64,5 @@ jobs: - name: Store results uses: actions/upload-artifact@v3 with: - name: windows-wheel + name: windows-28-wheels path: wheelhouse/*.whl From a2b3ba79af9d3d3278a8dbf37ce87184bf49a34b Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Fri, 16 Feb 2024 09:49:11 +0000 Subject: [PATCH 14/29] Restore version number --- README.rst | 4 ++-- src/doc/requirements.txt | 2 +- src/swig-0_27_3/__init__.py | 4 ++-- src/swig-0_27_7/__init__.py | 4 ++-- src/swig-0_28_2/__init__.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index 373ebb6..c66f2dc 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ -python-exiv2 v\ 0.16.2-1 -======================== +python-exiv2 v\ 0.16.4 +====================== python-exiv2 is a low level interface (or binding) to the exiv2_ C++ library. It is built using SWIG_ to automatically generate the interface code. diff --git a/src/doc/requirements.txt b/src/doc/requirements.txt index e7ba64b..8d8865b 100644 --- a/src/doc/requirements.txt +++ b/src/doc/requirements.txt @@ -1,3 +1,3 @@ -exiv2 <= 0.16.2-1 +exiv2 <= 0.16.4 sphinx == 7.2.6 sphinx-rtd-theme == 2.0.0 diff --git a/src/swig-0_27_3/__init__.py b/src/swig-0_27_3/__init__.py index 630d324..85c136a 100644 --- a/src/swig-0_27_3/__init__.py +++ b/src/swig-0_27_3/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.2-1" +__version__ = "0.16.4" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 2, 1)) +__version_tuple__ = tuple((0, 16, 4)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/src/swig-0_27_7/__init__.py b/src/swig-0_27_7/__init__.py index 630d324..85c136a 100644 --- a/src/swig-0_27_7/__init__.py +++ b/src/swig-0_27_7/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.2-1" +__version__ = "0.16.4" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 2, 1)) +__version_tuple__ = tuple((0, 16, 4)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/src/swig-0_28_2/__init__.py b/src/swig-0_28_2/__init__.py index 630d324..85c136a 100644 --- a/src/swig-0_28_2/__init__.py +++ b/src/swig-0_28_2/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.2-1" +__version__ = "0.16.4" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 2, 1)) +__version_tuple__ = tuple((0, 16, 4)) __all__ = ["Exiv2Error"] from exiv2.basicio import * From e39dbb08b7bbd22715c91ebeb60ab7d4f492f7d6 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Fri, 16 Feb 2024 09:52:53 +0000 Subject: [PATCH 15/29] Prepare tests for next version of libexiv2 --- tests/test_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_types.py b/tests/test_types.py index 234dac1..de7359b 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -132,7 +132,7 @@ def test_localisation(self): self.skipTest("locale environment ignored") # test localisation self.check_result(exiv2.exvGettext(str_en), str, str_de) - if not exiv2.testVersion(0, 28, 0): + if exiv2.testVersion(0, 28, 3) or not exiv2.testVersion(0, 28, 0): with self.assertLogs(level=logging.WARNING) as cm: comment = exiv2.CommentValue('charset=invalid Fred') self.assertEqual(cm.output, [ From 095aa82b6c07f453071030bae62c1dd710bf6516 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Fri, 16 Feb 2024 15:40:52 +0000 Subject: [PATCH 16/29] Reduce integer type conversions These were never a problem, as the values are samll, but some compilers complain of possible data loss. --- src/interface/shared/struct_dict.i | 8 ++++---- src/interface/value.i | 2 +- src/swig-0_27_3/datasets_wrap.cxx | 8 ++++---- src/swig-0_27_3/preview_wrap.cxx | 8 ++++---- src/swig-0_27_3/properties_wrap.cxx | 8 ++++---- src/swig-0_27_3/tags_wrap.cxx | 8 ++++---- src/swig-0_27_3/value_wrap.cxx | 24 +++++++++--------------- src/swig-0_27_7/datasets_wrap.cxx | 8 ++++---- src/swig-0_27_7/preview_wrap.cxx | 8 ++++---- src/swig-0_27_7/properties_wrap.cxx | 8 ++++---- src/swig-0_27_7/tags_wrap.cxx | 8 ++++---- src/swig-0_27_7/value_wrap.cxx | 24 +++++++++--------------- src/swig-0_28_2/datasets_wrap.cxx | 8 ++++---- src/swig-0_28_2/preview_wrap.cxx | 8 ++++---- src/swig-0_28_2/properties_wrap.cxx | 8 ++++---- src/swig-0_28_2/tags_wrap.cxx | 8 ++++---- src/swig-0_28_2/value_wrap.cxx | 24 +++++++++--------------- 17 files changed, 80 insertions(+), 98 deletions(-) diff --git a/src/interface/shared/struct_dict.i b/src/interface/shared/struct_dict.i index 2cddaa7..6b0fc86 100644 --- a/src/interface/shared/struct_dict.i +++ b/src/interface/shared/struct_dict.i @@ -36,10 +36,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -51,14 +51,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/interface/value.i b/src/interface/value.i index bbb7463..abc06e0 100644 --- a/src/interface/value.i +++ b/src/interface/value.i @@ -559,7 +559,7 @@ RAW_STRING_DATA(Exiv2::XmpTextValue) XmpArrayValue(Exiv2::TypeId typeId_xmpBag) { return new Exiv2::XmpArrayValue(typeId_xmpBag); } - std::string __getitem__(Py_ssize_t i) { + std::string __getitem__(long i) { return $self->toString(i); } void append(std::string value) { diff --git a/src/swig-0_27_3/datasets_wrap.cxx b/src/swig-0_27_3/datasets_wrap.cxx index 527273b..ff2a937 100644 --- a/src/swig-0_27_3/datasets_wrap.cxx +++ b/src/swig-0_27_3/datasets_wrap.cxx @@ -4305,10 +4305,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -4320,14 +4320,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/swig-0_27_3/preview_wrap.cxx b/src/swig-0_27_3/preview_wrap.cxx index bb0405c..216a3c1 100644 --- a/src/swig-0_27_3/preview_wrap.cxx +++ b/src/swig-0_27_3/preview_wrap.cxx @@ -5373,10 +5373,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -5388,14 +5388,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/swig-0_27_3/properties_wrap.cxx b/src/swig-0_27_3/properties_wrap.cxx index e8a6f83..be249d8 100644 --- a/src/swig-0_27_3/properties_wrap.cxx +++ b/src/swig-0_27_3/properties_wrap.cxx @@ -4354,10 +4354,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -4369,14 +4369,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/swig-0_27_3/tags_wrap.cxx b/src/swig-0_27_3/tags_wrap.cxx index be4999a..7e945d3 100644 --- a/src/swig-0_27_3/tags_wrap.cxx +++ b/src/swig-0_27_3/tags_wrap.cxx @@ -4334,10 +4334,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -4349,14 +4349,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/swig-0_27_3/value_wrap.cxx b/src/swig-0_27_3/value_wrap.cxx index 0ad5168..d4e4a23 100644 --- a/src/swig-0_27_3/value_wrap.cxx +++ b/src/swig-0_27_3/value_wrap.cxx @@ -6449,7 +6449,7 @@ SWIGINTERN Exiv2::XmpArrayValue *new_Exiv2_XmpArrayValue__SWIG_1(std::vector< st SWIGINTERN Exiv2::XmpArrayValue *new_Exiv2_XmpArrayValue__SWIG_2(Exiv2::TypeId typeId_xmpBag){ return new Exiv2::XmpArrayValue(typeId_xmpBag); } -SWIGINTERN std::string Exiv2_XmpArrayValue___getitem__(Exiv2::XmpArrayValue *self,Py_ssize_t i){ +SWIGINTERN std::string Exiv2_XmpArrayValue___getitem__(Exiv2::XmpArrayValue *self,long i){ return self->toString(i); } SWIGINTERN void Exiv2_XmpArrayValue_append(Exiv2::XmpArrayValue *self,std::string value){ @@ -6734,10 +6734,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -6749,14 +6749,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); @@ -12371,7 +12371,7 @@ SWIGINTERN int _wrap_new_XmpArrayValue(PyObject *self, PyObject *args, PyObject SWIGINTERN PyObject *_wrap_XmpArrayValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::XmpArrayValue *arg1 = (Exiv2::XmpArrayValue *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -12387,16 +12387,10 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue___getitem__(PyObject *self, PyObject *a arg1 = reinterpret_cast< Exiv2::XmpArrayValue * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XmpArrayValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XmpArrayValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); - - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { - PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); - SWIG_fail; - } - - result = Exiv2_XmpArrayValue___getitem__(arg1,SWIG_STD_MOVE(arg2)); + arg2 = static_cast< long >(val2); + result = Exiv2_XmpArrayValue___getitem__(arg1,arg2); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: diff --git a/src/swig-0_27_7/datasets_wrap.cxx b/src/swig-0_27_7/datasets_wrap.cxx index 527273b..ff2a937 100644 --- a/src/swig-0_27_7/datasets_wrap.cxx +++ b/src/swig-0_27_7/datasets_wrap.cxx @@ -4305,10 +4305,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -4320,14 +4320,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/swig-0_27_7/preview_wrap.cxx b/src/swig-0_27_7/preview_wrap.cxx index bb0405c..216a3c1 100644 --- a/src/swig-0_27_7/preview_wrap.cxx +++ b/src/swig-0_27_7/preview_wrap.cxx @@ -5373,10 +5373,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -5388,14 +5388,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/swig-0_27_7/properties_wrap.cxx b/src/swig-0_27_7/properties_wrap.cxx index e8a6f83..be249d8 100644 --- a/src/swig-0_27_7/properties_wrap.cxx +++ b/src/swig-0_27_7/properties_wrap.cxx @@ -4354,10 +4354,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -4369,14 +4369,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/swig-0_27_7/tags_wrap.cxx b/src/swig-0_27_7/tags_wrap.cxx index be4999a..7e945d3 100644 --- a/src/swig-0_27_7/tags_wrap.cxx +++ b/src/swig-0_27_7/tags_wrap.cxx @@ -4334,10 +4334,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -4349,14 +4349,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/swig-0_27_7/value_wrap.cxx b/src/swig-0_27_7/value_wrap.cxx index 0ad5168..d4e4a23 100644 --- a/src/swig-0_27_7/value_wrap.cxx +++ b/src/swig-0_27_7/value_wrap.cxx @@ -6449,7 +6449,7 @@ SWIGINTERN Exiv2::XmpArrayValue *new_Exiv2_XmpArrayValue__SWIG_1(std::vector< st SWIGINTERN Exiv2::XmpArrayValue *new_Exiv2_XmpArrayValue__SWIG_2(Exiv2::TypeId typeId_xmpBag){ return new Exiv2::XmpArrayValue(typeId_xmpBag); } -SWIGINTERN std::string Exiv2_XmpArrayValue___getitem__(Exiv2::XmpArrayValue *self,Py_ssize_t i){ +SWIGINTERN std::string Exiv2_XmpArrayValue___getitem__(Exiv2::XmpArrayValue *self,long i){ return self->toString(i); } SWIGINTERN void Exiv2_XmpArrayValue_append(Exiv2::XmpArrayValue *self,std::string value){ @@ -6734,10 +6734,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -6749,14 +6749,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); @@ -12371,7 +12371,7 @@ SWIGINTERN int _wrap_new_XmpArrayValue(PyObject *self, PyObject *args, PyObject SWIGINTERN PyObject *_wrap_XmpArrayValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::XmpArrayValue *arg1 = (Exiv2::XmpArrayValue *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -12387,16 +12387,10 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue___getitem__(PyObject *self, PyObject *a arg1 = reinterpret_cast< Exiv2::XmpArrayValue * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XmpArrayValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XmpArrayValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); - - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { - PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); - SWIG_fail; - } - - result = Exiv2_XmpArrayValue___getitem__(arg1,SWIG_STD_MOVE(arg2)); + arg2 = static_cast< long >(val2); + result = Exiv2_XmpArrayValue___getitem__(arg1,arg2); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: diff --git a/src/swig-0_28_2/datasets_wrap.cxx b/src/swig-0_28_2/datasets_wrap.cxx index 3454efd..c30e3f3 100644 --- a/src/swig-0_28_2/datasets_wrap.cxx +++ b/src/swig-0_28_2/datasets_wrap.cxx @@ -4305,10 +4305,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -4320,14 +4320,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/swig-0_28_2/preview_wrap.cxx b/src/swig-0_28_2/preview_wrap.cxx index 5fef28c..e0a82e9 100644 --- a/src/swig-0_28_2/preview_wrap.cxx +++ b/src/swig-0_28_2/preview_wrap.cxx @@ -5373,10 +5373,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -5388,14 +5388,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/swig-0_28_2/properties_wrap.cxx b/src/swig-0_28_2/properties_wrap.cxx index a79ef1e..e704e1d 100644 --- a/src/swig-0_28_2/properties_wrap.cxx +++ b/src/swig-0_28_2/properties_wrap.cxx @@ -4354,10 +4354,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -4369,14 +4369,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/swig-0_28_2/tags_wrap.cxx b/src/swig-0_28_2/tags_wrap.cxx index 0f257b1..3f2ced6 100644 --- a/src/swig-0_28_2/tags_wrap.cxx +++ b/src/swig-0_28_2/tags_wrap.cxx @@ -4406,10 +4406,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -4421,14 +4421,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); diff --git a/src/swig-0_28_2/value_wrap.cxx b/src/swig-0_28_2/value_wrap.cxx index afb1aa9..c82903a 100644 --- a/src/swig-0_28_2/value_wrap.cxx +++ b/src/swig-0_28_2/value_wrap.cxx @@ -6619,7 +6619,7 @@ SWIGINTERN Exiv2::XmpArrayValue *new_Exiv2_XmpArrayValue__SWIG_1(std::vector< st SWIGINTERN Exiv2::XmpArrayValue *new_Exiv2_XmpArrayValue__SWIG_2(Exiv2::TypeId typeId_xmpBag){ return new Exiv2::XmpArrayValue(typeId_xmpBag); } -SWIGINTERN std::string Exiv2_XmpArrayValue___getitem__(Exiv2::XmpArrayValue *self,Py_ssize_t i){ +SWIGINTERN std::string Exiv2_XmpArrayValue___getitem__(Exiv2::XmpArrayValue *self,long i){ return self->toString(i); } SWIGINTERN void Exiv2_XmpArrayValue_append(Exiv2::XmpArrayValue *self,std::string value){ @@ -6904,10 +6904,10 @@ static PyObject* list_getset( return result; }; static PyGetSetDef* find_getset(PyObject* obj, const char* name) { - unsigned int len = strlen(name); + size_t len = strlen(name); PyGetSetDef* getset = obj->ob_type->tp_getset; while (getset->name) { - unsigned int cmp_len = strlen(getset->name); + size_t cmp_len = strlen(getset->name); if (getset->name[cmp_len-1] == '_') cmp_len--; if ((cmp_len == len) && (strncmp(getset->name, name, len) == 0)) @@ -6919,14 +6919,14 @@ static PyGetSetDef* find_getset(PyObject* obj, const char* name) { return NULL; }; static PyObject* getset_to_item(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("(s#N)", getset->name, len, getset->get(obj, getset->closure)); }; static PyObject* getset_to_key(PyObject* obj, PyGetSetDef* getset) { - unsigned int len = strlen(getset->name); + size_t len = strlen(getset->name); if (getset->name[len-1] == '_') len--; return Py_BuildValue("s#", getset->name, len); @@ -12689,7 +12689,7 @@ SWIGINTERN int _wrap_new_XmpArrayValue(PyObject *self, PyObject *args, PyObject SWIGINTERN PyObject *_wrap_XmpArrayValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::XmpArrayValue *arg1 = (Exiv2::XmpArrayValue *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -12705,16 +12705,10 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue___getitem__(PyObject *self, PyObject *a arg1 = reinterpret_cast< Exiv2::XmpArrayValue * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XmpArrayValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XmpArrayValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); - - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { - PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); - SWIG_fail; - } - - result = Exiv2_XmpArrayValue___getitem__(arg1,SWIG_STD_MOVE(arg2)); + arg2 = static_cast< long >(val2); + result = Exiv2_XmpArrayValue___getitem__(arg1,arg2); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; fail: From f211f5aff7d72c4e9e9e367daa2a1d4ea71ce48b Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Sat, 17 Feb 2024 11:22:09 +0000 Subject: [PATCH 17/29] Enable "write" methods These have no advantage over using "print" to get a string and then writing that string to a file, but it's nice to have them for completeness. --- src/interface/metadatum.i | 7 +- src/interface/value.i | 16 +- src/swig-0_27_3/exif_wrap.cxx | 143 ++++- src/swig-0_27_3/iptc_wrap.cxx | 147 ++++- src/swig-0_27_3/metadatum_wrap.cxx | 154 ++++- src/swig-0_27_3/value_wrap.cxx | 881 ++++++++++++++++++++++++++++- src/swig-0_27_3/xmp_wrap.cxx | 147 ++++- src/swig-0_27_7/exif_wrap.cxx | 143 ++++- src/swig-0_27_7/iptc_wrap.cxx | 147 ++++- src/swig-0_27_7/metadatum_wrap.cxx | 154 ++++- src/swig-0_27_7/value_wrap.cxx | 881 ++++++++++++++++++++++++++++- src/swig-0_27_7/xmp_wrap.cxx | 147 ++++- src/swig-0_28_2/exif_wrap.cxx | 143 ++++- src/swig-0_28_2/iptc_wrap.cxx | 147 ++++- src/swig-0_28_2/metadatum_wrap.cxx | 154 ++++- src/swig-0_28_2/value_wrap.cxx | 881 ++++++++++++++++++++++++++++- src/swig-0_28_2/xmp_wrap.cxx | 147 ++++- tests/test_datasets.py | 6 +- tests/test_exif.py | 4 + tests/test_iptc.py | 4 + tests/test_properties.py | 6 +- tests/test_tags.py | 6 +- tests/test_value.py | 4 + tests/test_xmp.py | 4 + 24 files changed, 4307 insertions(+), 166 deletions(-) diff --git a/src/interface/metadatum.i b/src/interface/metadatum.i index 6d1abf8..87a0ed0 100644 --- a/src/interface/metadatum.i +++ b/src/interface/metadatum.i @@ -42,9 +42,10 @@ EXCEPTION() %ignore Exiv2::Metadatum::toRational() const; %ignore Exiv2::Metadatum::toUint32() const; -// Use default parameter in print() +// Use default parameter in print() and write() %typemap(default) const Exiv2::ExifData* pMetadata {$1 = NULL;} %ignore Exiv2::Metadatum::print() const; +%ignore Exiv2::Metadatum::write(std::ostream &) const; %define EXTEND_KEY(key_type) UNIQUE_PTR(key_type); @@ -55,6 +56,8 @@ EXTEND_KEY(Exiv2::Key); // Macro for Metadatum subclasses %define EXTEND_METADATUM(datum_type) +// Ignore overloaded default parameter version +%ignore datum_type::write(std::ostream &) const; // Turn off exception checking for methods that are guaranteed not to throw %noexception datum_type::count; %noexception datum_type::size; @@ -132,10 +135,8 @@ static PyObject* set_value_from_py(datum_type* datum, PyObject* py_value) { %ignore Exiv2::Key::~Key; %ignore Exiv2::Key::operator=; -%ignore Exiv2::Key::write; %ignore Exiv2::Metadatum::~Metadatum; %ignore Exiv2::Metadatum::operator=; -%ignore Exiv2::Metadatum::write; %ignore Exiv2::cmpMetadataByKey; %ignore Exiv2::cmpMetadataByTag; diff --git a/src/interface/value.i b/src/interface/value.i index abc06e0..66ff16b 100644 --- a/src/interface/value.i +++ b/src/interface/value.i @@ -63,6 +63,21 @@ UNIQUE_PTR(Exiv2::Value); // SWIG doesn't have typemaps for Py_ssize_t %apply long {Py_ssize_t}; +// Convert std::ostream inputs and outputs +%typemap(in) std::ostream& os (PyObject* _global_io, std::ostringstream temp) { + $1 = &temp; + _global_io = $input; +} +%typemap(out) std::ostream& { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >($1)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + $result = _global_io; +} + // for indexing multi-value values, assumes arg1 points to self %typemap(check) Py_ssize_t i %{ if ($1 < 0 || $1 >= static_cast< Py_ssize_t >(arg1->count())) { @@ -587,7 +602,6 @@ RAW_STRING_DATA(Exiv2::XmpTextValue) %ignore Exiv2::getValue; %ignore Exiv2::operator<<; %ignore Exiv2::Value::operator=; -%ignore Exiv2::Value::write; %ignore Exiv2::CommentValue::CharsetInfo; %ignore Exiv2::CommentValue::CharsetTable; %ignore Exiv2::LangAltValueComparator; diff --git a/src/swig-0_27_3/exif_wrap.cxx b/src/swig-0_27_3/exif_wrap.cxx index 8196177..179d4fb 100644 --- a/src/swig-0_27_3/exif_wrap.cxx +++ b/src/swig-0_27_3/exif_wrap.cxx @@ -3974,15 +3974,16 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_size_type swig_types[47] #define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[48] #define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t__iterator swig_types[49] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[50] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[51] -#define SWIGTYPE_p_unsigned_char swig_types[52] -#define SWIGTYPE_p_unsigned_int swig_types[53] -#define SWIGTYPE_p_unsigned_long_long swig_types[54] -#define SWIGTYPE_p_unsigned_short swig_types[55] -#define SWIGTYPE_p_value_type swig_types[56] -static swig_type_info *swig_types[58]; -static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[50] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[51] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[52] +#define SWIGTYPE_p_unsigned_char swig_types[53] +#define SWIGTYPE_p_unsigned_int swig_types[54] +#define SWIGTYPE_p_unsigned_long_long swig_types[55] +#define SWIGTYPE_p_unsigned_short swig_types[56] +#define SWIGTYPE_p_value_type swig_types[57] +static swig_type_info *swig_types[59]; +static swig_module_info swig_module = {swig_types, 58, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -6228,6 +6229,65 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_copy(PyObject *self, PyObject *args } +SWIGINTERN PyObject *_wrap_ExifData_iterator_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + ExifData_iterator *arg1 = (ExifData_iterator *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "ExifData_iterator_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ExifData_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifData_iterator_write" "', argument " "1"" of type '" "ExifData_iterator const *""'"); + } + arg1 = reinterpret_cast< ExifData_iterator * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ExifData_iterator_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &(*arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_ExifData_iterator_typeId(PyObject *self, PyObject *args) { PyObject *resultobj = 0; ExifData_iterator *arg1 = (ExifData_iterator *) 0 ; @@ -7614,6 +7674,65 @@ SWIGINTERN PyObject *_wrap_Exifdatum_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Exifdatum_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Exifdatum *arg1 = (Exiv2::Exifdatum *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "Exifdatum_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Exifdatum, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Exifdatum_write" "', argument " "1"" of type '" "Exiv2::Exifdatum const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Exifdatum * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Exifdatum_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &((Exiv2::Exifdatum const *)arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Exifdatum_typeId(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Exifdatum *arg1 = (Exiv2::Exifdatum *) 0 ; @@ -10318,6 +10437,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__ExifData_iterator_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, + { "write", _wrap_ExifData_iterator_write, METH_VARARGS, "" }, { "typeId", _wrap_ExifData_iterator_typeId, METH_VARARGS, " Return the type id of the value" }, { "typeName", _wrap_ExifData_iterator_typeName, METH_VARARGS, " Return the name of the type" }, { "typeSize", _wrap_ExifData_iterator_typeSize, METH_VARARGS, " Return the size in bytes of one component of this type" }, @@ -10651,6 +10771,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Exifdatum_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, + { "write", _wrap_Exifdatum_write, METH_VARARGS, "" }, { "typeId", _wrap_Exifdatum_typeId, METH_VARARGS, " Return the type id of the value" }, { "typeName", _wrap_Exifdatum_typeName, METH_VARARGS, " Return the name of the type" }, { "typeSize", _wrap_Exifdatum_typeSize, METH_VARARGS, " Return the size in bytes of one component of this type" }, @@ -11947,6 +12068,7 @@ static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_f static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__listT_Exiv2__Exifdatum_t = {"_p_std__listT_Exiv2__Exifdatum_t", "Exiv2::ExifMetadata *|std::list< Exiv2::Exifdatum > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__listT_Exiv2__Exifdatum_t__iterator = {"_p_std__listT_Exiv2__Exifdatum_t__iterator", "Exiv2::ExifData::iterator *|std::list< Exiv2::Exifdatum >::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "Exiv2::byte *|uint8_t *|uint_fast8_t *|uint_least8_t *|unsigned char *", 0, 0, (void*)0, 0}; @@ -12006,6 +12128,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_size_type, &_swigt__p_std__listT_Exiv2__Exifdatum_t, &_swigt__p_std__listT_Exiv2__Exifdatum_t__iterator, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_unsigned_char, @@ -12065,6 +12188,7 @@ static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0 static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__listT_Exiv2__Exifdatum_t[] = { {&_swigt__p_std__listT_Exiv2__Exifdatum_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__listT_Exiv2__Exifdatum_t__iterator[] = { {&_swigt__p_std__listT_Exiv2__Exifdatum_t__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -12124,6 +12248,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_size_type, _swigc__p_std__listT_Exiv2__Exifdatum_t, _swigc__p_std__listT_Exiv2__Exifdatum_t__iterator, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_unsigned_char, diff --git a/src/swig-0_27_3/iptc_wrap.cxx b/src/swig-0_27_3/iptc_wrap.cxx index 3541698..2617a45 100644 --- a/src/swig-0_27_3/iptc_wrap.cxx +++ b/src/swig-0_27_3/iptc_wrap.cxx @@ -3970,17 +3970,18 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_short swig_types[43] #define SWIGTYPE_p_signed_char swig_types[44] #define SWIGTYPE_p_size_type swig_types[45] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[46] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[47] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[48] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t__iterator swig_types[49] -#define SWIGTYPE_p_unsigned_char swig_types[50] -#define SWIGTYPE_p_unsigned_int swig_types[51] -#define SWIGTYPE_p_unsigned_long_long swig_types[52] -#define SWIGTYPE_p_unsigned_short swig_types[53] -#define SWIGTYPE_p_value_type swig_types[54] -static swig_type_info *swig_types[56]; -static swig_module_info swig_module = {swig_types, 55, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[46] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[47] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[48] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[49] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t__iterator swig_types[50] +#define SWIGTYPE_p_unsigned_char swig_types[51] +#define SWIGTYPE_p_unsigned_int swig_types[52] +#define SWIGTYPE_p_unsigned_long_long swig_types[53] +#define SWIGTYPE_p_unsigned_short swig_types[54] +#define SWIGTYPE_p_value_type swig_types[55] +static swig_type_info *swig_types[57]; +static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -5891,6 +5892,65 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_copy(PyObject *self, PyObject *args } +SWIGINTERN PyObject *_wrap_IptcData_iterator_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + IptcData_iterator *arg1 = (IptcData_iterator *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "IptcData_iterator_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_IptcData_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IptcData_iterator_write" "', argument " "1"" of type '" "IptcData_iterator const *""'"); + } + arg1 = reinterpret_cast< IptcData_iterator * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IptcData_iterator_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &(*arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_IptcData_iterator_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; IptcData_iterator *arg1 = (IptcData_iterator *) 0 ; @@ -7166,6 +7226,65 @@ SWIGINTERN PyObject *_wrap_Iptcdatum_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Iptcdatum_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Iptcdatum *arg1 = (Exiv2::Iptcdatum *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "Iptcdatum_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Iptcdatum, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Iptcdatum_write" "', argument " "1"" of type '" "Exiv2::Iptcdatum const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Iptcdatum * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Iptcdatum_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &((Exiv2::Iptcdatum const *)arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Iptcdatum_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Iptcdatum *arg1 = (Exiv2::Iptcdatum *) 0 ; @@ -9481,6 +9600,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__IptcData_iterator_methods[] = { { "__deref__", _wrap_IptcData_iterator___deref__, METH_VARARGS, "" }, { "setValue", _wrap_IptcData_iterator_setValue, METH_VARARGS, "" }, { "copy", _wrap_IptcData_iterator_copy, METH_VARARGS, "" }, + { "write", _wrap_IptcData_iterator_write, METH_VARARGS, "" }, { "key", _wrap_IptcData_iterator_key, METH_VARARGS, "\n" "Return the key of the Iptcdatum. The key is of the form\n" " '**Iptc**.recordName.datasetName'. Note however that the key\n" @@ -9789,6 +9909,7 @@ SwigPyBuiltin__Exiv2__Iptcdatum_richcompare(PyObject *self, PyObject *other, int SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Iptcdatum_methods[] = { { "setValue", _wrap_Iptcdatum_setValue, METH_VARARGS, "" }, { "copy", _wrap_Iptcdatum_copy, METH_VARARGS, "" }, + { "write", _wrap_Iptcdatum_write, METH_VARARGS, "" }, { "key", _wrap_Iptcdatum_key, METH_VARARGS, "\n" "Return the key of the Iptcdatum. The key is of the form\n" " '**Iptc**.recordName.datasetName'. Note however that the key\n" @@ -10493,6 +10614,7 @@ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *" static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t = {"_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t", "Exiv2::IptcMetadata *|std::vector< Exiv2::Iptcdatum,std::allocator< Exiv2::Iptcdatum > > *", 0, 0, (void*)0, 0}; @@ -10550,6 +10672,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t, @@ -10607,6 +10730,7 @@ static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t[] = { {&_swigt__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -10664,6 +10788,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t, diff --git a/src/swig-0_27_3/metadatum_wrap.cxx b/src/swig-0_27_3/metadatum_wrap.cxx index fe819f0..34cab07 100644 --- a/src/swig-0_27_3/metadatum_wrap.cxx +++ b/src/swig-0_27_3/metadatum_wrap.cxx @@ -3964,15 +3964,16 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_short swig_types[37] #define SWIGTYPE_p_signed_char swig_types[38] #define SWIGTYPE_p_size_type swig_types[39] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[40] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[41] -#define SWIGTYPE_p_unsigned_char swig_types[42] -#define SWIGTYPE_p_unsigned_int swig_types[43] -#define SWIGTYPE_p_unsigned_long_long swig_types[44] -#define SWIGTYPE_p_unsigned_short swig_types[45] -#define SWIGTYPE_p_value_type swig_types[46] -static swig_type_info *swig_types[48]; -static swig_module_info swig_module = {swig_types, 47, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[40] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[41] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[42] +#define SWIGTYPE_p_unsigned_char swig_types[43] +#define SWIGTYPE_p_unsigned_int swig_types[44] +#define SWIGTYPE_p_unsigned_long_long swig_types[45] +#define SWIGTYPE_p_unsigned_short swig_types[46] +#define SWIGTYPE_p_value_type swig_types[47] +static swig_type_info *swig_types[49]; +static swig_module_info swig_module = {swig_types, 48, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -5377,6 +5378,51 @@ SWIGINTERN PyObject *_wrap_Key_clone(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Key_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "Key_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_write" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::Key const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGPY_REPRFUNC_CLOSURE(_wrap_Key_key) /* defines _wrap_Key_key_reprfunc_closure */ SWIGINTERN PyObject *_wrap_Metadatum_setValue__SWIG_0(PyObject *self, PyObject *args) { @@ -5620,6 +5666,65 @@ SWIGINTERN PyObject *_wrap_Metadatum_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Metadatum_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Metadatum *arg1 = (Exiv2::Metadatum *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "Metadatum_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Metadatum, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Metadatum_write" "', argument " "1"" of type '" "Exiv2::Metadatum const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Metadatum * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Metadatum_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &((Exiv2::Metadatum const *)arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Metadatum_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Metadatum *arg1 = (Exiv2::Metadatum *) 0 ; @@ -6325,6 +6430,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Key_methods[] = { " The caller owns this copy and the auto-pointer ensures that it\n" " will be deleted.\n" "" }, + { "write", _wrap_Key_write, METH_VARARGS, "\n" + "Write the key to an output stream. You do not usually have\n" + " to use this function; it is used for the implementation of\n" + " the output operator for %Key,\n" + " operator<<(std::ostream &os, const Key &key).\n" + "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; @@ -6615,6 +6726,27 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Metadatum_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, + { "write", _wrap_Metadatum_write, METH_VARARGS, "\n" + "Write the interpreted value to an output stream, return\n" + " the stream.\n" + "\n" + "The method takes an optional pointer to a metadata container.\n" + "Pretty-print functions may use that to refer to other metadata as it\n" + "is sometimes not sufficient to know only the value of the metadatum\n" + "that should be interpreted. Thus, it is advisable to always call this\n" + "method with a pointer to the metadata container if possible.\n" + "\n" + "This functionality is currently only implemented for Exif tags.\n" + "The pointer is ignored when used to write IPTC datasets or XMP\n" + "properties.\n" + "\n" + "Without the optional metadata pointer, you do not usually have to use\n" + "this function; it is used for the implementation of the output\n" + "operator for %Metadatum,\n" + "operator<<(std::ostream &os, const Metadatum &md).\n" + "\n" + "See also print(), which prints the interpreted value to a string.\n" + "" }, { "key", _wrap_Metadatum_key, METH_VARARGS, "\n" "Return the key of the metadatum. The key is of the form\n" " 'familyName.groupName.tagName'. Note however that the key\n" @@ -7021,6 +7153,7 @@ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *" static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "Exiv2::byte *|uint8_t *|uint_fast8_t *|uint_least8_t *|unsigned char *", 0, 0, (void*)0, 0}; @@ -7070,6 +7203,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_unsigned_char, @@ -7119,6 +7253,7 @@ static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -7168,6 +7303,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_unsigned_char, diff --git a/src/swig-0_27_3/value_wrap.cxx b/src/swig-0_27_3/value_wrap.cxx index d4e4a23..6cd47c7 100644 --- a/src/swig-0_27_3/value_wrap.cxx +++ b/src/swig-0_27_3/value_wrap.cxx @@ -3968,15 +3968,16 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_short swig_types[38] #define SWIGTYPE_p_signed_char swig_types[39] #define SWIGTYPE_p_size_type swig_types[40] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[41] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[42] -#define SWIGTYPE_p_unsigned_char swig_types[43] -#define SWIGTYPE_p_unsigned_int swig_types[44] -#define SWIGTYPE_p_unsigned_long_long swig_types[45] -#define SWIGTYPE_p_unsigned_short swig_types[46] -#define SWIGTYPE_p_value_type swig_types[47] -static swig_type_info *swig_types[49]; -static swig_module_info swig_module = {swig_types, 48, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[41] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[42] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[43] +#define SWIGTYPE_p_unsigned_char swig_types[44] +#define SWIGTYPE_p_unsigned_int swig_types[45] +#define SWIGTYPE_p_unsigned_long_long swig_types[46] +#define SWIGTYPE_p_unsigned_short swig_types[47] +#define SWIGTYPE_p_value_type swig_types[48] +static swig_type_info *swig_types[50]; +static swig_module_info swig_module = {swig_types, 49, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -7973,6 +7974,51 @@ SWIGINTERN PyObject *_wrap_Value_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Value_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Value *arg1 = (Exiv2::Value *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "Value_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Value_write" "', argument " "1"" of type '" "Exiv2::Value const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Value * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::Value const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Value_toString__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Value *arg1 = (Exiv2::Value *) 0 ; @@ -8822,6 +8868,51 @@ SWIGINTERN PyObject *_wrap_DataValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_DataValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::DataValue *arg1 = (Exiv2::DataValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "DataValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__DataValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataValue_write" "', argument " "1"" of type '" "Exiv2::DataValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::DataValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::DataValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_DataValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::DataValue *arg1 = (Exiv2::DataValue *) 0 ; @@ -9519,6 +9610,51 @@ SWIGINTERN PyObject *_wrap_StringValueBase_toRational(PyObject *self, PyObject * } +SWIGINTERN PyObject *_wrap_StringValueBase_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::StringValueBase *arg1 = (Exiv2::StringValueBase *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "StringValueBase_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__StringValueBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringValueBase_write" "', argument " "1"" of type '" "Exiv2::StringValueBase const *""'"); + } + arg1 = reinterpret_cast< Exiv2::StringValueBase * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::StringValueBase const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_StringValueBase___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::StringValueBase *arg1 = (Exiv2::StringValueBase *) 0 ; @@ -10004,6 +10140,51 @@ SWIGINTERN PyObject *_wrap_AsciiValue_clone(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_AsciiValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::AsciiValue *arg1 = (Exiv2::AsciiValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "AsciiValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__AsciiValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsciiValue_write" "', argument " "1"" of type '" "Exiv2::AsciiValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::AsciiValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::AsciiValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN int _wrap_new_AsciiValue__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; std::string *arg1 = 0 ; @@ -10470,6 +10651,51 @@ SWIGINTERN PyObject *_wrap_CommentValue_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_CommentValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::CommentValue *arg1 = (Exiv2::CommentValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "CommentValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CommentValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CommentValue_write" "', argument " "1"" of type '" "Exiv2::CommentValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::CommentValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::CommentValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_CommentValue_comment__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::CommentValue *arg1 = (Exiv2::CommentValue *) 0 ; @@ -11644,6 +11870,51 @@ SWIGINTERN PyObject *_wrap_XmpTextValue_toRational(PyObject *self, PyObject *arg } +SWIGINTERN PyObject *_wrap_XmpTextValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::XmpTextValue *arg1 = (Exiv2::XmpTextValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "XmpTextValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__XmpTextValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpTextValue_write" "', argument " "1"" of type '" "Exiv2::XmpTextValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::XmpTextValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::XmpTextValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN int _wrap_new_XmpTextValue__SWIG_2(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; Exiv2::Value *arg1 = 0 ; @@ -12184,6 +12455,51 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue_toRational(PyObject *self, PyObject *ar } +SWIGINTERN PyObject *_wrap_XmpArrayValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::XmpArrayValue *arg1 = (Exiv2::XmpArrayValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "XmpArrayValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__XmpArrayValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpArrayValue_write" "', argument " "1"" of type '" "Exiv2::XmpArrayValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::XmpArrayValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::XmpArrayValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN int _wrap_new_XmpArrayValue__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; Exiv2::Value *arg1 = 0 ; @@ -12978,6 +13294,51 @@ SWIGINTERN PyObject *_wrap_LangAltValue_toRational(PyObject *self, PyObject *arg } +SWIGINTERN PyObject *_wrap_LangAltValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::LangAltValue *arg1 = (Exiv2::LangAltValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "LangAltValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__LangAltValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangAltValue_write" "', argument " "1"" of type '" "Exiv2::LangAltValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::LangAltValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::LangAltValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN int _wrap_new_LangAltValue__SWIG_2(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; Exiv2::LangAltValue::ValueType arg1 ; @@ -13813,6 +14174,51 @@ SWIGINTERN PyObject *_wrap_DateValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_DateValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::DateValue *arg1 = (Exiv2::DateValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "DateValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__DateValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateValue_write" "', argument " "1"" of type '" "Exiv2::DateValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::DateValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::DateValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_DateValue_toLong(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::DateValue *arg1 = (Exiv2::DateValue *) 0 ; @@ -15128,14 +15534,59 @@ SWIGINTERN PyObject *_wrap_TimeValue_size(PyObject *self, PyObject *args) { int res1 = 0 ; long result; - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "TimeValue_size takes no arguments"); + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "TimeValue_size takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__TimeValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeValue_size" "', argument " "1"" of type '" "Exiv2::TimeValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::TimeValue * >(argp1); + result = (long)((Exiv2::TimeValue const *)arg1)->size(); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TimeValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::TimeValue *arg1 = (Exiv2::TimeValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "TimeValue_write", 1, 1, &obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__TimeValue, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeValue_size" "', argument " "1"" of type '" "Exiv2::TimeValue const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeValue_write" "', argument " "1"" of type '" "Exiv2::TimeValue const *""'"); } arg1 = reinterpret_cast< Exiv2::TimeValue * >(argp1); - result = (long)((Exiv2::TimeValue const *)arg1)->size(); - resultobj = SWIG_From_long(static_cast< long >(result)); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::TimeValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } return resultobj; fail: return NULL; @@ -16695,6 +17146,51 @@ SWIGINTERN PyObject *_wrap_UShortValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_UShortValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< uint16_t > *arg1 = (Exiv2::ValueType< uint16_t > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "UShortValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UShortValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< uint16_t > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< uint16_t > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< uint16_t > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_UShortValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint16_t > *arg1 = (Exiv2::ValueType< uint16_t > *) 0 ; @@ -17785,6 +18281,51 @@ SWIGINTERN PyObject *_wrap_ULongValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_ULongValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< uint32_t > *arg1 = (Exiv2::ValueType< uint32_t > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "ULongValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ULongValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< uint32_t > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< uint32_t > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< uint32_t > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_ULongValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint32_t > *arg1 = (Exiv2::ValueType< uint32_t > *) 0 ; @@ -18880,6 +19421,51 @@ SWIGINTERN PyObject *_wrap_URationalValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_URationalValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< Exiv2::URational > *arg1 = (Exiv2::ValueType< Exiv2::URational > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "URationalValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "URationalValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< Exiv2::URational > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::URational > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< Exiv2::URational > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_URationalValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::URational > *arg1 = (Exiv2::ValueType< Exiv2::URational > *) 0 ; @@ -19964,6 +20550,51 @@ SWIGINTERN PyObject *_wrap_ShortValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_ShortValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< int16_t > *arg1 = (Exiv2::ValueType< int16_t > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "ShortValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< int16_t > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< int16_t > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< int16_t > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_ShortValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int16_t > *arg1 = (Exiv2::ValueType< int16_t > *) 0 ; @@ -21054,6 +21685,51 @@ SWIGINTERN PyObject *_wrap_LongValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_LongValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< int32_t > *arg1 = (Exiv2::ValueType< int32_t > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "LongValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< int32_t > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< int32_t > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< int32_t > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_LongValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int32_t > *arg1 = (Exiv2::ValueType< int32_t > *) 0 ; @@ -22149,6 +22825,51 @@ SWIGINTERN PyObject *_wrap_RationalValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_RationalValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< Exiv2::Rational > *arg1 = (Exiv2::ValueType< Exiv2::Rational > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "RationalValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RationalValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< Exiv2::Rational > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::Rational > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_RationalValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::Rational > *arg1 = (Exiv2::ValueType< Exiv2::Rational > *) 0 ; @@ -23233,6 +23954,51 @@ SWIGINTERN PyObject *_wrap_FloatValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_FloatValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< float > *arg1 = (Exiv2::ValueType< float > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "FloatValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_float_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< float > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< float > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< float > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_FloatValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< float > *arg1 = (Exiv2::ValueType< float > *) 0 ; @@ -24323,6 +25089,51 @@ SWIGINTERN PyObject *_wrap_DoubleValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_DoubleValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< double > *arg1 = (Exiv2::ValueType< double > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "DoubleValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_double_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< double > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< double > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< double > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_DoubleValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< double > *arg1 = (Exiv2::ValueType< double > *) 0 ; @@ -24935,6 +25746,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Value_methods[] = { "" }, { "count", _wrap_Value_count, METH_VARARGS, " Return the number of components of the value" }, { "size", _wrap_Value_size, METH_VARARGS, " Return the size of the value in bytes" }, + { "write", _wrap_Value_write, METH_VARARGS, "\n" + "Write the value to an output stream. You do not usually have\n" + " to use this function; it is used for the implementation of\n" + " the output operator for %Value,\n" + " operator<<(std::ostream &os, const Value &value).\n" + "" }, { "toString", _wrap_Value_toString, METH_VARARGS, "\n" "*Overload 1:*\n" "\n" @@ -25321,6 +26138,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataValue_methods[] = { "" }, { "count", _wrap_DataValue_count, METH_VARARGS, "" }, { "size", _wrap_DataValue_size, METH_VARARGS, "" }, + { "write", _wrap_DataValue_write, METH_VARARGS, "" }, { "toString", _wrap_DataValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -25635,6 +26453,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__StringValueBase_methods[] = { { "toLong", _wrap_StringValueBase_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_StringValueBase_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_StringValueBase_toRational, METH_VARARGS, "" }, + { "write", _wrap_StringValueBase_write, METH_VARARGS, "" }, { "__getitem__", _wrap_StringValueBase___getitem__, METH_VARARGS, "" }, { "data", _wrap_StringValueBase_data, METH_VARARGS, "\n" "Returns a temporary Python memoryview of the object's data.\n" @@ -26168,6 +26987,11 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__AsciiValue_methods[] = { " with '\\0'.\n" "" }, { "clone", _wrap_AsciiValue_clone, METH_VARARGS, "" }, + { "write", _wrap_AsciiValue_write, METH_VARARGS, "\n" + "Write the ASCII value up to the the first '\\0' character to an\n" + " output stream. Any further characters are ignored and not\n" + " written to the output stream.\n" + "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; @@ -26448,6 +27272,10 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__CommentValue_methods[] = { "" }, { "clone", _wrap_CommentValue_clone, METH_VARARGS, "" }, { "copy", _wrap_CommentValue_copy, METH_VARARGS, "" }, + { "write", _wrap_CommentValue_write, METH_VARARGS, "\n" + "Write the comment in a format which can be read by\n" + "read(const std::string& comment).\n" + "" }, { "comment", _wrap_CommentValue_comment, METH_VARARGS, "\n" "Return the comment (without a charset=\"...\" prefix)\n" "\n" @@ -27070,6 +27898,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpTextValue_methods[] = { ":rtype: (int, int) tuple\n" ":return: The converted value.\n" "" }, + { "write", _wrap_XmpTextValue_write, METH_VARARGS, "" }, { "__getitem__", _wrap_XmpTextValue___getitem__, METH_VARARGS, "" }, { "data", _wrap_XmpTextValue_data, METH_VARARGS, "\n" "Returns a temporary Python memoryview of the object's data.\n" @@ -27400,6 +28229,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpArrayValue_methods[] = { { "toLong", _wrap_XmpArrayValue_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_XmpArrayValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_XmpArrayValue_toRational, METH_VARARGS, "" }, + { "write", _wrap_XmpArrayValue_write, METH_VARARGS, "\n" + "Write all elements of the value to *os*, separated by commas.\n" + "\n" + "Notes: The output of this method cannot directly be used as the parameter\n" + " for read().\n" + "" }, { "__getitem__", _wrap_XmpArrayValue___getitem__, METH_VARARGS, "" }, { "append", _wrap_XmpArrayValue_append, METH_VARARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ @@ -27722,6 +28557,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__LangAltValue_methods[] = { { "toLong", _wrap_LangAltValue_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_LangAltValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_LangAltValue_toRational, METH_VARARGS, "" }, + { "write", _wrap_LangAltValue_write, METH_VARARGS, "\n" + "Write all elements of the value to *os*, separated by commas.\n" + "\n" + "Notes: The output of this method cannot directly be used as the parameter\n" + " for read().\n" + "" }, { "keys", _wrap_LangAltValue_keys, METH_VARARGS, "Get keys (i.e. languages) of the LangAltValue components." }, { "values", _wrap_LangAltValue_values, METH_VARARGS, "Get values (i.e. text strings) of the LangAltValue components." }, { "items", _wrap_LangAltValue_items, METH_VARARGS, "\n" @@ -28039,6 +28880,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DateValue_methods[] = { { "getDate", _wrap_DateValue_getDate, METH_VARARGS, " Return date struct containing date information" }, { "count", _wrap_DateValue_count, METH_VARARGS, "" }, { "size", _wrap_DateValue_size, METH_VARARGS, "" }, + { "write", _wrap_DateValue_write, METH_VARARGS, "" }, { "toLong", _wrap_DateValue_toLong, METH_VARARGS, " Return the value as a UNIX calender time converted to long." }, { "toFloat", _wrap_DateValue_toFloat, METH_VARARGS, " Return the value as a UNIX calender time converted to float." }, { "toRational", _wrap_DateValue_toRational, METH_VARARGS, " Return the value as a UNIX calender time converted to Rational." }, @@ -28615,6 +29457,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TimeValue_methods[] = { { "getTime", _wrap_TimeValue_getTime, METH_VARARGS, " Return time struct containing time information" }, { "count", _wrap_TimeValue_count, METH_VARARGS, "" }, { "size", _wrap_TimeValue_size, METH_VARARGS, "" }, + { "write", _wrap_TimeValue_write, METH_VARARGS, "" }, { "toLong", _wrap_TimeValue_toLong, METH_VARARGS, " Returns number of seconds in the day in UTC." }, { "toFloat", _wrap_TimeValue_toFloat, METH_VARARGS, " Returns number of seconds in the day in UTC converted to float." }, { "toRational", _wrap_TimeValue_toRational, METH_VARARGS, " Returns number of seconds in the day in UTC converted to Rational." }, @@ -29161,6 +30004,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods[] = { { "copy", _wrap_UShortValue_copy, METH_VARARGS, "" }, { "count", _wrap_UShortValue_count, METH_VARARGS, "" }, { "size", _wrap_UShortValue_size, METH_VARARGS, "" }, + { "write", _wrap_UShortValue_write, METH_VARARGS, "" }, { "toString", _wrap_UShortValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -29447,6 +30291,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods[] = { { "copy", _wrap_ULongValue_copy, METH_VARARGS, "" }, { "count", _wrap_ULongValue_count, METH_VARARGS, "" }, { "size", _wrap_ULongValue_size, METH_VARARGS, "" }, + { "write", _wrap_ULongValue_write, METH_VARARGS, "" }, { "toString", _wrap_ULongValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -29733,6 +30578,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_metho { "copy", _wrap_URationalValue_copy, METH_VARARGS, "" }, { "count", _wrap_URationalValue_count, METH_VARARGS, "" }, { "size", _wrap_URationalValue_size, METH_VARARGS, "" }, + { "write", _wrap_URationalValue_write, METH_VARARGS, "" }, { "toString", _wrap_URationalValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -30019,6 +30865,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods[] = { { "copy", _wrap_ShortValue_copy, METH_VARARGS, "" }, { "count", _wrap_ShortValue_count, METH_VARARGS, "" }, { "size", _wrap_ShortValue_size, METH_VARARGS, "" }, + { "write", _wrap_ShortValue_write, METH_VARARGS, "" }, { "toString", _wrap_ShortValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -30305,6 +31152,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods[] = { { "copy", _wrap_LongValue_copy, METH_VARARGS, "" }, { "count", _wrap_LongValue_count, METH_VARARGS, "" }, { "size", _wrap_LongValue_size, METH_VARARGS, "" }, + { "write", _wrap_LongValue_write, METH_VARARGS, "" }, { "toString", _wrap_LongValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -30591,6 +31439,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_method { "copy", _wrap_RationalValue_copy, METH_VARARGS, "" }, { "count", _wrap_RationalValue_count, METH_VARARGS, "" }, { "size", _wrap_RationalValue_size, METH_VARARGS, "" }, + { "write", _wrap_RationalValue_write, METH_VARARGS, "" }, { "toString", _wrap_RationalValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -30877,6 +31726,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods[] = { { "copy", _wrap_FloatValue_copy, METH_VARARGS, "" }, { "count", _wrap_FloatValue_count, METH_VARARGS, "" }, { "size", _wrap_FloatValue_size, METH_VARARGS, "" }, + { "write", _wrap_FloatValue_write, METH_VARARGS, "" }, { "toString", _wrap_FloatValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -31163,6 +32013,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods[] = { { "copy", _wrap_DoubleValue_copy, METH_VARARGS, "" }, { "count", _wrap_DoubleValue_count, METH_VARARGS, "" }, { "size", _wrap_DoubleValue_size, METH_VARARGS, "" }, + { "write", _wrap_DoubleValue_write, METH_VARARGS, "" }, { "toString", _wrap_DoubleValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -31515,6 +32366,7 @@ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *" static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "Exiv2::byte *|uint8_t *|uint_fast8_t *|uint_least8_t *|unsigned char *", 0, 0, (void*)0, 0}; @@ -31565,6 +32417,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_unsigned_char, @@ -31615,6 +32468,7 @@ static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -31665,6 +32519,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_unsigned_char, diff --git a/src/swig-0_27_3/xmp_wrap.cxx b/src/swig-0_27_3/xmp_wrap.cxx index da0dbf7..75ed42e 100644 --- a/src/swig-0_27_3/xmp_wrap.cxx +++ b/src/swig-0_27_3/xmp_wrap.cxx @@ -3972,17 +3972,18 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_short swig_types[45] #define SWIGTYPE_p_signed_char swig_types[46] #define SWIGTYPE_p_size_type swig_types[47] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[48] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[49] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[50] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t__iterator swig_types[51] -#define SWIGTYPE_p_unsigned_char swig_types[52] -#define SWIGTYPE_p_unsigned_int swig_types[53] -#define SWIGTYPE_p_unsigned_long_long swig_types[54] -#define SWIGTYPE_p_unsigned_short swig_types[55] -#define SWIGTYPE_p_value_type swig_types[56] -static swig_type_info *swig_types[58]; -static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[48] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[49] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[50] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[51] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t__iterator swig_types[52] +#define SWIGTYPE_p_unsigned_char swig_types[53] +#define SWIGTYPE_p_unsigned_int swig_types[54] +#define SWIGTYPE_p_unsigned_long_long swig_types[55] +#define SWIGTYPE_p_unsigned_short swig_types[56] +#define SWIGTYPE_p_value_type swig_types[57] +static swig_type_info *swig_types[59]; +static swig_module_info swig_module = {swig_types, 58, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -5839,6 +5840,65 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_copy(PyObject *self, PyObject *args) } +SWIGINTERN PyObject *_wrap_XmpData_iterator_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + XmpData_iterator *arg1 = (XmpData_iterator *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "XmpData_iterator_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_XmpData_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpData_iterator_write" "', argument " "1"" of type '" "XmpData_iterator const *""'"); + } + arg1 = reinterpret_cast< XmpData_iterator * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpData_iterator_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &(*arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_XmpData_iterator_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; XmpData_iterator *arg1 = (XmpData_iterator *) 0 ; @@ -7056,6 +7116,65 @@ SWIGINTERN PyObject *_wrap_Xmpdatum_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Xmpdatum_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Xmpdatum *arg1 = (Exiv2::Xmpdatum *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "Xmpdatum_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Xmpdatum, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Xmpdatum_write" "', argument " "1"" of type '" "Exiv2::Xmpdatum const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Xmpdatum * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Xmpdatum_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &((Exiv2::Xmpdatum const *)arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Xmpdatum_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Xmpdatum *arg1 = (Exiv2::Xmpdatum *) 0 ; @@ -9500,6 +9619,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__XmpData_iterator_methods[] = { { "__deref__", _wrap_XmpData_iterator___deref__, METH_VARARGS, "" }, { "setValue", _wrap_XmpData_iterator_setValue, METH_VARARGS, "" }, { "copy", _wrap_XmpData_iterator_copy, METH_VARARGS, " Not implemented. Calling this method will raise an exception." }, + { "write", _wrap_XmpData_iterator_write, METH_VARARGS, "" }, { "key", _wrap_XmpData_iterator_key, METH_VARARGS, "\n" "Return the key of the Xmpdatum. The key is of the form\n" " '**Xmp**.prefix.property'. Note however that the\n" @@ -9794,6 +9914,7 @@ SwigPyBuiltin__Exiv2__Xmpdatum_richcompare(PyObject *self, PyObject *other, int SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Xmpdatum_methods[] = { { "setValue", _wrap_Xmpdatum_setValue, METH_VARARGS, "" }, { "copy", _wrap_Xmpdatum_copy, METH_VARARGS, " Not implemented. Calling this method will raise an exception." }, + { "write", _wrap_Xmpdatum_write, METH_VARARGS, "" }, { "key", _wrap_Xmpdatum_key, METH_VARARGS, "\n" "Return the key of the Xmpdatum. The key is of the form\n" " '**Xmp**.prefix.property'. Note however that the\n" @@ -10812,6 +10933,7 @@ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *" static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t = {"_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t", "Exiv2::XmpMetadata *|std::vector< Exiv2::Xmpdatum,std::allocator< Exiv2::Xmpdatum > > *", 0, 0, (void*)0, 0}; @@ -10871,6 +10993,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t, @@ -10930,6 +11053,7 @@ static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t[] = { {&_swigt__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -10989,6 +11113,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t, diff --git a/src/swig-0_27_7/exif_wrap.cxx b/src/swig-0_27_7/exif_wrap.cxx index 8196177..179d4fb 100644 --- a/src/swig-0_27_7/exif_wrap.cxx +++ b/src/swig-0_27_7/exif_wrap.cxx @@ -3974,15 +3974,16 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_size_type swig_types[47] #define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[48] #define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t__iterator swig_types[49] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[50] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[51] -#define SWIGTYPE_p_unsigned_char swig_types[52] -#define SWIGTYPE_p_unsigned_int swig_types[53] -#define SWIGTYPE_p_unsigned_long_long swig_types[54] -#define SWIGTYPE_p_unsigned_short swig_types[55] -#define SWIGTYPE_p_value_type swig_types[56] -static swig_type_info *swig_types[58]; -static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[50] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[51] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[52] +#define SWIGTYPE_p_unsigned_char swig_types[53] +#define SWIGTYPE_p_unsigned_int swig_types[54] +#define SWIGTYPE_p_unsigned_long_long swig_types[55] +#define SWIGTYPE_p_unsigned_short swig_types[56] +#define SWIGTYPE_p_value_type swig_types[57] +static swig_type_info *swig_types[59]; +static swig_module_info swig_module = {swig_types, 58, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -6228,6 +6229,65 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_copy(PyObject *self, PyObject *args } +SWIGINTERN PyObject *_wrap_ExifData_iterator_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + ExifData_iterator *arg1 = (ExifData_iterator *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "ExifData_iterator_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ExifData_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifData_iterator_write" "', argument " "1"" of type '" "ExifData_iterator const *""'"); + } + arg1 = reinterpret_cast< ExifData_iterator * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ExifData_iterator_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &(*arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_ExifData_iterator_typeId(PyObject *self, PyObject *args) { PyObject *resultobj = 0; ExifData_iterator *arg1 = (ExifData_iterator *) 0 ; @@ -7614,6 +7674,65 @@ SWIGINTERN PyObject *_wrap_Exifdatum_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Exifdatum_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Exifdatum *arg1 = (Exiv2::Exifdatum *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "Exifdatum_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Exifdatum, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Exifdatum_write" "', argument " "1"" of type '" "Exiv2::Exifdatum const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Exifdatum * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Exifdatum_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &((Exiv2::Exifdatum const *)arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Exifdatum_typeId(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Exifdatum *arg1 = (Exiv2::Exifdatum *) 0 ; @@ -10318,6 +10437,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__ExifData_iterator_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, + { "write", _wrap_ExifData_iterator_write, METH_VARARGS, "" }, { "typeId", _wrap_ExifData_iterator_typeId, METH_VARARGS, " Return the type id of the value" }, { "typeName", _wrap_ExifData_iterator_typeName, METH_VARARGS, " Return the name of the type" }, { "typeSize", _wrap_ExifData_iterator_typeSize, METH_VARARGS, " Return the size in bytes of one component of this type" }, @@ -10651,6 +10771,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Exifdatum_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, + { "write", _wrap_Exifdatum_write, METH_VARARGS, "" }, { "typeId", _wrap_Exifdatum_typeId, METH_VARARGS, " Return the type id of the value" }, { "typeName", _wrap_Exifdatum_typeName, METH_VARARGS, " Return the name of the type" }, { "typeSize", _wrap_Exifdatum_typeSize, METH_VARARGS, " Return the size in bytes of one component of this type" }, @@ -11947,6 +12068,7 @@ static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_f static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__listT_Exiv2__Exifdatum_t = {"_p_std__listT_Exiv2__Exifdatum_t", "Exiv2::ExifMetadata *|std::list< Exiv2::Exifdatum > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__listT_Exiv2__Exifdatum_t__iterator = {"_p_std__listT_Exiv2__Exifdatum_t__iterator", "Exiv2::ExifData::iterator *|std::list< Exiv2::Exifdatum >::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "Exiv2::byte *|uint8_t *|uint_fast8_t *|uint_least8_t *|unsigned char *", 0, 0, (void*)0, 0}; @@ -12006,6 +12128,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_size_type, &_swigt__p_std__listT_Exiv2__Exifdatum_t, &_swigt__p_std__listT_Exiv2__Exifdatum_t__iterator, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_unsigned_char, @@ -12065,6 +12188,7 @@ static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0 static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__listT_Exiv2__Exifdatum_t[] = { {&_swigt__p_std__listT_Exiv2__Exifdatum_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__listT_Exiv2__Exifdatum_t__iterator[] = { {&_swigt__p_std__listT_Exiv2__Exifdatum_t__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -12124,6 +12248,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_size_type, _swigc__p_std__listT_Exiv2__Exifdatum_t, _swigc__p_std__listT_Exiv2__Exifdatum_t__iterator, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_unsigned_char, diff --git a/src/swig-0_27_7/iptc_wrap.cxx b/src/swig-0_27_7/iptc_wrap.cxx index 3541698..2617a45 100644 --- a/src/swig-0_27_7/iptc_wrap.cxx +++ b/src/swig-0_27_7/iptc_wrap.cxx @@ -3970,17 +3970,18 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_short swig_types[43] #define SWIGTYPE_p_signed_char swig_types[44] #define SWIGTYPE_p_size_type swig_types[45] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[46] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[47] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[48] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t__iterator swig_types[49] -#define SWIGTYPE_p_unsigned_char swig_types[50] -#define SWIGTYPE_p_unsigned_int swig_types[51] -#define SWIGTYPE_p_unsigned_long_long swig_types[52] -#define SWIGTYPE_p_unsigned_short swig_types[53] -#define SWIGTYPE_p_value_type swig_types[54] -static swig_type_info *swig_types[56]; -static swig_module_info swig_module = {swig_types, 55, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[46] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[47] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[48] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[49] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t__iterator swig_types[50] +#define SWIGTYPE_p_unsigned_char swig_types[51] +#define SWIGTYPE_p_unsigned_int swig_types[52] +#define SWIGTYPE_p_unsigned_long_long swig_types[53] +#define SWIGTYPE_p_unsigned_short swig_types[54] +#define SWIGTYPE_p_value_type swig_types[55] +static swig_type_info *swig_types[57]; +static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -5891,6 +5892,65 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_copy(PyObject *self, PyObject *args } +SWIGINTERN PyObject *_wrap_IptcData_iterator_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + IptcData_iterator *arg1 = (IptcData_iterator *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "IptcData_iterator_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_IptcData_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IptcData_iterator_write" "', argument " "1"" of type '" "IptcData_iterator const *""'"); + } + arg1 = reinterpret_cast< IptcData_iterator * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IptcData_iterator_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &(*arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_IptcData_iterator_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; IptcData_iterator *arg1 = (IptcData_iterator *) 0 ; @@ -7166,6 +7226,65 @@ SWIGINTERN PyObject *_wrap_Iptcdatum_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Iptcdatum_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Iptcdatum *arg1 = (Exiv2::Iptcdatum *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "Iptcdatum_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Iptcdatum, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Iptcdatum_write" "', argument " "1"" of type '" "Exiv2::Iptcdatum const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Iptcdatum * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Iptcdatum_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &((Exiv2::Iptcdatum const *)arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Iptcdatum_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Iptcdatum *arg1 = (Exiv2::Iptcdatum *) 0 ; @@ -9481,6 +9600,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__IptcData_iterator_methods[] = { { "__deref__", _wrap_IptcData_iterator___deref__, METH_VARARGS, "" }, { "setValue", _wrap_IptcData_iterator_setValue, METH_VARARGS, "" }, { "copy", _wrap_IptcData_iterator_copy, METH_VARARGS, "" }, + { "write", _wrap_IptcData_iterator_write, METH_VARARGS, "" }, { "key", _wrap_IptcData_iterator_key, METH_VARARGS, "\n" "Return the key of the Iptcdatum. The key is of the form\n" " '**Iptc**.recordName.datasetName'. Note however that the key\n" @@ -9789,6 +9909,7 @@ SwigPyBuiltin__Exiv2__Iptcdatum_richcompare(PyObject *self, PyObject *other, int SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Iptcdatum_methods[] = { { "setValue", _wrap_Iptcdatum_setValue, METH_VARARGS, "" }, { "copy", _wrap_Iptcdatum_copy, METH_VARARGS, "" }, + { "write", _wrap_Iptcdatum_write, METH_VARARGS, "" }, { "key", _wrap_Iptcdatum_key, METH_VARARGS, "\n" "Return the key of the Iptcdatum. The key is of the form\n" " '**Iptc**.recordName.datasetName'. Note however that the key\n" @@ -10493,6 +10614,7 @@ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *" static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t = {"_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t", "Exiv2::IptcMetadata *|std::vector< Exiv2::Iptcdatum,std::allocator< Exiv2::Iptcdatum > > *", 0, 0, (void*)0, 0}; @@ -10550,6 +10672,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t, @@ -10607,6 +10730,7 @@ static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t[] = { {&_swigt__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -10664,6 +10788,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t, diff --git a/src/swig-0_27_7/metadatum_wrap.cxx b/src/swig-0_27_7/metadatum_wrap.cxx index fe819f0..34cab07 100644 --- a/src/swig-0_27_7/metadatum_wrap.cxx +++ b/src/swig-0_27_7/metadatum_wrap.cxx @@ -3964,15 +3964,16 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_short swig_types[37] #define SWIGTYPE_p_signed_char swig_types[38] #define SWIGTYPE_p_size_type swig_types[39] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[40] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[41] -#define SWIGTYPE_p_unsigned_char swig_types[42] -#define SWIGTYPE_p_unsigned_int swig_types[43] -#define SWIGTYPE_p_unsigned_long_long swig_types[44] -#define SWIGTYPE_p_unsigned_short swig_types[45] -#define SWIGTYPE_p_value_type swig_types[46] -static swig_type_info *swig_types[48]; -static swig_module_info swig_module = {swig_types, 47, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[40] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[41] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[42] +#define SWIGTYPE_p_unsigned_char swig_types[43] +#define SWIGTYPE_p_unsigned_int swig_types[44] +#define SWIGTYPE_p_unsigned_long_long swig_types[45] +#define SWIGTYPE_p_unsigned_short swig_types[46] +#define SWIGTYPE_p_value_type swig_types[47] +static swig_type_info *swig_types[49]; +static swig_module_info swig_module = {swig_types, 48, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -5377,6 +5378,51 @@ SWIGINTERN PyObject *_wrap_Key_clone(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Key_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "Key_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_write" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::Key const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGPY_REPRFUNC_CLOSURE(_wrap_Key_key) /* defines _wrap_Key_key_reprfunc_closure */ SWIGINTERN PyObject *_wrap_Metadatum_setValue__SWIG_0(PyObject *self, PyObject *args) { @@ -5620,6 +5666,65 @@ SWIGINTERN PyObject *_wrap_Metadatum_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Metadatum_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Metadatum *arg1 = (Exiv2::Metadatum *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "Metadatum_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Metadatum, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Metadatum_write" "', argument " "1"" of type '" "Exiv2::Metadatum const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Metadatum * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Metadatum_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &((Exiv2::Metadatum const *)arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Metadatum_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Metadatum *arg1 = (Exiv2::Metadatum *) 0 ; @@ -6325,6 +6430,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Key_methods[] = { " The caller owns this copy and the auto-pointer ensures that it\n" " will be deleted.\n" "" }, + { "write", _wrap_Key_write, METH_VARARGS, "\n" + "Write the key to an output stream. You do not usually have\n" + " to use this function; it is used for the implementation of\n" + " the output operator for %Key,\n" + " operator<<(std::ostream &os, const Key &key).\n" + "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; @@ -6615,6 +6726,27 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Metadatum_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, + { "write", _wrap_Metadatum_write, METH_VARARGS, "\n" + "Write the interpreted value to an output stream, return\n" + " the stream.\n" + "\n" + "The method takes an optional pointer to a metadata container.\n" + "Pretty-print functions may use that to refer to other metadata as it\n" + "is sometimes not sufficient to know only the value of the metadatum\n" + "that should be interpreted. Thus, it is advisable to always call this\n" + "method with a pointer to the metadata container if possible.\n" + "\n" + "This functionality is currently only implemented for Exif tags.\n" + "The pointer is ignored when used to write IPTC datasets or XMP\n" + "properties.\n" + "\n" + "Without the optional metadata pointer, you do not usually have to use\n" + "this function; it is used for the implementation of the output\n" + "operator for %Metadatum,\n" + "operator<<(std::ostream &os, const Metadatum &md).\n" + "\n" + "See also print(), which prints the interpreted value to a string.\n" + "" }, { "key", _wrap_Metadatum_key, METH_VARARGS, "\n" "Return the key of the metadatum. The key is of the form\n" " 'familyName.groupName.tagName'. Note however that the key\n" @@ -7021,6 +7153,7 @@ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *" static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "Exiv2::byte *|uint8_t *|uint_fast8_t *|uint_least8_t *|unsigned char *", 0, 0, (void*)0, 0}; @@ -7070,6 +7203,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_unsigned_char, @@ -7119,6 +7253,7 @@ static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -7168,6 +7303,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_unsigned_char, diff --git a/src/swig-0_27_7/value_wrap.cxx b/src/swig-0_27_7/value_wrap.cxx index d4e4a23..6cd47c7 100644 --- a/src/swig-0_27_7/value_wrap.cxx +++ b/src/swig-0_27_7/value_wrap.cxx @@ -3968,15 +3968,16 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_short swig_types[38] #define SWIGTYPE_p_signed_char swig_types[39] #define SWIGTYPE_p_size_type swig_types[40] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[41] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[42] -#define SWIGTYPE_p_unsigned_char swig_types[43] -#define SWIGTYPE_p_unsigned_int swig_types[44] -#define SWIGTYPE_p_unsigned_long_long swig_types[45] -#define SWIGTYPE_p_unsigned_short swig_types[46] -#define SWIGTYPE_p_value_type swig_types[47] -static swig_type_info *swig_types[49]; -static swig_module_info swig_module = {swig_types, 48, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[41] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[42] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[43] +#define SWIGTYPE_p_unsigned_char swig_types[44] +#define SWIGTYPE_p_unsigned_int swig_types[45] +#define SWIGTYPE_p_unsigned_long_long swig_types[46] +#define SWIGTYPE_p_unsigned_short swig_types[47] +#define SWIGTYPE_p_value_type swig_types[48] +static swig_type_info *swig_types[50]; +static swig_module_info swig_module = {swig_types, 49, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -7973,6 +7974,51 @@ SWIGINTERN PyObject *_wrap_Value_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Value_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Value *arg1 = (Exiv2::Value *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "Value_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Value_write" "', argument " "1"" of type '" "Exiv2::Value const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Value * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::Value const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Value_toString__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Value *arg1 = (Exiv2::Value *) 0 ; @@ -8822,6 +8868,51 @@ SWIGINTERN PyObject *_wrap_DataValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_DataValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::DataValue *arg1 = (Exiv2::DataValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "DataValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__DataValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataValue_write" "', argument " "1"" of type '" "Exiv2::DataValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::DataValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::DataValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_DataValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::DataValue *arg1 = (Exiv2::DataValue *) 0 ; @@ -9519,6 +9610,51 @@ SWIGINTERN PyObject *_wrap_StringValueBase_toRational(PyObject *self, PyObject * } +SWIGINTERN PyObject *_wrap_StringValueBase_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::StringValueBase *arg1 = (Exiv2::StringValueBase *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "StringValueBase_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__StringValueBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringValueBase_write" "', argument " "1"" of type '" "Exiv2::StringValueBase const *""'"); + } + arg1 = reinterpret_cast< Exiv2::StringValueBase * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::StringValueBase const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_StringValueBase___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::StringValueBase *arg1 = (Exiv2::StringValueBase *) 0 ; @@ -10004,6 +10140,51 @@ SWIGINTERN PyObject *_wrap_AsciiValue_clone(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_AsciiValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::AsciiValue *arg1 = (Exiv2::AsciiValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "AsciiValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__AsciiValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsciiValue_write" "', argument " "1"" of type '" "Exiv2::AsciiValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::AsciiValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::AsciiValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN int _wrap_new_AsciiValue__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; std::string *arg1 = 0 ; @@ -10470,6 +10651,51 @@ SWIGINTERN PyObject *_wrap_CommentValue_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_CommentValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::CommentValue *arg1 = (Exiv2::CommentValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "CommentValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CommentValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CommentValue_write" "', argument " "1"" of type '" "Exiv2::CommentValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::CommentValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::CommentValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_CommentValue_comment__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::CommentValue *arg1 = (Exiv2::CommentValue *) 0 ; @@ -11644,6 +11870,51 @@ SWIGINTERN PyObject *_wrap_XmpTextValue_toRational(PyObject *self, PyObject *arg } +SWIGINTERN PyObject *_wrap_XmpTextValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::XmpTextValue *arg1 = (Exiv2::XmpTextValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "XmpTextValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__XmpTextValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpTextValue_write" "', argument " "1"" of type '" "Exiv2::XmpTextValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::XmpTextValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::XmpTextValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN int _wrap_new_XmpTextValue__SWIG_2(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; Exiv2::Value *arg1 = 0 ; @@ -12184,6 +12455,51 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue_toRational(PyObject *self, PyObject *ar } +SWIGINTERN PyObject *_wrap_XmpArrayValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::XmpArrayValue *arg1 = (Exiv2::XmpArrayValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "XmpArrayValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__XmpArrayValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpArrayValue_write" "', argument " "1"" of type '" "Exiv2::XmpArrayValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::XmpArrayValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::XmpArrayValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN int _wrap_new_XmpArrayValue__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; Exiv2::Value *arg1 = 0 ; @@ -12978,6 +13294,51 @@ SWIGINTERN PyObject *_wrap_LangAltValue_toRational(PyObject *self, PyObject *arg } +SWIGINTERN PyObject *_wrap_LangAltValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::LangAltValue *arg1 = (Exiv2::LangAltValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "LangAltValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__LangAltValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangAltValue_write" "', argument " "1"" of type '" "Exiv2::LangAltValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::LangAltValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::LangAltValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN int _wrap_new_LangAltValue__SWIG_2(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; Exiv2::LangAltValue::ValueType arg1 ; @@ -13813,6 +14174,51 @@ SWIGINTERN PyObject *_wrap_DateValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_DateValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::DateValue *arg1 = (Exiv2::DateValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "DateValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__DateValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateValue_write" "', argument " "1"" of type '" "Exiv2::DateValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::DateValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::DateValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_DateValue_toLong(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::DateValue *arg1 = (Exiv2::DateValue *) 0 ; @@ -15128,14 +15534,59 @@ SWIGINTERN PyObject *_wrap_TimeValue_size(PyObject *self, PyObject *args) { int res1 = 0 ; long result; - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "TimeValue_size takes no arguments"); + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "TimeValue_size takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__TimeValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeValue_size" "', argument " "1"" of type '" "Exiv2::TimeValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::TimeValue * >(argp1); + result = (long)((Exiv2::TimeValue const *)arg1)->size(); + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TimeValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::TimeValue *arg1 = (Exiv2::TimeValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "TimeValue_write", 1, 1, &obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__TimeValue, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeValue_size" "', argument " "1"" of type '" "Exiv2::TimeValue const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeValue_write" "', argument " "1"" of type '" "Exiv2::TimeValue const *""'"); } arg1 = reinterpret_cast< Exiv2::TimeValue * >(argp1); - result = (long)((Exiv2::TimeValue const *)arg1)->size(); - resultobj = SWIG_From_long(static_cast< long >(result)); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::TimeValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } return resultobj; fail: return NULL; @@ -16695,6 +17146,51 @@ SWIGINTERN PyObject *_wrap_UShortValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_UShortValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< uint16_t > *arg1 = (Exiv2::ValueType< uint16_t > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "UShortValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UShortValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< uint16_t > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< uint16_t > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< uint16_t > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_UShortValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint16_t > *arg1 = (Exiv2::ValueType< uint16_t > *) 0 ; @@ -17785,6 +18281,51 @@ SWIGINTERN PyObject *_wrap_ULongValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_ULongValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< uint32_t > *arg1 = (Exiv2::ValueType< uint32_t > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "ULongValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ULongValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< uint32_t > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< uint32_t > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< uint32_t > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_ULongValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint32_t > *arg1 = (Exiv2::ValueType< uint32_t > *) 0 ; @@ -18880,6 +19421,51 @@ SWIGINTERN PyObject *_wrap_URationalValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_URationalValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< Exiv2::URational > *arg1 = (Exiv2::ValueType< Exiv2::URational > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "URationalValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "URationalValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< Exiv2::URational > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::URational > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< Exiv2::URational > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_URationalValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::URational > *arg1 = (Exiv2::ValueType< Exiv2::URational > *) 0 ; @@ -19964,6 +20550,51 @@ SWIGINTERN PyObject *_wrap_ShortValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_ShortValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< int16_t > *arg1 = (Exiv2::ValueType< int16_t > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "ShortValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< int16_t > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< int16_t > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< int16_t > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_ShortValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int16_t > *arg1 = (Exiv2::ValueType< int16_t > *) 0 ; @@ -21054,6 +21685,51 @@ SWIGINTERN PyObject *_wrap_LongValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_LongValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< int32_t > *arg1 = (Exiv2::ValueType< int32_t > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "LongValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< int32_t > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< int32_t > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< int32_t > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_LongValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int32_t > *arg1 = (Exiv2::ValueType< int32_t > *) 0 ; @@ -22149,6 +22825,51 @@ SWIGINTERN PyObject *_wrap_RationalValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_RationalValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< Exiv2::Rational > *arg1 = (Exiv2::ValueType< Exiv2::Rational > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "RationalValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RationalValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< Exiv2::Rational > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::Rational > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_RationalValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::Rational > *arg1 = (Exiv2::ValueType< Exiv2::Rational > *) 0 ; @@ -23233,6 +23954,51 @@ SWIGINTERN PyObject *_wrap_FloatValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_FloatValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< float > *arg1 = (Exiv2::ValueType< float > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "FloatValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_float_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< float > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< float > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< float > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_FloatValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< float > *arg1 = (Exiv2::ValueType< float > *) 0 ; @@ -24323,6 +25089,51 @@ SWIGINTERN PyObject *_wrap_DoubleValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_DoubleValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< double > *arg1 = (Exiv2::ValueType< double > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "DoubleValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_double_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< double > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< double > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< double > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_DoubleValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< double > *arg1 = (Exiv2::ValueType< double > *) 0 ; @@ -24935,6 +25746,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Value_methods[] = { "" }, { "count", _wrap_Value_count, METH_VARARGS, " Return the number of components of the value" }, { "size", _wrap_Value_size, METH_VARARGS, " Return the size of the value in bytes" }, + { "write", _wrap_Value_write, METH_VARARGS, "\n" + "Write the value to an output stream. You do not usually have\n" + " to use this function; it is used for the implementation of\n" + " the output operator for %Value,\n" + " operator<<(std::ostream &os, const Value &value).\n" + "" }, { "toString", _wrap_Value_toString, METH_VARARGS, "\n" "*Overload 1:*\n" "\n" @@ -25321,6 +26138,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataValue_methods[] = { "" }, { "count", _wrap_DataValue_count, METH_VARARGS, "" }, { "size", _wrap_DataValue_size, METH_VARARGS, "" }, + { "write", _wrap_DataValue_write, METH_VARARGS, "" }, { "toString", _wrap_DataValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -25635,6 +26453,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__StringValueBase_methods[] = { { "toLong", _wrap_StringValueBase_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_StringValueBase_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_StringValueBase_toRational, METH_VARARGS, "" }, + { "write", _wrap_StringValueBase_write, METH_VARARGS, "" }, { "__getitem__", _wrap_StringValueBase___getitem__, METH_VARARGS, "" }, { "data", _wrap_StringValueBase_data, METH_VARARGS, "\n" "Returns a temporary Python memoryview of the object's data.\n" @@ -26168,6 +26987,11 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__AsciiValue_methods[] = { " with '\\0'.\n" "" }, { "clone", _wrap_AsciiValue_clone, METH_VARARGS, "" }, + { "write", _wrap_AsciiValue_write, METH_VARARGS, "\n" + "Write the ASCII value up to the the first '\\0' character to an\n" + " output stream. Any further characters are ignored and not\n" + " written to the output stream.\n" + "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; @@ -26448,6 +27272,10 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__CommentValue_methods[] = { "" }, { "clone", _wrap_CommentValue_clone, METH_VARARGS, "" }, { "copy", _wrap_CommentValue_copy, METH_VARARGS, "" }, + { "write", _wrap_CommentValue_write, METH_VARARGS, "\n" + "Write the comment in a format which can be read by\n" + "read(const std::string& comment).\n" + "" }, { "comment", _wrap_CommentValue_comment, METH_VARARGS, "\n" "Return the comment (without a charset=\"...\" prefix)\n" "\n" @@ -27070,6 +27898,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpTextValue_methods[] = { ":rtype: (int, int) tuple\n" ":return: The converted value.\n" "" }, + { "write", _wrap_XmpTextValue_write, METH_VARARGS, "" }, { "__getitem__", _wrap_XmpTextValue___getitem__, METH_VARARGS, "" }, { "data", _wrap_XmpTextValue_data, METH_VARARGS, "\n" "Returns a temporary Python memoryview of the object's data.\n" @@ -27400,6 +28229,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpArrayValue_methods[] = { { "toLong", _wrap_XmpArrayValue_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_XmpArrayValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_XmpArrayValue_toRational, METH_VARARGS, "" }, + { "write", _wrap_XmpArrayValue_write, METH_VARARGS, "\n" + "Write all elements of the value to *os*, separated by commas.\n" + "\n" + "Notes: The output of this method cannot directly be used as the parameter\n" + " for read().\n" + "" }, { "__getitem__", _wrap_XmpArrayValue___getitem__, METH_VARARGS, "" }, { "append", _wrap_XmpArrayValue_append, METH_VARARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ @@ -27722,6 +28557,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__LangAltValue_methods[] = { { "toLong", _wrap_LangAltValue_toLong, METH_VARARGS, "" }, { "toFloat", _wrap_LangAltValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_LangAltValue_toRational, METH_VARARGS, "" }, + { "write", _wrap_LangAltValue_write, METH_VARARGS, "\n" + "Write all elements of the value to *os*, separated by commas.\n" + "\n" + "Notes: The output of this method cannot directly be used as the parameter\n" + " for read().\n" + "" }, { "keys", _wrap_LangAltValue_keys, METH_VARARGS, "Get keys (i.e. languages) of the LangAltValue components." }, { "values", _wrap_LangAltValue_values, METH_VARARGS, "Get values (i.e. text strings) of the LangAltValue components." }, { "items", _wrap_LangAltValue_items, METH_VARARGS, "\n" @@ -28039,6 +28880,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DateValue_methods[] = { { "getDate", _wrap_DateValue_getDate, METH_VARARGS, " Return date struct containing date information" }, { "count", _wrap_DateValue_count, METH_VARARGS, "" }, { "size", _wrap_DateValue_size, METH_VARARGS, "" }, + { "write", _wrap_DateValue_write, METH_VARARGS, "" }, { "toLong", _wrap_DateValue_toLong, METH_VARARGS, " Return the value as a UNIX calender time converted to long." }, { "toFloat", _wrap_DateValue_toFloat, METH_VARARGS, " Return the value as a UNIX calender time converted to float." }, { "toRational", _wrap_DateValue_toRational, METH_VARARGS, " Return the value as a UNIX calender time converted to Rational." }, @@ -28615,6 +29457,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TimeValue_methods[] = { { "getTime", _wrap_TimeValue_getTime, METH_VARARGS, " Return time struct containing time information" }, { "count", _wrap_TimeValue_count, METH_VARARGS, "" }, { "size", _wrap_TimeValue_size, METH_VARARGS, "" }, + { "write", _wrap_TimeValue_write, METH_VARARGS, "" }, { "toLong", _wrap_TimeValue_toLong, METH_VARARGS, " Returns number of seconds in the day in UTC." }, { "toFloat", _wrap_TimeValue_toFloat, METH_VARARGS, " Returns number of seconds in the day in UTC converted to float." }, { "toRational", _wrap_TimeValue_toRational, METH_VARARGS, " Returns number of seconds in the day in UTC converted to Rational." }, @@ -29161,6 +30004,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods[] = { { "copy", _wrap_UShortValue_copy, METH_VARARGS, "" }, { "count", _wrap_UShortValue_count, METH_VARARGS, "" }, { "size", _wrap_UShortValue_size, METH_VARARGS, "" }, + { "write", _wrap_UShortValue_write, METH_VARARGS, "" }, { "toString", _wrap_UShortValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -29447,6 +30291,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods[] = { { "copy", _wrap_ULongValue_copy, METH_VARARGS, "" }, { "count", _wrap_ULongValue_count, METH_VARARGS, "" }, { "size", _wrap_ULongValue_size, METH_VARARGS, "" }, + { "write", _wrap_ULongValue_write, METH_VARARGS, "" }, { "toString", _wrap_ULongValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -29733,6 +30578,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_metho { "copy", _wrap_URationalValue_copy, METH_VARARGS, "" }, { "count", _wrap_URationalValue_count, METH_VARARGS, "" }, { "size", _wrap_URationalValue_size, METH_VARARGS, "" }, + { "write", _wrap_URationalValue_write, METH_VARARGS, "" }, { "toString", _wrap_URationalValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -30019,6 +30865,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods[] = { { "copy", _wrap_ShortValue_copy, METH_VARARGS, "" }, { "count", _wrap_ShortValue_count, METH_VARARGS, "" }, { "size", _wrap_ShortValue_size, METH_VARARGS, "" }, + { "write", _wrap_ShortValue_write, METH_VARARGS, "" }, { "toString", _wrap_ShortValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -30305,6 +31152,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods[] = { { "copy", _wrap_LongValue_copy, METH_VARARGS, "" }, { "count", _wrap_LongValue_count, METH_VARARGS, "" }, { "size", _wrap_LongValue_size, METH_VARARGS, "" }, + { "write", _wrap_LongValue_write, METH_VARARGS, "" }, { "toString", _wrap_LongValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -30591,6 +31439,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_method { "copy", _wrap_RationalValue_copy, METH_VARARGS, "" }, { "count", _wrap_RationalValue_count, METH_VARARGS, "" }, { "size", _wrap_RationalValue_size, METH_VARARGS, "" }, + { "write", _wrap_RationalValue_write, METH_VARARGS, "" }, { "toString", _wrap_RationalValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -30877,6 +31726,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods[] = { { "copy", _wrap_FloatValue_copy, METH_VARARGS, "" }, { "count", _wrap_FloatValue_count, METH_VARARGS, "" }, { "size", _wrap_FloatValue_size, METH_VARARGS, "" }, + { "write", _wrap_FloatValue_write, METH_VARARGS, "" }, { "toString", _wrap_FloatValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -31163,6 +32013,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods[] = { { "copy", _wrap_DoubleValue_copy, METH_VARARGS, "" }, { "count", _wrap_DoubleValue_count, METH_VARARGS, "" }, { "size", _wrap_DoubleValue_size, METH_VARARGS, "" }, + { "write", _wrap_DoubleValue_write, METH_VARARGS, "" }, { "toString", _wrap_DoubleValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -31515,6 +32366,7 @@ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *" static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "Exiv2::byte *|uint8_t *|uint_fast8_t *|uint_least8_t *|unsigned char *", 0, 0, (void*)0, 0}; @@ -31565,6 +32417,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_unsigned_char, @@ -31615,6 +32468,7 @@ static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -31665,6 +32519,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_unsigned_char, diff --git a/src/swig-0_27_7/xmp_wrap.cxx b/src/swig-0_27_7/xmp_wrap.cxx index da0dbf7..75ed42e 100644 --- a/src/swig-0_27_7/xmp_wrap.cxx +++ b/src/swig-0_27_7/xmp_wrap.cxx @@ -3972,17 +3972,18 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_short swig_types[45] #define SWIGTYPE_p_signed_char swig_types[46] #define SWIGTYPE_p_size_type swig_types[47] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[48] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[49] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[50] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t__iterator swig_types[51] -#define SWIGTYPE_p_unsigned_char swig_types[52] -#define SWIGTYPE_p_unsigned_int swig_types[53] -#define SWIGTYPE_p_unsigned_long_long swig_types[54] -#define SWIGTYPE_p_unsigned_short swig_types[55] -#define SWIGTYPE_p_value_type swig_types[56] -static swig_type_info *swig_types[58]; -static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[48] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[49] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[50] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[51] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t__iterator swig_types[52] +#define SWIGTYPE_p_unsigned_char swig_types[53] +#define SWIGTYPE_p_unsigned_int swig_types[54] +#define SWIGTYPE_p_unsigned_long_long swig_types[55] +#define SWIGTYPE_p_unsigned_short swig_types[56] +#define SWIGTYPE_p_value_type swig_types[57] +static swig_type_info *swig_types[59]; +static swig_module_info swig_module = {swig_types, 58, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -5839,6 +5840,65 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_copy(PyObject *self, PyObject *args) } +SWIGINTERN PyObject *_wrap_XmpData_iterator_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + XmpData_iterator *arg1 = (XmpData_iterator *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "XmpData_iterator_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_XmpData_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpData_iterator_write" "', argument " "1"" of type '" "XmpData_iterator const *""'"); + } + arg1 = reinterpret_cast< XmpData_iterator * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpData_iterator_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &(*arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_XmpData_iterator_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; XmpData_iterator *arg1 = (XmpData_iterator *) 0 ; @@ -7056,6 +7116,65 @@ SWIGINTERN PyObject *_wrap_Xmpdatum_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Xmpdatum_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Xmpdatum *arg1 = (Exiv2::Xmpdatum *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "Xmpdatum_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Xmpdatum, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Xmpdatum_write" "', argument " "1"" of type '" "Exiv2::Xmpdatum const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Xmpdatum * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Xmpdatum_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &((Exiv2::Xmpdatum const *)arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Xmpdatum_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Xmpdatum *arg1 = (Exiv2::Xmpdatum *) 0 ; @@ -9500,6 +9619,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__XmpData_iterator_methods[] = { { "__deref__", _wrap_XmpData_iterator___deref__, METH_VARARGS, "" }, { "setValue", _wrap_XmpData_iterator_setValue, METH_VARARGS, "" }, { "copy", _wrap_XmpData_iterator_copy, METH_VARARGS, " Not implemented. Calling this method will raise an exception." }, + { "write", _wrap_XmpData_iterator_write, METH_VARARGS, "" }, { "key", _wrap_XmpData_iterator_key, METH_VARARGS, "\n" "Return the key of the Xmpdatum. The key is of the form\n" " '**Xmp**.prefix.property'. Note however that the\n" @@ -9794,6 +9914,7 @@ SwigPyBuiltin__Exiv2__Xmpdatum_richcompare(PyObject *self, PyObject *other, int SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Xmpdatum_methods[] = { { "setValue", _wrap_Xmpdatum_setValue, METH_VARARGS, "" }, { "copy", _wrap_Xmpdatum_copy, METH_VARARGS, " Not implemented. Calling this method will raise an exception." }, + { "write", _wrap_Xmpdatum_write, METH_VARARGS, "" }, { "key", _wrap_Xmpdatum_key, METH_VARARGS, "\n" "Return the key of the Xmpdatum. The key is of the form\n" " '**Xmp**.prefix.property'. Note however that the\n" @@ -10812,6 +10933,7 @@ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *" static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t = {"_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t", "Exiv2::XmpMetadata *|std::vector< Exiv2::Xmpdatum,std::allocator< Exiv2::Xmpdatum > > *", 0, 0, (void*)0, 0}; @@ -10871,6 +10993,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t, @@ -10930,6 +11053,7 @@ static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t[] = { {&_swigt__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -10989,6 +11113,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t, diff --git a/src/swig-0_28_2/exif_wrap.cxx b/src/swig-0_28_2/exif_wrap.cxx index 61c32ae..6b5b1e3 100644 --- a/src/swig-0_28_2/exif_wrap.cxx +++ b/src/swig-0_28_2/exif_wrap.cxx @@ -3974,15 +3974,16 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_size_type swig_types[47] #define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[48] #define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t__iterator swig_types[49] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[50] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[51] -#define SWIGTYPE_p_unsigned_char swig_types[52] -#define SWIGTYPE_p_unsigned_int swig_types[53] -#define SWIGTYPE_p_unsigned_long_long swig_types[54] -#define SWIGTYPE_p_unsigned_short swig_types[55] -#define SWIGTYPE_p_value_type swig_types[56] -static swig_type_info *swig_types[58]; -static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[50] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[51] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[52] +#define SWIGTYPE_p_unsigned_char swig_types[53] +#define SWIGTYPE_p_unsigned_int swig_types[54] +#define SWIGTYPE_p_unsigned_long_long swig_types[55] +#define SWIGTYPE_p_unsigned_short swig_types[56] +#define SWIGTYPE_p_value_type swig_types[57] +static swig_type_info *swig_types[59]; +static swig_module_info swig_module = {swig_types, 58, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -6360,6 +6361,65 @@ SWIGINTERN PyObject *_wrap_ExifData_iterator_copy(PyObject *self, PyObject *args } +SWIGINTERN PyObject *_wrap_ExifData_iterator_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + ExifData_iterator *arg1 = (ExifData_iterator *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "ExifData_iterator_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ExifData_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExifData_iterator_write" "', argument " "1"" of type '" "ExifData_iterator const *""'"); + } + arg1 = reinterpret_cast< ExifData_iterator * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ExifData_iterator_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &(*arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_ExifData_iterator_typeId(PyObject *self, PyObject *args) { PyObject *resultobj = 0; ExifData_iterator *arg1 = (ExifData_iterator *) 0 ; @@ -7818,6 +7878,65 @@ SWIGINTERN PyObject *_wrap_Exifdatum_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Exifdatum_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Exifdatum *arg1 = (Exiv2::Exifdatum *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "Exifdatum_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Exifdatum, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Exifdatum_write" "', argument " "1"" of type '" "Exiv2::Exifdatum const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Exifdatum * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Exifdatum_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &((Exiv2::Exifdatum const *)arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Exifdatum_typeId(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Exifdatum *arg1 = (Exiv2::Exifdatum *) 0 ; @@ -10523,6 +10642,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__ExifData_iterator_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, + { "write", _wrap_ExifData_iterator_write, METH_VARARGS, "" }, { "typeId", _wrap_ExifData_iterator_typeId, METH_VARARGS, " Return the type id of the value" }, { "typeName", _wrap_ExifData_iterator_typeName, METH_VARARGS, " Return the name of the type" }, { "typeSize", _wrap_ExifData_iterator_typeSize, METH_VARARGS, " Return the size in bytes of one component of this type" }, @@ -10858,6 +10978,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Exifdatum_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, + { "write", _wrap_Exifdatum_write, METH_VARARGS, "" }, { "typeId", _wrap_Exifdatum_typeId, METH_VARARGS, " Return the type id of the value" }, { "typeName", _wrap_Exifdatum_typeName, METH_VARARGS, " Return the name of the type" }, { "typeSize", _wrap_Exifdatum_typeSize, METH_VARARGS, " Return the size in bytes of one component of this type" }, @@ -12154,6 +12275,7 @@ static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_f static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__listT_Exiv2__Exifdatum_t = {"_p_std__listT_Exiv2__Exifdatum_t", "Exiv2::ExifMetadata *|std::list< Exiv2::Exifdatum > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__listT_Exiv2__Exifdatum_t__iterator = {"_p_std__listT_Exiv2__Exifdatum_t__iterator", "Exiv2::ExifData::iterator *|std::list< Exiv2::Exifdatum >::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "Exiv2::byte *|uint8_t *|uint_fast8_t *|uint_least8_t *|unsigned char *", 0, 0, (void*)0, 0}; @@ -12213,6 +12335,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_size_type, &_swigt__p_std__listT_Exiv2__Exifdatum_t, &_swigt__p_std__listT_Exiv2__Exifdatum_t__iterator, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_unsigned_char, @@ -12272,6 +12395,7 @@ static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0 static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__listT_Exiv2__Exifdatum_t[] = { {&_swigt__p_std__listT_Exiv2__Exifdatum_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__listT_Exiv2__Exifdatum_t__iterator[] = { {&_swigt__p_std__listT_Exiv2__Exifdatum_t__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -12331,6 +12455,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_size_type, _swigc__p_std__listT_Exiv2__Exifdatum_t, _swigc__p_std__listT_Exiv2__Exifdatum_t__iterator, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_unsigned_char, diff --git a/src/swig-0_28_2/iptc_wrap.cxx b/src/swig-0_28_2/iptc_wrap.cxx index 1c4e863..655cdbb 100644 --- a/src/swig-0_28_2/iptc_wrap.cxx +++ b/src/swig-0_28_2/iptc_wrap.cxx @@ -3970,17 +3970,18 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_short swig_types[43] #define SWIGTYPE_p_signed_char swig_types[44] #define SWIGTYPE_p_size_type swig_types[45] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[46] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[47] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[48] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t__iterator swig_types[49] -#define SWIGTYPE_p_unsigned_char swig_types[50] -#define SWIGTYPE_p_unsigned_int swig_types[51] -#define SWIGTYPE_p_unsigned_long_long swig_types[52] -#define SWIGTYPE_p_unsigned_short swig_types[53] -#define SWIGTYPE_p_value_type swig_types[54] -static swig_type_info *swig_types[56]; -static swig_module_info swig_module = {swig_types, 55, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[46] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[47] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[48] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[49] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t__iterator swig_types[50] +#define SWIGTYPE_p_unsigned_char swig_types[51] +#define SWIGTYPE_p_unsigned_int swig_types[52] +#define SWIGTYPE_p_unsigned_long_long swig_types[53] +#define SWIGTYPE_p_unsigned_short swig_types[54] +#define SWIGTYPE_p_value_type swig_types[55] +static swig_type_info *swig_types[57]; +static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -6001,6 +6002,65 @@ SWIGINTERN PyObject *_wrap_IptcData_iterator_copy(PyObject *self, PyObject *args } +SWIGINTERN PyObject *_wrap_IptcData_iterator_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + IptcData_iterator *arg1 = (IptcData_iterator *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "IptcData_iterator_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_IptcData_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IptcData_iterator_write" "', argument " "1"" of type '" "IptcData_iterator const *""'"); + } + arg1 = reinterpret_cast< IptcData_iterator * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IptcData_iterator_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &(*arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_IptcData_iterator_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; IptcData_iterator *arg1 = (IptcData_iterator *) 0 ; @@ -7348,6 +7408,65 @@ SWIGINTERN PyObject *_wrap_Iptcdatum_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Iptcdatum_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Iptcdatum *arg1 = (Exiv2::Iptcdatum *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "Iptcdatum_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Iptcdatum, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Iptcdatum_write" "', argument " "1"" of type '" "Exiv2::Iptcdatum const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Iptcdatum * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Iptcdatum_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &((Exiv2::Iptcdatum const *)arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Iptcdatum_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Iptcdatum *arg1 = (Exiv2::Iptcdatum *) 0 ; @@ -9692,6 +9811,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__IptcData_iterator_methods[] = { { "__deref__", _wrap_IptcData_iterator___deref__, METH_VARARGS, "" }, { "setValue", _wrap_IptcData_iterator_setValue, METH_VARARGS, "" }, { "copy", _wrap_IptcData_iterator_copy, METH_VARARGS, "" }, + { "write", _wrap_IptcData_iterator_write, METH_VARARGS, "" }, { "key", _wrap_IptcData_iterator_key, METH_VARARGS, "\n" "Return the key of the Iptcdatum. The key is of the form\n" " '**Iptc**.recordName.datasetName'. Note however that the key\n" @@ -10002,6 +10122,7 @@ SwigPyBuiltin__Exiv2__Iptcdatum_richcompare(PyObject *self, PyObject *other, int SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Iptcdatum_methods[] = { { "setValue", _wrap_Iptcdatum_setValue, METH_VARARGS, "" }, { "copy", _wrap_Iptcdatum_copy, METH_VARARGS, "" }, + { "write", _wrap_Iptcdatum_write, METH_VARARGS, "" }, { "key", _wrap_Iptcdatum_key, METH_VARARGS, "\n" "Return the key of the Iptcdatum. The key is of the form\n" " '**Iptc**.recordName.datasetName'. Note however that the key\n" @@ -10708,6 +10829,7 @@ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *" static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t = {"_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t", "Exiv2::IptcMetadata *|std::vector< Exiv2::Iptcdatum,std::allocator< Exiv2::Iptcdatum > > *", 0, 0, (void*)0, 0}; @@ -10765,6 +10887,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t, @@ -10822,6 +10945,7 @@ static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t[] = { {&_swigt__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -10879,6 +11003,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t, diff --git a/src/swig-0_28_2/metadatum_wrap.cxx b/src/swig-0_28_2/metadatum_wrap.cxx index cf4a98e..2276640 100644 --- a/src/swig-0_28_2/metadatum_wrap.cxx +++ b/src/swig-0_28_2/metadatum_wrap.cxx @@ -3964,15 +3964,16 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_short swig_types[37] #define SWIGTYPE_p_signed_char swig_types[38] #define SWIGTYPE_p_size_type swig_types[39] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[40] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[41] -#define SWIGTYPE_p_unsigned_char swig_types[42] -#define SWIGTYPE_p_unsigned_int swig_types[43] -#define SWIGTYPE_p_unsigned_long_long swig_types[44] -#define SWIGTYPE_p_unsigned_short swig_types[45] -#define SWIGTYPE_p_value_type swig_types[46] -static swig_type_info *swig_types[48]; -static swig_module_info swig_module = {swig_types, 47, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[40] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[41] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[42] +#define SWIGTYPE_p_unsigned_char swig_types[43] +#define SWIGTYPE_p_unsigned_int swig_types[44] +#define SWIGTYPE_p_unsigned_long_long swig_types[45] +#define SWIGTYPE_p_unsigned_short swig_types[46] +#define SWIGTYPE_p_value_type swig_types[47] +static swig_type_info *swig_types[49]; +static swig_module_info swig_module = {swig_types, 48, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -5568,6 +5569,51 @@ SWIGINTERN PyObject *_wrap_Key_clone(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Key_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Key *arg1 = (Exiv2::Key *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "Key_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Key_write" "', argument " "1"" of type '" "Exiv2::Key const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Key * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::Key const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGPY_REPRFUNC_CLOSURE(_wrap_Key_key) /* defines _wrap_Key_key_reprfunc_closure */ SWIGINTERN PyObject *_wrap_Metadatum_setValue__SWIG_0(PyObject *self, PyObject *args) { @@ -5811,6 +5857,65 @@ SWIGINTERN PyObject *_wrap_Metadatum_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Metadatum_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Metadatum *arg1 = (Exiv2::Metadatum *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "Metadatum_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Metadatum, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Metadatum_write" "', argument " "1"" of type '" "Exiv2::Metadatum const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Metadatum * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Metadatum_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &((Exiv2::Metadatum const *)arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Metadatum_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Metadatum *arg1 = (Exiv2::Metadatum *) 0 ; @@ -6589,6 +6694,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Key_methods[] = { " The caller owns this copy and the auto-pointer ensures that it\n" " will be deleted.\n" "" }, + { "write", _wrap_Key_write, METH_VARARGS, "\n" + "Write the key to an output stream. You do not usually have\n" + " to use this function; it is used for the implementation of\n" + " the output operator for %Key,\n" + " operator<<(std::ostream &os, const Key &key).\n" + "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; @@ -6879,6 +6990,27 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Metadatum_methods[] = { ":rtype: int\n" ":return: Number of characters written.\n" "" }, + { "write", _wrap_Metadatum_write, METH_VARARGS, "\n" + "Write the interpreted value to an output stream, return\n" + " the stream.\n" + "\n" + "The method takes an optional pointer to a metadata container.\n" + "Pretty-print functions may use that to refer to other metadata as it\n" + "is sometimes not sufficient to know only the value of the metadatum\n" + "that should be interpreted. Thus, it is advisable to always call this\n" + "method with a pointer to the metadata container if possible.\n" + "\n" + "This functionality is currently only implemented for Exif tags.\n" + "The pointer is ignored when used to write IPTC datasets or XMP\n" + "properties.\n" + "\n" + "Without the optional metadata pointer, you do not usually have to use\n" + "this function; it is used for the implementation of the output\n" + "operator for %Metadatum,\n" + "operator<<(std::ostream &os, const Metadatum &md).\n" + "\n" + "See also print(), which prints the interpreted value to a string.\n" + "" }, { "key", _wrap_Metadatum_key, METH_VARARGS, "\n" "Return the key of the metadatum. The key is of the form\n" " 'familyName.groupName.tagName'. Note however that the key\n" @@ -7287,6 +7419,7 @@ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *" static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "Exiv2::byte *|uint8_t *|uint_fast8_t *|uint_least8_t *|unsigned char *", 0, 0, (void*)0, 0}; @@ -7336,6 +7469,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_unsigned_char, @@ -7385,6 +7519,7 @@ static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -7434,6 +7569,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_unsigned_char, diff --git a/src/swig-0_28_2/value_wrap.cxx b/src/swig-0_28_2/value_wrap.cxx index c82903a..733d040 100644 --- a/src/swig-0_28_2/value_wrap.cxx +++ b/src/swig-0_28_2/value_wrap.cxx @@ -3968,15 +3968,16 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_short swig_types[38] #define SWIGTYPE_p_signed_char swig_types[39] #define SWIGTYPE_p_size_type swig_types[40] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[41] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[42] -#define SWIGTYPE_p_unsigned_char swig_types[43] -#define SWIGTYPE_p_unsigned_int swig_types[44] -#define SWIGTYPE_p_unsigned_long_long swig_types[45] -#define SWIGTYPE_p_unsigned_short swig_types[46] -#define SWIGTYPE_p_value_type swig_types[47] -static swig_type_info *swig_types[49]; -static swig_module_info swig_module = {swig_types, 48, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[41] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[42] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[43] +#define SWIGTYPE_p_unsigned_char swig_types[44] +#define SWIGTYPE_p_unsigned_int swig_types[45] +#define SWIGTYPE_p_unsigned_long_long swig_types[46] +#define SWIGTYPE_p_unsigned_short swig_types[47] +#define SWIGTYPE_p_value_type swig_types[48] +static swig_type_info *swig_types[50]; +static swig_module_info swig_module = {swig_types, 49, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -8076,6 +8077,51 @@ SWIGINTERN PyObject *_wrap_Value_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Value_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Value *arg1 = (Exiv2::Value *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "Value_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Value_write" "', argument " "1"" of type '" "Exiv2::Value const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Value * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::Value const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Value_toString__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Value *arg1 = (Exiv2::Value *) 0 ; @@ -8948,6 +8994,51 @@ SWIGINTERN PyObject *_wrap_DataValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_DataValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::DataValue *arg1 = (Exiv2::DataValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "DataValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__DataValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataValue_write" "', argument " "1"" of type '" "Exiv2::DataValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::DataValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::DataValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_DataValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::DataValue *arg1 = (Exiv2::DataValue *) 0 ; @@ -9751,6 +9842,51 @@ SWIGINTERN PyObject *_wrap_StringValueBase_toRational(PyObject *self, PyObject * } +SWIGINTERN PyObject *_wrap_StringValueBase_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::StringValueBase *arg1 = (Exiv2::StringValueBase *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "StringValueBase_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__StringValueBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringValueBase_write" "', argument " "1"" of type '" "Exiv2::StringValueBase const *""'"); + } + arg1 = reinterpret_cast< Exiv2::StringValueBase * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::StringValueBase const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_StringValueBase___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::StringValueBase *arg1 = (Exiv2::StringValueBase *) 0 ; @@ -10216,6 +10352,51 @@ SWIGINTERN PyObject *_wrap_AsciiValue_clone(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_AsciiValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::AsciiValue *arg1 = (Exiv2::AsciiValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "AsciiValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__AsciiValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AsciiValue_write" "', argument " "1"" of type '" "Exiv2::AsciiValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::AsciiValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::AsciiValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN int _wrap_new_AsciiValue__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; std::string *arg1 = 0 ; @@ -10682,6 +10863,51 @@ SWIGINTERN PyObject *_wrap_CommentValue_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_CommentValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::CommentValue *arg1 = (Exiv2::CommentValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "CommentValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CommentValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CommentValue_write" "', argument " "1"" of type '" "Exiv2::CommentValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::CommentValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::CommentValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_CommentValue_comment__SWIG_0(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::CommentValue *arg1 = (Exiv2::CommentValue *) 0 ; @@ -11919,6 +12145,51 @@ SWIGINTERN PyObject *_wrap_XmpTextValue_toRational(PyObject *self, PyObject *arg } +SWIGINTERN PyObject *_wrap_XmpTextValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::XmpTextValue *arg1 = (Exiv2::XmpTextValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "XmpTextValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__XmpTextValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpTextValue_write" "', argument " "1"" of type '" "Exiv2::XmpTextValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::XmpTextValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::XmpTextValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN int _wrap_new_XmpTextValue__SWIG_2(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; Exiv2::Value *arg1 = 0 ; @@ -12502,6 +12773,51 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue_toRational(PyObject *self, PyObject *ar } +SWIGINTERN PyObject *_wrap_XmpArrayValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::XmpArrayValue *arg1 = (Exiv2::XmpArrayValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "XmpArrayValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__XmpArrayValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpArrayValue_write" "', argument " "1"" of type '" "Exiv2::XmpArrayValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::XmpArrayValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::XmpArrayValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN int _wrap_new_XmpArrayValue__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; Exiv2::Value *arg1 = 0 ; @@ -13339,6 +13655,51 @@ SWIGINTERN PyObject *_wrap_LangAltValue_toRational(PyObject *self, PyObject *arg } +SWIGINTERN PyObject *_wrap_LangAltValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::LangAltValue *arg1 = (Exiv2::LangAltValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "LangAltValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__LangAltValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LangAltValue_write" "', argument " "1"" of type '" "Exiv2::LangAltValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::LangAltValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::LangAltValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN int _wrap_new_LangAltValue__SWIG_2(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; Exiv2::LangAltValue::ValueType arg1 ; @@ -14154,6 +14515,51 @@ SWIGINTERN PyObject *_wrap_DateValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_DateValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::DateValue *arg1 = (Exiv2::DateValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "DateValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__DateValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateValue_write" "', argument " "1"" of type '" "Exiv2::DateValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::DateValue * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::DateValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_DateValue_toInt64(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::DateValue *arg1 = (Exiv2::DateValue *) 0 ; @@ -15512,14 +15918,59 @@ SWIGINTERN PyObject *_wrap_TimeValue_size(PyObject *self, PyObject *args) { int res1 = 0 ; size_t result; - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "TimeValue_size takes no arguments"); + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "TimeValue_size takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__TimeValue, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeValue_size" "', argument " "1"" of type '" "Exiv2::TimeValue const *""'"); + } + arg1 = reinterpret_cast< Exiv2::TimeValue * >(argp1); + result = ((Exiv2::TimeValue const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TimeValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::TimeValue *arg1 = (Exiv2::TimeValue *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "TimeValue_write", 1, 1, &obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__TimeValue, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeValue_size" "', argument " "1"" of type '" "Exiv2::TimeValue const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeValue_write" "', argument " "1"" of type '" "Exiv2::TimeValue const *""'"); } arg1 = reinterpret_cast< Exiv2::TimeValue * >(argp1); - result = ((Exiv2::TimeValue const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::TimeValue const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } return resultobj; fail: return NULL; @@ -17122,6 +17573,51 @@ SWIGINTERN PyObject *_wrap_UShortValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_UShortValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< uint16_t > *arg1 = (Exiv2::ValueType< uint16_t > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "UShortValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UShortValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< uint16_t > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< uint16_t > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< uint16_t > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_UShortValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint16_t > *arg1 = (Exiv2::ValueType< uint16_t > *) 0 ; @@ -18226,6 +18722,51 @@ SWIGINTERN PyObject *_wrap_ULongValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_ULongValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< uint32_t > *arg1 = (Exiv2::ValueType< uint32_t > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "ULongValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ULongValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< uint32_t > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< uint32_t > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< uint32_t > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_ULongValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint32_t > *arg1 = (Exiv2::ValueType< uint32_t > *) 0 ; @@ -19335,6 +19876,51 @@ SWIGINTERN PyObject *_wrap_URationalValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_URationalValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< Exiv2::URational > *arg1 = (Exiv2::ValueType< Exiv2::URational > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "URationalValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "URationalValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< Exiv2::URational > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::URational > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< Exiv2::URational > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_URationalValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::URational > *arg1 = (Exiv2::ValueType< Exiv2::URational > *) 0 ; @@ -20433,6 +21019,51 @@ SWIGINTERN PyObject *_wrap_ShortValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_ShortValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< int16_t > *arg1 = (Exiv2::ValueType< int16_t > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "ShortValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< int16_t > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< int16_t > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< int16_t > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_ShortValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int16_t > *arg1 = (Exiv2::ValueType< int16_t > *) 0 ; @@ -21537,6 +22168,51 @@ SWIGINTERN PyObject *_wrap_LongValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_LongValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< int32_t > *arg1 = (Exiv2::ValueType< int32_t > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "LongValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< int32_t > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< int32_t > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< int32_t > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_LongValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int32_t > *arg1 = (Exiv2::ValueType< int32_t > *) 0 ; @@ -22646,6 +23322,51 @@ SWIGINTERN PyObject *_wrap_RationalValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_RationalValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< Exiv2::Rational > *arg1 = (Exiv2::ValueType< Exiv2::Rational > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "RationalValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RationalValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< Exiv2::Rational > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::Rational > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< Exiv2::Rational > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_RationalValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::Rational > *arg1 = (Exiv2::ValueType< Exiv2::Rational > *) 0 ; @@ -23744,6 +24465,51 @@ SWIGINTERN PyObject *_wrap_FloatValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_FloatValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< float > *arg1 = (Exiv2::ValueType< float > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "FloatValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_float_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< float > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< float > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< float > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_FloatValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< float > *arg1 = (Exiv2::ValueType< float > *) 0 ; @@ -24848,6 +25614,51 @@ SWIGINTERN PyObject *_wrap_DoubleValue_size(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_DoubleValue_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::ValueType< double > *arg1 = (Exiv2::ValueType< double > *) 0 ; + std::ostream *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + PyObject * obj1 = 0 ; + std::ostream *result = 0 ; + + if (!PyArg_UnpackTuple(args, "DoubleValue_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__ValueTypeT_double_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleValue_write" "', argument " "1"" of type '" "Exiv2::ValueType< double > const *""'"); + } + arg1 = reinterpret_cast< Exiv2::ValueType< double > * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + { + try { + result = (std::ostream *) &((Exiv2::ValueType< double > const *)arg1)->write(*arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_DoubleValue_toString(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< double > *arg1 = (Exiv2::ValueType< double > *) 0 ; @@ -25491,6 +26302,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Value_methods[] = { "" }, { "count", _wrap_Value_count, METH_VARARGS, " Return the number of components of the value" }, { "size", _wrap_Value_size, METH_VARARGS, " Return the size of the value in bytes" }, + { "write", _wrap_Value_write, METH_VARARGS, "\n" + "Write the value to an output stream. You do not usually have\n" + " to use this function; it is used for the implementation of\n" + " the output operator for %Value,\n" + " operator<<(std::ostream &os, const Value &value).\n" + "" }, { "toString", _wrap_Value_toString, METH_VARARGS, "\n" "*Overload 1:*\n" "\n" @@ -25863,6 +26680,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DataValue_methods[] = { "" }, { "count", _wrap_DataValue_count, METH_VARARGS, "" }, { "size", _wrap_DataValue_size, METH_VARARGS, "" }, + { "write", _wrap_DataValue_write, METH_VARARGS, "" }, { "toString", _wrap_DataValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -26135,6 +26953,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__StringValueBase_methods[] = { { "toUint32", _wrap_StringValueBase_toUint32, METH_VARARGS, "" }, { "toFloat", _wrap_StringValueBase_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_StringValueBase_toRational, METH_VARARGS, "" }, + { "write", _wrap_StringValueBase_write, METH_VARARGS, "" }, { "__getitem__", _wrap_StringValueBase___getitem__, METH_VARARGS, "" }, { "data", _wrap_StringValueBase_data, METH_VARARGS, "\n" "Returns a temporary Python memoryview of the object's data.\n" @@ -26643,6 +27462,11 @@ SwigPyBuiltin__Exiv2__AsciiValue_richcompare(PyObject *self, PyObject *other, in SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__AsciiValue_methods[] = { { "read", _wrap_AsciiValue_read, METH_VARARGS, "" }, { "clone", _wrap_AsciiValue_clone, METH_VARARGS, "" }, + { "write", _wrap_AsciiValue_write, METH_VARARGS, "\n" + "Write the ASCII value up to the first '\\0' character to an\n" + " output stream. Any further characters are ignored and not\n" + " written to the output stream.\n" + "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; @@ -26915,6 +27739,10 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__CommentValue_methods[] = { "" }, { "clone", _wrap_CommentValue_clone, METH_VARARGS, "" }, { "copy", _wrap_CommentValue_copy, METH_VARARGS, "" }, + { "write", _wrap_CommentValue_write, METH_VARARGS, "\n" + "Write the comment in a format which can be read by\n" + "read(const std::string& comment).\n" + "" }, { "comment", _wrap_CommentValue_comment, METH_VARARGS, "\n" "Return the comment (without a charset=\"...\" prefix)\n" "\n" @@ -27511,6 +28339,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpTextValue_methods[] = { ":rtype: (int, int) tuple\n" ":return: The converted value.\n" "" }, + { "write", _wrap_XmpTextValue_write, METH_VARARGS, "" }, { "__getitem__", _wrap_XmpTextValue___getitem__, METH_VARARGS, "" }, { "data", _wrap_XmpTextValue_data, METH_VARARGS, "\n" "Returns a temporary Python memoryview of the object's data.\n" @@ -27810,6 +28639,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XmpArrayValue_methods[] = { { "toUint32", _wrap_XmpArrayValue_toUint32, METH_VARARGS, "" }, { "toFloat", _wrap_XmpArrayValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_XmpArrayValue_toRational, METH_VARARGS, "" }, + { "write", _wrap_XmpArrayValue_write, METH_VARARGS, "\n" + "Write all elements of the value to *os*, separated by commas.\n" + "\n" + "Notes: The output of this method cannot directly be used as the parameter\n" + " for read().\n" + "" }, { "__getitem__", _wrap_XmpArrayValue___getitem__, METH_VARARGS, "" }, { "append", _wrap_XmpArrayValue_append, METH_VARARGS, "" }, { NULL, NULL, 0, NULL } /* Sentinel */ @@ -28117,6 +28952,12 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__LangAltValue_methods[] = { { "toUint32", _wrap_LangAltValue_toUint32, METH_VARARGS, "" }, { "toFloat", _wrap_LangAltValue_toFloat, METH_VARARGS, "" }, { "toRational", _wrap_LangAltValue_toRational, METH_VARARGS, "" }, + { "write", _wrap_LangAltValue_write, METH_VARARGS, "\n" + "Write all elements of the value to *os*, separated by commas.\n" + "\n" + "Notes: The output of this method cannot directly be used as the parameter\n" + " for read().\n" + "" }, { "keys", _wrap_LangAltValue_keys, METH_VARARGS, "Get keys (i.e. languages) of the LangAltValue components." }, { "values", _wrap_LangAltValue_values, METH_VARARGS, "Get values (i.e. text strings) of the LangAltValue components." }, { "items", _wrap_LangAltValue_items, METH_VARARGS, "\n" @@ -28421,6 +29262,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__DateValue_methods[] = { { "getDate", _wrap_DateValue_getDate, METH_VARARGS, " Return date struct containing date information" }, { "count", _wrap_DateValue_count, METH_VARARGS, "" }, { "size", _wrap_DateValue_size, METH_VARARGS, "" }, + { "write", _wrap_DateValue_write, METH_VARARGS, "" }, { "toInt64", _wrap_DateValue_toInt64, METH_VARARGS, " Return the value as a UNIX calendar time converted to int64_t." }, { "toUint32", _wrap_DateValue_toUint32, METH_VARARGS, " Return the value as a UNIX calendar time converted to uint32_t." }, { "toFloat", _wrap_DateValue_toFloat, METH_VARARGS, " Return the value as a UNIX calendar time converted to float." }, @@ -28985,6 +29827,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__TimeValue_methods[] = { { "getTime", _wrap_TimeValue_getTime, METH_VARARGS, " Return time struct containing time information" }, { "count", _wrap_TimeValue_count, METH_VARARGS, "" }, { "size", _wrap_TimeValue_size, METH_VARARGS, "" }, + { "write", _wrap_TimeValue_write, METH_VARARGS, "" }, { "toInt64", _wrap_TimeValue_toInt64, METH_VARARGS, " Returns number of seconds in the day in UTC." }, { "toUint32", _wrap_TimeValue_toUint32, METH_VARARGS, " Returns number of seconds in the day in UTC." }, { "toFloat", _wrap_TimeValue_toFloat, METH_VARARGS, " Returns number of seconds in the day in UTC converted to float." }, @@ -29532,6 +30375,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint16_t_t_methods[] = { { "copy", _wrap_UShortValue_copy, METH_VARARGS, "" }, { "count", _wrap_UShortValue_count, METH_VARARGS, "" }, { "size", _wrap_UShortValue_size, METH_VARARGS, "" }, + { "write", _wrap_UShortValue_write, METH_VARARGS, "" }, { "toString", _wrap_UShortValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -29819,6 +30663,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_uint32_t_t_methods[] = { { "copy", _wrap_ULongValue_copy, METH_VARARGS, "" }, { "count", _wrap_ULongValue_count, METH_VARARGS, "" }, { "size", _wrap_ULongValue_size, METH_VARARGS, "" }, + { "write", _wrap_ULongValue_write, METH_VARARGS, "" }, { "toString", _wrap_ULongValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -30106,6 +30951,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__URational_t_metho { "copy", _wrap_URationalValue_copy, METH_VARARGS, "" }, { "count", _wrap_URationalValue_count, METH_VARARGS, "" }, { "size", _wrap_URationalValue_size, METH_VARARGS, "" }, + { "write", _wrap_URationalValue_write, METH_VARARGS, "" }, { "toString", _wrap_URationalValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -30393,6 +31239,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int16_t_t_methods[] = { { "copy", _wrap_ShortValue_copy, METH_VARARGS, "" }, { "count", _wrap_ShortValue_count, METH_VARARGS, "" }, { "size", _wrap_ShortValue_size, METH_VARARGS, "" }, + { "write", _wrap_ShortValue_write, METH_VARARGS, "" }, { "toString", _wrap_ShortValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -30680,6 +31527,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_int32_t_t_methods[] = { { "copy", _wrap_LongValue_copy, METH_VARARGS, "" }, { "count", _wrap_LongValue_count, METH_VARARGS, "" }, { "size", _wrap_LongValue_size, METH_VARARGS, "" }, + { "write", _wrap_LongValue_write, METH_VARARGS, "" }, { "toString", _wrap_LongValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -30967,6 +31815,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_Exiv2__Rational_t_method { "copy", _wrap_RationalValue_copy, METH_VARARGS, "" }, { "count", _wrap_RationalValue_count, METH_VARARGS, "" }, { "size", _wrap_RationalValue_size, METH_VARARGS, "" }, + { "write", _wrap_RationalValue_write, METH_VARARGS, "" }, { "toString", _wrap_RationalValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -31254,6 +32103,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_float_t_methods[] = { { "copy", _wrap_FloatValue_copy, METH_VARARGS, "" }, { "count", _wrap_FloatValue_count, METH_VARARGS, "" }, { "size", _wrap_FloatValue_size, METH_VARARGS, "" }, + { "write", _wrap_FloatValue_write, METH_VARARGS, "" }, { "toString", _wrap_FloatValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -31541,6 +32391,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ValueTypeT_double_t_methods[] = { { "copy", _wrap_DoubleValue_copy, METH_VARARGS, "" }, { "count", _wrap_DoubleValue_count, METH_VARARGS, "" }, { "size", _wrap_DoubleValue_size, METH_VARARGS, "" }, + { "write", _wrap_DoubleValue_write, METH_VARARGS, "" }, { "toString", _wrap_DoubleValue_toString, METH_VARARGS, "\n" "Return the **n**-th component of the value as a string.\n" " The behaviour of this method may be undefined if there is no\n" @@ -31894,6 +32745,7 @@ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *" static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "Exiv2::byte *|uint8_t *|uint_fast8_t *|uint_least8_t *|unsigned char *", 0, 0, (void*)0, 0}; @@ -31944,6 +32796,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_unsigned_char, @@ -31994,6 +32847,7 @@ static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -32044,6 +32898,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_unsigned_char, diff --git a/src/swig-0_28_2/xmp_wrap.cxx b/src/swig-0_28_2/xmp_wrap.cxx index 79c430e..a642a06 100644 --- a/src/swig-0_28_2/xmp_wrap.cxx +++ b/src/swig-0_28_2/xmp_wrap.cxx @@ -3972,17 +3972,18 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_short swig_types[45] #define SWIGTYPE_p_signed_char swig_types[46] #define SWIGTYPE_p_size_type swig_types[47] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[48] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[49] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[50] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t__iterator swig_types[51] -#define SWIGTYPE_p_unsigned_char swig_types[52] -#define SWIGTYPE_p_unsigned_int swig_types[53] -#define SWIGTYPE_p_unsigned_long_long swig_types[54] -#define SWIGTYPE_p_unsigned_short swig_types[55] -#define SWIGTYPE_p_value_type swig_types[56] -static swig_type_info *swig_types[58]; -static swig_module_info swig_module = {swig_types, 57, 0, 0, 0, 0}; +#define SWIGTYPE_p_std__ostream swig_types[48] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[49] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[50] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[51] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t__iterator swig_types[52] +#define SWIGTYPE_p_unsigned_char swig_types[53] +#define SWIGTYPE_p_unsigned_int swig_types[54] +#define SWIGTYPE_p_unsigned_long_long swig_types[55] +#define SWIGTYPE_p_unsigned_short swig_types[56] +#define SWIGTYPE_p_value_type swig_types[57] +static swig_type_info *swig_types[59]; +static swig_module_info swig_module = {swig_types, 58, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -6001,6 +6002,65 @@ SWIGINTERN PyObject *_wrap_XmpData_iterator_copy(PyObject *self, PyObject *args) } +SWIGINTERN PyObject *_wrap_XmpData_iterator_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + XmpData_iterator *arg1 = (XmpData_iterator *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "XmpData_iterator_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_XmpData_iterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmpData_iterator_write" "', argument " "1"" of type '" "XmpData_iterator const *""'"); + } + arg1 = reinterpret_cast< XmpData_iterator * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "XmpData_iterator_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &(*arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_XmpData_iterator_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; XmpData_iterator *arg1 = (XmpData_iterator *) 0 ; @@ -7290,6 +7350,65 @@ SWIGINTERN PyObject *_wrap_Xmpdatum_copy(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_Xmpdatum_write(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::Xmpdatum *arg1 = (Exiv2::Xmpdatum *) 0 ; + std::ostream *arg2 = 0 ; + Exiv2::ExifData *arg3 = (Exiv2::ExifData *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_io ; + std::ostringstream temp2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + std::ostream *result = 0 ; + + { + arg3 = NULL; + } + if (!PyArg_UnpackTuple(args, "Xmpdatum_write", 1, 2, &obj1, &obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__Xmpdatum, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Xmpdatum_write" "', argument " "1"" of type '" "Exiv2::Xmpdatum const *""'"); + } + arg1 = reinterpret_cast< Exiv2::Xmpdatum * >(argp1); + { + arg2 = &temp2; + _global_io = obj1; + } + if (obj2) { + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_Exiv2__ExifData, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Xmpdatum_write" "', argument " "3"" of type '" "Exiv2::ExifData const *""'"); + } + arg3 = reinterpret_cast< Exiv2::ExifData * >(argp3); + } + { + try { + result = (std::ostream *) &((Exiv2::Xmpdatum const *)arg1)->write(*arg2,(Exiv2::ExifData const *)arg3); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + PyObject* OK = PyObject_CallMethod(_global_io, "write", "(s)", + static_cast< std::ostringstream* >(result)->str().c_str()); + if (!OK) + SWIG_fail; + Py_DECREF(OK); + Py_INCREF(_global_io); + resultobj = _global_io; + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Xmpdatum_key(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::Xmpdatum *arg1 = (Exiv2::Xmpdatum *) 0 ; @@ -9758,6 +9877,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__XmpData_iterator_methods[] = { { "__deref__", _wrap_XmpData_iterator___deref__, METH_VARARGS, "" }, { "setValue", _wrap_XmpData_iterator_setValue, METH_VARARGS, "" }, { "copy", _wrap_XmpData_iterator_copy, METH_VARARGS, " Not implemented. Calling this method will raise an exception." }, + { "write", _wrap_XmpData_iterator_write, METH_VARARGS, "" }, { "key", _wrap_XmpData_iterator_key, METH_VARARGS, "\n" "Return the key of the Xmpdatum. The key is of the form\n" " '**Xmp**.prefix.property'. Note however that the\n" @@ -10054,6 +10174,7 @@ SwigPyBuiltin__Exiv2__Xmpdatum_richcompare(PyObject *self, PyObject *other, int SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__Xmpdatum_methods[] = { { "setValue", _wrap_Xmpdatum_setValue, METH_VARARGS, "" }, { "copy", _wrap_Xmpdatum_copy, METH_VARARGS, " Not implemented. Calling this method will raise an exception." }, + { "write", _wrap_Xmpdatum_write, METH_VARARGS, "" }, { "key", _wrap_Xmpdatum_key, METH_VARARGS, "\n" "Return the key of the Xmpdatum. The key is of the form\n" " '**Xmp**.prefix.property'. Note however that the\n" @@ -11073,6 +11194,7 @@ static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *" static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__ostream = {"_p_std__ostream", "std::ostream *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_int32_t_int32_t_t = {"_p_std__pairT_int32_t_int32_t_t", "Exiv2::Rational *|std::pair< int,int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__pairT_uint32_t_uint32_t_t = {"_p_std__pairT_uint32_t_uint32_t_t", "Exiv2::URational *|std::pair< unsigned int,unsigned int > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t = {"_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t", "Exiv2::XmpMetadata *|std::vector< Exiv2::Xmpdatum,std::allocator< Exiv2::Xmpdatum > > *", 0, 0, (void*)0, 0}; @@ -11132,6 +11254,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_short, &_swigt__p_signed_char, &_swigt__p_size_type, + &_swigt__p_std__ostream, &_swigt__p_std__pairT_int32_t_int32_t_t, &_swigt__p_std__pairT_uint32_t_uint32_t_t, &_swigt__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t, @@ -11191,6 +11314,7 @@ static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__ostream[] = { {&_swigt__p_std__ostream, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_int32_t_int32_t_t[] = { {&_swigt__p_std__pairT_int32_t_int32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__pairT_uint32_t_uint32_t_t[] = { {&_swigt__p_std__pairT_uint32_t_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t[] = { {&_swigt__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t, 0, 0, 0},{0, 0, 0, 0}}; @@ -11250,6 +11374,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_short, _swigc__p_signed_char, _swigc__p_size_type, + _swigc__p_std__ostream, _swigc__p_std__pairT_int32_t_int32_t_t, _swigc__p_std__pairT_uint32_t_uint32_t_t, _swigc__p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t, diff --git a/tests/test_datasets.py b/tests/test_datasets.py index bf19ad1..3ab731f 100644 --- a/tests/test_datasets.py +++ b/tests/test_datasets.py @@ -16,6 +16,7 @@ ## along with this program. If not, see ## . +import io import os import sys import tempfile @@ -99,7 +100,10 @@ def test_IptcKey(self): self.check_result(key.tag(), int, exiv2.IptcDataSets.Caption) self.check_result(key.tagLabel(), str, key_name.split('.')[2]) self.check_result(key.tagName(), str, key_name.split('.')[2]) - + buf = io.StringIO() + buf = key.write(buf) + self.assertEqual(buf.getvalue(), key_name) + if __name__ == '__main__': unittest.main() diff --git a/tests/test_exif.py b/tests/test_exif.py index ea4aa97..b6b3a88 100644 --- a/tests/test_exif.py +++ b/tests/test_exif.py @@ -16,6 +16,7 @@ ## along with this program. If not, see ## . +import io import os import sys import tempfile @@ -156,6 +157,9 @@ def _test_datum(self, datum): with self.assertWarns(DeprecationWarning): self.assertIsInstance( datum.value(exiv2.TypeId.asciiString), exiv2.AsciiValue) + buf = io.StringIO() + buf = datum.write(buf) + self.assertEqual(buf.getvalue(), 'Good view of the lighthouse.') datum.setValue('fred') datum.setValue(exiv2.AsciiValue('Acme')) with self.assertRaises(TypeError): diff --git a/tests/test_iptc.py b/tests/test_iptc.py index 6b518a1..5b7d6ef 100644 --- a/tests/test_iptc.py +++ b/tests/test_iptc.py @@ -16,6 +16,7 @@ ## along with this program. If not, see ## . +import io import os import sys import unittest @@ -155,6 +156,9 @@ def _test_datum(self, datum): with self.assertWarns(DeprecationWarning): self.assertIsInstance( datum.value(exiv2.TypeId.string), exiv2.StringValue) + buf = io.StringIO() + buf = datum.write(buf) + self.assertEqual(buf.getvalue(), 'Good view of the lighthouse.') datum.setValue('fred') datum.setValue(exiv2.StringValue('Acme')) with self.assertRaises(TypeError): diff --git a/tests/test_properties.py b/tests/test_properties.py index 50959bd..efd999d 100644 --- a/tests/test_properties.py +++ b/tests/test_properties.py @@ -16,6 +16,7 @@ ## along with this program. If not, see ## . +import io import os import sys import tempfile @@ -127,7 +128,10 @@ def test_XmpKey(self): self.check_result(key.tag(), int, 0) self.check_result(key.tagLabel(), str, 'Description') self.check_result(key.tagName(), str, self.key_name.split('.')[2]) - + buf = io.StringIO() + buf = key.write(buf) + self.assertEqual(buf.getvalue(), self.key_name) + if __name__ == '__main__': unittest.main() diff --git a/tests/test_tags.py b/tests/test_tags.py index f5a4700..51bfa7e 100644 --- a/tests/test_tags.py +++ b/tests/test_tags.py @@ -16,6 +16,7 @@ ## along with this program. If not, see ## . +import io import os import unittest @@ -119,7 +120,10 @@ def test_ExifKey(self): self.assertTrue(desc.startswith('A character string giving the title')) self.check_result(key.tagLabel(), str, 'Image Description') self.check_result(key.tagName(), str, self.key_name.split('.')[2]) - + buf = io.StringIO() + buf = key.write(buf) + self.assertEqual(buf.getvalue(), self.key_name) + if __name__ == '__main__': unittest.main() diff --git a/tests/test_value.py b/tests/test_value.py index 83438f3..48b6953 100644 --- a/tests/test_value.py +++ b/tests/test_value.py @@ -18,6 +18,7 @@ import datetime from fractions import Fraction +import io import os import random import struct @@ -64,6 +65,9 @@ def do_common_tests(self, value, type_id, string, data, sequence=None): value.typeId(), exiv2.TypeId, exiv2.TypeId.undefined) else: self.check_result(value.typeId(), exiv2.TypeId, type_id) + buf = io.StringIO() + buf = value.write(buf) + self.assertEqual(buf.getvalue(), string) def do_conversion_tests(self, value, text, number): result = value.toFloat(0) diff --git a/tests/test_xmp.py b/tests/test_xmp.py index 28c345c..d8f1e03 100644 --- a/tests/test_xmp.py +++ b/tests/test_xmp.py @@ -16,6 +16,7 @@ ## along with this program. If not, see ## . +import io import os import sys import unittest @@ -160,6 +161,9 @@ def _test_datum(self, datum): with self.assertWarns(DeprecationWarning): self.assertIsInstance( datum.value(exiv2.TypeId.langAlt), exiv2.LangAltValue) + buf = io.StringIO() + buf = datum.write(buf) + self.assertEqual(buf.getvalue(), datum.toString()) datum.setValue('fred') datum.setValue(exiv2.XmpTextValue('Acme')) with self.assertRaises(TypeError): From 10c2e278d9fd53b10690762a6b29e6843bbf7c03 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Sat, 17 Feb 2024 12:41:59 +0000 Subject: [PATCH 18/29] Minor tweak to docs build --- src/doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/conf.py b/src/doc/conf.py index a2b9b3a..c924441 100644 --- a/src/doc/conf.py +++ b/src/doc/conf.py @@ -74,7 +74,7 @@ import re class_re = re.compile(r':class:`(\w+?)`') -percent_re = re.compile(r'%(\w+?)([.|(\s]|$)') +percent_re = re.compile(r'%(\w+?)([.,|(\s]|$)') def process_docstring(app, what, name, obj, options, lines): # replace/modify some docstrings From a1e64cf2e7ec65fde4e8a7012adb74a1d4528269 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Sun, 18 Feb 2024 09:51:01 +0000 Subject: [PATCH 19/29] Force EXIV2_ENABLE_WIN_UNICODE=OFF always The code-page to utf-8 translation works OK and is required for exiv2 v0.28.x anyway, so ignoring the wchar versions of some methods entirely makes sense. --- .github/workflows/build-windows-27.yml | 2 +- src/interface/shared/windows_path.i | 15 ++++++--------- src/interface/version.i | 3 --- src/swig-0_27_3/basicio_wrap.cxx | 20 ++++++++++++++++++++ src/swig-0_27_3/exif_wrap.cxx | 6 ++++++ src/swig-0_27_3/image_wrap.cxx | 8 ++++++++ src/swig-0_27_3/preview_wrap.cxx | 4 ++++ src/swig-0_27_3/version_wrap.cxx | 3 --- src/swig-0_27_7/basicio_wrap.cxx | 20 ++++++++++++++++++++ src/swig-0_27_7/exif_wrap.cxx | 6 ++++++ src/swig-0_27_7/image_wrap.cxx | 8 ++++++++ src/swig-0_27_7/preview_wrap.cxx | 4 ++++ src/swig-0_27_7/version_wrap.cxx | 3 --- src/swig-0_28_2/basicio_wrap.cxx | 20 ++++++++++++++++++++ src/swig-0_28_2/exif_wrap.cxx | 6 ++++++ src/swig-0_28_2/image_wrap.cxx | 8 ++++++++ src/swig-0_28_2/preview_wrap.cxx | 4 ++++ src/swig-0_28_2/version_wrap.cxx | 3 --- 18 files changed, 121 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-windows-27.yml b/.github/workflows/build-windows-27.yml index 4f1f541..35f08eb 100644 --- a/.github/workflows/build-windows-27.yml +++ b/.github/workflows/build-windows-27.yml @@ -56,7 +56,7 @@ jobs: cmake -B build-msvc -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=build-msvc/install - -D EXIV2_ENABLE_WIN_UNICODE=ON + -D EXIV2_ENABLE_WIN_UNICODE=OFF -D EXIV2_BUILD_SAMPLES=OFF -D EXIV2_BUILD_EXIV2_COMMAND=OFF -D EXIV2_ENABLE_BMFF=ON diff --git a/src/interface/shared/windows_path.i b/src/interface/shared/windows_path.i index 0c7ad5f..32f2aea 100644 --- a/src/interface/shared/windows_path.i +++ b/src/interface/shared/windows_path.i @@ -18,37 +18,34 @@ %include "shared/windows_cp.i" -// If exiv2's wstring methods are available then use them! -#ifdef EXV_UNICODE_PATH -%include "std_wstring.i" -#endif - // Macro to convert Windows path inputs from utf-8 to current code page %define WINDOWS_PATH(signature) -#ifndef EXV_UNICODE_PATH %typemap(check, fragment="utf8_to_wcp") signature { +%#ifdef _WIN32 if (utf8_to_wcp($1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +%#endif } -#endif %enddef // WINDOWS_PATH // Macro to convert Windows path outputs from current code page to utf-8 %define WINDOWS_PATH_OUT(function) -#ifndef EXV_UNICODE_PATH %typemap(out, fragment="utf8_to_wcp") std::string function { +%#ifdef _WIN32 if (utf8_to_wcp(&$1, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +%#endif $result = SWIG_From_std_string($1); } %typemap(out, fragment="utf8_to_wcp") const std::string& function { std::string copy = *$1; +%#ifdef _WIN32 if (utf8_to_wcp(©, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +%#endif $result = SWIG_From_std_string(copy); } -#endif %enddef // WINDOWS_PATH_OUT diff --git a/src/interface/version.i b/src/interface/version.i index 1311735..2673b71 100644 --- a/src/interface/version.i +++ b/src/interface/version.i @@ -55,9 +55,6 @@ static PyObject* versionInfo() { #ifdef EXV_ENABLE_VIDEO video = true; #endif -#ifdef EXV_UNICODE_PATH - unicode = true; -#endif #ifdef EXV_ENABLE_WEBREADY webready = true; #endif diff --git a/src/swig-0_27_3/basicio_wrap.cxx b/src/swig-0_27_3/basicio_wrap.cxx index 42f689c..2b76c2f 100644 --- a/src/swig-0_27_3/basicio_wrap.cxx +++ b/src/swig-0_27_3/basicio_wrap.cxx @@ -5735,9 +5735,11 @@ SWIGINTERN PyObject *_wrap_BasicIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::BasicIo * >(argp1); result = ((Exiv2::BasicIo const *)arg1)->path(); { +#ifdef _WIN32 if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(result); } return resultobj; @@ -5767,9 +5769,11 @@ SWIGINTERN int _wrap_new_FileIo(PyObject *self, PyObject *args, PyObject *kwargs arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6536,9 +6540,11 @@ SWIGINTERN PyObject *_wrap_FileIo_setPath(PyObject *self, PyObject *args) { arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6702,9 +6708,11 @@ SWIGINTERN PyObject *_wrap_FileIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); result = ((Exiv2::FileIo const *)arg1)->path(); { +#ifdef _WIN32 if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(result); } return resultobj; @@ -7483,9 +7491,11 @@ SWIGINTERN PyObject *_wrap_MemIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); result = ((Exiv2::MemIo const *)arg1)->path(); { +#ifdef _WIN32 if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(result); } return resultobj; @@ -7519,9 +7529,11 @@ SWIGINTERN int _wrap_new_XPathIo(PyObject *self, PyObject *args, PyObject *kwarg arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -7633,9 +7645,11 @@ SWIGINTERN PyObject *_wrap_XPathIo_writeDataToFile(PyObject *self, PyObject *arg arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -8389,9 +8403,11 @@ SWIGINTERN PyObject *_wrap_RemoteIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); result = ((Exiv2::RemoteIo const *)arg1)->path(); { +#ifdef _WIN32 if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(result); } return resultobj; @@ -8434,9 +8450,11 @@ SWIGINTERN int _wrap_new_HttpIo__SWIG_0(PyObject *self, PyObject *args, PyObject } arg2 = static_cast< size_t >(val2); { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -8477,9 +8495,11 @@ SWIGINTERN int _wrap_new_HttpIo__SWIG_1(PyObject *self, PyObject *args, PyObject arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { diff --git a/src/swig-0_27_3/exif_wrap.cxx b/src/swig-0_27_3/exif_wrap.cxx index 179d4fb..8ae5d9f 100644 --- a/src/swig-0_27_3/exif_wrap.cxx +++ b/src/swig-0_27_3/exif_wrap.cxx @@ -8633,9 +8633,11 @@ SWIGINTERN PyObject *_wrap_ExifThumbC_writeFile(PyObject *self, PyObject *args) arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -8841,9 +8843,11 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_0(PyObject *self, Py } arg5 = static_cast< uint16_t >(val5); { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -8970,9 +8974,11 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_2(PyObject *self, Py arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { diff --git a/src/swig-0_27_3/image_wrap.cxx b/src/swig-0_27_3/image_wrap.cxx index 44aa5da..ec82656 100644 --- a/src/swig-0_27_3/image_wrap.cxx +++ b/src/swig-0_27_3/image_wrap.cxx @@ -6245,9 +6245,11 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo(PyObject *self, PyObject *args) arg2 = static_cast< bool >(val2); } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6303,9 +6305,11 @@ SWIGINTERN PyObject *_wrap_ImageFactory_open__SWIG_0(PyObject *self, Py_ssize_t arg2 = static_cast< bool >(val2); } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6451,9 +6455,11 @@ SWIGINTERN PyObject *_wrap_ImageFactory_create__SWIG_0(PyObject *self, Py_ssize_ arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6568,9 +6574,11 @@ SWIGINTERN PyObject *_wrap_ImageFactory_getType__SWIG_0(PyObject *self, Py_ssize arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { diff --git a/src/swig-0_27_3/preview_wrap.cxx b/src/swig-0_27_3/preview_wrap.cxx index 216a3c1..65f5c35 100644 --- a/src/swig-0_27_3/preview_wrap.cxx +++ b/src/swig-0_27_3/preview_wrap.cxx @@ -6347,9 +6347,11 @@ SWIGINTERN PyObject *_wrap_PreviewImage_writeFile(PyObject *self, PyObject *args arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6405,9 +6407,11 @@ SWIGINTERN PyObject *_wrap_PreviewImage_extension(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::PreviewImage * >(argp1); result = ((Exiv2::PreviewImage const *)arg1)->extension(); { +#ifdef _WIN32 if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(result); } return resultobj; diff --git a/src/swig-0_27_3/version_wrap.cxx b/src/swig-0_27_3/version_wrap.cxx index ced3e77..9078c28 100644 --- a/src/swig-0_27_3/version_wrap.cxx +++ b/src/swig-0_27_3/version_wrap.cxx @@ -4272,9 +4272,6 @@ static PyObject* versionInfo() { #ifdef EXV_ENABLE_VIDEO video = true; #endif -#ifdef EXV_UNICODE_PATH - unicode = true; -#endif #ifdef EXV_ENABLE_WEBREADY webready = true; #endif diff --git a/src/swig-0_27_7/basicio_wrap.cxx b/src/swig-0_27_7/basicio_wrap.cxx index 42f689c..2b76c2f 100644 --- a/src/swig-0_27_7/basicio_wrap.cxx +++ b/src/swig-0_27_7/basicio_wrap.cxx @@ -5735,9 +5735,11 @@ SWIGINTERN PyObject *_wrap_BasicIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::BasicIo * >(argp1); result = ((Exiv2::BasicIo const *)arg1)->path(); { +#ifdef _WIN32 if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(result); } return resultobj; @@ -5767,9 +5769,11 @@ SWIGINTERN int _wrap_new_FileIo(PyObject *self, PyObject *args, PyObject *kwargs arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6536,9 +6540,11 @@ SWIGINTERN PyObject *_wrap_FileIo_setPath(PyObject *self, PyObject *args) { arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6702,9 +6708,11 @@ SWIGINTERN PyObject *_wrap_FileIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); result = ((Exiv2::FileIo const *)arg1)->path(); { +#ifdef _WIN32 if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(result); } return resultobj; @@ -7483,9 +7491,11 @@ SWIGINTERN PyObject *_wrap_MemIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); result = ((Exiv2::MemIo const *)arg1)->path(); { +#ifdef _WIN32 if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(result); } return resultobj; @@ -7519,9 +7529,11 @@ SWIGINTERN int _wrap_new_XPathIo(PyObject *self, PyObject *args, PyObject *kwarg arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -7633,9 +7645,11 @@ SWIGINTERN PyObject *_wrap_XPathIo_writeDataToFile(PyObject *self, PyObject *arg arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -8389,9 +8403,11 @@ SWIGINTERN PyObject *_wrap_RemoteIo_path(PyObject *self, PyObject *args) { arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); result = ((Exiv2::RemoteIo const *)arg1)->path(); { +#ifdef _WIN32 if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(result); } return resultobj; @@ -8434,9 +8450,11 @@ SWIGINTERN int _wrap_new_HttpIo__SWIG_0(PyObject *self, PyObject *args, PyObject } arg2 = static_cast< size_t >(val2); { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -8477,9 +8495,11 @@ SWIGINTERN int _wrap_new_HttpIo__SWIG_1(PyObject *self, PyObject *args, PyObject arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { diff --git a/src/swig-0_27_7/exif_wrap.cxx b/src/swig-0_27_7/exif_wrap.cxx index 179d4fb..8ae5d9f 100644 --- a/src/swig-0_27_7/exif_wrap.cxx +++ b/src/swig-0_27_7/exif_wrap.cxx @@ -8633,9 +8633,11 @@ SWIGINTERN PyObject *_wrap_ExifThumbC_writeFile(PyObject *self, PyObject *args) arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -8841,9 +8843,11 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_0(PyObject *self, Py } arg5 = static_cast< uint16_t >(val5); { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -8970,9 +8974,11 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_2(PyObject *self, Py arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { diff --git a/src/swig-0_27_7/image_wrap.cxx b/src/swig-0_27_7/image_wrap.cxx index 44aa5da..ec82656 100644 --- a/src/swig-0_27_7/image_wrap.cxx +++ b/src/swig-0_27_7/image_wrap.cxx @@ -6245,9 +6245,11 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo(PyObject *self, PyObject *args) arg2 = static_cast< bool >(val2); } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6303,9 +6305,11 @@ SWIGINTERN PyObject *_wrap_ImageFactory_open__SWIG_0(PyObject *self, Py_ssize_t arg2 = static_cast< bool >(val2); } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6451,9 +6455,11 @@ SWIGINTERN PyObject *_wrap_ImageFactory_create__SWIG_0(PyObject *self, Py_ssize_ arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6568,9 +6574,11 @@ SWIGINTERN PyObject *_wrap_ImageFactory_getType__SWIG_0(PyObject *self, Py_ssize arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { diff --git a/src/swig-0_27_7/preview_wrap.cxx b/src/swig-0_27_7/preview_wrap.cxx index 216a3c1..65f5c35 100644 --- a/src/swig-0_27_7/preview_wrap.cxx +++ b/src/swig-0_27_7/preview_wrap.cxx @@ -6347,9 +6347,11 @@ SWIGINTERN PyObject *_wrap_PreviewImage_writeFile(PyObject *self, PyObject *args arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6405,9 +6407,11 @@ SWIGINTERN PyObject *_wrap_PreviewImage_extension(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::PreviewImage * >(argp1); result = ((Exiv2::PreviewImage const *)arg1)->extension(); { +#ifdef _WIN32 if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(result); } return resultobj; diff --git a/src/swig-0_27_7/version_wrap.cxx b/src/swig-0_27_7/version_wrap.cxx index ced3e77..9078c28 100644 --- a/src/swig-0_27_7/version_wrap.cxx +++ b/src/swig-0_27_7/version_wrap.cxx @@ -4272,9 +4272,6 @@ static PyObject* versionInfo() { #ifdef EXV_ENABLE_VIDEO video = true; #endif -#ifdef EXV_UNICODE_PATH - unicode = true; -#endif #ifdef EXV_ENABLE_WEBREADY webready = true; #endif diff --git a/src/swig-0_28_2/basicio_wrap.cxx b/src/swig-0_28_2/basicio_wrap.cxx index 1f615ac..92e41ce 100644 --- a/src/swig-0_28_2/basicio_wrap.cxx +++ b/src/swig-0_28_2/basicio_wrap.cxx @@ -5941,9 +5941,11 @@ SWIGINTERN PyObject *_wrap_BasicIo_path(PyObject *self, PyObject *args) { result = (std::string *) &((Exiv2::BasicIo const *)arg1)->path(); { std::string copy = *result; +#ifdef _WIN32 if (utf8_to_wcp(©, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(copy); } return resultobj; @@ -5973,9 +5975,11 @@ SWIGINTERN int _wrap_new_FileIo(PyObject *self, PyObject *args, PyObject *kwargs arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6742,9 +6746,11 @@ SWIGINTERN PyObject *_wrap_FileIo_setPath(PyObject *self, PyObject *args) { arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6909,9 +6915,11 @@ SWIGINTERN PyObject *_wrap_FileIo_path(PyObject *self, PyObject *args) { result = (std::string *) &((Exiv2::FileIo const *)arg1)->path(); { std::string copy = *result; +#ifdef _WIN32 if (utf8_to_wcp(©, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(copy); } return resultobj; @@ -7691,9 +7699,11 @@ SWIGINTERN PyObject *_wrap_MemIo_path(PyObject *self, PyObject *args) { result = (std::string *) &((Exiv2::MemIo const *)arg1)->path(); { std::string copy = *result; +#ifdef _WIN32 if (utf8_to_wcp(©, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(copy); } return resultobj; @@ -7727,9 +7737,11 @@ SWIGINTERN int _wrap_new_XPathIo(PyObject *self, PyObject *args, PyObject *kwarg arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -7841,9 +7853,11 @@ SWIGINTERN PyObject *_wrap_XPathIo_writeDataToFile(PyObject *self, PyObject *arg arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -8620,9 +8634,11 @@ SWIGINTERN PyObject *_wrap_RemoteIo_path(PyObject *self, PyObject *args) { result = (std::string *) &((Exiv2::RemoteIo const *)arg1)->path(); { std::string copy = *result; +#ifdef _WIN32 if (utf8_to_wcp(©, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(copy); } return resultobj; @@ -8665,9 +8681,11 @@ SWIGINTERN int _wrap_new_HttpIo__SWIG_0(PyObject *self, PyObject *args, PyObject } arg2 = static_cast< size_t >(val2); { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -8708,9 +8726,11 @@ SWIGINTERN int _wrap_new_HttpIo__SWIG_1(PyObject *self, PyObject *args, PyObject arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { diff --git a/src/swig-0_28_2/exif_wrap.cxx b/src/swig-0_28_2/exif_wrap.cxx index 6b5b1e3..7474a21 100644 --- a/src/swig-0_28_2/exif_wrap.cxx +++ b/src/swig-0_28_2/exif_wrap.cxx @@ -8837,9 +8837,11 @@ SWIGINTERN PyObject *_wrap_ExifThumbC_writeFile(PyObject *self, PyObject *args) arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -9045,9 +9047,11 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_0(PyObject *self, Py } arg5 = static_cast< uint16_t >(val5); { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -9174,9 +9178,11 @@ SWIGINTERN PyObject *_wrap_ExifThumb_setJpegThumbnail__SWIG_2(PyObject *self, Py arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { diff --git a/src/swig-0_28_2/image_wrap.cxx b/src/swig-0_28_2/image_wrap.cxx index 8b257bc..9689dc3 100644 --- a/src/swig-0_28_2/image_wrap.cxx +++ b/src/swig-0_28_2/image_wrap.cxx @@ -6312,9 +6312,11 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo(PyObject *self, PyObject *args) arg2 = static_cast< bool >(val2); } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6370,9 +6372,11 @@ SWIGINTERN PyObject *_wrap_ImageFactory_open__SWIG_0(PyObject *self, Py_ssize_t arg2 = static_cast< bool >(val2); } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6518,9 +6522,11 @@ SWIGINTERN PyObject *_wrap_ImageFactory_create__SWIG_0(PyObject *self, Py_ssize_ arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6635,9 +6641,11 @@ SWIGINTERN PyObject *_wrap_ImageFactory_getType__SWIG_0(PyObject *self, Py_ssize arg1 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg1, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { diff --git a/src/swig-0_28_2/preview_wrap.cxx b/src/swig-0_28_2/preview_wrap.cxx index e0a82e9..2dc743f 100644 --- a/src/swig-0_28_2/preview_wrap.cxx +++ b/src/swig-0_28_2/preview_wrap.cxx @@ -6347,9 +6347,11 @@ SWIGINTERN PyObject *_wrap_PreviewImage_writeFile(PyObject *self, PyObject *args arg2 = ptr; } { +#ifdef _WIN32 if (utf8_to_wcp(arg2, true) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); } +#endif } { try { @@ -6405,9 +6407,11 @@ SWIGINTERN PyObject *_wrap_PreviewImage_extension(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::PreviewImage * >(argp1); result = ((Exiv2::PreviewImage const *)arg1)->extension(); { +#ifdef _WIN32 if (utf8_to_wcp(&result, false) < 0) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } +#endif resultobj = SWIG_From_std_string(result); } return resultobj; diff --git a/src/swig-0_28_2/version_wrap.cxx b/src/swig-0_28_2/version_wrap.cxx index 4fbe615..65699f5 100644 --- a/src/swig-0_28_2/version_wrap.cxx +++ b/src/swig-0_28_2/version_wrap.cxx @@ -4272,9 +4272,6 @@ static PyObject* versionInfo() { #ifdef EXV_ENABLE_VIDEO video = true; #endif -#ifdef EXV_UNICODE_PATH - unicode = true; -#endif #ifdef EXV_ENABLE_WEBREADY webready = true; #endif From bf8838b62afeeac9186c538f10df1025c2c9d984 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Mon, 19 Feb 2024 11:03:56 +0000 Subject: [PATCH 20/29] Enable use of Exiv2::CurlIo If needed, a dummy CurlIo class is used so SWIG generated files with EXV_USE_CURL enabled can be linked with libexiv2 built with EXV_USE_CURL disabled. Similarly SWIG generated files with EXV_USE_CURL disabled can be linked with libexiv2 built with EXV_USE_CURL enabled. --- src/interface/basicio.i | 16 + src/interface/image.i | 1 + src/interface/preview.i | 1 + src/interface/shared/remoteio_derived.i | 37 + src/interface/version.i | 14 +- src/swig-0_27_3/basicio_wrap.cxx | 678 ++++++- src/swig-0_27_3/image_wrap.cxx | 170 +- src/swig-0_27_3/preview_wrap.cxx | 166 +- src/swig-0_27_3/version_wrap.cxx | 9 +- src/swig-0_27_7/basicio_wrap.cxx | 678 ++++++- src/swig-0_27_7/image_wrap.cxx | 170 +- src/swig-0_27_7/preview_wrap.cxx | 166 +- src/swig-0_27_7/version_wrap.cxx | 9 +- src/swig-0_28_2/basicio_wrap.cxx | 2145 +++++++++++++++-------- src/swig-0_28_2/image_wrap.cxx | 170 +- src/swig-0_28_2/preview_wrap.cxx | 166 +- src/swig-0_28_2/version_wrap.cxx | 9 +- tests/test_basicio.py | 23 + tests/test_value.py | 2 +- utils/build_swig.py | 40 +- 20 files changed, 3410 insertions(+), 1260 deletions(-) create mode 100644 src/interface/shared/remoteio_derived.i diff --git a/src/interface/basicio.i b/src/interface/basicio.i index e7ac03f..e355ace 100644 --- a/src/interface/basicio.i +++ b/src/interface/basicio.i @@ -29,6 +29,7 @@ %include "shared/enum.i" %include "shared/exception.i" %include "shared/keep_reference.i" +%include "shared/remoteio_derived.i" %include "shared/unique_ptr.i" %include "shared/windows_path.i" @@ -94,6 +95,10 @@ static swig_type_info* basicio_subtype(Exiv2::BasicIo* ptr) { else if (dynamic_cast(ptr)) { if (dynamic_cast(ptr)) return $descriptor(Exiv2::HttpIo*); +#ifdef EXV_USE_CURL + else if (dynamic_cast(ptr)) + return $descriptor(Exiv2::CurlIo*); +#endif else return $descriptor(Exiv2::RemoteIo*); } @@ -109,6 +114,16 @@ static swig_type_info* basicio_subtype(Exiv2::BasicIo* ptr) { ptr, basicio_subtype(ptr), SWIG_POINTER_OWN); } +// CurlIo destructor isn't seen by SWIG in v0.27.x +#if EXIV2_VERSION_HEX < 0x001c0000 +#ifdef EXV_USE_CURL +%extend Exiv2::CurlIo { + ~CurlIo() {}; +} +%ignore Exiv2::CurlIo::~CurlIo; +#endif +#endif + // readOrThrow & seekOrThrow use ErrorCode internally without Exiv2:: prefix // as if SWIG doesn't realise ErrorCode is in the Exiv2 namespace %{ @@ -198,6 +213,7 @@ DEPRECATED_ENUM(BasicIo, Position, "Seek starting positions.", %ignore Exiv2::BasicIo::~BasicIo; %ignore Exiv2::BasicIo::bigBlock_; %ignore Exiv2::BasicIo::populateFakeData; +%ignore Exiv2::curlWriter; %ignore Exiv2::IoCloser; %ignore Exiv2::ReplaceStringInPlace; %ignore Exiv2::readFile; diff --git a/src/interface/image.i b/src/interface/image.i index 10daeb4..f287e44 100644 --- a/src/interface/image.i +++ b/src/interface/image.i @@ -29,6 +29,7 @@ %include "shared/enum.i" %include "shared/exception.i" %include "shared/keep_reference.i" +%include "shared/remoteio_derived.i" %include "shared/windows_path.i" %include "std_string.i" diff --git a/src/interface/preview.i b/src/interface/preview.i index 05f0ffa..8306442 100644 --- a/src/interface/preview.i +++ b/src/interface/preview.i @@ -30,6 +30,7 @@ For Exif thumbnail images see the :py:class:`ExifThumb` class."; %include "shared/buffers.i" %include "shared/exception.i" %include "shared/keep_reference.i" +%include "shared/remoteio_derived.i" %include "shared/struct_dict.i" %include "shared/windows_path.i" diff --git a/src/interface/shared/remoteio_derived.i b/src/interface/shared/remoteio_derived.i new file mode 100644 index 0000000..20cfbc7 --- /dev/null +++ b/src/interface/shared/remoteio_derived.i @@ -0,0 +1,37 @@ +// python-exiv2 - Python interface to libexiv2 +// http://github.com/jim-easterbrook/python-exiv2 +// Copyright (C) 2024 Jim Easterbrook jim@jim-easterbrook.me.uk +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + + +// Replacement for CurlIo missing from linked libexiv2 +// First ifdef EXV_USE_CURL detects SWIGging with EXV_USE_CURL set +// Second ifndef EXV_USE_CURL detects compiling with EXV_USE_CURL unset +#ifdef EXV_USE_CURL +%{ +#ifndef EXV_USE_CURL +namespace Exiv2 { + class CurlIo : public RemoteIo { + public: + CurlIo(const std::string& url, size_t blockSize=0) { + throw std::runtime_error( + "CurlIo not enabled in linked libexiv2"); + }; + }; +} +#endif +%} +#endif + diff --git a/src/interface/version.i b/src/interface/version.i index 2673b71..7240af3 100644 --- a/src/interface/version.i +++ b/src/interface/version.i @@ -39,6 +39,11 @@ EXCEPTION() // Function to report build options used %feature("docstring") versionInfo "Return a dict of libexiv2 build options." +#ifndef EXV_USE_CURL +%{ +#undef EXV_USE_CURL +%} +#endif %inline %{ static PyObject* versionInfo() { bool nls = false; @@ -46,6 +51,7 @@ static PyObject* versionInfo() { bool video = false; bool unicode = false; bool webready = false; + bool curl = false; #ifdef EXV_ENABLE_NLS nls = true; #endif @@ -58,13 +64,17 @@ static PyObject* versionInfo() { #ifdef EXV_ENABLE_WEBREADY webready = true; #endif - return Py_BuildValue("{ss,sN,sN,sN,sN,sN}", +#ifdef EXV_USE_CURL + curl = true; +#endif + return Py_BuildValue("{ss,sN,sN,sN,sN,sN,sN}", "version", Exiv2::version(), "EXV_ENABLE_NLS", PyBool_FromLong(nls), "EXV_ENABLE_BMFF", PyBool_FromLong(bmff), "EXV_ENABLE_VIDEO", PyBool_FromLong(video), "EXV_UNICODE_PATH", PyBool_FromLong(unicode), - "EXV_ENABLE_WEBREADY", PyBool_FromLong(webready)); + "EXV_ENABLE_WEBREADY", PyBool_FromLong(webready), + "EXV_USE_CURL", PyBool_FromLong(curl)); }; %} diff --git a/src/swig-0_27_3/basicio_wrap.cxx b/src/swig-0_27_3/basicio_wrap.cxx index 2b76c2f..eb80575 100644 --- a/src/swig-0_27_3/basicio_wrap.cxx +++ b/src/swig-0_27_3/basicio_wrap.cxx @@ -3926,28 +3926,29 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_Exiv2__BasicIo swig_types[0] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[1] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[2] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[3] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[4] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[5] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[6] -#define SWIGTYPE_p_SwigPyObject swig_types[7] -#define SWIGTYPE_p_char swig_types[8] -#define SWIGTYPE_p_first_type swig_types[9] -#define SWIGTYPE_p_int swig_types[10] -#define SWIGTYPE_p_long_long swig_types[11] -#define SWIGTYPE_p_second_type swig_types[12] -#define SWIGTYPE_p_short swig_types[13] -#define SWIGTYPE_p_signed_char swig_types[14] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[15] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[16] -#define SWIGTYPE_p_unsigned_char swig_types[17] -#define SWIGTYPE_p_unsigned_int swig_types[18] -#define SWIGTYPE_p_unsigned_long_long swig_types[19] -#define SWIGTYPE_p_unsigned_short swig_types[20] -static swig_type_info *swig_types[22]; -static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__CurlIo swig_types[1] +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[2] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[3] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[4] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[5] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[6] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[7] +#define SWIGTYPE_p_SwigPyObject swig_types[8] +#define SWIGTYPE_p_char swig_types[9] +#define SWIGTYPE_p_first_type swig_types[10] +#define SWIGTYPE_p_int swig_types[11] +#define SWIGTYPE_p_long_long swig_types[12] +#define SWIGTYPE_p_second_type swig_types[13] +#define SWIGTYPE_p_short swig_types[14] +#define SWIGTYPE_p_signed_char swig_types[15] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[16] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[17] +#define SWIGTYPE_p_unsigned_char swig_types[18] +#define SWIGTYPE_p_unsigned_int swig_types[19] +#define SWIGTYPE_p_unsigned_long_long swig_types[20] +#define SWIGTYPE_p_unsigned_short swig_types[21] +static swig_type_info *swig_types[23]; +static swig_module_info swig_module = {swig_types, 22, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4146,6 +4147,19 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" +#ifndef EXV_USE_CURL +namespace Exiv2 { + class CurlIo : public RemoteIo { + public: + CurlIo(const std::string& url, size_t blockSize=0) { + throw std::runtime_error( + "CurlIo not enabled in linked libexiv2"); + }; + }; +} +#endif + + #include @@ -4975,6 +4989,7 @@ SWIG_AsVal_size_t (PyObject * obj, size_t *val) return res; } +SWIGINTERN void delete_Exiv2_CurlIo(Exiv2::CurlIo *self){} #ifdef __cplusplus extern "C" { #endif @@ -8553,6 +8568,310 @@ SWIGINTERN int _wrap_new_HttpIo(PyObject *self, PyObject *args, PyObject *kwargs } +SWIGINTERN int _wrap_new_CurlIo__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + size_t arg2 ; + int res1 = SWIG_OLDOBJ ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + Exiv2::CurlIo *result = 0 ; + + if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; + if (!PyArg_UnpackTuple(args, "new_CurlIo", 2, 2, &obj1, &obj2)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_size_t(obj2, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CurlIo" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + { +#ifdef _WIN32 + if (utf8_to_wcp(arg1, true) < 0) { + SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); + } +#endif + } + { + try { + result = (Exiv2::CurlIo *)new Exiv2::CurlIo((std::string const &)*arg1,arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__CurlIo, SWIG_BUILTIN_INIT | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj == Py_None ? -1 : 0; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return -1; +} + + +SWIGINTERN int _wrap_new_CurlIo__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + PyObject * obj1 = 0 ; + Exiv2::CurlIo *result = 0 ; + + if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; + if (!PyArg_UnpackTuple(args, "new_CurlIo", 1, 1, &obj1)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { +#ifdef _WIN32 + if (utf8_to_wcp(arg1, true) < 0) { + SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); + } +#endif + } + { + try { + result = (Exiv2::CurlIo *)new Exiv2::CurlIo((std::string const &)*arg1); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__CurlIo, SWIG_BUILTIN_INIT | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj == Py_None ? -1 : 0; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return -1; +} + + +SWIGINTERN int _wrap_new_CurlIo(PyObject *self, PyObject *args, PyObject *kwargs) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + Py_ssize_t ii; + + (void)self; + if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < 2) && (ii < argc); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int retval = _wrap_new_CurlIo__SWIG_1(self, args, NULL); + if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; + SWIG_fail; + } + if (argc == 2) { + int retval = _wrap_new_CurlIo__SWIG_0(self, args, NULL); + if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; + SWIG_fail; + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CurlIo'.\n" + " Possible C/C++ prototypes are:\n" + " Exiv2::CurlIo::CurlIo(std::string const &,size_t)\n" + " Exiv2::CurlIo::CurlIo(std::string const &)\n"); + return -1; +} + + +SWIGINTERN PyObject *_wrap_CurlIo_write__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; + Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; + long arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_view = NULL ; + PyObject * obj1 = 0 ; + long result; + + if (!PyArg_UnpackTuple(args, "CurlIo_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlIo_write" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); + } + arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); + { + _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); + if (!_global_view) { + PyErr_Clear(); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "CurlIo_write" "', argument " "2"" of type '" "bytes-like object""'") + ; + } + Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); + arg2 = (Exiv2::byte *) buff->buf; + arg3 = (long) buff->len; + } + { + try { + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (long)(arg1)->write((Exiv2::byte const *)arg2,arg3); + SWIG_PYTHON_THREAD_END_ALLOW; + } + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_long(static_cast< long >(result)); + + Py_XDECREF(_global_view); + + return resultobj; +fail: + + Py_XDECREF(_global_view); + + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurlIo_write__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; + Exiv2::BasicIo *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj1 = 0 ; + long result; + + if (!PyArg_UnpackTuple(args, "CurlIo_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlIo_write" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); + } + arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurlIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurlIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); + } + arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); + { + try { + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (long)(arg1)->write(*arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurlIo_write(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + Py_ssize_t ii; + + (void)self; + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + argv[0] = self; + for (ii = 0; (ii < 1) && (ii < argc); ii++) { + argv[ii + 1] = PyTuple_GET_ITEM(args,ii); + } + argc++; + if (argc == 2) { + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + return _wrap_CurlIo_write__SWIG_1(self, args); + } +check_1: + + if (argc == 2) { + PyObject *retobj = _wrap_CurlIo_write__SWIG_0(self, args); + if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; + SWIG_fail; + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CurlIo_write'.\n" + " Possible C/C++ prototypes are:\n" + " Exiv2::CurlIo::write(Exiv2::byte const *,long)\n" + " Exiv2::CurlIo::write(Exiv2::BasicIo &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_CurlIo(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_CurlIo takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CurlIo" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); + } + arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); + { + try { + delete_Exiv2_CurlIo(arg1); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CurlIo) /* defines _wrap_delete_CurlIo_destructor_closure */ + static PyMethodDef SwigMethods[] = { { "_enum_list_Position", _wrap__enum_list_Position, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } @@ -10721,9 +11040,279 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__HttpIo_type = { SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__HttpIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__HttpIo_type}; +static SwigPyGetSet CurlIo___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__CurlIo_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" + "Constructor that accepts the URL on which IO will be\n" + " performed.\n" + ":type url: str\n" + ":param url: The full path of url\n" + ":type blockSize: int, optional\n" + ":param blockSize: the size of the memory block. The file content is\n" + " divided into the memory blocks. These blocks are populated\n" + " on demand from the server, so it avoids copying the complete file.\n" + ":raises: Error if it is unable to init curl pointer.\n" + "", &CurlIo___dict___getset }, + { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ +}; + +SWIGINTERN PyObject * +SwigPyBuiltin__Exiv2__CurlIo_richcompare(PyObject *self, PyObject *other, int op) { + PyObject *result = NULL; + PyObject *tuple = PyTuple_New(1); + assert(tuple); + PyTuple_SET_ITEM(tuple, 0, other); + Py_XINCREF(other); + if (!result && !PyErr_Occurred()) { + if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { + result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); + } else { + result = Py_NotImplemented; + Py_INCREF(result); + } + } + Py_DECREF(tuple); + return result; +} + +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__CurlIo_methods[] = { + { "write", _wrap_CurlIo_write, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Write access is only available for some protocols. This method\n" + " will call RemoteIo::write(const byte* data, long wcount) if the write\n" + " access is available for the protocol. Otherwise, it throws the Error.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Write access is only available for some protocols. This method\n" + " will call RemoteIo::write(BasicIo& src) if the write access is available\n" + " for the protocol. Otherwise, it throws the Error.\n" + "" }, + { NULL, NULL, 0, NULL } /* Sentinel */ +}; + +static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { + { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "exiv2.basicio.CurlIo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_CurlIo_destructor_closure, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 + (printfunc) 0, /* tp_print */ +#else + (Py_ssize_t) 0, /* tp_vectorcall_offset */ +#endif + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__CurlIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__CurlIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__CurlIo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__CurlIo_type.as_buffer, /* tp_as_buffer */ +#if PY_VERSION_HEX >= 0x03000000 + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ +#else + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ +#endif + "\n" + "Provides the http, https read/write access and ftp read access for the RemoteIo.\n" + " This class is based on libcurl.\n" + "",/* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__CurlIo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__CurlIo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__CurlIo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_CurlIo, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + (destructor) 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + (vectorcallfunc) 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#if PY_VERSION_HEX >= 0x030c0000 + (char) 0, /* tp_watched */ +#endif +#ifdef COUNT_ALLOCS + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ +#endif + }, +#if PY_VERSION_HEX >= 0x03050000 + { + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ +# if PY_VERSION_HEX >= 0x030a0000 + (sendfunc) 0, /* am_send */ +# endif + }, +#endif + { + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ +#if PY_VERSION_HEX < 0x03000000 + (coercion) 0, /* nb_coerce */ +#endif + (unaryfunc) 0, /* nb_int */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* nb_reserved */ +#else + (unaryfunc) 0, /* nb_long */ +#endif + (unaryfunc) 0, /* nb_float */ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ +#endif + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ +#if PY_VERSION_HEX >= 0x03050000 + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ +#endif + }, + { + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ + }, + { + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* was_sq_slice */ +#else + (ssizessizeargfunc) 0, /* sq_slice */ +#endif + (ssizeobjargproc) 0, /* sq_ass_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* was_sq_ass_slice */ +#else + (ssizessizeobjargproc) 0, /* sq_ass_slice */ +#endif + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ + }, + { +#if PY_VERSION_HEX < 0x03000000 + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ +#endif + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ + }, + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ +#if PY_VERSION_HEX >= 0x03030000 + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ +#endif +#if PY_VERSION_HEX >= 0x03090000 + (PyObject *) 0, /* ht_module */ +#endif +#if PY_VERSION_HEX >= 0x030b0000 + (char *) 0, /* _ht_tpname */ + { + (PyObject *) 0, /* getitem */ +#if PY_VERSION_HEX >= 0x030c0000 + (uint32_t) 0, /* getitem_version */ +#endif + } +#endif +}; + +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__CurlIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__CurlIo_type}; + /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -10742,10 +11331,14 @@ static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(n static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } +static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__BasicIo_clientdata, 0}; +static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__CurlIo_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__FileIo_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__HttpIo_clientdata, 0}; @@ -10769,6 +11362,7 @@ static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "uint16_t static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__BasicIo, + &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__FileIo, &_swigt__p_Exiv2__HttpIo, @@ -10791,12 +11385,13 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_unsigned_short, }; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__FileIo[] = { {&_swigt__p_Exiv2__FileIo, 0, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__FileIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XPathIo[] = { {&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SwigPyObject[] = { {&_swigt__p_SwigPyObject, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -10815,6 +11410,7 @@ static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__BasicIo, + _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__FileIo, _swigc__p_Exiv2__HttpIo, @@ -11525,6 +12121,40 @@ SWIG_init(void) { SwigPyBuiltin_AddPublicSymbol(public_interface, "HttpIo"); d = md; + /* type 'Exiv2::CurlIo' */ + builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__CurlIo_type; + builtin_pytype->tp_dict = d = PyDict_New(); + SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); + builtin_pytype->tp_new = PyType_GenericNew; + builtin_base_count = 0; + builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__RemoteIo"); + if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { + builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; + } else { + PyErr_SetString(PyExc_TypeError, "Could not create type 'CurlIo' as base 'Exiv2::RemoteIo' has not been initialized.\n"); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } + builtin_bases[builtin_base_count] = NULL; + SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); + PyDict_SetItemString(d, "this", this_descr); + PyDict_SetItemString(d, "thisown", thisown_descr); + if (PyType_Ready(builtin_pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'CurlIo'."); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } + Py_INCREF(builtin_pytype); + PyModule_AddObject(m, "CurlIo", (PyObject *)builtin_pytype); + SwigPyBuiltin_AddPublicSymbol(public_interface, "CurlIo"); + d = md; + /* Initialize threading */ SWIG_PYTHON_INITIALIZE_THREADS; #if PY_VERSION_HEX >= 0x03000000 diff --git a/src/swig-0_27_3/image_wrap.cxx b/src/swig-0_27_3/image_wrap.cxx index ec82656..3b28b29 100644 --- a/src/swig-0_27_3/image_wrap.cxx +++ b/src/swig-0_27_3/image_wrap.cxx @@ -3930,75 +3930,76 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__AsciiValue swig_types[2] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[3] #define SWIGTYPE_p_Exiv2__CommentValue swig_types[4] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[5] -#define SWIGTYPE_p_Exiv2__DataSet swig_types[6] -#define SWIGTYPE_p_Exiv2__DataValue swig_types[7] -#define SWIGTYPE_p_Exiv2__DateValue swig_types[8] -#define SWIGTYPE_p_Exiv2__ExifData swig_types[9] -#define SWIGTYPE_p_Exiv2__ExifKey swig_types[10] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[11] -#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[13] -#define SWIGTYPE_p_Exiv2__Image swig_types[14] -#define SWIGTYPE_p_Exiv2__ImageFactory swig_types[15] -#define SWIGTYPE_p_Exiv2__IptcData swig_types[16] -#define SWIGTYPE_p_Exiv2__IptcKey swig_types[17] -#define SWIGTYPE_p_Exiv2__Key swig_types[18] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[19] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[20] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] -#define SWIGTYPE_p_Exiv2__Value swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpData swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] -#define SWIGTYPE_p_IptcData_iterator swig_types[42] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] -#define SWIGTYPE_p_SwigPyObject swig_types[44] -#define SWIGTYPE_p_ValueType swig_types[45] -#define SWIGTYPE_p_XmpData_iterator swig_types[46] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] -#define SWIGTYPE_p_allocator_type swig_types[48] -#define SWIGTYPE_p_char swig_types[49] -#define SWIGTYPE_p_const_iterator swig_types[50] -#define SWIGTYPE_p_difference_type swig_types[51] -#define SWIGTYPE_p_first_type swig_types[52] -#define SWIGTYPE_p_int swig_types[53] -#define SWIGTYPE_p_iterator swig_types[54] -#define SWIGTYPE_p_key_type swig_types[55] -#define SWIGTYPE_p_long_long swig_types[56] -#define SWIGTYPE_p_mapped_type swig_types[57] -#define SWIGTYPE_p_second_type swig_types[58] -#define SWIGTYPE_p_short swig_types[59] -#define SWIGTYPE_p_signed_char swig_types[60] -#define SWIGTYPE_p_size_type swig_types[61] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] -#define SWIGTYPE_p_unsigned_char swig_types[67] -#define SWIGTYPE_p_unsigned_int swig_types[68] -#define SWIGTYPE_p_unsigned_long_long swig_types[69] -#define SWIGTYPE_p_unsigned_short swig_types[70] -#define SWIGTYPE_p_value_type swig_types[71] -static swig_type_info *swig_types[73]; -static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__CurlIo swig_types[5] +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[6] +#define SWIGTYPE_p_Exiv2__DataSet swig_types[7] +#define SWIGTYPE_p_Exiv2__DataValue swig_types[8] +#define SWIGTYPE_p_Exiv2__DateValue swig_types[9] +#define SWIGTYPE_p_Exiv2__ExifData swig_types[10] +#define SWIGTYPE_p_Exiv2__ExifKey swig_types[11] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[12] +#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[13] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[14] +#define SWIGTYPE_p_Exiv2__Image swig_types[15] +#define SWIGTYPE_p_Exiv2__ImageFactory swig_types[16] +#define SWIGTYPE_p_Exiv2__IptcData swig_types[17] +#define SWIGTYPE_p_Exiv2__IptcKey swig_types[18] +#define SWIGTYPE_p_Exiv2__Key swig_types[19] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[20] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[21] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[23] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[24] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[25] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[26] +#define SWIGTYPE_p_Exiv2__Value swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[35] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpData swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[40] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[41] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[42] +#define SWIGTYPE_p_IptcData_iterator swig_types[43] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[44] +#define SWIGTYPE_p_SwigPyObject swig_types[45] +#define SWIGTYPE_p_ValueType swig_types[46] +#define SWIGTYPE_p_XmpData_iterator swig_types[47] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[48] +#define SWIGTYPE_p_allocator_type swig_types[49] +#define SWIGTYPE_p_char swig_types[50] +#define SWIGTYPE_p_const_iterator swig_types[51] +#define SWIGTYPE_p_difference_type swig_types[52] +#define SWIGTYPE_p_first_type swig_types[53] +#define SWIGTYPE_p_int swig_types[54] +#define SWIGTYPE_p_iterator swig_types[55] +#define SWIGTYPE_p_key_type swig_types[56] +#define SWIGTYPE_p_long_long swig_types[57] +#define SWIGTYPE_p_mapped_type swig_types[58] +#define SWIGTYPE_p_second_type swig_types[59] +#define SWIGTYPE_p_short swig_types[60] +#define SWIGTYPE_p_signed_char swig_types[61] +#define SWIGTYPE_p_size_type swig_types[62] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[63] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[64] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[66] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[67] +#define SWIGTYPE_p_unsigned_char swig_types[68] +#define SWIGTYPE_p_unsigned_int swig_types[69] +#define SWIGTYPE_p_unsigned_long_long swig_types[70] +#define SWIGTYPE_p_unsigned_short swig_types[71] +#define SWIGTYPE_p_value_type swig_types[72] +static swig_type_info *swig_types[74]; +static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4197,6 +4198,19 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" +#ifndef EXV_USE_CURL +namespace Exiv2 { + class CurlIo : public RemoteIo { + public: + CurlIo(const std::string& url, size_t blockSize=0) { + throw std::runtime_error( + "CurlIo not enabled in linked libexiv2"); + }; + }; +} +#endif + + #include @@ -4697,6 +4711,10 @@ static swig_type_info* basicio_subtype(Exiv2::BasicIo* ptr) { else if (dynamic_cast(ptr)) { if (dynamic_cast(ptr)) return SWIGTYPE_p_Exiv2__HttpIo; + + else if (dynamic_cast(ptr)) + return SWIGTYPE_p_Exiv2__CurlIo; + else return SWIGTYPE_p_Exiv2__RemoteIo; } @@ -7794,6 +7812,9 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ImageFactory_clientdata = {0, /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -7821,6 +7842,9 @@ static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newme static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); } +static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } @@ -7904,6 +7928,7 @@ static swig_type_info _swigt__p_ExifData_iterator_base = {"_p_ExifData_iterator_ static swig_type_info _swigt__p_Exiv2__AsciiValue = {"_p_Exiv2__AsciiValue", "Exiv2::AsciiValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__CommentValue = {"_p_Exiv2__CommentValue", "Exiv2::CommentValue *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataSet = {"_p_Exiv2__DataSet", "Exiv2::DataSet *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; @@ -7978,6 +8003,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__AsciiValue, &_swigt__p_Exiv2__BasicIo, &_swigt__p_Exiv2__CommentValue, + &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__DataSet, &_swigt__p_Exiv2__DataValue, @@ -8050,8 +8076,9 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_ExifData_iterator[] = { {&_swigt__p_ExifData_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ExifData_iterator_base[] = { {&_swigt__p_ExifData_iterator_base, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__AsciiValue[] = { {&_swigt__p_Exiv2__AsciiValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__CommentValue[] = { {&_swigt__p_Exiv2__CommentValue, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataSet[] = { {&_swigt__p_Exiv2__DataSet, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -8068,7 +8095,7 @@ static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValueBase[] = { {&_swigt__p_Exiv2__StringValueBase, 0, 0, 0}, {&_swigt__p_Exiv2__AsciiValue, _p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__CommentValue, _p_Exiv2__CommentValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__StringValue, _p_Exiv2__StringValueTo_p_Exiv2__StringValueBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__TagInfo[] = { {&_swigt__p_Exiv2__TagInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -8126,6 +8153,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__AsciiValue, _swigc__p_Exiv2__BasicIo, _swigc__p_Exiv2__CommentValue, + _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__DataSet, _swigc__p_Exiv2__DataValue, diff --git a/src/swig-0_27_3/preview_wrap.cxx b/src/swig-0_27_3/preview_wrap.cxx index 65f5c35..2f2b02a 100644 --- a/src/swig-0_27_3/preview_wrap.cxx +++ b/src/swig-0_27_3/preview_wrap.cxx @@ -3932,75 +3932,76 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__AsciiValue swig_types[2] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[3] #define SWIGTYPE_p_Exiv2__CommentValue swig_types[4] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[5] -#define SWIGTYPE_p_Exiv2__DataSet swig_types[6] -#define SWIGTYPE_p_Exiv2__DataValue swig_types[7] -#define SWIGTYPE_p_Exiv2__DateValue swig_types[8] -#define SWIGTYPE_p_Exiv2__ExifKey swig_types[9] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[10] -#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[11] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[12] -#define SWIGTYPE_p_Exiv2__Image swig_types[13] -#define SWIGTYPE_p_Exiv2__IptcKey swig_types[14] -#define SWIGTYPE_p_Exiv2__Key swig_types[15] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[16] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[17] -#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[18] -#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[19] -#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[20] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] -#define SWIGTYPE_p_Exiv2__Value swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[40] -#define SWIGTYPE_p_IptcData_iterator swig_types[41] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[42] -#define SWIGTYPE_p_SwigPyObject swig_types[43] -#define SWIGTYPE_p_ValueType swig_types[44] -#define SWIGTYPE_p_XmpData_iterator swig_types[45] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[46] -#define SWIGTYPE_p_allocator_type swig_types[47] -#define SWIGTYPE_p_char swig_types[48] -#define SWIGTYPE_p_const_iterator swig_types[49] -#define SWIGTYPE_p_difference_type swig_types[50] -#define SWIGTYPE_p_first_type swig_types[51] -#define SWIGTYPE_p_int swig_types[52] -#define SWIGTYPE_p_iterator swig_types[53] -#define SWIGTYPE_p_key_type swig_types[54] -#define SWIGTYPE_p_long_long swig_types[55] -#define SWIGTYPE_p_mapped_type swig_types[56] -#define SWIGTYPE_p_second_type swig_types[57] -#define SWIGTYPE_p_short swig_types[58] -#define SWIGTYPE_p_signed_char swig_types[59] -#define SWIGTYPE_p_size_type swig_types[60] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[61] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[62] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[63] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[65] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] -#define SWIGTYPE_p_unsigned_char swig_types[67] -#define SWIGTYPE_p_unsigned_int swig_types[68] -#define SWIGTYPE_p_unsigned_long_long swig_types[69] -#define SWIGTYPE_p_unsigned_short swig_types[70] -#define SWIGTYPE_p_value_type swig_types[71] -static swig_type_info *swig_types[73]; -static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__CurlIo swig_types[5] +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[6] +#define SWIGTYPE_p_Exiv2__DataSet swig_types[7] +#define SWIGTYPE_p_Exiv2__DataValue swig_types[8] +#define SWIGTYPE_p_Exiv2__DateValue swig_types[9] +#define SWIGTYPE_p_Exiv2__ExifKey swig_types[10] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[11] +#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[13] +#define SWIGTYPE_p_Exiv2__Image swig_types[14] +#define SWIGTYPE_p_Exiv2__IptcKey swig_types[15] +#define SWIGTYPE_p_Exiv2__Key swig_types[16] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[17] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[18] +#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[19] +#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[20] +#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[21] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[23] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[24] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[25] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[26] +#define SWIGTYPE_p_Exiv2__Value swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[35] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] +#define SWIGTYPE_p_IptcData_iterator swig_types[42] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] +#define SWIGTYPE_p_SwigPyObject swig_types[44] +#define SWIGTYPE_p_ValueType swig_types[45] +#define SWIGTYPE_p_XmpData_iterator swig_types[46] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] +#define SWIGTYPE_p_allocator_type swig_types[48] +#define SWIGTYPE_p_char swig_types[49] +#define SWIGTYPE_p_const_iterator swig_types[50] +#define SWIGTYPE_p_difference_type swig_types[51] +#define SWIGTYPE_p_first_type swig_types[52] +#define SWIGTYPE_p_int swig_types[53] +#define SWIGTYPE_p_iterator swig_types[54] +#define SWIGTYPE_p_key_type swig_types[55] +#define SWIGTYPE_p_long_long swig_types[56] +#define SWIGTYPE_p_mapped_type swig_types[57] +#define SWIGTYPE_p_second_type swig_types[58] +#define SWIGTYPE_p_short swig_types[59] +#define SWIGTYPE_p_signed_char swig_types[60] +#define SWIGTYPE_p_size_type swig_types[61] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[66] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[67] +#define SWIGTYPE_p_unsigned_char swig_types[68] +#define SWIGTYPE_p_unsigned_int swig_types[69] +#define SWIGTYPE_p_unsigned_long_long swig_types[70] +#define SWIGTYPE_p_unsigned_short swig_types[71] +#define SWIGTYPE_p_value_type swig_types[72] +static swig_type_info *swig_types[74]; +static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4199,6 +4200,19 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" +#ifndef EXV_USE_CURL +namespace Exiv2 { + class CurlIo : public RemoteIo { + public: + CurlIo(const std::string& url, size_t blockSize=0) { + throw std::runtime_error( + "CurlIo not enabled in linked libexiv2"); + }; + }; +} +#endif + + #include @@ -7432,6 +7446,9 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewManager_clientdata = {0 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -7459,6 +7476,9 @@ static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newme static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); } +static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } @@ -7542,6 +7562,7 @@ static swig_type_info _swigt__p_ExifData_iterator_base = {"_p_ExifData_iterator_ static swig_type_info _swigt__p_Exiv2__AsciiValue = {"_p_Exiv2__AsciiValue", "Exiv2::AsciiValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__CommentValue = {"_p_Exiv2__CommentValue", "Exiv2::CommentValue *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataSet = {"_p_Exiv2__DataSet", "Exiv2::DataSet *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; @@ -7616,6 +7637,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__AsciiValue, &_swigt__p_Exiv2__BasicIo, &_swigt__p_Exiv2__CommentValue, + &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__DataSet, &_swigt__p_Exiv2__DataValue, @@ -7688,8 +7710,9 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_ExifData_iterator[] = { {&_swigt__p_ExifData_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ExifData_iterator_base[] = { {&_swigt__p_ExifData_iterator_base, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__AsciiValue[] = { {&_swigt__p_Exiv2__AsciiValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__CommentValue[] = { {&_swigt__p_Exiv2__CommentValue, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataSet[] = { {&_swigt__p_Exiv2__DataSet, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -7706,7 +7729,7 @@ static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, static swig_cast_info _swigc__p_Exiv2__PreviewImage[] = { {&_swigt__p_Exiv2__PreviewImage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewManager[] = { {&_swigt__p_Exiv2__PreviewManager, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewProperties[] = { {&_swigt__p_Exiv2__PreviewProperties, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValueBase[] = { {&_swigt__p_Exiv2__StringValueBase, 0, 0, 0}, {&_swigt__p_Exiv2__AsciiValue, _p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__CommentValue, _p_Exiv2__CommentValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__StringValue, _p_Exiv2__StringValueTo_p_Exiv2__StringValueBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__TagInfo[] = { {&_swigt__p_Exiv2__TagInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -7764,6 +7787,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__AsciiValue, _swigc__p_Exiv2__BasicIo, _swigc__p_Exiv2__CommentValue, + _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__DataSet, _swigc__p_Exiv2__DataValue, diff --git a/src/swig-0_27_3/version_wrap.cxx b/src/swig-0_27_3/version_wrap.cxx index 9078c28..3b0d067 100644 --- a/src/swig-0_27_3/version_wrap.cxx +++ b/src/swig-0_27_3/version_wrap.cxx @@ -4263,6 +4263,7 @@ static PyObject* versionInfo() { bool video = false; bool unicode = false; bool webready = false; + bool curl = false; #ifdef EXV_ENABLE_NLS nls = true; #endif @@ -4275,13 +4276,17 @@ static PyObject* versionInfo() { #ifdef EXV_ENABLE_WEBREADY webready = true; #endif - return Py_BuildValue("{ss,sN,sN,sN,sN,sN}", +#ifdef EXV_USE_CURL + curl = true; +#endif + return Py_BuildValue("{ss,sN,sN,sN,sN,sN,sN}", "version", Exiv2::version(), "EXV_ENABLE_NLS", PyBool_FromLong(nls), "EXV_ENABLE_BMFF", PyBool_FromLong(bmff), "EXV_ENABLE_VIDEO", PyBool_FromLong(video), "EXV_UNICODE_PATH", PyBool_FromLong(unicode), - "EXV_ENABLE_WEBREADY", PyBool_FromLong(webready)); + "EXV_ENABLE_WEBREADY", PyBool_FromLong(webready), + "EXV_USE_CURL", PyBool_FromLong(curl)); }; diff --git a/src/swig-0_27_7/basicio_wrap.cxx b/src/swig-0_27_7/basicio_wrap.cxx index 2b76c2f..eb80575 100644 --- a/src/swig-0_27_7/basicio_wrap.cxx +++ b/src/swig-0_27_7/basicio_wrap.cxx @@ -3926,28 +3926,29 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_Exiv2__BasicIo swig_types[0] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[1] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[2] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[3] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[4] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[5] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[6] -#define SWIGTYPE_p_SwigPyObject swig_types[7] -#define SWIGTYPE_p_char swig_types[8] -#define SWIGTYPE_p_first_type swig_types[9] -#define SWIGTYPE_p_int swig_types[10] -#define SWIGTYPE_p_long_long swig_types[11] -#define SWIGTYPE_p_second_type swig_types[12] -#define SWIGTYPE_p_short swig_types[13] -#define SWIGTYPE_p_signed_char swig_types[14] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[15] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[16] -#define SWIGTYPE_p_unsigned_char swig_types[17] -#define SWIGTYPE_p_unsigned_int swig_types[18] -#define SWIGTYPE_p_unsigned_long_long swig_types[19] -#define SWIGTYPE_p_unsigned_short swig_types[20] -static swig_type_info *swig_types[22]; -static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__CurlIo swig_types[1] +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[2] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[3] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[4] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[5] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[6] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[7] +#define SWIGTYPE_p_SwigPyObject swig_types[8] +#define SWIGTYPE_p_char swig_types[9] +#define SWIGTYPE_p_first_type swig_types[10] +#define SWIGTYPE_p_int swig_types[11] +#define SWIGTYPE_p_long_long swig_types[12] +#define SWIGTYPE_p_second_type swig_types[13] +#define SWIGTYPE_p_short swig_types[14] +#define SWIGTYPE_p_signed_char swig_types[15] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[16] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[17] +#define SWIGTYPE_p_unsigned_char swig_types[18] +#define SWIGTYPE_p_unsigned_int swig_types[19] +#define SWIGTYPE_p_unsigned_long_long swig_types[20] +#define SWIGTYPE_p_unsigned_short swig_types[21] +static swig_type_info *swig_types[23]; +static swig_module_info swig_module = {swig_types, 22, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4146,6 +4147,19 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" +#ifndef EXV_USE_CURL +namespace Exiv2 { + class CurlIo : public RemoteIo { + public: + CurlIo(const std::string& url, size_t blockSize=0) { + throw std::runtime_error( + "CurlIo not enabled in linked libexiv2"); + }; + }; +} +#endif + + #include @@ -4975,6 +4989,7 @@ SWIG_AsVal_size_t (PyObject * obj, size_t *val) return res; } +SWIGINTERN void delete_Exiv2_CurlIo(Exiv2::CurlIo *self){} #ifdef __cplusplus extern "C" { #endif @@ -8553,6 +8568,310 @@ SWIGINTERN int _wrap_new_HttpIo(PyObject *self, PyObject *args, PyObject *kwargs } +SWIGINTERN int _wrap_new_CurlIo__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + size_t arg2 ; + int res1 = SWIG_OLDOBJ ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + Exiv2::CurlIo *result = 0 ; + + if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; + if (!PyArg_UnpackTuple(args, "new_CurlIo", 2, 2, &obj1, &obj2)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_size_t(obj2, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CurlIo" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + { +#ifdef _WIN32 + if (utf8_to_wcp(arg1, true) < 0) { + SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); + } +#endif + } + { + try { + result = (Exiv2::CurlIo *)new Exiv2::CurlIo((std::string const &)*arg1,arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__CurlIo, SWIG_BUILTIN_INIT | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj == Py_None ? -1 : 0; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return -1; +} + + +SWIGINTERN int _wrap_new_CurlIo__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + PyObject * obj1 = 0 ; + Exiv2::CurlIo *result = 0 ; + + if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; + if (!PyArg_UnpackTuple(args, "new_CurlIo", 1, 1, &obj1)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + { +#ifdef _WIN32 + if (utf8_to_wcp(arg1, true) < 0) { + SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); + } +#endif + } + { + try { + result = (Exiv2::CurlIo *)new Exiv2::CurlIo((std::string const &)*arg1); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__CurlIo, SWIG_BUILTIN_INIT | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj == Py_None ? -1 : 0; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return -1; +} + + +SWIGINTERN int _wrap_new_CurlIo(PyObject *self, PyObject *args, PyObject *kwargs) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + Py_ssize_t ii; + + (void)self; + if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < 2) && (ii < argc); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int retval = _wrap_new_CurlIo__SWIG_1(self, args, NULL); + if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; + SWIG_fail; + } + if (argc == 2) { + int retval = _wrap_new_CurlIo__SWIG_0(self, args, NULL); + if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; + SWIG_fail; + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CurlIo'.\n" + " Possible C/C++ prototypes are:\n" + " Exiv2::CurlIo::CurlIo(std::string const &,size_t)\n" + " Exiv2::CurlIo::CurlIo(std::string const &)\n"); + return -1; +} + + +SWIGINTERN PyObject *_wrap_CurlIo_write__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; + Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; + long arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_view = NULL ; + PyObject * obj1 = 0 ; + long result; + + if (!PyArg_UnpackTuple(args, "CurlIo_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlIo_write" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); + } + arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); + { + _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); + if (!_global_view) { + PyErr_Clear(); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "CurlIo_write" "', argument " "2"" of type '" "bytes-like object""'") + ; + } + Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); + arg2 = (Exiv2::byte *) buff->buf; + arg3 = (long) buff->len; + } + { + try { + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (long)(arg1)->write((Exiv2::byte const *)arg2,arg3); + SWIG_PYTHON_THREAD_END_ALLOW; + } + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_long(static_cast< long >(result)); + + Py_XDECREF(_global_view); + + return resultobj; +fail: + + Py_XDECREF(_global_view); + + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurlIo_write__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; + Exiv2::BasicIo *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj1 = 0 ; + long result; + + if (!PyArg_UnpackTuple(args, "CurlIo_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlIo_write" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); + } + arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurlIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurlIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); + } + arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); + { + try { + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (long)(arg1)->write(*arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_long(static_cast< long >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurlIo_write(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + Py_ssize_t ii; + + (void)self; + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + argv[0] = self; + for (ii = 0; (ii < 1) && (ii < argc); ii++) { + argv[ii + 1] = PyTuple_GET_ITEM(args,ii); + } + argc++; + if (argc == 2) { + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + return _wrap_CurlIo_write__SWIG_1(self, args); + } +check_1: + + if (argc == 2) { + PyObject *retobj = _wrap_CurlIo_write__SWIG_0(self, args); + if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; + SWIG_fail; + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CurlIo_write'.\n" + " Possible C/C++ prototypes are:\n" + " Exiv2::CurlIo::write(Exiv2::byte const *,long)\n" + " Exiv2::CurlIo::write(Exiv2::BasicIo &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_CurlIo(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_CurlIo takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CurlIo" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); + } + arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); + { + try { + delete_Exiv2_CurlIo(arg1); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CurlIo) /* defines _wrap_delete_CurlIo_destructor_closure */ + static PyMethodDef SwigMethods[] = { { "_enum_list_Position", _wrap__enum_list_Position, METH_VARARGS, NULL}, { NULL, NULL, 0, NULL } @@ -10721,9 +11040,279 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__HttpIo_type = { SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__HttpIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__HttpIo_type}; +static SwigPyGetSet CurlIo___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__CurlIo_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" + "Constructor that accepts the URL on which IO will be\n" + " performed.\n" + ":type url: str\n" + ":param url: The full path of url\n" + ":type blockSize: int, optional\n" + ":param blockSize: the size of the memory block. The file content is\n" + " divided into the memory blocks. These blocks are populated\n" + " on demand from the server, so it avoids copying the complete file.\n" + ":raises: Error if it is unable to init curl pointer.\n" + "", &CurlIo___dict___getset }, + { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ +}; + +SWIGINTERN PyObject * +SwigPyBuiltin__Exiv2__CurlIo_richcompare(PyObject *self, PyObject *other, int op) { + PyObject *result = NULL; + PyObject *tuple = PyTuple_New(1); + assert(tuple); + PyTuple_SET_ITEM(tuple, 0, other); + Py_XINCREF(other); + if (!result && !PyErr_Occurred()) { + if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { + result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); + } else { + result = Py_NotImplemented; + Py_INCREF(result); + } + } + Py_DECREF(tuple); + return result; +} + +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__CurlIo_methods[] = { + { "write", _wrap_CurlIo_write, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Write access is only available for some protocols. This method\n" + " will call RemoteIo::write(const byte* data, long wcount) if the write\n" + " access is available for the protocol. Otherwise, it throws the Error.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Write access is only available for some protocols. This method\n" + " will call RemoteIo::write(BasicIo& src) if the write access is available\n" + " for the protocol. Otherwise, it throws the Error.\n" + "" }, + { NULL, NULL, 0, NULL } /* Sentinel */ +}; + +static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { + { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "exiv2.basicio.CurlIo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + _wrap_delete_CurlIo_destructor_closure, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 + (printfunc) 0, /* tp_print */ +#else + (Py_ssize_t) 0, /* tp_vectorcall_offset */ +#endif + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__CurlIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__CurlIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__CurlIo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__CurlIo_type.as_buffer, /* tp_as_buffer */ +#if PY_VERSION_HEX >= 0x03000000 + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ +#else + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ +#endif + "\n" + "Provides the http, https read/write access and ftp read access for the RemoteIo.\n" + " This class is based on libcurl.\n" + "",/* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__CurlIo_richcompare, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__CurlIo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__CurlIo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + _wrap_new_CurlIo, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + (destructor) 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + (vectorcallfunc) 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#if PY_VERSION_HEX >= 0x030c0000 + (char) 0, /* tp_watched */ +#endif +#ifdef COUNT_ALLOCS + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ +#endif + }, +#if PY_VERSION_HEX >= 0x03050000 + { + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ +# if PY_VERSION_HEX >= 0x030a0000 + (sendfunc) 0, /* am_send */ +# endif + }, +#endif + { + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ +#if PY_VERSION_HEX < 0x03000000 + (coercion) 0, /* nb_coerce */ +#endif + (unaryfunc) 0, /* nb_int */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* nb_reserved */ +#else + (unaryfunc) 0, /* nb_long */ +#endif + (unaryfunc) 0, /* nb_float */ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ +#endif + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ +#if PY_VERSION_HEX >= 0x03050000 + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ +#endif + }, + { + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ + }, + { + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* was_sq_slice */ +#else + (ssizessizeargfunc) 0, /* sq_slice */ +#endif + (ssizeobjargproc) 0, /* sq_ass_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* was_sq_ass_slice */ +#else + (ssizessizeobjargproc) 0, /* sq_ass_slice */ +#endif + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ + }, + { +#if PY_VERSION_HEX < 0x03000000 + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ +#endif + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ + }, + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ +#if PY_VERSION_HEX >= 0x03030000 + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ +#endif +#if PY_VERSION_HEX >= 0x03090000 + (PyObject *) 0, /* ht_module */ +#endif +#if PY_VERSION_HEX >= 0x030b0000 + (char *) 0, /* _ht_tpname */ + { + (PyObject *) 0, /* getitem */ +#if PY_VERSION_HEX >= 0x030c0000 + (uint32_t) 0, /* getitem_version */ +#endif + } +#endif +}; + +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__CurlIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__CurlIo_type}; + /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -10742,10 +11331,14 @@ static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(n static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } +static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__BasicIo_clientdata, 0}; +static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__CurlIo_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__FileIo_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__HttpIo_clientdata, 0}; @@ -10769,6 +11362,7 @@ static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "uint16_t static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__BasicIo, + &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__FileIo, &_swigt__p_Exiv2__HttpIo, @@ -10791,12 +11385,13 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_unsigned_short, }; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__FileIo[] = { {&_swigt__p_Exiv2__FileIo, 0, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__FileIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XPathIo[] = { {&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SwigPyObject[] = { {&_swigt__p_SwigPyObject, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -10815,6 +11410,7 @@ static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__BasicIo, + _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__FileIo, _swigc__p_Exiv2__HttpIo, @@ -11525,6 +12121,40 @@ SWIG_init(void) { SwigPyBuiltin_AddPublicSymbol(public_interface, "HttpIo"); d = md; + /* type 'Exiv2::CurlIo' */ + builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__CurlIo_type; + builtin_pytype->tp_dict = d = PyDict_New(); + SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); + builtin_pytype->tp_new = PyType_GenericNew; + builtin_base_count = 0; + builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__RemoteIo"); + if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { + builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; + } else { + PyErr_SetString(PyExc_TypeError, "Could not create type 'CurlIo' as base 'Exiv2::RemoteIo' has not been initialized.\n"); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } + builtin_bases[builtin_base_count] = NULL; + SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); + PyDict_SetItemString(d, "this", this_descr); + PyDict_SetItemString(d, "thisown", thisown_descr); + if (PyType_Ready(builtin_pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'CurlIo'."); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } + Py_INCREF(builtin_pytype); + PyModule_AddObject(m, "CurlIo", (PyObject *)builtin_pytype); + SwigPyBuiltin_AddPublicSymbol(public_interface, "CurlIo"); + d = md; + /* Initialize threading */ SWIG_PYTHON_INITIALIZE_THREADS; #if PY_VERSION_HEX >= 0x03000000 diff --git a/src/swig-0_27_7/image_wrap.cxx b/src/swig-0_27_7/image_wrap.cxx index ec82656..3b28b29 100644 --- a/src/swig-0_27_7/image_wrap.cxx +++ b/src/swig-0_27_7/image_wrap.cxx @@ -3930,75 +3930,76 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__AsciiValue swig_types[2] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[3] #define SWIGTYPE_p_Exiv2__CommentValue swig_types[4] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[5] -#define SWIGTYPE_p_Exiv2__DataSet swig_types[6] -#define SWIGTYPE_p_Exiv2__DataValue swig_types[7] -#define SWIGTYPE_p_Exiv2__DateValue swig_types[8] -#define SWIGTYPE_p_Exiv2__ExifData swig_types[9] -#define SWIGTYPE_p_Exiv2__ExifKey swig_types[10] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[11] -#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[13] -#define SWIGTYPE_p_Exiv2__Image swig_types[14] -#define SWIGTYPE_p_Exiv2__ImageFactory swig_types[15] -#define SWIGTYPE_p_Exiv2__IptcData swig_types[16] -#define SWIGTYPE_p_Exiv2__IptcKey swig_types[17] -#define SWIGTYPE_p_Exiv2__Key swig_types[18] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[19] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[20] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] -#define SWIGTYPE_p_Exiv2__Value swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpData swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] -#define SWIGTYPE_p_IptcData_iterator swig_types[42] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] -#define SWIGTYPE_p_SwigPyObject swig_types[44] -#define SWIGTYPE_p_ValueType swig_types[45] -#define SWIGTYPE_p_XmpData_iterator swig_types[46] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] -#define SWIGTYPE_p_allocator_type swig_types[48] -#define SWIGTYPE_p_char swig_types[49] -#define SWIGTYPE_p_const_iterator swig_types[50] -#define SWIGTYPE_p_difference_type swig_types[51] -#define SWIGTYPE_p_first_type swig_types[52] -#define SWIGTYPE_p_int swig_types[53] -#define SWIGTYPE_p_iterator swig_types[54] -#define SWIGTYPE_p_key_type swig_types[55] -#define SWIGTYPE_p_long_long swig_types[56] -#define SWIGTYPE_p_mapped_type swig_types[57] -#define SWIGTYPE_p_second_type swig_types[58] -#define SWIGTYPE_p_short swig_types[59] -#define SWIGTYPE_p_signed_char swig_types[60] -#define SWIGTYPE_p_size_type swig_types[61] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] -#define SWIGTYPE_p_unsigned_char swig_types[67] -#define SWIGTYPE_p_unsigned_int swig_types[68] -#define SWIGTYPE_p_unsigned_long_long swig_types[69] -#define SWIGTYPE_p_unsigned_short swig_types[70] -#define SWIGTYPE_p_value_type swig_types[71] -static swig_type_info *swig_types[73]; -static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__CurlIo swig_types[5] +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[6] +#define SWIGTYPE_p_Exiv2__DataSet swig_types[7] +#define SWIGTYPE_p_Exiv2__DataValue swig_types[8] +#define SWIGTYPE_p_Exiv2__DateValue swig_types[9] +#define SWIGTYPE_p_Exiv2__ExifData swig_types[10] +#define SWIGTYPE_p_Exiv2__ExifKey swig_types[11] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[12] +#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[13] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[14] +#define SWIGTYPE_p_Exiv2__Image swig_types[15] +#define SWIGTYPE_p_Exiv2__ImageFactory swig_types[16] +#define SWIGTYPE_p_Exiv2__IptcData swig_types[17] +#define SWIGTYPE_p_Exiv2__IptcKey swig_types[18] +#define SWIGTYPE_p_Exiv2__Key swig_types[19] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[20] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[21] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[23] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[24] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[25] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[26] +#define SWIGTYPE_p_Exiv2__Value swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[35] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpData swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[40] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[41] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[42] +#define SWIGTYPE_p_IptcData_iterator swig_types[43] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[44] +#define SWIGTYPE_p_SwigPyObject swig_types[45] +#define SWIGTYPE_p_ValueType swig_types[46] +#define SWIGTYPE_p_XmpData_iterator swig_types[47] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[48] +#define SWIGTYPE_p_allocator_type swig_types[49] +#define SWIGTYPE_p_char swig_types[50] +#define SWIGTYPE_p_const_iterator swig_types[51] +#define SWIGTYPE_p_difference_type swig_types[52] +#define SWIGTYPE_p_first_type swig_types[53] +#define SWIGTYPE_p_int swig_types[54] +#define SWIGTYPE_p_iterator swig_types[55] +#define SWIGTYPE_p_key_type swig_types[56] +#define SWIGTYPE_p_long_long swig_types[57] +#define SWIGTYPE_p_mapped_type swig_types[58] +#define SWIGTYPE_p_second_type swig_types[59] +#define SWIGTYPE_p_short swig_types[60] +#define SWIGTYPE_p_signed_char swig_types[61] +#define SWIGTYPE_p_size_type swig_types[62] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[63] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[64] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[66] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[67] +#define SWIGTYPE_p_unsigned_char swig_types[68] +#define SWIGTYPE_p_unsigned_int swig_types[69] +#define SWIGTYPE_p_unsigned_long_long swig_types[70] +#define SWIGTYPE_p_unsigned_short swig_types[71] +#define SWIGTYPE_p_value_type swig_types[72] +static swig_type_info *swig_types[74]; +static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4197,6 +4198,19 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" +#ifndef EXV_USE_CURL +namespace Exiv2 { + class CurlIo : public RemoteIo { + public: + CurlIo(const std::string& url, size_t blockSize=0) { + throw std::runtime_error( + "CurlIo not enabled in linked libexiv2"); + }; + }; +} +#endif + + #include @@ -4697,6 +4711,10 @@ static swig_type_info* basicio_subtype(Exiv2::BasicIo* ptr) { else if (dynamic_cast(ptr)) { if (dynamic_cast(ptr)) return SWIGTYPE_p_Exiv2__HttpIo; + + else if (dynamic_cast(ptr)) + return SWIGTYPE_p_Exiv2__CurlIo; + else return SWIGTYPE_p_Exiv2__RemoteIo; } @@ -7794,6 +7812,9 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ImageFactory_clientdata = {0, /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -7821,6 +7842,9 @@ static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newme static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); } +static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } @@ -7904,6 +7928,7 @@ static swig_type_info _swigt__p_ExifData_iterator_base = {"_p_ExifData_iterator_ static swig_type_info _swigt__p_Exiv2__AsciiValue = {"_p_Exiv2__AsciiValue", "Exiv2::AsciiValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__CommentValue = {"_p_Exiv2__CommentValue", "Exiv2::CommentValue *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataSet = {"_p_Exiv2__DataSet", "Exiv2::DataSet *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; @@ -7978,6 +8003,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__AsciiValue, &_swigt__p_Exiv2__BasicIo, &_swigt__p_Exiv2__CommentValue, + &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__DataSet, &_swigt__p_Exiv2__DataValue, @@ -8050,8 +8076,9 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_ExifData_iterator[] = { {&_swigt__p_ExifData_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ExifData_iterator_base[] = { {&_swigt__p_ExifData_iterator_base, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__AsciiValue[] = { {&_swigt__p_Exiv2__AsciiValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__CommentValue[] = { {&_swigt__p_Exiv2__CommentValue, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataSet[] = { {&_swigt__p_Exiv2__DataSet, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -8068,7 +8095,7 @@ static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValueBase[] = { {&_swigt__p_Exiv2__StringValueBase, 0, 0, 0}, {&_swigt__p_Exiv2__AsciiValue, _p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__CommentValue, _p_Exiv2__CommentValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__StringValue, _p_Exiv2__StringValueTo_p_Exiv2__StringValueBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__TagInfo[] = { {&_swigt__p_Exiv2__TagInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -8126,6 +8153,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__AsciiValue, _swigc__p_Exiv2__BasicIo, _swigc__p_Exiv2__CommentValue, + _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__DataSet, _swigc__p_Exiv2__DataValue, diff --git a/src/swig-0_27_7/preview_wrap.cxx b/src/swig-0_27_7/preview_wrap.cxx index 65f5c35..2f2b02a 100644 --- a/src/swig-0_27_7/preview_wrap.cxx +++ b/src/swig-0_27_7/preview_wrap.cxx @@ -3932,75 +3932,76 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__AsciiValue swig_types[2] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[3] #define SWIGTYPE_p_Exiv2__CommentValue swig_types[4] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[5] -#define SWIGTYPE_p_Exiv2__DataSet swig_types[6] -#define SWIGTYPE_p_Exiv2__DataValue swig_types[7] -#define SWIGTYPE_p_Exiv2__DateValue swig_types[8] -#define SWIGTYPE_p_Exiv2__ExifKey swig_types[9] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[10] -#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[11] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[12] -#define SWIGTYPE_p_Exiv2__Image swig_types[13] -#define SWIGTYPE_p_Exiv2__IptcKey swig_types[14] -#define SWIGTYPE_p_Exiv2__Key swig_types[15] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[16] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[17] -#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[18] -#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[19] -#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[20] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] -#define SWIGTYPE_p_Exiv2__Value swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[40] -#define SWIGTYPE_p_IptcData_iterator swig_types[41] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[42] -#define SWIGTYPE_p_SwigPyObject swig_types[43] -#define SWIGTYPE_p_ValueType swig_types[44] -#define SWIGTYPE_p_XmpData_iterator swig_types[45] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[46] -#define SWIGTYPE_p_allocator_type swig_types[47] -#define SWIGTYPE_p_char swig_types[48] -#define SWIGTYPE_p_const_iterator swig_types[49] -#define SWIGTYPE_p_difference_type swig_types[50] -#define SWIGTYPE_p_first_type swig_types[51] -#define SWIGTYPE_p_int swig_types[52] -#define SWIGTYPE_p_iterator swig_types[53] -#define SWIGTYPE_p_key_type swig_types[54] -#define SWIGTYPE_p_long_long swig_types[55] -#define SWIGTYPE_p_mapped_type swig_types[56] -#define SWIGTYPE_p_second_type swig_types[57] -#define SWIGTYPE_p_short swig_types[58] -#define SWIGTYPE_p_signed_char swig_types[59] -#define SWIGTYPE_p_size_type swig_types[60] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[61] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[62] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[63] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[65] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] -#define SWIGTYPE_p_unsigned_char swig_types[67] -#define SWIGTYPE_p_unsigned_int swig_types[68] -#define SWIGTYPE_p_unsigned_long_long swig_types[69] -#define SWIGTYPE_p_unsigned_short swig_types[70] -#define SWIGTYPE_p_value_type swig_types[71] -static swig_type_info *swig_types[73]; -static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__CurlIo swig_types[5] +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[6] +#define SWIGTYPE_p_Exiv2__DataSet swig_types[7] +#define SWIGTYPE_p_Exiv2__DataValue swig_types[8] +#define SWIGTYPE_p_Exiv2__DateValue swig_types[9] +#define SWIGTYPE_p_Exiv2__ExifKey swig_types[10] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[11] +#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[13] +#define SWIGTYPE_p_Exiv2__Image swig_types[14] +#define SWIGTYPE_p_Exiv2__IptcKey swig_types[15] +#define SWIGTYPE_p_Exiv2__Key swig_types[16] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[17] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[18] +#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[19] +#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[20] +#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[21] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[23] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[24] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[25] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[26] +#define SWIGTYPE_p_Exiv2__Value swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[35] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] +#define SWIGTYPE_p_IptcData_iterator swig_types[42] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] +#define SWIGTYPE_p_SwigPyObject swig_types[44] +#define SWIGTYPE_p_ValueType swig_types[45] +#define SWIGTYPE_p_XmpData_iterator swig_types[46] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] +#define SWIGTYPE_p_allocator_type swig_types[48] +#define SWIGTYPE_p_char swig_types[49] +#define SWIGTYPE_p_const_iterator swig_types[50] +#define SWIGTYPE_p_difference_type swig_types[51] +#define SWIGTYPE_p_first_type swig_types[52] +#define SWIGTYPE_p_int swig_types[53] +#define SWIGTYPE_p_iterator swig_types[54] +#define SWIGTYPE_p_key_type swig_types[55] +#define SWIGTYPE_p_long_long swig_types[56] +#define SWIGTYPE_p_mapped_type swig_types[57] +#define SWIGTYPE_p_second_type swig_types[58] +#define SWIGTYPE_p_short swig_types[59] +#define SWIGTYPE_p_signed_char swig_types[60] +#define SWIGTYPE_p_size_type swig_types[61] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[66] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[67] +#define SWIGTYPE_p_unsigned_char swig_types[68] +#define SWIGTYPE_p_unsigned_int swig_types[69] +#define SWIGTYPE_p_unsigned_long_long swig_types[70] +#define SWIGTYPE_p_unsigned_short swig_types[71] +#define SWIGTYPE_p_value_type swig_types[72] +static swig_type_info *swig_types[74]; +static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4199,6 +4200,19 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" +#ifndef EXV_USE_CURL +namespace Exiv2 { + class CurlIo : public RemoteIo { + public: + CurlIo(const std::string& url, size_t blockSize=0) { + throw std::runtime_error( + "CurlIo not enabled in linked libexiv2"); + }; + }; +} +#endif + + #include @@ -7432,6 +7446,9 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewManager_clientdata = {0 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -7459,6 +7476,9 @@ static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newme static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); } +static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } @@ -7542,6 +7562,7 @@ static swig_type_info _swigt__p_ExifData_iterator_base = {"_p_ExifData_iterator_ static swig_type_info _swigt__p_Exiv2__AsciiValue = {"_p_Exiv2__AsciiValue", "Exiv2::AsciiValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__CommentValue = {"_p_Exiv2__CommentValue", "Exiv2::CommentValue *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataSet = {"_p_Exiv2__DataSet", "Exiv2::DataSet *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; @@ -7616,6 +7637,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__AsciiValue, &_swigt__p_Exiv2__BasicIo, &_swigt__p_Exiv2__CommentValue, + &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__DataSet, &_swigt__p_Exiv2__DataValue, @@ -7688,8 +7710,9 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_ExifData_iterator[] = { {&_swigt__p_ExifData_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ExifData_iterator_base[] = { {&_swigt__p_ExifData_iterator_base, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__AsciiValue[] = { {&_swigt__p_Exiv2__AsciiValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__CommentValue[] = { {&_swigt__p_Exiv2__CommentValue, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataSet[] = { {&_swigt__p_Exiv2__DataSet, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -7706,7 +7729,7 @@ static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, static swig_cast_info _swigc__p_Exiv2__PreviewImage[] = { {&_swigt__p_Exiv2__PreviewImage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewManager[] = { {&_swigt__p_Exiv2__PreviewManager, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewProperties[] = { {&_swigt__p_Exiv2__PreviewProperties, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValueBase[] = { {&_swigt__p_Exiv2__StringValueBase, 0, 0, 0}, {&_swigt__p_Exiv2__AsciiValue, _p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__CommentValue, _p_Exiv2__CommentValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__StringValue, _p_Exiv2__StringValueTo_p_Exiv2__StringValueBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__TagInfo[] = { {&_swigt__p_Exiv2__TagInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -7764,6 +7787,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__AsciiValue, _swigc__p_Exiv2__BasicIo, _swigc__p_Exiv2__CommentValue, + _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__DataSet, _swigc__p_Exiv2__DataValue, diff --git a/src/swig-0_27_7/version_wrap.cxx b/src/swig-0_27_7/version_wrap.cxx index 9078c28..3b0d067 100644 --- a/src/swig-0_27_7/version_wrap.cxx +++ b/src/swig-0_27_7/version_wrap.cxx @@ -4263,6 +4263,7 @@ static PyObject* versionInfo() { bool video = false; bool unicode = false; bool webready = false; + bool curl = false; #ifdef EXV_ENABLE_NLS nls = true; #endif @@ -4275,13 +4276,17 @@ static PyObject* versionInfo() { #ifdef EXV_ENABLE_WEBREADY webready = true; #endif - return Py_BuildValue("{ss,sN,sN,sN,sN,sN}", +#ifdef EXV_USE_CURL + curl = true; +#endif + return Py_BuildValue("{ss,sN,sN,sN,sN,sN,sN}", "version", Exiv2::version(), "EXV_ENABLE_NLS", PyBool_FromLong(nls), "EXV_ENABLE_BMFF", PyBool_FromLong(bmff), "EXV_ENABLE_VIDEO", PyBool_FromLong(video), "EXV_UNICODE_PATH", PyBool_FromLong(unicode), - "EXV_ENABLE_WEBREADY", PyBool_FromLong(webready)); + "EXV_ENABLE_WEBREADY", PyBool_FromLong(webready), + "EXV_USE_CURL", PyBool_FromLong(curl)); }; diff --git a/src/swig-0_28_2/basicio_wrap.cxx b/src/swig-0_28_2/basicio_wrap.cxx index 92e41ce..8ef1228 100644 --- a/src/swig-0_28_2/basicio_wrap.cxx +++ b/src/swig-0_28_2/basicio_wrap.cxx @@ -3927,28 +3927,29 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_ErrorCode swig_types[0] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[1] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[2] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[3] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[4] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[5] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[6] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[7] -#define SWIGTYPE_p_SwigPyObject swig_types[8] -#define SWIGTYPE_p_char swig_types[9] -#define SWIGTYPE_p_first_type swig_types[10] -#define SWIGTYPE_p_int swig_types[11] -#define SWIGTYPE_p_long_long swig_types[12] -#define SWIGTYPE_p_second_type swig_types[13] -#define SWIGTYPE_p_short swig_types[14] -#define SWIGTYPE_p_signed_char swig_types[15] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[16] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[17] -#define SWIGTYPE_p_unsigned_char swig_types[18] -#define SWIGTYPE_p_unsigned_int swig_types[19] -#define SWIGTYPE_p_unsigned_long_long swig_types[20] -#define SWIGTYPE_p_unsigned_short swig_types[21] -static swig_type_info *swig_types[23]; -static swig_module_info swig_module = {swig_types, 22, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__CurlIo swig_types[2] +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[3] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[4] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[5] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[6] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[7] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[8] +#define SWIGTYPE_p_SwigPyObject swig_types[9] +#define SWIGTYPE_p_char swig_types[10] +#define SWIGTYPE_p_first_type swig_types[11] +#define SWIGTYPE_p_int swig_types[12] +#define SWIGTYPE_p_long_long swig_types[13] +#define SWIGTYPE_p_second_type swig_types[14] +#define SWIGTYPE_p_short swig_types[15] +#define SWIGTYPE_p_signed_char swig_types[16] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[17] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[18] +#define SWIGTYPE_p_unsigned_char swig_types[19] +#define SWIGTYPE_p_unsigned_int swig_types[20] +#define SWIGTYPE_p_unsigned_long_long swig_types[21] +#define SWIGTYPE_p_unsigned_short swig_types[22] +static swig_type_info *swig_types[24]; +static swig_module_info swig_module = {swig_types, 23, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4147,6 +4148,19 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" +#ifndef EXV_USE_CURL +namespace Exiv2 { + class CurlIo : public RemoteIo { + public: + CurlIo(const std::string& url, size_t blockSize=0) { + throw std::runtime_error( + "CurlIo not enabled in linked libexiv2"); + }; + }; +} +#endif + + #include @@ -8814,195 +8828,930 @@ SWIGINTERN PyObject *_wrap_delete_HttpIo(PyObject *self, PyObject *args) { SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_HttpIo) /* defines _wrap_delete_HttpIo_destructor_closure */ -static PyMethodDef SwigMethods[] = { - { "_enum_list_Position", _wrap__enum_list_Position, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } -}; +SWIGINTERN int _wrap_new_CurlIo__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + size_t arg2 ; + int res1 = SWIG_OLDOBJ ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + Exiv2::CurlIo *result = 0 ; + + if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; + if (!PyArg_UnpackTuple(args, "new_CurlIo", 2, 2, &obj1, &obj2)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_size_t(obj2, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CurlIo" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + { +#ifdef _WIN32 + if (utf8_to_wcp(arg1, true) < 0) { + SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); + } +#endif + } + { + try { + result = (Exiv2::CurlIo *)new Exiv2::CurlIo((std::string const &)*arg1,arg2); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__CurlIo, SWIG_BUILTIN_INIT | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj == Py_None ? -1 : 0; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return -1; +} -static SwigPyGetSet BasicIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__BasicIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"", &BasicIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__BasicIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); +SWIGINTERN int _wrap_new_CurlIo__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = SWIG_OLDOBJ ; + PyObject * obj1 = 0 ; + Exiv2::CurlIo *result = 0 ; + + if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; + if (!PyArg_UnpackTuple(args, "new_CurlIo", 1, 1, &obj1)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_AsPtr_std_string(obj1, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); } + arg1 = ptr; } - Py_DECREF(tuple); - return result; + { +#ifdef _WIN32 + if (utf8_to_wcp(arg1, true) < 0) { + SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); + } +#endif + } + { + try { + result = (Exiv2::CurlIo *)new Exiv2::CurlIo((std::string const &)*arg1); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__CurlIo, SWIG_BUILTIN_INIT | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj == Py_None ? -1 : 0; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return -1; } -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { - { "open", _wrap_BasicIo_open, METH_VARARGS, "\n" - "Open the IO source using the default access mode. The\n" - " default mode should allow for reading and writing.\n" - "\n" - "This method can also be used to \"reopen\" an IO source which will\n" - "flush any unwritten data and reset the IO position to the start.\n" - "Subclasses may provide custom methods to allow for\n" - "opening IO sources differently.\n" - "\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "close", _wrap_BasicIo_close, METH_VARARGS, "\n" - "Close the IO source. After closing a BasicIo instance can not\n" - " be read or written. Closing flushes any unwritten data. It is\n" - " safe to call close on a closed instance.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "write", _wrap_BasicIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Write data to the IO source. Current IO position is advanced\n" - " by the number of bytes written.\n" - ":type data: :py:term:`bytes-like object`\n" - ":param data: Pointer to data. Data must be at least *wcount*\n" - " bytes long\n" - ":type wcount: int\n" - ":param wcount: Number of bytes to be written.\n" - ":rtype: int\n" - ":return: Number of bytes written to IO source successfully;\n" - "\n" - " 0 if failure;\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to\n" - " the IO source. Current IO position is advanced by the number\n" - " of bytes written.\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: Number of bytes written to IO source successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "putb", _wrap_BasicIo_putb, METH_VARARGS, "\n" - "Write one byte to the IO source. Current IO position is\n" - " advanced by one byte.\n" - ":type data: int\n" - ":param data: The single byte to be written.\n" - ":rtype: int\n" - ":return: The value of the byte written if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "read", _wrap_BasicIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the IO source. Reading starts at the current\n" - " IO position and the position is advanced by the number of bytes\n" - " read.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the IO source. Reading starts at the current\n" - " IO position and the position is advanced by the number of bytes\n" - " read.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from IO source successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "readOrThrow", _wrap_BasicIo_readOrThrow, METH_VARARGS, "\n" - "Safe version of `read()` that checks for errors and throws\n" - " an exception if the read was unsuccessful.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":type err: ErrorCode, optional\n" - ":param err: Error code to use if an exception is thrown.\n" - "" }, - { "getb", _wrap_BasicIo_getb, METH_VARARGS, "\n" - "Read one byte from the IO source. Current IO position is\n" - " advanced by one byte.\n" - ":rtype: int\n" - ":return: The byte read from the IO source if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_BasicIo_transfer, METH_VARARGS, "\n" - "Remove all data from this object's IO source and then transfer\n" - " data from the *src* BasicIo object into this object.\n" - "\n" - "The source object is invalidated by this operation and should not be\n" - "used after this method returns. This method exists primarily to\n" - "be used with the BasicIo::temporary() method.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "" }, - { "seek", _wrap_BasicIo_seek, METH_VARARGS, "\n" - "Move the current IO position.\n" - ":type offset: int\n" - ":param offset: Number of bytes to move the position relative\n" - " to the starting position specified by *pos*\n" - ":type pos: :py:class:`BasicIo.Position`\n" - ":param pos: Position from which the seek should start\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "seekOrThrow", _wrap_BasicIo_seekOrThrow, METH_VARARGS, "\n" - "Safe version of `seek()` that checks for errors and throws\n" - " an exception if the seek was unsuccessful.\n" - ":type offset: int\n" - ":param offset: Number of bytes to move the position relative\n" - " to the starting position specified by *pos*\n" - ":type pos: :py:class:`BasicIo.Position`\n" - ":param pos: Position from which the seek should start\n" + +SWIGINTERN int _wrap_new_CurlIo(PyObject *self, PyObject *args, PyObject *kwargs) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + Py_ssize_t ii; + + (void)self; + if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < 2) && (ii < argc); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int retval = _wrap_new_CurlIo__SWIG_1(self, args, NULL); + if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; + SWIG_fail; + } + if (argc == 2) { + int retval = _wrap_new_CurlIo__SWIG_0(self, args, NULL); + if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; + SWIG_fail; + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CurlIo'.\n" + " Possible C/C++ prototypes are:\n" + " Exiv2::CurlIo::CurlIo(std::string const &,size_t)\n" + " Exiv2::CurlIo::CurlIo(std::string const &)\n"); + return -1; +} + + +SWIGINTERN PyObject *_wrap_CurlIo_write__SWIG_0(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; + Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; + size_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *_global_view = NULL ; + PyObject * obj1 = 0 ; + size_t result; + + if (!PyArg_UnpackTuple(args, "CurlIo_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlIo_write" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); + } + arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); + { + _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); + if (!_global_view) { + PyErr_Clear(); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "CurlIo_write" "', argument " "2"" of type '" "bytes-like object""'") + ; + } + Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); + arg2 = (Exiv2::byte *) buff->buf; + arg3 = (size_t) buff->len; + } + { + try { + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (arg1)->write((Exiv2::byte const *)arg2,arg3); + SWIG_PYTHON_THREAD_END_ALLOW; + } + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + + Py_XDECREF(_global_view); + + return resultobj; +fail: + + Py_XDECREF(_global_view); + + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurlIo_write__SWIG_1(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; + Exiv2::BasicIo *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj1 = 0 ; + size_t result; + + if (!PyArg_UnpackTuple(args, "CurlIo_write", 1, 1, &obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlIo_write" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); + } + arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurlIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurlIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); + } + arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); + { + try { + { + SWIG_PYTHON_THREAD_BEGIN_ALLOW; + result = (arg1)->write(*arg2); + SWIG_PYTHON_THREAD_END_ALLOW; + } + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurlIo_write(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + Py_ssize_t ii; + + (void)self; + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + argv[0] = self; + for (ii = 0; (ii < 1) && (ii < argc); ii++) { + argv[ii + 1] = PyTuple_GET_ITEM(args,ii); + } + argc++; + if (argc == 2) { + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + return _wrap_CurlIo_write__SWIG_1(self, args); + } +check_1: + + if (argc == 2) { + PyObject *retobj = _wrap_CurlIo_write__SWIG_0(self, args); + if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; + SWIG_fail; + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CurlIo_write'.\n" + " Possible C/C++ prototypes are:\n" + " Exiv2::CurlIo::write(Exiv2::byte const *,size_t)\n" + " Exiv2::CurlIo::write(Exiv2::BasicIo &)\n"); + return 0; +} + + +SWIGINTERN PyObject *_wrap_delete_CurlIo(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_CurlIo takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CurlIo" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); + } + arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); + { + try { + delete arg1; + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CurlIo) /* defines _wrap_delete_CurlIo_destructor_closure */ + +static PyMethodDef SwigMethods[] = { + { "_enum_list_Position", _wrap__enum_list_Position, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; + +static SwigPyGetSet BasicIo___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__BasicIo_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"", &BasicIo___dict___getset }, + { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ +}; + +SWIGINTERN PyObject * +SwigPyBuiltin__Exiv2__BasicIo_richcompare(PyObject *self, PyObject *other, int op) { + PyObject *result = NULL; + PyObject *tuple = PyTuple_New(1); + assert(tuple); + PyTuple_SET_ITEM(tuple, 0, other); + Py_XINCREF(other); + if (!result && !PyErr_Occurred()) { + if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { + result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); + } else { + result = Py_NotImplemented; + Py_INCREF(result); + } + } + Py_DECREF(tuple); + return result; +} + +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { + { "open", _wrap_BasicIo_open, METH_VARARGS, "\n" + "Open the IO source using the default access mode. The\n" + " default mode should allow for reading and writing.\n" + "\n" + "This method can also be used to \"reopen\" an IO source which will\n" + "flush any unwritten data and reset the IO position to the start.\n" + "Subclasses may provide custom methods to allow for\n" + "opening IO sources differently.\n" + "\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure.\n" + "" }, + { "close", _wrap_BasicIo_close, METH_VARARGS, "\n" + "Close the IO source. After closing a BasicIo instance can not\n" + " be read or written. Closing flushes any unwritten data. It is\n" + " safe to call close on a closed instance.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure.\n" + "" }, + { "write", _wrap_BasicIo_write, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Write data to the IO source. Current IO position is advanced\n" + " by the number of bytes written.\n" + ":type data: :py:term:`bytes-like object`\n" + ":param data: Pointer to data. Data must be at least *wcount*\n" + " bytes long\n" + ":type wcount: int\n" + ":param wcount: Number of bytes to be written.\n" + ":rtype: int\n" + ":return: Number of bytes written to IO source successfully;\n" + "\n" + " 0 if failure;\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Write data that is read from another BasicIo instance to\n" + " the IO source. Current IO position is advanced by the number\n" + " of bytes written.\n" + ":type src: :py:class:`BasicIo`\n" + ":param src: Reference to another BasicIo instance. Reading start\n" + " at the source's current IO position\n" + ":rtype: int\n" + ":return: Number of bytes written to IO source successfully;\n" + "\n" + " 0 if failure;\n" + "" }, + { "putb", _wrap_BasicIo_putb, METH_VARARGS, "\n" + "Write one byte to the IO source. Current IO position is\n" + " advanced by one byte.\n" + ":type data: int\n" + ":param data: The single byte to be written.\n" + ":rtype: int\n" + ":return: The value of the byte written if successful;\n" + "\n" + " EOF if failure;\n" + "" }, + { "read", _wrap_BasicIo_read, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Read data from the IO source. Reading starts at the current\n" + " IO position and the position is advanced by the number of bytes\n" + " read.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":rtype: :py:class:`DataBuf`\n" + ":return: DataBuf instance containing the bytes read. Use the\n" + " DataBuf::size_ member to find the number of bytes read.\n" + " DataBuf::size_ will be 0 on failure.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Read data from the IO source. Reading starts at the current\n" + " IO position and the position is advanced by the number of bytes\n" + " read.\n" + ":type buf: writeable :py:term:`bytes-like object`\n" + ":param buf: Pointer to a block of memory into which the read data\n" + " is stored. The memory block must be at least *rcount* bytes\n" + " long.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":rtype: int\n" + ":return: Number of bytes read from IO source successfully;\n" + "\n" + " 0 if failure;\n" + "" }, + { "readOrThrow", _wrap_BasicIo_readOrThrow, METH_VARARGS, "\n" + "Safe version of `read()` that checks for errors and throws\n" + " an exception if the read was unsuccessful.\n" + ":type buf: writeable :py:term:`bytes-like object`\n" + ":param buf: Pointer to a block of memory into which the read data\n" + " is stored. The memory block must be at least *rcount* bytes\n" + " long.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":type err: ErrorCode, optional\n" + ":param err: Error code to use if an exception is thrown.\n" + "" }, + { "getb", _wrap_BasicIo_getb, METH_VARARGS, "\n" + "Read one byte from the IO source. Current IO position is\n" + " advanced by one byte.\n" + ":rtype: int\n" + ":return: The byte read from the IO source if successful;\n" + "\n" + " EOF if failure;\n" + "" }, + { "transfer", _wrap_BasicIo_transfer, METH_VARARGS, "\n" + "Remove all data from this object's IO source and then transfer\n" + " data from the *src* BasicIo object into this object.\n" + "\n" + "The source object is invalidated by this operation and should not be\n" + "used after this method returns. This method exists primarily to\n" + "be used with the BasicIo::temporary() method.\n" + "\n" + ":type src: :py:class:`BasicIo`\n" + ":param src: Reference to another BasicIo instance. The entire contents\n" + " of src are transferred to this object. The *src* object is\n" + " invalidated by the method.\n" + ":raises: Error In case of failure\n" + "" }, + { "seek", _wrap_BasicIo_seek, METH_VARARGS, "\n" + "Move the current IO position.\n" + ":type offset: int\n" + ":param offset: Number of bytes to move the position relative\n" + " to the starting position specified by *pos*\n" + ":type pos: :py:class:`BasicIo.Position`\n" + ":param pos: Position from which the seek should start\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure;\n" + "" }, + { "seekOrThrow", _wrap_BasicIo_seekOrThrow, METH_VARARGS, "\n" + "Safe version of `seek()` that checks for errors and throws\n" + " an exception if the seek was unsuccessful.\n" + ":type offset: int\n" + ":param offset: Number of bytes to move the position relative\n" + " to the starting position specified by *pos*\n" + ":type pos: :py:class:`BasicIo.Position`\n" + ":param pos: Position from which the seek should start\n" ":type err: ErrorCode\n" ":param err: Error code to use if an exception is thrown.\n" "" }, - { "mmap", _wrap_BasicIo_mmap, METH_VARARGS, "\n" - "Direct access to the IO data. For files, this is done by\n" - " mapping the file into the process's address space; for memory\n" - " blocks, this allows direct access to the memory block.\n" + { "mmap", _wrap_BasicIo_mmap, METH_VARARGS, "\n" + "Direct access to the IO data. For files, this is done by\n" + " mapping the file into the process's address space; for memory\n" + " blocks, this allows direct access to the memory block.\n" + ":type isWriteable: bool, optional\n" + ":param isWriteable: Set to true if the mapped area should be writeable\n" + " (default is false).\n" + ":rtype: memoryview\n" + ":return: A pointer to the mapped area.\n" + ":raises: Error In case of failure.\n" + "" }, + { "munmap", _wrap_BasicIo_munmap, METH_VARARGS, "\n" + "Remove a mapping established with mmap(). If the mapped area\n" + " is writeable, this ensures that changes are written back.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure;\n" + "" }, + { "tell", _wrap_BasicIo_tell, METH_VARARGS, "\n" + "Get the current IO position.\n" + ":rtype: int\n" + ":return: Offset from the start of IO\n" + "" }, + { "size", _wrap_BasicIo_size, METH_VARARGS, "\n" + "Get the current size of the IO source in bytes.\n" + ":rtype: int\n" + ":return: Size of the IO source in bytes;\n" + "\n" + " -1 if failure;\n" + "" }, + { "isopen", _wrap_BasicIo_isopen, METH_VARARGS, " Returns true if the IO source is open, otherwise false." }, + { "error", _wrap_BasicIo_error, METH_VARARGS, " Returns 0 if the IO source is in a valid state, otherwise nonzero." }, + { "eof", _wrap_BasicIo_eof, METH_VARARGS, " Returns true if the IO position has reached the end, otherwise false." }, + { "path", _wrap_BasicIo_path, METH_VARARGS, "\n" + "Return the path to the IO resource. Often used to form\n" + " comprehensive error messages where only a BasicIo instance is\n" + " available.\n" + "" }, + { NULL, NULL, 0, NULL } /* Sentinel */ +}; + +static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { + { +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + "exiv2.basicio.BasicIo", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + SwigPyBuiltin_BadDealloc, /* tp_dealloc */ +#if PY_VERSION_HEX < 0x030800b4 + (printfunc) 0, /* tp_print */ +#else + (Py_ssize_t) 0, /* tp_vectorcall_offset */ +#endif + (getattrfunc) 0, /* tp_getattr */ + (setattrfunc) 0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_compare */ +#else + (cmpfunc) 0, /* tp_compare */ +#endif + (reprfunc) 0, /* tp_repr */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping, /* tp_as_mapping */ + SwigPyObject_hash, /* tp_hash */ + (ternaryfunc) 0, /* tp_call */ + (reprfunc) 0, /* tp_str */ + (getattrofunc) 0, /* tp_getattro */ + (setattrofunc) 0, /* tp_setattro */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_buffer, /* tp_as_buffer */ +#if PY_VERSION_HEX >= 0x03000000 + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ +#else + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ +#endif + "\n" + "An interface for simple binary IO.\n" + "\n" + "Designed to have semantics and names similar to those of C style FILE*\n" + "operations. Subclasses should all behave the same so that they can be\n" + "interchanged.\n" + "",/* tp_doc */ + (traverseproc) 0, /* tp_traverse */ + (inquiry) 0, /* tp_clear */ + SwigPyBuiltin__Exiv2__BasicIo_richcompare,/* tp_richcompare */ + 0, /* tp_weaklistoffset */ + (getiterfunc) 0, /* tp_iter */ + (iternextfunc) 0, /* tp_iternext */ + SwigPyBuiltin__Exiv2__BasicIo_methods, /* tp_methods */ + 0, /* tp_members */ + SwigPyBuiltin__Exiv2__BasicIo_getset, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + (descrgetfunc) 0, /* tp_descr_get */ + (descrsetfunc) 0, /* tp_descr_set */ + offsetof(SwigPyObject, dict), /* tp_dictoffset */ + SwigPyBuiltin_BadInit, /* tp_init */ + (allocfunc) 0, /* tp_alloc */ + (newfunc) 0, /* tp_new */ + (freefunc) 0, /* tp_free */ + (inquiry) 0, /* tp_is_gc */ + (PyObject *) 0, /* tp_bases */ + (PyObject *) 0, /* tp_mro */ + (PyObject *) 0, /* tp_cache */ + (PyObject *) 0, /* tp_subclasses */ + (PyObject *) 0, /* tp_weaklist */ + (destructor) 0, /* tp_del */ + (int) 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x03040000 + (destructor) 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x03080000 + (vectorcallfunc) 0, /* tp_vectorcall */ +#endif +#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) + 0, /* tp_print */ +#endif +#if PY_VERSION_HEX >= 0x030c0000 + (char) 0, /* tp_watched */ +#endif +#ifdef COUNT_ALLOCS + (Py_ssize_t) 0, /* tp_allocs */ + (Py_ssize_t) 0, /* tp_frees */ + (Py_ssize_t) 0, /* tp_maxalloc */ + 0, /* tp_prev */ + 0, /* tp_next */ +#endif + }, +#if PY_VERSION_HEX >= 0x03050000 + { + (unaryfunc) 0, /* am_await */ + (unaryfunc) 0, /* am_aiter */ + (unaryfunc) 0, /* am_anext */ +# if PY_VERSION_HEX >= 0x030a0000 + (sendfunc) 0, /* am_send */ +# endif + }, +#endif + { + (binaryfunc) 0, /* nb_add */ + (binaryfunc) 0, /* nb_subtract */ + (binaryfunc) 0, /* nb_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_divide */ +#endif + (binaryfunc) 0, /* nb_remainder */ + (binaryfunc) 0, /* nb_divmod */ + (ternaryfunc) 0, /* nb_power */ + (unaryfunc) 0, /* nb_negative */ + (unaryfunc) 0, /* nb_positive */ + (unaryfunc) 0, /* nb_absolute */ + (inquiry) 0, /* nb_nonzero */ + (unaryfunc) 0, /* nb_invert */ + (binaryfunc) 0, /* nb_lshift */ + (binaryfunc) 0, /* nb_rshift */ + (binaryfunc) 0, /* nb_and */ + (binaryfunc) 0, /* nb_xor */ + (binaryfunc) 0, /* nb_or */ +#if PY_VERSION_HEX < 0x03000000 + (coercion) 0, /* nb_coerce */ +#endif + (unaryfunc) 0, /* nb_int */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* nb_reserved */ +#else + (unaryfunc) 0, /* nb_long */ +#endif + (unaryfunc) 0, /* nb_float */ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc) 0, /* nb_oct */ + (unaryfunc) 0, /* nb_hex */ +#endif + (binaryfunc) 0, /* nb_inplace_add */ + (binaryfunc) 0, /* nb_inplace_subtract */ + (binaryfunc) 0, /* nb_inplace_multiply */ +#if PY_VERSION_HEX < 0x03000000 + (binaryfunc) 0, /* nb_inplace_divide */ +#endif + (binaryfunc) 0, /* nb_inplace_remainder */ + (ternaryfunc) 0, /* nb_inplace_power */ + (binaryfunc) 0, /* nb_inplace_lshift */ + (binaryfunc) 0, /* nb_inplace_rshift */ + (binaryfunc) 0, /* nb_inplace_and */ + (binaryfunc) 0, /* nb_inplace_xor */ + (binaryfunc) 0, /* nb_inplace_or */ + (binaryfunc) 0, /* nb_floor_divide */ + (binaryfunc) 0, /* nb_true_divide */ + (binaryfunc) 0, /* nb_inplace_floor_divide */ + (binaryfunc) 0, /* nb_inplace_true_divide */ + (unaryfunc) 0, /* nb_index */ +#if PY_VERSION_HEX >= 0x03050000 + (binaryfunc) 0, /* nb_matrix_multiply */ + (binaryfunc) 0, /* nb_inplace_matrix_multiply */ +#endif + }, + { + (lenfunc) 0, /* mp_length */ + (binaryfunc) 0, /* mp_subscript */ + (objobjargproc) 0, /* mp_ass_subscript */ + }, + { + (lenfunc) 0, /* sq_length */ + (binaryfunc) 0, /* sq_concat */ + (ssizeargfunc) 0, /* sq_repeat */ + (ssizeargfunc) 0, /* sq_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* was_sq_slice */ +#else + (ssizessizeargfunc) 0, /* sq_slice */ +#endif + (ssizeobjargproc) 0, /* sq_ass_item */ +#if PY_VERSION_HEX >= 0x03000000 + (void *) 0, /* was_sq_ass_slice */ +#else + (ssizessizeobjargproc) 0, /* sq_ass_slice */ +#endif + (objobjproc) 0, /* sq_contains */ + (binaryfunc) 0, /* sq_inplace_concat */ + (ssizeargfunc) 0, /* sq_inplace_repeat */ + }, + { +#if PY_VERSION_HEX < 0x03000000 + (readbufferproc) 0, /* bf_getreadbuffer */ + (writebufferproc) 0, /* bf_getwritebuffer */ + (segcountproc) 0, /* bf_getsegcount */ + (charbufferproc) 0, /* bf_getcharbuffer */ +#endif + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ + }, + (PyObject *) 0, /* ht_name */ + (PyObject *) 0, /* ht_slots */ +#if PY_VERSION_HEX >= 0x03030000 + (PyObject *) 0, /* ht_qualname */ + 0, /* ht_cached_keys */ +#endif +#if PY_VERSION_HEX >= 0x03090000 + (PyObject *) 0, /* ht_module */ +#endif +#if PY_VERSION_HEX >= 0x030b0000 + (char *) 0, /* _ht_tpname */ + { + (PyObject *) 0, /* getitem */ +#if PY_VERSION_HEX >= 0x030c0000 + (uint32_t) 0, /* getitem_version */ +#endif + } +#endif +}; + +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__BasicIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type}; + +static SwigPyGetSet FileIo___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__FileIo_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" + "Constructor that accepts the file path on which IO will be\n" + " performed. The constructor does not open the file, and\n" + " therefore never fails.\n" + ":type path: str\n" + ":param path: The full path of a file\n" + "", &FileIo___dict___getset }, + { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ +}; + +SWIGINTERN PyObject * +SwigPyBuiltin__Exiv2__FileIo_richcompare(PyObject *self, PyObject *other, int op) { + PyObject *result = NULL; + PyObject *tuple = PyTuple_New(1); + assert(tuple); + PyTuple_SET_ITEM(tuple, 0, other); + Py_XINCREF(other); + if (!result && !PyErr_Occurred()) { + if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { + result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); + } else { + result = Py_NotImplemented; + Py_INCREF(result); + } + } + Py_DECREF(tuple); + return result; +} + +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__FileIo_methods[] = { + { "open", _wrap_FileIo_open, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Open the file using the specified mode.\n" + "\n" + "This method can also be used to \"reopen\" a file which will flush any\n" + "unwritten data and reset the IO position to the start. Although\n" + "files can be opened in binary or text mode, this class has\n" + "only been tested carefully in binary mode.\n" + "\n" + ":type mode: str\n" + ":param mode: Specified that type of access allowed on the file.\n" + " Valid values match those of the C fopen command exactly.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Open the file using the default access mode of \"rb\".\n" + " This method can also be used to \"reopen\" a file which will flush\n" + " any unwritten data and reset the IO position to the start.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure.\n" + "" }, + { "close", _wrap_FileIo_close, METH_VARARGS, "\n" + "Flush and unwritten data and close the file . It is\n" + " safe to call close on an already closed instance.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure;\n" + "" }, + { "write", _wrap_FileIo_write, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Write data to the file. The file position is advanced\n" + " by the number of bytes written.\n" + ":type data: :py:term:`bytes-like object`\n" + ":param data: Pointer to data. Data must be at least *wcount*\n" + " bytes long\n" + ":type wcount: int\n" + ":param wcount: Number of bytes to be written.\n" + ":rtype: int\n" + ":return: Number of bytes written to the file successfully;\n" + "\n" + " 0 if failure;\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Write data that is read from another BasicIo instance to\n" + " the file. The file position is advanced by the number\n" + " of bytes written.\n" + ":type src: :py:class:`BasicIo`\n" + ":param src: Reference to another BasicIo instance. Reading start\n" + " at the source's current IO position\n" + ":rtype: int\n" + ":return: Number of bytes written to the file successfully;\n" + "\n" + " 0 if failure;\n" + "" }, + { "putb", _wrap_FileIo_putb, METH_VARARGS, "\n" + "Write one byte to the file. The file position is\n" + " advanced by one byte.\n" + ":type data: int\n" + ":param data: The single byte to be written.\n" + ":rtype: int\n" + ":return: The value of the byte written if successful;\n" + "\n" + " EOF if failure;\n" + "" }, + { "read", _wrap_FileIo_read, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Read data from the file. Reading starts at the current\n" + " file position and the position is advanced by the number of\n" + " bytes read.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":rtype: :py:class:`DataBuf`\n" + ":return: DataBuf instance containing the bytes read. Use the\n" + " DataBuf::size_ member to find the number of bytes read.\n" + " DataBuf::size_ will be 0 on failure.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Read data from the file. Reading starts at the current\n" + " file position and the position is advanced by the number of\n" + " bytes read.\n" + ":type buf: writeable :py:term:`bytes-like object`\n" + ":param buf: Pointer to a block of memory into which the read data\n" + " is stored. The memory block must be at least *rcount* bytes\n" + " long.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":rtype: int\n" + ":return: Number of bytes read from the file successfully;\n" + "\n" + " 0 if failure;\n" + "" }, + { "getb", _wrap_FileIo_getb, METH_VARARGS, "\n" + "Read one byte from the file. The file position is\n" + " advanced by one byte.\n" + ":rtype: int\n" + ":return: The byte read from the file if successful;\n" + "\n" + " EOF if failure;\n" + "" }, + { "transfer", _wrap_FileIo_transfer, METH_VARARGS, "\n" + "Remove the contents of the file and then transfer data from\n" + " the *src* BasicIo object into the empty file.\n" + "\n" + "This method is optimized to simply rename the source file if the\n" + "source object is another FileIo instance. The source BasicIo object\n" + "is invalidated by this operation and should not be used after this\n" + "method returns. This method exists primarily to be used with\n" + "the BasicIo::temporary() method.\n" + "\n" + "Notes: If the caller doesn't have permissions to write to the file,\n" + " an exception is raised and *src* is deleted.\n" + "\n" + ":type src: :py:class:`BasicIo`\n" + ":param src: Reference to another BasicIo instance. The entire contents\n" + " of src are transferred to this object. The *src* object is\n" + " invalidated by the method.\n" + ":raises: Error In case of failure\n" + "" }, + { "seek", _wrap_FileIo_seek, METH_VARARGS, "" }, + { "mmap", _wrap_FileIo_mmap, METH_VARARGS, "\n" + "Map the file into the process's address space. The file must be\n" + " open before mmap() is called. If the mapped area is writeable,\n" + " changes may not be written back to the underlying file until\n" + " munmap() is called. The pointer is valid only as long as the\n" + " FileIo object exists.\n" ":type isWriteable: bool, optional\n" ":param isWriteable: Set to true if the mapped area should be writeable\n" " (default is false).\n" @@ -9010,38 +9759,37 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { ":return: A pointer to the mapped area.\n" ":raises: Error In case of failure.\n" "" }, - { "munmap", _wrap_BasicIo_munmap, METH_VARARGS, "\n" - "Remove a mapping established with mmap(). If the mapped area\n" - " is writeable, this ensures that changes are written back.\n" + { "munmap", _wrap_FileIo_munmap, METH_VARARGS, "\n" + "Remove a mapping established with mmap(). If the mapped area is\n" + " writeable, this ensures that changes are written back to the\n" + " underlying file.\n" ":rtype: int\n" ":return: 0 if successful;\n" "\n" " Nonzero if failure;\n" "" }, - { "tell", _wrap_BasicIo_tell, METH_VARARGS, "\n" - "Get the current IO position.\n" + { "setPath", _wrap_FileIo_setPath, METH_VARARGS, " close the file source and set a new path." }, + { "tell", _wrap_FileIo_tell, METH_VARARGS, "\n" + "Get the current file position.\n" ":rtype: int\n" - ":return: Offset from the start of IO\n" + ":return: Offset from the start of the file\n" "" }, - { "size", _wrap_BasicIo_size, METH_VARARGS, "\n" - "Get the current size of the IO source in bytes.\n" + { "size", _wrap_FileIo_size, METH_VARARGS, "\n" + "Flush any buffered writes and get the current file size\n" + " in bytes.\n" ":rtype: int\n" - ":return: Size of the IO source in bytes;\n" + ":return: Size of the file in bytes;\n" "\n" " -1 if failure;\n" "" }, - { "isopen", _wrap_BasicIo_isopen, METH_VARARGS, " Returns true if the IO source is open, otherwise false." }, - { "error", _wrap_BasicIo_error, METH_VARARGS, " Returns 0 if the IO source is in a valid state, otherwise nonzero." }, - { "eof", _wrap_BasicIo_eof, METH_VARARGS, " Returns true if the IO position has reached the end, otherwise false." }, - { "path", _wrap_BasicIo_path, METH_VARARGS, "\n" - "Return the path to the IO resource. Often used to form\n" - " comprehensive error messages where only a BasicIo instance is\n" - " available.\n" - "" }, + { "isopen", _wrap_FileIo_isopen, METH_VARARGS, " Returns true if the file is open, otherwise false." }, + { "error", _wrap_FileIo_error, METH_VARARGS, " Returns 0 if the file is in a valid state, otherwise nonzero." }, + { "eof", _wrap_FileIo_eof, METH_VARARGS, " Returns true if the file position has reached the end, otherwise false." }, + { "path", _wrap_FileIo_path, METH_VARARGS, " Returns the path of the file" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; -static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { +static PyHeapTypeObject SwigPyBuiltin__Exiv2__FileIo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) @@ -9049,10 +9797,10 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "exiv2.basicio.BasicIo", /* tp_name */ + "exiv2.basicio.FileIo", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ + _wrap_delete_FileIo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 (printfunc) 0, /* tp_print */ #else @@ -9066,42 +9814,39 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { (cmpfunc) 0, /* tp_compare */ #endif (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping, /* tp_as_mapping */ + &SwigPyBuiltin__Exiv2__FileIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__FileIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__FileIo_type.as_mapping, /* tp_as_mapping */ SwigPyObject_hash, /* tp_hash */ (ternaryfunc) 0, /* tp_call */ (reprfunc) 0, /* tp_str */ (getattrofunc) 0, /* tp_getattro */ (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__FileIo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" - "An interface for simple binary IO.\n" - "\n" - "Designed to have semantics and names similar to those of C style FILE*\n" - "operations. Subclasses should all behave the same so that they can be\n" - "interchanged.\n" + "Provides binary file IO by implementing the BasicIo\n" + " interface.\n" "",/* tp_doc */ (traverseproc) 0, /* tp_traverse */ (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__BasicIo_richcompare,/* tp_richcompare */ + SwigPyBuiltin__Exiv2__FileIo_richcompare, /* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc) 0, /* tp_iter */ (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__BasicIo_methods, /* tp_methods */ + SwigPyBuiltin__Exiv2__FileIo_methods, /* tp_methods */ 0, /* tp_members */ - SwigPyBuiltin__Exiv2__BasicIo_getset, /* tp_getset */ + SwigPyBuiltin__Exiv2__FileIo_getset, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ (descrgetfunc) 0, /* tp_descr_get */ (descrsetfunc) 0, /* tp_descr_set */ offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ + _wrap_new_FileIo, /* tp_init */ (allocfunc) 0, /* tp_alloc */ (newfunc) 0, /* tp_new */ (freefunc) 0, /* tp_free */ @@ -9206,7 +9951,7 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ + _wrap_FileIo_size_lenfunc_closure, /* sq_length */ (binaryfunc) 0, /* sq_concat */ (ssizeargfunc) 0, /* sq_repeat */ (ssizeargfunc) 0, /* sq_item */ @@ -9232,8 +9977,8 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { (segcountproc) 0, /* bf_getsegcount */ (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + getbuffer_Exiv2_FileIo, /* bf_getbuffer */ + releasebuffer_Exiv2_FileIo, /* bf_releasebuffer */ }, (PyObject *) 0, /* ht_name */ (PyObject *) 0, /* ht_slots */ @@ -9255,22 +10000,31 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__BasicIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type}; +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__FileIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__FileIo_type}; -static SwigPyGetSet FileIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__FileIo_getset[] = { +static SwigPyGetSet MemIo___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__MemIo_getset[] = { { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "Constructor that accepts the file path on which IO will be\n" - " performed. The constructor does not open the file, and\n" - " therefore never fails.\n" - ":type path: str\n" - ":param path: The full path of a file\n" - "", &FileIo___dict___getset }, + "*Overload 1:*\n" + "Default constructor that results in an empty object\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + " Constructor that accepts a block of memory. A copy-on-write\n" + " algorithm allows read operations directly from the original data\n" + " and will create a copy of the buffer on the first write operation.\n" + " :type data: :py:term:`bytes-like object`\n" + " :param data: Pointer to data. Data must be at least *size* bytes long\n" + " :type size: int\n" + " :param size: Number of bytes to copy.\n" + "", &MemIo___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__FileIo_richcompare(PyObject *self, PyObject *other, int op) { +SwigPyBuiltin__Exiv2__MemIo_richcompare(PyObject *self, PyObject *other, int op) { PyObject *result = NULL; PyObject *tuple = PyTuple_New(1); assert(tuple); @@ -9288,49 +10042,24 @@ SwigPyBuiltin__Exiv2__FileIo_richcompare(PyObject *self, PyObject *other, int op return result; } -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__FileIo_methods[] = { - { "open", _wrap_FileIo_open, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Open the file using the specified mode.\n" - "\n" - "This method can also be used to \"reopen\" a file which will flush any\n" - "unwritten data and reset the IO position to the start. Although\n" - "files can be opened in binary or text mode, this class has\n" - "only been tested carefully in binary mode.\n" - "\n" - ":type mode: str\n" - ":param mode: Specified that type of access allowed on the file.\n" - " Valid values match those of the C fopen command exactly.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__MemIo_methods[] = { + { "open", _wrap_MemIo_open, METH_VARARGS, "\n" + "Memory IO is always open for reading and writing. This method\n" + " therefore only resets the IO position to the start.\n" "\n" - "Open the file using the default access mode of \"rb\".\n" - " This method can also be used to \"reopen\" a file which will flush\n" - " any unwritten data and reset the IO position to the start.\n" ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" + ":return: 0\n" "" }, - { "close", _wrap_FileIo_close, METH_VARARGS, "\n" - "Flush and unwritten data and close the file . It is\n" - " safe to call close on an already closed instance.\n" + { "close", _wrap_MemIo_close, METH_VARARGS, "\n" + "Does nothing on MemIo objects.\n" ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" + ":return: 0\n" "" }, - { "write", _wrap_FileIo_write, METH_VARARGS, "\n" + { "write", _wrap_MemIo_write, METH_VARARGS, "\n" "*Overload 1:*\n" "\n" - "Write data to the file. The file position is advanced\n" + "Write data to the memory block. If needed, the size of the\n" + " internal memory block is expanded. The IO position is advanced\n" " by the number of bytes written.\n" ":type data: :py:term:`bytes-like object`\n" ":param data: Pointer to data. Data must be at least *wcount*\n" @@ -9338,7 +10067,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__FileIo_methods[] = { ":type wcount: int\n" ":param wcount: Number of bytes to be written.\n" ":rtype: int\n" - ":return: Number of bytes written to the file successfully;\n" + ":return: Number of bytes written to the memory block successfully;\n" "\n" " 0 if failure;\n" "\n" @@ -9347,18 +10076,19 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__FileIo_methods[] = { "*Overload 2:*\n" "\n" "Write data that is read from another BasicIo instance to\n" - " the file. The file position is advanced by the number\n" + " the memory block. If needed, the size of the internal memory\n" + " block is expanded. The IO position is advanced by the number\n" " of bytes written.\n" ":type src: :py:class:`BasicIo`\n" ":param src: Reference to another BasicIo instance. Reading start\n" " at the source's current IO position\n" ":rtype: int\n" - ":return: Number of bytes written to the file successfully;\n" + ":return: Number of bytes written to the memory block successfully;\n" "\n" " 0 if failure;\n" "" }, - { "putb", _wrap_FileIo_putb, METH_VARARGS, "\n" - "Write one byte to the file. The file position is\n" + { "putb", _wrap_MemIo_putb, METH_VARARGS, "\n" + "Write one byte to the memory block. The IO position is\n" " advanced by one byte.\n" ":type data: int\n" ":param data: The single byte to be written.\n" @@ -9367,11 +10097,11 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__FileIo_methods[] = { "\n" " EOF if failure;\n" "" }, - { "read", _wrap_FileIo_read, METH_VARARGS, "\n" + { "read", _wrap_MemIo_read, METH_VARARGS, "\n" "*Overload 1:*\n" "\n" - "Read data from the file. Reading starts at the current\n" - " file position and the position is advanced by the number of\n" + "Read data from the memory block. Reading starts at the current\n" + " IO position and the position is advanced by the number of\n" " bytes read.\n" ":type rcount: int\n" ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" @@ -9385,8 +10115,8 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__FileIo_methods[] = { "\n" "*Overload 2:*\n" "\n" - "Read data from the file. Reading starts at the current\n" - " file position and the position is advanced by the number of\n" + "Read data from the memory block. Reading starts at the current\n" + " IO position and the position is advanced by the number of\n" " bytes read.\n" ":type buf: writeable :py:term:`bytes-like object`\n" ":param buf: Pointer to a block of memory into which the read data\n" @@ -9396,82 +10126,64 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__FileIo_methods[] = { ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" " read if *rcount* bytes are not available.\n" ":rtype: int\n" - ":return: Number of bytes read from the file successfully;\n" + ":return: Number of bytes read from the memory block successfully;\n" "\n" " 0 if failure;\n" "" }, - { "getb", _wrap_FileIo_getb, METH_VARARGS, "\n" - "Read one byte from the file. The file position is\n" + { "getb", _wrap_MemIo_getb, METH_VARARGS, "\n" + "Read one byte from the memory block. The IO position is\n" " advanced by one byte.\n" ":rtype: int\n" - ":return: The byte read from the file if successful;\n" + ":return: The byte read from the memory block if successful;\n" "\n" " EOF if failure;\n" - "" }, - { "transfer", _wrap_FileIo_transfer, METH_VARARGS, "\n" - "Remove the contents of the file and then transfer data from\n" - " the *src* BasicIo object into the empty file.\n" + "" }, + { "transfer", _wrap_MemIo_transfer, METH_VARARGS, "\n" + "Clear the memory block and then transfer data from\n" + " the *src* BasicIo object into a new block of memory.\n" "\n" - "This method is optimized to simply rename the source file if the\n" - "source object is another FileIo instance. The source BasicIo object\n" + "This method is optimized to simply swap memory block if the source\n" + "object is another MemIo instance. The source BasicIo instance\n" "is invalidated by this operation and should not be used after this\n" "method returns. This method exists primarily to be used with\n" "the BasicIo::temporary() method.\n" "\n" - "Notes: If the caller doesn't have permissions to write to the file,\n" - " an exception is raised and *src* is deleted.\n" - "\n" ":type src: :py:class:`BasicIo`\n" ":param src: Reference to another BasicIo instance. The entire contents\n" " of src are transferred to this object. The *src* object is\n" " invalidated by the method.\n" ":raises: Error In case of failure\n" "" }, - { "seek", _wrap_FileIo_seek, METH_VARARGS, "" }, - { "mmap", _wrap_FileIo_mmap, METH_VARARGS, "\n" - "Map the file into the process's address space. The file must be\n" - " open before mmap() is called. If the mapped area is writeable,\n" - " changes may not be written back to the underlying file until\n" - " munmap() is called. The pointer is valid only as long as the\n" - " FileIo object exists.\n" - ":type isWriteable: bool, optional\n" - ":param isWriteable: Set to true if the mapped area should be writeable\n" - " (default is false).\n" - ":rtype: memoryview\n" - ":return: A pointer to the mapped area.\n" - ":raises: Error In case of failure.\n" - "" }, - { "munmap", _wrap_FileIo_munmap, METH_VARARGS, "\n" - "Remove a mapping established with mmap(). If the mapped area is\n" - " writeable, this ensures that changes are written back to the\n" - " underlying file.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" + { "seek", _wrap_MemIo_seek, METH_VARARGS, "" }, + { "mmap", _wrap_MemIo_mmap, METH_VARARGS, "\n" + "Allow direct access to the underlying data buffer. The buffer\n" + " is not protected against write access in any way, the argument\n" + " is ignored.\n" + "Notes: The application must ensure that the memory pointed to by the\n" + " returned pointer remains valid and allocated as long as the\n" + " MemIo object exists.\n" "" }, - { "setPath", _wrap_FileIo_setPath, METH_VARARGS, " close the file source and set a new path." }, - { "tell", _wrap_FileIo_tell, METH_VARARGS, "\n" - "Get the current file position.\n" + { "munmap", _wrap_MemIo_munmap, METH_VARARGS, "" }, + { "tell", _wrap_MemIo_tell, METH_VARARGS, "\n" + "Get the current IO position.\n" ":rtype: int\n" - ":return: Offset from the start of the file\n" + ":return: Offset from the start of the memory block\n" "" }, - { "size", _wrap_FileIo_size, METH_VARARGS, "\n" - "Flush any buffered writes and get the current file size\n" - " in bytes.\n" + { "size", _wrap_MemIo_size, METH_VARARGS, "\n" + "Get the current memory buffer size in bytes.\n" ":rtype: int\n" - ":return: Size of the file in bytes;\n" + ":return: Size of the in memory data in bytes;\n" "\n" " -1 if failure;\n" "" }, - { "isopen", _wrap_FileIo_isopen, METH_VARARGS, " Returns true if the file is open, otherwise false." }, - { "error", _wrap_FileIo_error, METH_VARARGS, " Returns 0 if the file is in a valid state, otherwise nonzero." }, - { "eof", _wrap_FileIo_eof, METH_VARARGS, " Returns true if the file position has reached the end, otherwise false." }, - { "path", _wrap_FileIo_path, METH_VARARGS, " Returns the path of the file" }, + { "isopen", _wrap_MemIo_isopen, METH_VARARGS, " Always returns true" }, + { "error", _wrap_MemIo_error, METH_VARARGS, " Always returns 0" }, + { "eof", _wrap_MemIo_eof, METH_VARARGS, " Returns true if the IO position has reached the end, otherwise false." }, + { "path", _wrap_MemIo_path, METH_VARARGS, " Returns a dummy path, indicating that memory access is used" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; -static PyHeapTypeObject SwigPyBuiltin__Exiv2__FileIo_type = { +static PyHeapTypeObject SwigPyBuiltin__Exiv2__MemIo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) @@ -9479,10 +10191,10 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__FileIo_type = { PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "exiv2.basicio.FileIo", /* tp_name */ + "exiv2.basicio.MemIo", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ - _wrap_delete_FileIo_destructor_closure, /* tp_dealloc */ + _wrap_delete_MemIo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 (printfunc) 0, /* tp_print */ #else @@ -9496,39 +10208,47 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__FileIo_type = { (cmpfunc) 0, /* tp_compare */ #endif (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_mapping, /* tp_as_mapping */ + &SwigPyBuiltin__Exiv2__MemIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__MemIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__MemIo_type.as_mapping, /* tp_as_mapping */ SwigPyObject_hash, /* tp_hash */ (ternaryfunc) 0, /* tp_call */ (reprfunc) 0, /* tp_str */ (getattrofunc) 0, /* tp_getattro */ (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__MemIo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" - "Provides binary file IO by implementing the BasicIo\n" - " interface.\n" + "Provides binary IO on blocks of memory by implementing the BasicIo\n" + " interface. A copy-on-write implementation ensures that the data passed\n" + " in is only copied when necessary, i.e., as soon as data is written to\n" + " the MemIo. The original data is only used for reading. If writes are\n" + " performed, the changed data can be retrieved using the read methods\n" + " (since the data used in construction is never modified).\n" + "\n" + "Notes: If read only usage of this class is common, it might be worth\n" + " creating a specialized readonly class or changing this one to\n" + " have a readonly mode.\n" "",/* tp_doc */ (traverseproc) 0, /* tp_traverse */ (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__FileIo_richcompare, /* tp_richcompare */ + SwigPyBuiltin__Exiv2__MemIo_richcompare, /* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc) 0, /* tp_iter */ (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__FileIo_methods, /* tp_methods */ + SwigPyBuiltin__Exiv2__MemIo_methods, /* tp_methods */ 0, /* tp_members */ - SwigPyBuiltin__Exiv2__FileIo_getset, /* tp_getset */ + SwigPyBuiltin__Exiv2__MemIo_getset, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ (descrgetfunc) 0, /* tp_descr_get */ (descrsetfunc) 0, /* tp_descr_set */ offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_FileIo, /* tp_init */ + _wrap_new_MemIo, /* tp_init */ (allocfunc) 0, /* tp_alloc */ (newfunc) 0, /* tp_new */ (freefunc) 0, /* tp_free */ @@ -9633,7 +10353,7 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__FileIo_type = { (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_FileIo_size_lenfunc_closure, /* sq_length */ + _wrap_MemIo_size_lenfunc_closure, /* sq_length */ (binaryfunc) 0, /* sq_concat */ (ssizeargfunc) 0, /* sq_repeat */ (ssizeargfunc) 0, /* sq_item */ @@ -9659,8 +10379,8 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__FileIo_type = { (segcountproc) 0, /* bf_getsegcount */ (charbufferproc) 0, /* bf_getcharbuffer */ #endif - getbuffer_Exiv2_FileIo, /* bf_getbuffer */ - releasebuffer_Exiv2_FileIo, /* bf_releasebuffer */ + getbuffer_Exiv2_MemIo, /* bf_getbuffer */ + releasebuffer_Exiv2_MemIo, /* bf_releasebuffer */ }, (PyObject *) 0, /* ht_name */ (PyObject *) 0, /* ht_slots */ @@ -9682,31 +10402,16 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__FileIo_type = { #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__FileIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__FileIo_type}; +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__MemIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__MemIo_type}; -static SwigPyGetSet MemIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__MemIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "*Overload 1:*\n" - "Default constructor that results in an empty object\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - " Constructor that accepts a block of memory. A copy-on-write\n" - " algorithm allows read operations directly from the original data\n" - " and will create a copy of the buffer on the first write operation.\n" - " :type data: :py:term:`bytes-like object`\n" - " :param data: Pointer to data. Data must be at least *size* bytes long\n" - " :type size: int\n" - " :param size: Number of bytes to copy.\n" - "", &MemIo___dict___getset }, +static SwigPyGetSet XPathIo___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XPathIo_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Default constructor that reads data from stdin/data uri path and writes them to the temp file.", &XPathIo___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__MemIo_richcompare(PyObject *self, PyObject *other, int op) { +SwigPyBuiltin__Exiv2__XPathIo_richcompare(PyObject *self, PyObject *other, int op) { PyObject *result = NULL; PyObject *tuple = PyTuple_New(1); assert(tuple); @@ -9724,148 +10429,23 @@ SwigPyBuiltin__Exiv2__MemIo_richcompare(PyObject *self, PyObject *other, int op) return result; } -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__MemIo_methods[] = { - { "open", _wrap_MemIo_open, METH_VARARGS, "\n" - "Memory IO is always open for reading and writing. This method\n" - " therefore only resets the IO position to the start.\n" - "\n" - ":rtype: int\n" - ":return: 0\n" - "" }, - { "close", _wrap_MemIo_close, METH_VARARGS, "\n" - "Does nothing on MemIo objects.\n" - ":rtype: int\n" - ":return: 0\n" - "" }, - { "write", _wrap_MemIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Write data to the memory block. If needed, the size of the\n" - " internal memory block is expanded. The IO position is advanced\n" - " by the number of bytes written.\n" - ":type data: :py:term:`bytes-like object`\n" - ":param data: Pointer to data. Data must be at least *wcount*\n" - " bytes long\n" - ":type wcount: int\n" - ":param wcount: Number of bytes to be written.\n" - ":rtype: int\n" - ":return: Number of bytes written to the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to\n" - " the memory block. If needed, the size of the internal memory\n" - " block is expanded. The IO position is advanced by the number\n" - " of bytes written.\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: Number of bytes written to the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "putb", _wrap_MemIo_putb, METH_VARARGS, "\n" - "Write one byte to the memory block. The IO position is\n" - " advanced by one byte.\n" - ":type data: int\n" - ":param data: The single byte to be written.\n" - ":rtype: int\n" - ":return: The value of the byte written if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "read", _wrap_MemIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the memory block. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the memory block. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_MemIo_getb, METH_VARARGS, "\n" - "Read one byte from the memory block. The IO position is\n" - " advanced by one byte.\n" - ":rtype: int\n" - ":return: The byte read from the memory block if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_MemIo_transfer, METH_VARARGS, "\n" - "Clear the memory block and then transfer data from\n" - " the *src* BasicIo object into a new block of memory.\n" - "\n" - "This method is optimized to simply swap memory block if the source\n" - "object is another MemIo instance. The source BasicIo instance\n" - "is invalidated by this operation and should not be used after this\n" - "method returns. This method exists primarily to be used with\n" - "the BasicIo::temporary() method.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "" }, - { "seek", _wrap_MemIo_seek, METH_VARARGS, "" }, - { "mmap", _wrap_MemIo_mmap, METH_VARARGS, "\n" - "Allow direct access to the underlying data buffer. The buffer\n" - " is not protected against write access in any way, the argument\n" - " is ignored.\n" - "Notes: The application must ensure that the memory pointed to by the\n" - " returned pointer remains valid and allocated as long as the\n" - " MemIo object exists.\n" - "" }, - { "munmap", _wrap_MemIo_munmap, METH_VARARGS, "" }, - { "tell", _wrap_MemIo_tell, METH_VARARGS, "\n" - "Get the current IO position.\n" - ":rtype: int\n" - ":return: Offset from the start of the memory block\n" +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XPathIo_methods[] = { + { "transfer", _wrap_XPathIo_transfer, METH_VARARGS, "\n" + "Change the name of the temp file and make it untemporary before\n" + " calling the method of superclass FileIo::transfer.\n" "" }, - { "size", _wrap_MemIo_size, METH_VARARGS, "\n" - "Get the current memory buffer size in bytes.\n" - ":rtype: int\n" - ":return: Size of the in memory data in bytes;\n" - "\n" - " -1 if failure;\n" + { "writeDataToFile", (PyCFunction)(void(*)(void))_wrap_XPathIo_writeDataToFile, METH_STATIC|METH_VARARGS, "\n" + "Read the data from stdin/data uri path and write them to the file.\n" + ":type orgPath: str\n" + ":param orgPath: It equals \"-\" if the input data's from stdin. Otherwise, it's data uri path.\n" + ":rtype: str\n" + ":return: the name of the new file.\n" + ":raises: Error if it fails.\n" "" }, - { "isopen", _wrap_MemIo_isopen, METH_VARARGS, " Always returns true" }, - { "error", _wrap_MemIo_error, METH_VARARGS, " Always returns 0" }, - { "eof", _wrap_MemIo_eof, METH_VARARGS, " Returns true if the IO position has reached the end, otherwise false." }, - { "path", _wrap_MemIo_path, METH_VARARGS, " Returns a dummy path, indicating that memory access is used" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; -static PyHeapTypeObject SwigPyBuiltin__Exiv2__MemIo_type = { +static PyHeapTypeObject SwigPyBuiltin__Exiv2__XPathIo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) @@ -9873,10 +10453,10 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__MemIo_type = { PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "exiv2.basicio.MemIo", /* tp_name */ + "exiv2.basicio.XPathIo", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ - _wrap_delete_MemIo_destructor_closure, /* tp_dealloc */ + _wrap_delete_XPathIo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 (printfunc) 0, /* tp_print */ #else @@ -9890,47 +10470,36 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__MemIo_type = { (cmpfunc) 0, /* tp_compare */ #endif (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_mapping, /* tp_as_mapping */ + &SwigPyBuiltin__Exiv2__XPathIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__XPathIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__XPathIo_type.as_mapping, /* tp_as_mapping */ SwigPyObject_hash, /* tp_hash */ (ternaryfunc) 0, /* tp_call */ (reprfunc) 0, /* tp_str */ (getattrofunc) 0, /* tp_getattro */ (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__XPathIo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - "\n" - "Provides binary IO on blocks of memory by implementing the BasicIo\n" - " interface. A copy-on-write implementation ensures that the data passed\n" - " in is only copied when necessary, i.e., as soon as data is written to\n" - " the MemIo. The original data is only used for reading. If writes are\n" - " performed, the changed data can be retrieved using the read methods\n" - " (since the data used in construction is never modified).\n" - "\n" - "Notes: If read only usage of this class is common, it might be worth\n" - " creating a specialized readonly class or changing this one to\n" - " have a readonly mode.\n" - "",/* tp_doc */ + " Provides binary IO for the data from stdin and data uri path.",/* tp_doc */ (traverseproc) 0, /* tp_traverse */ (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__MemIo_richcompare, /* tp_richcompare */ + SwigPyBuiltin__Exiv2__XPathIo_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc) 0, /* tp_iter */ (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__MemIo_methods, /* tp_methods */ + SwigPyBuiltin__Exiv2__XPathIo_methods, /* tp_methods */ 0, /* tp_members */ - SwigPyBuiltin__Exiv2__MemIo_getset, /* tp_getset */ + SwigPyBuiltin__Exiv2__XPathIo_getset, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ (descrgetfunc) 0, /* tp_descr_get */ (descrsetfunc) 0, /* tp_descr_set */ offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_MemIo, /* tp_init */ + _wrap_new_XPathIo, /* tp_init */ (allocfunc) 0, /* tp_alloc */ (newfunc) 0, /* tp_new */ (freefunc) 0, /* tp_free */ @@ -10035,7 +10604,7 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__MemIo_type = { (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_MemIo_size_lenfunc_closure, /* sq_length */ + (lenfunc) 0, /* sq_length */ (binaryfunc) 0, /* sq_concat */ (ssizeargfunc) 0, /* sq_repeat */ (ssizeargfunc) 0, /* sq_item */ @@ -10061,8 +10630,8 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__MemIo_type = { (segcountproc) 0, /* bf_getsegcount */ (charbufferproc) 0, /* bf_getcharbuffer */ #endif - getbuffer_Exiv2_MemIo, /* bf_getbuffer */ - releasebuffer_Exiv2_MemIo, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, (PyObject *) 0, /* ht_name */ (PyObject *) 0, /* ht_slots */ @@ -10084,16 +10653,16 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__MemIo_type = { #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__MemIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__MemIo_type}; +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XPathIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XPathIo_type}; -static SwigPyGetSet XPathIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XPathIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Default constructor that reads data from stdin/data uri path and writes them to the temp file.", &XPathIo___dict___getset }, +static SwigPyGetSet RemoteIo___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__RemoteIo_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Destructor. Releases all managed memory.", &RemoteIo___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__XPathIo_richcompare(PyObject *self, PyObject *other, int op) { +SwigPyBuiltin__Exiv2__RemoteIo_richcompare(PyObject *self, PyObject *other, int op) { PyObject *result = NULL; PyObject *tuple = PyTuple_New(1); assert(tuple); @@ -10111,23 +10680,150 @@ SwigPyBuiltin__Exiv2__XPathIo_richcompare(PyObject *self, PyObject *other, int o return result; } -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XPathIo_methods[] = { - { "transfer", _wrap_XPathIo_transfer, METH_VARARGS, "\n" - "Change the name of the temp file and make it untemporary before\n" - " calling the method of superclass FileIo::transfer.\n" +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__RemoteIo_methods[] = { + { "open", _wrap_RemoteIo_open, METH_VARARGS, "\n" + "Connect to the remote server, get the size of the remote file and\n" + " allocate the array of blocksMap.\n" + "\n" + " If the blocksMap is already allocated (this method has been called before),\n" + " it just reset IO position to the start and does not flush the old data.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure.\n" "" }, - { "writeDataToFile", (PyCFunction)(void(*)(void))_wrap_XPathIo_writeDataToFile, METH_STATIC|METH_VARARGS, "\n" - "Read the data from stdin/data uri path and write them to the file.\n" - ":type orgPath: str\n" - ":param orgPath: It equals \"-\" if the input data's from stdin. Otherwise, it's data uri path.\n" - ":rtype: str\n" - ":return: the name of the new file.\n" - ":raises: Error if it fails.\n" + { "close", _wrap_RemoteIo_close, METH_VARARGS, "\n" + "Reset the IO position to the start. It does not release the data.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure.\n" + "" }, + { "write", _wrap_RemoteIo_write, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Not support this method.\n" + ":rtype: int\n" + ":return: 0 means failure\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Write data that is read from another BasicIo instance to the remote file.\n" + "\n" + "The write access is done in an efficient way. It only sends the range of different\n" + "bytes between the current data and BasicIo instance to the remote machine.\n" + "\n" + ":type src: :py:class:`BasicIo`\n" + ":param src: Reference to another BasicIo instance. Reading start\n" + " at the source's current IO position\n" + ":rtype: int\n" + ":return: The size of BasicIo instance;\n" + "\n" + " 0 if failure;\n" + ":raises: Error In case of failure\n" + "\n" + "Notes: The write access is only supported by http, https, ssh.\n" + "" }, + { "putb", _wrap_RemoteIo_putb, METH_VARARGS, "\n" + "Not support\n" + ":rtype: int\n" + ":return: 0 means failure\n" + "" }, + { "read", _wrap_RemoteIo_read, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Read data from the memory blocks. Reading starts at the current\n" + " IO position and the position is advanced by the number of\n" + " bytes read.\n" + " If the memory blocks are not populated (False), it will connect to server\n" + " and populate the data to memory blocks.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":rtype: :py:class:`DataBuf`\n" + ":return: DataBuf instance containing the bytes read. Use the\n" + " DataBuf::size_ member to find the number of bytes read.\n" + " DataBuf::size_ will be 0 on failure.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Read data from the memory blocks. Reading starts at the current\n" + " IO position and the position is advanced by the number of\n" + " bytes read.\n" + " If the memory blocks are not populated (!= bMemory), it will connect to server\n" + " and populate the data to memory blocks.\n" + ":type buf: writeable :py:term:`bytes-like object`\n" + ":param buf: Pointer to a block of memory into which the read data\n" + " is stored. The memory block must be at least *rcount* bytes\n" + " long.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":rtype: int\n" + ":return: Number of bytes read from the memory block successfully;\n" + "\n" + " 0 if failure;\n" + "" }, + { "getb", _wrap_RemoteIo_getb, METH_VARARGS, "\n" + "Read one byte from the memory blocks. The IO position is\n" + " advanced by one byte.\n" + " If the memory block is not populated (!= bMemory), it will connect to server\n" + " and populate the data to the memory block.\n" + ":rtype: int\n" + ":return: The byte read from the memory block if successful;\n" + "\n" + " EOF if failure;\n" + "" }, + { "transfer", _wrap_RemoteIo_transfer, METH_VARARGS, "\n" + "Remove the contents of the file and then transfer data from\n" + " the *src* BasicIo object into the empty file.\n" + "\n" + "The write access is done in an efficient way. It only sends the range of different\n" + "bytes between the current data and BasicIo instance to the remote machine.\n" + "\n" + ":type src: :py:class:`BasicIo`\n" + ":param src: Reference to another BasicIo instance. The entire contents\n" + " of src are transferred to this object. The *src* object is\n" + " invalidated by the method.\n" + ":raises: Error In case of failure\n" + "\n" + "Notes: The write access is only supported by http, https, ssh.\n" + "" }, + { "seek", _wrap_RemoteIo_seek, METH_VARARGS, "" }, + { "mmap", _wrap_RemoteIo_mmap, METH_VARARGS, "\n" + "Not support\n" + ":rtype: memoryview\n" + ":return: NULL\n" + "" }, + { "munmap", _wrap_RemoteIo_munmap, METH_VARARGS, "\n" + "Not support\n" + ":rtype: int\n" + ":return: 0\n" + "" }, + { "tell", _wrap_RemoteIo_tell, METH_VARARGS, "\n" + "Get the current IO position.\n" + ":rtype: int\n" + ":return: Offset from the start of the memory block\n" + "" }, + { "size", _wrap_RemoteIo_size, METH_VARARGS, "\n" + "Get the current memory buffer size in bytes.\n" + ":rtype: int\n" + ":return: Size of the in memory data in bytes;\n" + "\n" + " -1 if failure;\n" "" }, + { "isopen", _wrap_RemoteIo_isopen, METH_VARARGS, " Returns true if the memory area is allocated." }, + { "error", _wrap_RemoteIo_error, METH_VARARGS, " Always returns 0" }, + { "eof", _wrap_RemoteIo_eof, METH_VARARGS, " Returns true if the IO position has reached the end, otherwise false." }, + { "path", _wrap_RemoteIo_path, METH_VARARGS, " Returns the URL of the file." }, { NULL, NULL, 0, NULL } /* Sentinel */ }; -static PyHeapTypeObject SwigPyBuiltin__Exiv2__XPathIo_type = { +static PyHeapTypeObject SwigPyBuiltin__Exiv2__RemoteIo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) @@ -10135,10 +10831,10 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XPathIo_type = { PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "exiv2.basicio.XPathIo", /* tp_name */ + "exiv2.basicio.RemoteIo", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ - _wrap_delete_XPathIo_destructor_closure, /* tp_dealloc */ + _wrap_delete_RemoteIo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 (printfunc) 0, /* tp_print */ #else @@ -10152,36 +10848,40 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XPathIo_type = { (cmpfunc) 0, /* tp_compare */ #endif (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_mapping, /* tp_as_mapping */ + &SwigPyBuiltin__Exiv2__RemoteIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__RemoteIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__RemoteIo_type.as_mapping, /* tp_as_mapping */ SwigPyObject_hash, /* tp_hash */ (ternaryfunc) 0, /* tp_call */ (reprfunc) 0, /* tp_str */ (getattrofunc) 0, /* tp_getattro */ (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__RemoteIo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Provides binary IO for the data from stdin and data uri path.",/* tp_doc */ + "\n" + "Provides remote binary file IO by implementing the BasicIo interface. This is an\n" + " abstract class. The logics for remote access are implemented in HttpIo, CurlIo, SshIo which\n" + " are the derived classes of RemoteIo.\n" + "",/* tp_doc */ (traverseproc) 0, /* tp_traverse */ (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XPathIo_richcompare,/* tp_richcompare */ + SwigPyBuiltin__Exiv2__RemoteIo_richcompare, /* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc) 0, /* tp_iter */ (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XPathIo_methods, /* tp_methods */ + SwigPyBuiltin__Exiv2__RemoteIo_methods, /* tp_methods */ 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XPathIo_getset, /* tp_getset */ + SwigPyBuiltin__Exiv2__RemoteIo_getset, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ (descrgetfunc) 0, /* tp_descr_get */ (descrsetfunc) 0, /* tp_descr_set */ offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XPathIo, /* tp_init */ + _wrap_new_RemoteIo, /* tp_init */ (allocfunc) 0, /* tp_alloc */ (newfunc) 0, /* tp_new */ (freefunc) 0, /* tp_free */ @@ -10286,7 +10986,7 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XPathIo_type = { (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ + _wrap_RemoteIo_size_lenfunc_closure, /* sq_length */ (binaryfunc) 0, /* sq_concat */ (ssizeargfunc) 0, /* sq_repeat */ (ssizeargfunc) 0, /* sq_item */ @@ -10312,8 +11012,8 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XPathIo_type = { (segcountproc) 0, /* bf_getsegcount */ (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + getbuffer_Exiv2_RemoteIo, /* bf_getbuffer */ + releasebuffer_Exiv2_RemoteIo, /* bf_releasebuffer */ }, (PyObject *) 0, /* ht_name */ (PyObject *) 0, /* ht_slots */ @@ -10335,16 +11035,26 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__XPathIo_type = { #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XPathIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XPathIo_type}; +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__RemoteIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__RemoteIo_type}; -static SwigPyGetSet RemoteIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__RemoteIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Destructor. Releases all managed memory.", &RemoteIo___dict___getset }, +static SwigPyGetSet HttpIo___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__HttpIo_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" + "Constructor that accepts the http URL on which IO will be\n" + " performed. The constructor does not open the file, and\n" + " therefore never fails.\n" + ":type url: str\n" + ":param url: The full path of url\n" + ":type blockSize: int, optional\n" + ":param blockSize: the size of the memory block. The file content is\n" + " divided into the memory blocks. These blocks are populated\n" + " on demand from the server, so it avoids copying the complete file.\n" + "", &HttpIo___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__RemoteIo_richcompare(PyObject *self, PyObject *other, int op) { +SwigPyBuiltin__Exiv2__HttpIo_richcompare(PyObject *self, PyObject *other, int op) { PyObject *result = NULL; PyObject *tuple = PyTuple_New(1); assert(tuple); @@ -10362,150 +11072,11 @@ SwigPyBuiltin__Exiv2__RemoteIo_richcompare(PyObject *self, PyObject *other, int return result; } -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__RemoteIo_methods[] = { - { "open", _wrap_RemoteIo_open, METH_VARARGS, "\n" - "Connect to the remote server, get the size of the remote file and\n" - " allocate the array of blocksMap.\n" - "\n" - " If the blocksMap is already allocated (this method has been called before),\n" - " it just reset IO position to the start and does not flush the old data.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "close", _wrap_RemoteIo_close, METH_VARARGS, "\n" - "Reset the IO position to the start. It does not release the data.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "write", _wrap_RemoteIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Not support this method.\n" - ":rtype: int\n" - ":return: 0 means failure\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to the remote file.\n" - "\n" - "The write access is done in an efficient way. It only sends the range of different\n" - "bytes between the current data and BasicIo instance to the remote machine.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: The size of BasicIo instance;\n" - "\n" - " 0 if failure;\n" - ":raises: Error In case of failure\n" - "\n" - "Notes: The write access is only supported by http, https, ssh.\n" - "" }, - { "putb", _wrap_RemoteIo_putb, METH_VARARGS, "\n" - "Not support\n" - ":rtype: int\n" - ":return: 0 means failure\n" - "" }, - { "read", _wrap_RemoteIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the memory blocks. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - " If the memory blocks are not populated (False), it will connect to server\n" - " and populate the data to memory blocks.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the memory blocks. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - " If the memory blocks are not populated (!= bMemory), it will connect to server\n" - " and populate the data to memory blocks.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_RemoteIo_getb, METH_VARARGS, "\n" - "Read one byte from the memory blocks. The IO position is\n" - " advanced by one byte.\n" - " If the memory block is not populated (!= bMemory), it will connect to server\n" - " and populate the data to the memory block.\n" - ":rtype: int\n" - ":return: The byte read from the memory block if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_RemoteIo_transfer, METH_VARARGS, "\n" - "Remove the contents of the file and then transfer data from\n" - " the *src* BasicIo object into the empty file.\n" - "\n" - "The write access is done in an efficient way. It only sends the range of different\n" - "bytes between the current data and BasicIo instance to the remote machine.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "\n" - "Notes: The write access is only supported by http, https, ssh.\n" - "" }, - { "seek", _wrap_RemoteIo_seek, METH_VARARGS, "" }, - { "mmap", _wrap_RemoteIo_mmap, METH_VARARGS, "\n" - "Not support\n" - ":rtype: memoryview\n" - ":return: NULL\n" - "" }, - { "munmap", _wrap_RemoteIo_munmap, METH_VARARGS, "\n" - "Not support\n" - ":rtype: int\n" - ":return: 0\n" - "" }, - { "tell", _wrap_RemoteIo_tell, METH_VARARGS, "\n" - "Get the current IO position.\n" - ":rtype: int\n" - ":return: Offset from the start of the memory block\n" - "" }, - { "size", _wrap_RemoteIo_size, METH_VARARGS, "\n" - "Get the current memory buffer size in bytes.\n" - ":rtype: int\n" - ":return: Size of the in memory data in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_RemoteIo_isopen, METH_VARARGS, " Returns true if the memory area is allocated." }, - { "error", _wrap_RemoteIo_error, METH_VARARGS, " Always returns 0" }, - { "eof", _wrap_RemoteIo_eof, METH_VARARGS, " Returns true if the IO position has reached the end, otherwise false." }, - { "path", _wrap_RemoteIo_path, METH_VARARGS, " Returns the URL of the file." }, +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__HttpIo_methods[] = { { NULL, NULL, 0, NULL } /* Sentinel */ }; -static PyHeapTypeObject SwigPyBuiltin__Exiv2__RemoteIo_type = { +static PyHeapTypeObject SwigPyBuiltin__Exiv2__HttpIo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) @@ -10513,10 +11084,10 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__RemoteIo_type = { PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "exiv2.basicio.RemoteIo", /* tp_name */ + "exiv2.basicio.HttpIo", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ - _wrap_delete_RemoteIo_destructor_closure, /* tp_dealloc */ + _wrap_delete_HttpIo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 (printfunc) 0, /* tp_print */ #else @@ -10530,40 +11101,36 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__RemoteIo_type = { (cmpfunc) 0, /* tp_compare */ #endif (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_mapping, /* tp_as_mapping */ + &SwigPyBuiltin__Exiv2__HttpIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__HttpIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__HttpIo_type.as_mapping, /* tp_as_mapping */ SwigPyObject_hash, /* tp_hash */ (ternaryfunc) 0, /* tp_call */ (reprfunc) 0, /* tp_str */ (getattrofunc) 0, /* tp_getattro */ (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__HttpIo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - "\n" - "Provides remote binary file IO by implementing the BasicIo interface. This is an\n" - " abstract class. The logics for remote access are implemented in HttpIo, CurlIo, SshIo which\n" - " are the derived classes of RemoteIo.\n" - "",/* tp_doc */ + " Provides the http read/write access for the RemoteIo.", /* tp_doc */ (traverseproc) 0, /* tp_traverse */ (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__RemoteIo_richcompare, /* tp_richcompare */ + SwigPyBuiltin__Exiv2__HttpIo_richcompare, /* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc) 0, /* tp_iter */ (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__RemoteIo_methods, /* tp_methods */ + SwigPyBuiltin__Exiv2__HttpIo_methods, /* tp_methods */ 0, /* tp_members */ - SwigPyBuiltin__Exiv2__RemoteIo_getset, /* tp_getset */ + SwigPyBuiltin__Exiv2__HttpIo_getset, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ (descrgetfunc) 0, /* tp_descr_get */ (descrsetfunc) 0, /* tp_descr_set */ offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_RemoteIo, /* tp_init */ + _wrap_new_HttpIo, /* tp_init */ (allocfunc) 0, /* tp_alloc */ (newfunc) 0, /* tp_new */ (freefunc) 0, /* tp_free */ @@ -10668,7 +11235,7 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__RemoteIo_type = { (objobjargproc) 0, /* mp_ass_subscript */ }, { - _wrap_RemoteIo_size_lenfunc_closure, /* sq_length */ + (lenfunc) 0, /* sq_length */ (binaryfunc) 0, /* sq_concat */ (ssizeargfunc) 0, /* sq_repeat */ (ssizeargfunc) 0, /* sq_item */ @@ -10694,8 +11261,8 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__RemoteIo_type = { (segcountproc) 0, /* bf_getsegcount */ (charbufferproc) 0, /* bf_getcharbuffer */ #endif - getbuffer_Exiv2_RemoteIo, /* bf_getbuffer */ - releasebuffer_Exiv2_RemoteIo, /* bf_releasebuffer */ + (getbufferproc) 0, /* bf_getbuffer */ + (releasebufferproc) 0, /* bf_releasebuffer */ }, (PyObject *) 0, /* ht_name */ (PyObject *) 0, /* ht_slots */ @@ -10717,26 +11284,26 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__RemoteIo_type = { #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__RemoteIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__RemoteIo_type}; +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__HttpIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__HttpIo_type}; -static SwigPyGetSet HttpIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__HttpIo_getset[] = { +static SwigPyGetSet CurlIo___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__CurlIo_getset[] = { { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "Constructor that accepts the http URL on which IO will be\n" - " performed. The constructor does not open the file, and\n" - " therefore never fails.\n" + "Constructor that accepts the URL on which IO will be\n" + " performed.\n" ":type url: str\n" ":param url: The full path of url\n" ":type blockSize: int, optional\n" ":param blockSize: the size of the memory block. The file content is\n" " divided into the memory blocks. These blocks are populated\n" " on demand from the server, so it avoids copying the complete file.\n" - "", &HttpIo___dict___getset }, + ":raises: Error if it is unable to init curl pointer.\n" + "", &CurlIo___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__HttpIo_richcompare(PyObject *self, PyObject *other, int op) { +SwigPyBuiltin__Exiv2__CurlIo_richcompare(PyObject *self, PyObject *other, int op) { PyObject *result = NULL; PyObject *tuple = PyTuple_New(1); assert(tuple); @@ -10754,11 +11321,26 @@ SwigPyBuiltin__Exiv2__HttpIo_richcompare(PyObject *self, PyObject *other, int op return result; } -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__HttpIo_methods[] = { +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__CurlIo_methods[] = { + { "write", _wrap_CurlIo_write, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Write access is only available for some protocols. This method\n" + " will call RemoteIo::write(const byte* data, long wcount) if the write\n" + " access is available for the protocol. Otherwise, it throws the Error.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Write access is only available for some protocols. This method\n" + " will call RemoteIo::write(BasicIo& src) if the write access is available\n" + " for the protocol. Otherwise, it throws the Error.\n" + "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; -static PyHeapTypeObject SwigPyBuiltin__Exiv2__HttpIo_type = { +static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) @@ -10766,10 +11348,10 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__HttpIo_type = { PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "exiv2.basicio.HttpIo", /* tp_name */ + "exiv2.basicio.CurlIo", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ - _wrap_delete_HttpIo_destructor_closure, /* tp_dealloc */ + _wrap_delete_CurlIo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 (printfunc) 0, /* tp_print */ #else @@ -10783,36 +11365,39 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__HttpIo_type = { (cmpfunc) 0, /* tp_compare */ #endif (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_mapping, /* tp_as_mapping */ + &SwigPyBuiltin__Exiv2__CurlIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__CurlIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__CurlIo_type.as_mapping, /* tp_as_mapping */ SwigPyObject_hash, /* tp_hash */ (ternaryfunc) 0, /* tp_call */ (reprfunc) 0, /* tp_str */ (getattrofunc) 0, /* tp_getattro */ (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__CurlIo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif - " Provides the http read/write access for the RemoteIo.", /* tp_doc */ + "\n" + "Provides the http, https read/write access and ftp read access for the RemoteIo.\n" + " This class is based on libcurl.\n" + "",/* tp_doc */ (traverseproc) 0, /* tp_traverse */ (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__HttpIo_richcompare, /* tp_richcompare */ + SwigPyBuiltin__Exiv2__CurlIo_richcompare, /* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc) 0, /* tp_iter */ (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__HttpIo_methods, /* tp_methods */ + SwigPyBuiltin__Exiv2__CurlIo_methods, /* tp_methods */ 0, /* tp_members */ - SwigPyBuiltin__Exiv2__HttpIo_getset, /* tp_getset */ + SwigPyBuiltin__Exiv2__CurlIo_getset, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ (descrgetfunc) 0, /* tp_descr_get */ (descrsetfunc) 0, /* tp_descr_set */ offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_HttpIo, /* tp_init */ + _wrap_new_CurlIo, /* tp_init */ (allocfunc) 0, /* tp_alloc */ (newfunc) 0, /* tp_new */ (freefunc) 0, /* tp_free */ @@ -10966,11 +11551,14 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__HttpIo_type = { #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__HttpIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__HttpIo_type}; +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__CurlIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__CurlIo_type}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -10989,11 +11577,15 @@ static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(n static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } +static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } static swig_type_info _swigt__p_ErrorCode = {"_p_ErrorCode", "ErrorCode *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__BasicIo_clientdata, 0}; +static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__CurlIo_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__FileIo_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__HttpIo_clientdata, 0}; @@ -11018,6 +11610,7 @@ static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "uint16_t static swig_type_info *swig_type_initial[] = { &_swigt__p_ErrorCode, &_swigt__p_Exiv2__BasicIo, + &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__FileIo, &_swigt__p_Exiv2__HttpIo, @@ -11041,12 +11634,13 @@ static swig_type_info *swig_type_initial[] = { }; static swig_cast_info _swigc__p_ErrorCode[] = { {&_swigt__p_ErrorCode, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__FileIo[] = { {&_swigt__p_Exiv2__FileIo, 0, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__FileIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XPathIo[] = { {&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SwigPyObject[] = { {&_swigt__p_SwigPyObject, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -11066,6 +11660,7 @@ static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short static swig_cast_info *swig_cast_initial[] = { _swigc__p_ErrorCode, _swigc__p_Exiv2__BasicIo, + _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__FileIo, _swigc__p_Exiv2__HttpIo, @@ -11776,6 +12371,40 @@ SWIG_init(void) { SwigPyBuiltin_AddPublicSymbol(public_interface, "HttpIo"); d = md; + /* type 'Exiv2::CurlIo' */ + builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__CurlIo_type; + builtin_pytype->tp_dict = d = PyDict_New(); + SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); + builtin_pytype->tp_new = PyType_GenericNew; + builtin_base_count = 0; + builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__RemoteIo"); + if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { + builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; + } else { + PyErr_SetString(PyExc_TypeError, "Could not create type 'CurlIo' as base 'Exiv2::RemoteIo' has not been initialized.\n"); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } + builtin_bases[builtin_base_count] = NULL; + SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); + PyDict_SetItemString(d, "this", this_descr); + PyDict_SetItemString(d, "thisown", thisown_descr); + if (PyType_Ready(builtin_pytype) < 0) { + PyErr_SetString(PyExc_TypeError, "Could not create type 'CurlIo'."); +#if PY_VERSION_HEX >= 0x03000000 + return NULL; +#else + return; +#endif + } + Py_INCREF(builtin_pytype); + PyModule_AddObject(m, "CurlIo", (PyObject *)builtin_pytype); + SwigPyBuiltin_AddPublicSymbol(public_interface, "CurlIo"); + d = md; + /* Initialize threading */ SWIG_PYTHON_INITIALIZE_THREADS; #if PY_VERSION_HEX >= 0x03000000 diff --git a/src/swig-0_28_2/image_wrap.cxx b/src/swig-0_28_2/image_wrap.cxx index 9689dc3..14b7683 100644 --- a/src/swig-0_28_2/image_wrap.cxx +++ b/src/swig-0_28_2/image_wrap.cxx @@ -3930,75 +3930,76 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__AsciiValue swig_types[2] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[3] #define SWIGTYPE_p_Exiv2__CommentValue swig_types[4] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[5] -#define SWIGTYPE_p_Exiv2__DataSet swig_types[6] -#define SWIGTYPE_p_Exiv2__DataValue swig_types[7] -#define SWIGTYPE_p_Exiv2__DateValue swig_types[8] -#define SWIGTYPE_p_Exiv2__ExifData swig_types[9] -#define SWIGTYPE_p_Exiv2__ExifKey swig_types[10] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[11] -#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[13] -#define SWIGTYPE_p_Exiv2__Image swig_types[14] -#define SWIGTYPE_p_Exiv2__ImageFactory swig_types[15] -#define SWIGTYPE_p_Exiv2__IptcData swig_types[16] -#define SWIGTYPE_p_Exiv2__IptcKey swig_types[17] -#define SWIGTYPE_p_Exiv2__Key swig_types[18] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[19] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[20] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] -#define SWIGTYPE_p_Exiv2__Value swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpData swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] -#define SWIGTYPE_p_IptcData_iterator swig_types[42] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] -#define SWIGTYPE_p_SwigPyObject swig_types[44] -#define SWIGTYPE_p_ValueType swig_types[45] -#define SWIGTYPE_p_XmpData_iterator swig_types[46] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] -#define SWIGTYPE_p_allocator_type swig_types[48] -#define SWIGTYPE_p_char swig_types[49] -#define SWIGTYPE_p_const_iterator swig_types[50] -#define SWIGTYPE_p_difference_type swig_types[51] -#define SWIGTYPE_p_first_type swig_types[52] -#define SWIGTYPE_p_int swig_types[53] -#define SWIGTYPE_p_iterator swig_types[54] -#define SWIGTYPE_p_key_type swig_types[55] -#define SWIGTYPE_p_long_long swig_types[56] -#define SWIGTYPE_p_mapped_type swig_types[57] -#define SWIGTYPE_p_second_type swig_types[58] -#define SWIGTYPE_p_short swig_types[59] -#define SWIGTYPE_p_signed_char swig_types[60] -#define SWIGTYPE_p_size_type swig_types[61] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] -#define SWIGTYPE_p_unsigned_char swig_types[67] -#define SWIGTYPE_p_unsigned_int swig_types[68] -#define SWIGTYPE_p_unsigned_long_long swig_types[69] -#define SWIGTYPE_p_unsigned_short swig_types[70] -#define SWIGTYPE_p_value_type swig_types[71] -static swig_type_info *swig_types[73]; -static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__CurlIo swig_types[5] +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[6] +#define SWIGTYPE_p_Exiv2__DataSet swig_types[7] +#define SWIGTYPE_p_Exiv2__DataValue swig_types[8] +#define SWIGTYPE_p_Exiv2__DateValue swig_types[9] +#define SWIGTYPE_p_Exiv2__ExifData swig_types[10] +#define SWIGTYPE_p_Exiv2__ExifKey swig_types[11] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[12] +#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[13] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[14] +#define SWIGTYPE_p_Exiv2__Image swig_types[15] +#define SWIGTYPE_p_Exiv2__ImageFactory swig_types[16] +#define SWIGTYPE_p_Exiv2__IptcData swig_types[17] +#define SWIGTYPE_p_Exiv2__IptcKey swig_types[18] +#define SWIGTYPE_p_Exiv2__Key swig_types[19] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[20] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[21] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[23] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[24] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[25] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[26] +#define SWIGTYPE_p_Exiv2__Value swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[35] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpData swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[40] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[41] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[42] +#define SWIGTYPE_p_IptcData_iterator swig_types[43] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[44] +#define SWIGTYPE_p_SwigPyObject swig_types[45] +#define SWIGTYPE_p_ValueType swig_types[46] +#define SWIGTYPE_p_XmpData_iterator swig_types[47] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[48] +#define SWIGTYPE_p_allocator_type swig_types[49] +#define SWIGTYPE_p_char swig_types[50] +#define SWIGTYPE_p_const_iterator swig_types[51] +#define SWIGTYPE_p_difference_type swig_types[52] +#define SWIGTYPE_p_first_type swig_types[53] +#define SWIGTYPE_p_int swig_types[54] +#define SWIGTYPE_p_iterator swig_types[55] +#define SWIGTYPE_p_key_type swig_types[56] +#define SWIGTYPE_p_long_long swig_types[57] +#define SWIGTYPE_p_mapped_type swig_types[58] +#define SWIGTYPE_p_second_type swig_types[59] +#define SWIGTYPE_p_short swig_types[60] +#define SWIGTYPE_p_signed_char swig_types[61] +#define SWIGTYPE_p_size_type swig_types[62] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[63] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[64] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[66] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[67] +#define SWIGTYPE_p_unsigned_char swig_types[68] +#define SWIGTYPE_p_unsigned_int swig_types[69] +#define SWIGTYPE_p_unsigned_long_long swig_types[70] +#define SWIGTYPE_p_unsigned_short swig_types[71] +#define SWIGTYPE_p_value_type swig_types[72] +static swig_type_info *swig_types[74]; +static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4197,6 +4198,19 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" +#ifndef EXV_USE_CURL +namespace Exiv2 { + class CurlIo : public RemoteIo { + public: + CurlIo(const std::string& url, size_t blockSize=0) { + throw std::runtime_error( + "CurlIo not enabled in linked libexiv2"); + }; + }; +} +#endif + + #include @@ -4697,6 +4711,10 @@ static swig_type_info* basicio_subtype(Exiv2::BasicIo* ptr) { else if (dynamic_cast(ptr)) { if (dynamic_cast(ptr)) return SWIGTYPE_p_Exiv2__HttpIo; + + else if (dynamic_cast(ptr)) + return SWIGTYPE_p_Exiv2__CurlIo; + else return SWIGTYPE_p_Exiv2__RemoteIo; } @@ -7874,6 +7892,9 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ImageFactory_clientdata = {0, /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -7901,6 +7922,9 @@ static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newme static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); } +static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } @@ -7984,6 +8008,7 @@ static swig_type_info _swigt__p_ExifData_iterator_base = {"_p_ExifData_iterator_ static swig_type_info _swigt__p_Exiv2__AsciiValue = {"_p_Exiv2__AsciiValue", "Exiv2::AsciiValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__CommentValue = {"_p_Exiv2__CommentValue", "Exiv2::CommentValue *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataSet = {"_p_Exiv2__DataSet", "Exiv2::DataSet *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; @@ -8058,6 +8083,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__AsciiValue, &_swigt__p_Exiv2__BasicIo, &_swigt__p_Exiv2__CommentValue, + &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__DataSet, &_swigt__p_Exiv2__DataValue, @@ -8130,8 +8156,9 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_ExifData_iterator[] = { {&_swigt__p_ExifData_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ExifData_iterator_base[] = { {&_swigt__p_ExifData_iterator_base, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__AsciiValue[] = { {&_swigt__p_Exiv2__AsciiValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__CommentValue[] = { {&_swigt__p_Exiv2__CommentValue, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataSet[] = { {&_swigt__p_Exiv2__DataSet, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -8148,7 +8175,7 @@ static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValueBase[] = { {&_swigt__p_Exiv2__StringValueBase, 0, 0, 0}, {&_swigt__p_Exiv2__AsciiValue, _p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__CommentValue, _p_Exiv2__CommentValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__StringValue, _p_Exiv2__StringValueTo_p_Exiv2__StringValueBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__TagInfo[] = { {&_swigt__p_Exiv2__TagInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -8206,6 +8233,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__AsciiValue, _swigc__p_Exiv2__BasicIo, _swigc__p_Exiv2__CommentValue, + _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__DataSet, _swigc__p_Exiv2__DataValue, diff --git a/src/swig-0_28_2/preview_wrap.cxx b/src/swig-0_28_2/preview_wrap.cxx index 2dc743f..1c8de1d 100644 --- a/src/swig-0_28_2/preview_wrap.cxx +++ b/src/swig-0_28_2/preview_wrap.cxx @@ -3932,75 +3932,76 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__AsciiValue swig_types[2] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[3] #define SWIGTYPE_p_Exiv2__CommentValue swig_types[4] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[5] -#define SWIGTYPE_p_Exiv2__DataSet swig_types[6] -#define SWIGTYPE_p_Exiv2__DataValue swig_types[7] -#define SWIGTYPE_p_Exiv2__DateValue swig_types[8] -#define SWIGTYPE_p_Exiv2__ExifKey swig_types[9] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[10] -#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[11] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[12] -#define SWIGTYPE_p_Exiv2__Image swig_types[13] -#define SWIGTYPE_p_Exiv2__IptcKey swig_types[14] -#define SWIGTYPE_p_Exiv2__Key swig_types[15] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[16] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[17] -#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[18] -#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[19] -#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[20] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] -#define SWIGTYPE_p_Exiv2__Value swig_types[26] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[40] -#define SWIGTYPE_p_IptcData_iterator swig_types[41] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[42] -#define SWIGTYPE_p_SwigPyObject swig_types[43] -#define SWIGTYPE_p_ValueType swig_types[44] -#define SWIGTYPE_p_XmpData_iterator swig_types[45] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[46] -#define SWIGTYPE_p_allocator_type swig_types[47] -#define SWIGTYPE_p_char swig_types[48] -#define SWIGTYPE_p_const_iterator swig_types[49] -#define SWIGTYPE_p_difference_type swig_types[50] -#define SWIGTYPE_p_first_type swig_types[51] -#define SWIGTYPE_p_int swig_types[52] -#define SWIGTYPE_p_iterator swig_types[53] -#define SWIGTYPE_p_key_type swig_types[54] -#define SWIGTYPE_p_long_long swig_types[55] -#define SWIGTYPE_p_mapped_type swig_types[56] -#define SWIGTYPE_p_second_type swig_types[57] -#define SWIGTYPE_p_short swig_types[58] -#define SWIGTYPE_p_signed_char swig_types[59] -#define SWIGTYPE_p_size_type swig_types[60] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[61] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[62] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[63] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[65] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] -#define SWIGTYPE_p_unsigned_char swig_types[67] -#define SWIGTYPE_p_unsigned_int swig_types[68] -#define SWIGTYPE_p_unsigned_long_long swig_types[69] -#define SWIGTYPE_p_unsigned_short swig_types[70] -#define SWIGTYPE_p_value_type swig_types[71] -static swig_type_info *swig_types[73]; -static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__CurlIo swig_types[5] +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[6] +#define SWIGTYPE_p_Exiv2__DataSet swig_types[7] +#define SWIGTYPE_p_Exiv2__DataValue swig_types[8] +#define SWIGTYPE_p_Exiv2__DateValue swig_types[9] +#define SWIGTYPE_p_Exiv2__ExifKey swig_types[10] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[11] +#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[13] +#define SWIGTYPE_p_Exiv2__Image swig_types[14] +#define SWIGTYPE_p_Exiv2__IptcKey swig_types[15] +#define SWIGTYPE_p_Exiv2__Key swig_types[16] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[17] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[18] +#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[19] +#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[20] +#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[21] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[23] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[24] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[25] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[26] +#define SWIGTYPE_p_Exiv2__Value swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[35] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] +#define SWIGTYPE_p_IptcData_iterator swig_types[42] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] +#define SWIGTYPE_p_SwigPyObject swig_types[44] +#define SWIGTYPE_p_ValueType swig_types[45] +#define SWIGTYPE_p_XmpData_iterator swig_types[46] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] +#define SWIGTYPE_p_allocator_type swig_types[48] +#define SWIGTYPE_p_char swig_types[49] +#define SWIGTYPE_p_const_iterator swig_types[50] +#define SWIGTYPE_p_difference_type swig_types[51] +#define SWIGTYPE_p_first_type swig_types[52] +#define SWIGTYPE_p_int swig_types[53] +#define SWIGTYPE_p_iterator swig_types[54] +#define SWIGTYPE_p_key_type swig_types[55] +#define SWIGTYPE_p_long_long swig_types[56] +#define SWIGTYPE_p_mapped_type swig_types[57] +#define SWIGTYPE_p_second_type swig_types[58] +#define SWIGTYPE_p_short swig_types[59] +#define SWIGTYPE_p_signed_char swig_types[60] +#define SWIGTYPE_p_size_type swig_types[61] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[66] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[67] +#define SWIGTYPE_p_unsigned_char swig_types[68] +#define SWIGTYPE_p_unsigned_int swig_types[69] +#define SWIGTYPE_p_unsigned_long_long swig_types[70] +#define SWIGTYPE_p_unsigned_short swig_types[71] +#define SWIGTYPE_p_value_type swig_types[72] +static swig_type_info *swig_types[74]; +static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4199,6 +4200,19 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" +#ifndef EXV_USE_CURL +namespace Exiv2 { + class CurlIo : public RemoteIo { + public: + CurlIo(const std::string& url, size_t blockSize=0) { + throw std::runtime_error( + "CurlIo not enabled in linked libexiv2"); + }; + }; +} +#endif + + #include @@ -7432,6 +7446,9 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewManager_clientdata = {0 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -7459,6 +7476,9 @@ static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newme static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); } +static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { + return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); +} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } @@ -7542,6 +7562,7 @@ static swig_type_info _swigt__p_ExifData_iterator_base = {"_p_ExifData_iterator_ static swig_type_info _swigt__p_Exiv2__AsciiValue = {"_p_Exiv2__AsciiValue", "Exiv2::AsciiValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__CommentValue = {"_p_Exiv2__CommentValue", "Exiv2::CommentValue *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataSet = {"_p_Exiv2__DataSet", "Exiv2::DataSet *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; @@ -7616,6 +7637,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__AsciiValue, &_swigt__p_Exiv2__BasicIo, &_swigt__p_Exiv2__CommentValue, + &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__DataSet, &_swigt__p_Exiv2__DataValue, @@ -7688,8 +7710,9 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_ExifData_iterator[] = { {&_swigt__p_ExifData_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ExifData_iterator_base[] = { {&_swigt__p_ExifData_iterator_base, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__AsciiValue[] = { {&_swigt__p_Exiv2__AsciiValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__CommentValue[] = { {&_swigt__p_Exiv2__CommentValue, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataSet[] = { {&_swigt__p_Exiv2__DataSet, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; @@ -7706,7 +7729,7 @@ static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, static swig_cast_info _swigc__p_Exiv2__PreviewImage[] = { {&_swigt__p_Exiv2__PreviewImage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewManager[] = { {&_swigt__p_Exiv2__PreviewManager, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewProperties[] = { {&_swigt__p_Exiv2__PreviewProperties, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValueBase[] = { {&_swigt__p_Exiv2__StringValueBase, 0, 0, 0}, {&_swigt__p_Exiv2__AsciiValue, _p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__CommentValue, _p_Exiv2__CommentValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__StringValue, _p_Exiv2__StringValueTo_p_Exiv2__StringValueBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__TagInfo[] = { {&_swigt__p_Exiv2__TagInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -7764,6 +7787,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__AsciiValue, _swigc__p_Exiv2__BasicIo, _swigc__p_Exiv2__CommentValue, + _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__DataSet, _swigc__p_Exiv2__DataValue, diff --git a/src/swig-0_28_2/version_wrap.cxx b/src/swig-0_28_2/version_wrap.cxx index 65699f5..261bda8 100644 --- a/src/swig-0_28_2/version_wrap.cxx +++ b/src/swig-0_28_2/version_wrap.cxx @@ -4263,6 +4263,7 @@ static PyObject* versionInfo() { bool video = false; bool unicode = false; bool webready = false; + bool curl = false; #ifdef EXV_ENABLE_NLS nls = true; #endif @@ -4275,13 +4276,17 @@ static PyObject* versionInfo() { #ifdef EXV_ENABLE_WEBREADY webready = true; #endif - return Py_BuildValue("{ss,sN,sN,sN,sN,sN}", +#ifdef EXV_USE_CURL + curl = true; +#endif + return Py_BuildValue("{ss,sN,sN,sN,sN,sN,sN}", "version", Exiv2::version(), "EXV_ENABLE_NLS", PyBool_FromLong(nls), "EXV_ENABLE_BMFF", PyBool_FromLong(bmff), "EXV_ENABLE_VIDEO", PyBool_FromLong(video), "EXV_UNICODE_PATH", PyBool_FromLong(unicode), - "EXV_ENABLE_WEBREADY", PyBool_FromLong(webready)); + "EXV_ENABLE_WEBREADY", PyBool_FromLong(webready), + "EXV_USE_CURL", PyBool_FromLong(curl)); }; diff --git a/tests/test_basicio.py b/tests/test_basicio.py index 5f5e639..bf76299 100644 --- a/tests/test_basicio.py +++ b/tests/test_basicio.py @@ -33,6 +33,29 @@ def setUpClass(cls): cls.image_path = os.path.join(test_dir, 'image_02.jpg') cls.data = b'The quick brown fox jumps over the lazy dog' + @unittest.skipUnless(exiv2.versionInfo()['EXV_USE_CURL'], + 'CurlIo not included') + def test_CurlIo(self): + https_image = ('https://raw.githubusercontent.com/jim-easterbrook' + '/python-exiv2/main/tests/image_02.jpg') + io = exiv2.CurlIo(https_image) + self.assertIsInstance(io, exiv2.CurlIo) + self.assertEqual(io.error(), False) + self.assertEqual(io.path(), https_image) + self.assertEqual(io.size(), 0) + io = exiv2.ImageFactory.createIo(https_image) + self.assertIsInstance(io, exiv2.CurlIo) + self.assertEqual(io.error(), False) + self.assertEqual(io.path(), https_image) + self.assertEqual(io.size(), 0) + # open and close + self.assertEqual(io.isopen(), False) + self.assertEqual(io.open(), 0) + self.assertEqual(io.size(), 15125) + self.assertEqual(io.isopen(), True) + self.assertEqual(io.close(), 0) + self.assertEqual(io.isopen(), True) + def test_FileIo(self): # most functions are tested in test_MemIo io = exiv2.FileIo(self.image_path) diff --git a/tests/test_value.py b/tests/test_value.py index 48b6953..b05def9 100644 --- a/tests/test_value.py +++ b/tests/test_value.py @@ -152,7 +152,7 @@ def test_AsciiValue(self): def test_CommentValue(self): raw_text = 'The quick brown fox jumps over the lazy dog. àéīöûç' data = b'UNICODE\x00' + bytes(raw_text, 'utf-16-le') - if exiv2.testVersion(0, 27, 4): + if exiv2.testVersion(0, 27, 2): text = 'charset=Unicode ' + raw_text else: text = 'charset="Unicode" ' + raw_text diff --git a/utils/build_swig.py b/utils/build_swig.py index 052535d..a4fbbf8 100644 --- a/utils/build_swig.py +++ b/utils/build_swig.py @@ -52,12 +52,10 @@ def main(): if swig_version < (4, 1, 0): print('SWIG version 4.1.0 or later required') return 1 - # get version to SWIG - if len(sys.argv) < 2 or len(sys.argv) > 3: - print('Usage: %s path ["minimal"]' % sys.argv[0]) + # get source to SWIG + if len(sys.argv) != 2: + print('Usage: %s path' % sys.argv[0]) return 1 - # minimal build? - minimal = len(sys.argv) >= 3 and sys.argv[2] == 'minimal' # get config platform = sys.platform if platform == 'win32' and 'GCC' in sys.version: @@ -75,21 +73,25 @@ def main(): exiv2_version = get_version(incl_dir) # get exiv2 build options options = { - 'EXV_UNICODE_PATH' : False, + 'EXV_ENABLE_WEBREADY': False, + 'EXV_USE_CURL': False, } - if not minimal: - with open(os.path.join(incl_dir, 'exv_conf.h')) as cnf: - for line in cnf.readlines(): - words = line.split() - for key in options: - if key not in line: - continue - if words[1] != key: - continue - if words[0] == '#define': - options[key] = True - elif words[0] == '#undef': - options[key] = False + with open(os.path.join(incl_dir, 'exv_conf.h')) as cnf: + for line in cnf.readlines(): + words = line.split() + for key in options: + if key not in line: + continue + if words[1] != key: + continue + if words[0] == '#define': + options[key] = True + elif words[0] == '#undef': + options[key] = False + for key in options: + if not options[key]: + print(f'WARNING: option {key} is not set.' + ' Some functionality will not be available to Python.') # get python-exiv2 version with open('README.rst') as rst: py_exiv2_version = rst.readline().split()[-1] From b38dde60b9b746bef79ada72effa57f9a828cb65 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Mon, 19 Feb 2024 11:16:38 +0000 Subject: [PATCH 21/29] Tweak CommentValue test on old libexiv2 --- tests/test_value.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_value.py b/tests/test_value.py index b05def9..4d8127d 100644 --- a/tests/test_value.py +++ b/tests/test_value.py @@ -152,7 +152,7 @@ def test_AsciiValue(self): def test_CommentValue(self): raw_text = 'The quick brown fox jumps over the lazy dog. àéīöûç' data = b'UNICODE\x00' + bytes(raw_text, 'utf-16-le') - if exiv2.testVersion(0, 27, 2): + if exiv2.testVersion(0, 27, 3): text = 'charset=Unicode ' + raw_text else: text = 'charset="Unicode" ' + raw_text From d2095f50074a57fbd340fbd0126c3d4046fa21f1 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Mon, 19 Feb 2024 11:39:00 +0000 Subject: [PATCH 22/29] Remove SSH from GitHub actions builds It hasn't been accessible from Python and isn't in v0.28 anyway. --- .github/workflows/build-linux-27.yml | 4 ++-- .github/workflows/build-linux-28.yml | 2 +- .github/workflows/build-macos-27.yml | 2 +- .github/workflows/build-macos-arm-27.yml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-linux-27.yml b/.github/workflows/build-linux-27.yml index 7ba88e7..36f5d48 100644 --- a/.github/workflows/build-linux-27.yml +++ b/.github/workflows/build-linux-27.yml @@ -31,7 +31,7 @@ jobs: python3 -m unittest discover {project}/tests -v CIBW_BEFORE_ALL: > yum install -y zlib-devel expat-devel gettext-devel - libcurl-devel libssh-devel && + libcurl-devel && localedef -c -i de_DE -f UTF-8 de_DE.UTF-8 && cd libexiv2 && cmake -B build-linux -D CMAKE_BUILD_TYPE=Release @@ -44,7 +44,7 @@ jobs: -D EXIV2_ENABLE_VIDEO=ON -D EXIV2_ENABLE_WEBREADY=ON -D EXIV2_ENABLE_CURL=ON - -D EXIV2_ENABLE_SSH=ON + -D EXIV2_ENABLE_SSH=OFF -D CMAKE_CXX_STANDARD=98 && cmake --build build-linux && cmake --install build-linux diff --git a/.github/workflows/build-linux-28.yml b/.github/workflows/build-linux-28.yml index 17ee40d..feee572 100644 --- a/.github/workflows/build-linux-28.yml +++ b/.github/workflows/build-linux-28.yml @@ -42,7 +42,7 @@ jobs: python3 -m unittest discover {project}/tests -v CIBW_BEFORE_ALL: > yum install -y --nogpgcheck zlib-devel expat-devel gettext-devel - libcurl-devel libssh-devel brotli-devel meson && + libcurl-devel brotli-devel meson && localedef -c -i de_DE -f UTF-8 de_DE.UTF-8 && pip install ninja && cd inih && mkdir build && cd build && diff --git a/.github/workflows/build-macos-27.yml b/.github/workflows/build-macos-27.yml index 3849bd9..1cfd2a8 100644 --- a/.github/workflows/build-macos-27.yml +++ b/.github/workflows/build-macos-27.yml @@ -42,7 +42,7 @@ jobs: -D EXIV2_ENABLE_VIDEO=ON -D EXIV2_ENABLE_WEBREADY=ON -D EXIV2_ENABLE_CURL=ON - -D EXIV2_ENABLE_SSH=ON + -D EXIV2_ENABLE_SSH=OFF -D CMAKE_CXX_STANDARD=98 -G Ninja && cmake --build build-macos --config Release && diff --git a/.github/workflows/build-macos-arm-27.yml b/.github/workflows/build-macos-arm-27.yml index e390801..40b1286 100644 --- a/.github/workflows/build-macos-arm-27.yml +++ b/.github/workflows/build-macos-arm-27.yml @@ -34,7 +34,7 @@ jobs: python -m unittest discover {project}/tests -v CIBW_TEST_SKIP: cp38-* CIBW_BEFORE_ALL: > - brew install ninja libssh curl && + brew install ninja curl && cd libexiv2 && cmake . -B build-macos -DCMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=build-macos/install @@ -46,7 +46,7 @@ jobs: -D EXIV2_ENABLE_VIDEO=ON -D EXIV2_ENABLE_WEBREADY=ON -D EXIV2_ENABLE_CURL=ON - -D EXIV2_ENABLE_SSH=ON + -D EXIV2_ENABLE_SSH=OFF -D CMAKE_CXX_STANDARD=98 -D CMAKE_OSX_ARCHITECTURES=arm64 -G Ninja && From 067893d980cf045b8e1c777d0d6c294260e253c2 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Mon, 19 Feb 2024 11:55:14 +0000 Subject: [PATCH 23/29] Install libssh on Linux build --- .github/workflows/build-linux-27.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-linux-27.yml b/.github/workflows/build-linux-27.yml index 36f5d48..c86082c 100644 --- a/.github/workflows/build-linux-27.yml +++ b/.github/workflows/build-linux-27.yml @@ -31,7 +31,7 @@ jobs: python3 -m unittest discover {project}/tests -v CIBW_BEFORE_ALL: > yum install -y zlib-devel expat-devel gettext-devel - libcurl-devel && + libcurl-devel libssh-devel && localedef -c -i de_DE -f UTF-8 de_DE.UTF-8 && cd libexiv2 && cmake -B build-linux -D CMAKE_BUILD_TYPE=Release From dced7debc7f5842cab7451e56f617239fcf64f5a Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Mon, 19 Feb 2024 13:31:39 +0000 Subject: [PATCH 24/29] Update linux-27 build to manylinux_2_28 Older images use older libssl that segfaults. --- .github/workflows/build-linux-27.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-linux-27.yml b/.github/workflows/build-linux-27.yml index c86082c..19e8982 100644 --- a/.github/workflows/build-linux-27.yml +++ b/.github/workflows/build-linux-27.yml @@ -24,6 +24,7 @@ jobs: uses: pypa/cibuildwheel@v2.16.5 env: CIBW_ARCHS: auto64 + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_ENVIRONMENT: EXIV2_ROOT=libexiv2/build-linux/install CIBW_BUILD: cp*-manylinux_x86_64 CIBW_TEST_COMMAND: > @@ -31,7 +32,7 @@ jobs: python3 -m unittest discover {project}/tests -v CIBW_BEFORE_ALL: > yum install -y zlib-devel expat-devel gettext-devel - libcurl-devel libssh-devel && + libcurl-devel && localedef -c -i de_DE -f UTF-8 de_DE.UTF-8 && cd libexiv2 && cmake -B build-linux -D CMAKE_BUILD_TYPE=Release From 8710193d8eded6905236a828ce42d8f5cb02b9e2 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Mon, 19 Feb 2024 15:47:32 +0000 Subject: [PATCH 25/29] Remove redundant version check --- src/interface/xmp.i | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/interface/xmp.i b/src/interface/xmp.i index 23957c5..f422f79 100644 --- a/src/interface/xmp.i +++ b/src/interface/xmp.i @@ -67,8 +67,4 @@ DATA_CONTAINER(Exiv2::XmpData, Exiv2::Xmpdatum, Exiv2::XmpKey) %ignore Exiv2::XmpParser::decode; %ignore Exiv2::XmpParser::encode; -#if EXIV2_VERSION_HEX >= 0x001b0000 %include "exiv2/xmp_exiv2.hpp" -#else -%include "exiv2/xmp.hpp" -#endif From e8d2a9c3cdeeb02fabf63cff76428770755a62c0 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Mon, 19 Feb 2024 17:24:19 +0000 Subject: [PATCH 26/29] Extend ImageFactory.createIo to create a MemIo --- src/interface/image.i | 12 +++ src/swig-0_27_3/image_wrap.cxx | 164 ++++++++++++++++++++++++++++++++- src/swig-0_27_7/image_wrap.cxx | 164 ++++++++++++++++++++++++++++++++- src/swig-0_28_2/image_wrap.cxx | 97 ++++++++++++++++++- tests/test_image.py | 1 + 5 files changed, 429 insertions(+), 9 deletions(-) diff --git a/src/interface/image.i b/src/interface/image.i index f287e44..e31a088 100644 --- a/src/interface/image.i +++ b/src/interface/image.i @@ -88,6 +88,18 @@ WINDOWS_PATH(const std::string& path) %typemap(default) bool enable {$1 = true;} %ignore Exiv2::enableBMFF(); +// Extend ImageFactory to allow creation of a MemIo from a buffer +%extend Exiv2::ImageFactory { + static Exiv2::BasicIo::SMART_PTR createIo( + const Exiv2::byte* data, size_t B) { +#if EXIV2_VERSION_HEX < 0x001c0000 + return Exiv2::BasicIo::AutoPtr(new Exiv2::MemIo(data, B)); +#else + return std::make_unique(data, B); +#endif + } +} + // Make enableBMFF() function available regardless of exiv2 version %feature("docstring") enableBMFF "Enable BMFF support. diff --git a/src/swig-0_27_3/image_wrap.cxx b/src/swig-0_27_3/image_wrap.cxx index 3b28b29..d250444 100644 --- a/src/swig-0_27_3/image_wrap.cxx +++ b/src/swig-0_27_3/image_wrap.cxx @@ -4861,6 +4861,80 @@ static PyObject* py_from_enum_Exiv2_ImageType(long value) { return result; }; + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) +{ + int res = SWIG_TypeError; + if (PyLong_Check(obj)) { + unsigned long long v = PyLong_AsUnsignedLongLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + res = SWIG_OverflowError; + } + } else { + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj,&v); + if (SWIG_IsOK(res)) { + if (val) *val = v; + return res; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + const double mant_max = 1LL << DBL_MANT_DIG; + double d; + res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) + return SWIG_OverflowError; + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { + if (val) *val = (unsigned long long)(d); + return SWIG_AddCast(res); + } + res = SWIG_TypeError; + } +#endif + return res; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (PyObject * obj, size_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); + } +#endif + return res; +} + +SWIGINTERN Exiv2::BasicIo::AutoPtr Exiv2_ImageFactory_createIo__SWIG_1(Exiv2::byte const *data,size_t B){ + + return Exiv2::BasicIo::AutoPtr(new Exiv2::MemIo(data, B)); + + + + } #ifdef __cplusplus extern "C" { #endif @@ -6230,20 +6304,19 @@ SWIGINTERN PyObject *_wrap_Image_imageType(PyObject *self, PyObject *args) { SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_Image) /* defines _wrap_delete_Image_destructor_closure */ -SWIGINTERN PyObject *_wrap_ImageFactory_createIo(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::string *arg1 = 0 ; bool arg2 ; int res1 = SWIG_OLDOBJ ; bool val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; Exiv2::BasicIo::AutoPtr result; { arg2 = true; } - if (!SWIG_Python_UnpackTuple(args, "ImageFactory_createIo", 1, 2, swig_obj)) SWIG_fail; + if ((nobjs < 1) || (nobjs > 2)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); @@ -6858,6 +6931,91 @@ SWIGINTERN PyObject *_wrap_ImageFactory_checkType(PyObject *self, PyObject *args } +SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Exiv2::byte *arg1 = (Exiv2::byte *) 0 ; + size_t arg2 ; + PyObject *_global_view = NULL ; + Exiv2::BasicIo::AutoPtr result; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + _global_view = PyMemoryView_GetContiguous(swig_obj[0], PyBUF_READ, 'A'); + if (!_global_view) { + PyErr_Clear(); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageFactory_createIo" "', argument " "1"" of type '" "bytes-like object""'") + ; + } + Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); + arg1 = (Exiv2::byte *) buff->buf; + arg2 = (size_t) buff->len; + } + { + try { + result = Exiv2_ImageFactory_createIo__SWIG_1((unsigned char const *)arg1,SWIG_STD_MOVE(arg2)); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + Exiv2::BasicIo* ptr = (&result)->release(); + resultobj = SWIG_NewPointerObj( + ptr, basicio_subtype(ptr), SWIG_POINTER_OWN); + } + + PyObject_SetAttrString(resultobj, "_refers_to", _global_view); + + + Py_XDECREF(_global_view); + + return resultobj; +fail: + + Py_XDECREF(_global_view); + + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ImageFactory_createIo(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + (void)self; + if (!(argc = SWIG_Python_UnpackTuple(args, "ImageFactory_createIo", 0, 2, argv))) SWIG_fail; + --argc; + if ((argc >= 1) && (argc <= 2)) { + int _v = 0; + { + int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + PyObject *retobj = _wrap_ImageFactory_createIo__SWIG_0(self, argc, argv); + if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; + SWIG_fail; + } +check_1: + + if (argc == 1) { + PyObject *retobj = _wrap_ImageFactory_createIo__SWIG_1(self, argc, argv); + if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; + SWIG_fail; + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ImageFactory_createIo'.\n" + " Possible C/C++ prototypes are:\n" + " Exiv2::ImageFactory::createIo(std::string const &,bool)\n" + " Exiv2::ImageFactory::Exiv2_ImageFactory_createIo__SWIG_1(Exiv2::byte const *,size_t)\n"); + return 0; +} + + SWIGINTERN PyObject *_wrap_delete_ImageFactory(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ImageFactory *arg1 = (Exiv2::ImageFactory *) 0 ; diff --git a/src/swig-0_27_7/image_wrap.cxx b/src/swig-0_27_7/image_wrap.cxx index 3b28b29..d250444 100644 --- a/src/swig-0_27_7/image_wrap.cxx +++ b/src/swig-0_27_7/image_wrap.cxx @@ -4861,6 +4861,80 @@ static PyObject* py_from_enum_Exiv2_ImageType(long value) { return result; }; + +#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) +# define SWIG_LONG_LONG_AVAILABLE +#endif + + +#ifdef SWIG_LONG_LONG_AVAILABLE +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) +{ + int res = SWIG_TypeError; + if (PyLong_Check(obj)) { + unsigned long long v = PyLong_AsUnsignedLongLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + res = SWIG_OverflowError; + } + } else { + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj,&v); + if (SWIG_IsOK(res)) { + if (val) *val = v; + return res; + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + const double mant_max = 1LL << DBL_MANT_DIG; + double d; + res = SWIG_AsVal_double (obj,&d); + if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) + return SWIG_OverflowError; + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { + if (val) *val = (unsigned long long)(d); + return SWIG_AddCast(res); + } + res = SWIG_TypeError; + } +#endif + return res; +} +#endif + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (PyObject * obj, size_t *val) +{ + int res = SWIG_TypeError; +#ifdef SWIG_LONG_LONG_AVAILABLE + if (sizeof(size_t) <= sizeof(unsigned long)) { +#endif + unsigned long v; + res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); +#ifdef SWIG_LONG_LONG_AVAILABLE + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + unsigned long long v; + res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); + } +#endif + return res; +} + +SWIGINTERN Exiv2::BasicIo::AutoPtr Exiv2_ImageFactory_createIo__SWIG_1(Exiv2::byte const *data,size_t B){ + + return Exiv2::BasicIo::AutoPtr(new Exiv2::MemIo(data, B)); + + + + } #ifdef __cplusplus extern "C" { #endif @@ -6230,20 +6304,19 @@ SWIGINTERN PyObject *_wrap_Image_imageType(PyObject *self, PyObject *args) { SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_Image) /* defines _wrap_delete_Image_destructor_closure */ -SWIGINTERN PyObject *_wrap_ImageFactory_createIo(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::string *arg1 = 0 ; bool arg2 ; int res1 = SWIG_OLDOBJ ; bool val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; Exiv2::BasicIo::AutoPtr result; { arg2 = true; } - if (!SWIG_Python_UnpackTuple(args, "ImageFactory_createIo", 1, 2, swig_obj)) SWIG_fail; + if ((nobjs < 1) || (nobjs > 2)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); @@ -6858,6 +6931,91 @@ SWIGINTERN PyObject *_wrap_ImageFactory_checkType(PyObject *self, PyObject *args } +SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Exiv2::byte *arg1 = (Exiv2::byte *) 0 ; + size_t arg2 ; + PyObject *_global_view = NULL ; + Exiv2::BasicIo::AutoPtr result; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + _global_view = PyMemoryView_GetContiguous(swig_obj[0], PyBUF_READ, 'A'); + if (!_global_view) { + PyErr_Clear(); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageFactory_createIo" "', argument " "1"" of type '" "bytes-like object""'") + ; + } + Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); + arg1 = (Exiv2::byte *) buff->buf; + arg2 = (size_t) buff->len; + } + { + try { + result = Exiv2_ImageFactory_createIo__SWIG_1((unsigned char const *)arg1,SWIG_STD_MOVE(arg2)); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + Exiv2::BasicIo* ptr = (&result)->release(); + resultobj = SWIG_NewPointerObj( + ptr, basicio_subtype(ptr), SWIG_POINTER_OWN); + } + + PyObject_SetAttrString(resultobj, "_refers_to", _global_view); + + + Py_XDECREF(_global_view); + + return resultobj; +fail: + + Py_XDECREF(_global_view); + + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ImageFactory_createIo(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + (void)self; + if (!(argc = SWIG_Python_UnpackTuple(args, "ImageFactory_createIo", 0, 2, argv))) SWIG_fail; + --argc; + if ((argc >= 1) && (argc <= 2)) { + int _v = 0; + { + int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + PyObject *retobj = _wrap_ImageFactory_createIo__SWIG_0(self, argc, argv); + if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; + SWIG_fail; + } +check_1: + + if (argc == 1) { + PyObject *retobj = _wrap_ImageFactory_createIo__SWIG_1(self, argc, argv); + if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; + SWIG_fail; + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ImageFactory_createIo'.\n" + " Possible C/C++ prototypes are:\n" + " Exiv2::ImageFactory::createIo(std::string const &,bool)\n" + " Exiv2::ImageFactory::Exiv2_ImageFactory_createIo__SWIG_1(Exiv2::byte const *,size_t)\n"); + return 0; +} + + SWIGINTERN PyObject *_wrap_delete_ImageFactory(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ImageFactory *arg1 = (Exiv2::ImageFactory *) 0 ; diff --git a/src/swig-0_28_2/image_wrap.cxx b/src/swig-0_28_2/image_wrap.cxx index 14b7683..0e2316f 100644 --- a/src/swig-0_28_2/image_wrap.cxx +++ b/src/swig-0_28_2/image_wrap.cxx @@ -4928,6 +4928,13 @@ SWIG_AsVal_size_t (PyObject * obj, size_t *val) return res; } +SWIGINTERN Exiv2::BasicIo::UniquePtr Exiv2_ImageFactory_createIo__SWIG_1(Exiv2::byte const *data,size_t B){ + + + + return std::make_unique(data, B); + + } #ifdef __cplusplus extern "C" { #endif @@ -6297,20 +6304,19 @@ SWIGINTERN PyObject *_wrap_Image_imageType(PyObject *self, PyObject *args) { SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_Image) /* defines _wrap_delete_Image_destructor_closure */ -SWIGINTERN PyObject *_wrap_ImageFactory_createIo(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { PyObject *resultobj = 0; std::string *arg1 = 0 ; bool arg2 ; int res1 = SWIG_OLDOBJ ; bool val2 ; int ecode2 = 0 ; - PyObject *swig_obj[2] ; Exiv2::BasicIo::UniquePtr result; { arg2 = true; } - if (!SWIG_Python_UnpackTuple(args, "ImageFactory_createIo", 1, 2, swig_obj)) SWIG_fail; + if ((nobjs < 1) || (nobjs > 2)) SWIG_fail; { std::string *ptr = (std::string *)0; res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr); @@ -6925,6 +6931,91 @@ SWIGINTERN PyObject *_wrap_ImageFactory_checkType(PyObject *self, PyObject *args } +SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Exiv2::byte *arg1 = (Exiv2::byte *) 0 ; + size_t arg2 ; + PyObject *_global_view = NULL ; + Exiv2::BasicIo::UniquePtr result; + + if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; + { + _global_view = PyMemoryView_GetContiguous(swig_obj[0], PyBUF_READ, 'A'); + if (!_global_view) { + PyErr_Clear(); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ImageFactory_createIo" "', argument " "1"" of type '" "bytes-like object""'") + ; + } + Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); + arg1 = (Exiv2::byte *) buff->buf; + arg2 = (size_t) buff->len; + } + { + try { + result = Exiv2_ImageFactory_createIo__SWIG_1((unsigned char const *)arg1,SWIG_STD_MOVE(arg2)); + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + { + Exiv2::BasicIo* ptr = (&result)->release(); + resultobj = SWIG_NewPointerObj( + ptr, basicio_subtype(ptr), SWIG_POINTER_OWN); + } + + PyObject_SetAttrString(resultobj, "_refers_to", _global_view); + + + Py_XDECREF(_global_view); + + return resultobj; +fail: + + Py_XDECREF(_global_view); + + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ImageFactory_createIo(PyObject *self, PyObject *args) { + Py_ssize_t argc; + PyObject *argv[3] = { + 0 + }; + + (void)self; + if (!(argc = SWIG_Python_UnpackTuple(args, "ImageFactory_createIo", 0, 2, argv))) SWIG_fail; + --argc; + if ((argc >= 1) && (argc <= 2)) { + int _v = 0; + { + int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + PyObject *retobj = _wrap_ImageFactory_createIo__SWIG_0(self, argc, argv); + if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; + SWIG_fail; + } +check_1: + + if (argc == 1) { + PyObject *retobj = _wrap_ImageFactory_createIo__SWIG_1(self, argc, argv); + if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; + SWIG_fail; + } + +fail: + SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ImageFactory_createIo'.\n" + " Possible C/C++ prototypes are:\n" + " Exiv2::ImageFactory::createIo(std::string const &,bool)\n" + " Exiv2::ImageFactory::Exiv2_ImageFactory_createIo__SWIG_1(Exiv2::byte const *,size_t)\n"); + return 0; +} + + SWIGINTERN int _wrap_new_ImageFactory(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; Exiv2::ImageFactory *result = 0 ; diff --git a/tests/test_image.py b/tests/test_image.py index 0d977b8..d485c8f 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -136,6 +136,7 @@ def test_ImageFactory(self): self.assertIsInstance( factory.create(exiv2.ImageType.jpeg, temp_file), exiv2.Image) self.assertIsInstance(factory.createIo(self.image_path), exiv2.FileIo) + self.assertIsInstance(factory.createIo(self.image_data), exiv2.MemIo) self.check_result(factory.getType(self.image_path), exiv2.ImageType, exiv2.ImageType.jpeg) self.check_result(factory.getType(self.image_data), From b3a7b22f712c3b22733fc7737a705f1dc394b26f Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Tue, 20 Feb 2024 08:59:11 +0000 Subject: [PATCH 27/29] Omit derived classes of BasicIo The complications of dealing with compile options such as EXV_USE_CURL are not needed as the derived classes all have the same interface. ImageFactory.createIo() can be used to create an object of a BasicIo drived class if needed. --- CHANGELOG.txt | 3 + README.rst | 2 +- src/doc/_templates/module.rst | 5 - src/doc/requirements.txt | 2 +- src/interface/basicio.i | 134 +- src/interface/image.i | 1 - src/interface/preview.i | 1 - src/interface/shared/remoteio_derived.i | 37 - src/interface/shared/windows_path.i | 4 +- src/interface/version.i | 5 - src/swig-0_27_3/__init__.py | 4 +- src/swig-0_27_3/basicio_wrap.cxx | 6175 ++--------------------- src/swig-0_27_3/image_wrap.cxx | 233 +- src/swig-0_27_3/preview_wrap.cxx | 192 +- src/swig-0_27_7/__init__.py | 4 +- src/swig-0_27_7/basicio_wrap.cxx | 6175 ++--------------------- src/swig-0_27_7/image_wrap.cxx | 233 +- src/swig-0_27_7/preview_wrap.cxx | 192 +- src/swig-0_28_2/__init__.py | 4 +- src/swig-0_28_2/basicio_wrap.cxx | 6171 ++-------------------- src/swig-0_28_2/image_wrap.cxx | 233 +- src/swig-0_28_2/preview_wrap.cxx | 192 +- tests/test_basicio.py | 29 +- tests/test_image.py | 8 +- utils/build_swig.py | 24 - 25 files changed, 1522 insertions(+), 18541 deletions(-) delete mode 100644 src/interface/shared/remoteio_derived.i diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b52c33c..0cd993f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -16,6 +16,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . +Changes in v0.17.0: + 1/ API change: derived classes of BasicIo are omitted from Python. + Changes in v0.16.3: 1/ Binary wheels incorporate libexiv2 v0.28.2. diff --git a/README.rst b/README.rst index c66f2dc..b4d52dc 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -python-exiv2 v\ 0.16.4 +python-exiv2 v\ 0.17.0 ====================== python-exiv2 is a low level interface (or binding) to the exiv2_ C++ library. diff --git a/src/doc/_templates/module.rst b/src/doc/_templates/module.rst index ed741f5..d57aad6 100644 --- a/src/doc/_templates/module.rst +++ b/src/doc/_templates/module.rst @@ -15,11 +15,6 @@ :top-classes: exiv2.value.Value {% endif %} - {% if fullname == "exiv2._basicio" %} - .. inheritance-diagram:: {{ classes | join(" ") }} - :top-classes: exiv2.basicio.BasicIo - {% endif %} - {% if fullname in ["exiv2._datasets", "exiv2._metadatum", "exiv2._properties", "exiv2._tags"] %} .. inheritance-diagram:: exiv2.ExifKey exiv2.IptcKey exiv2.XmpKey :top-classes: exiv2.metadatum.Key diff --git a/src/doc/requirements.txt b/src/doc/requirements.txt index 8d8865b..306fadd 100644 --- a/src/doc/requirements.txt +++ b/src/doc/requirements.txt @@ -1,3 +1,3 @@ -exiv2 <= 0.16.4 +exiv2 <= 0.17.0 sphinx == 7.2.6 sphinx-rtd-theme == 2.0.0 diff --git a/src/interface/basicio.i b/src/interface/basicio.i index e355ace..13b1d0d 100644 --- a/src/interface/basicio.i +++ b/src/interface/basicio.i @@ -19,7 +19,8 @@ %nothread; #ifndef SWIGIMPORTED -%constant char* __doc__ = "Classes to access files, memory and remote data."; +%constant char* __doc__ = + "Class interface to access files, memory and remote data."; #endif #pragma SWIG nowarn=321 // 'open' conflicts with a built-in name in python @@ -29,7 +30,6 @@ %include "shared/enum.i" %include "shared/exception.i" %include "shared/keep_reference.i" -%include "shared/remoteio_derived.i" %include "shared/unique_ptr.i" %include "shared/windows_path.i" @@ -48,32 +48,15 @@ UNIQUE_PTR(Exiv2::BasicIo); %thread Exiv2::BasicIo::mmap; %thread Exiv2::BasicIo::munmap; %thread Exiv2::BasicIo::read; -%thread Exiv2::MemIo::read; %thread Exiv2::BasicIo::seek; -%thread Exiv2::FileIo::size; -%thread Exiv2::FileIo::tell; %thread Exiv2::BasicIo::transfer; %thread Exiv2::BasicIo::write; -%thread Exiv2::MemIo::write; // Some calls don't raise exceptions -%noexception Exiv2::MemIo::close; %noexception Exiv2::BasicIo::eof; %noexception Exiv2::BasicIo::error; %noexception Exiv2::BasicIo::isopen; -%noexception Exiv2::MemIo::mmap; -%noexception Exiv2::MemIo::munmap; -%noexception Exiv2::RemoteIo::munmap; -%noexception Exiv2::MemIo::open; %noexception Exiv2::BasicIo::path; -%noexception Exiv2::MemIo::read; -%noexception Exiv2::MemIo::seek; -%noexception Exiv2::RemoteIo::seek; -%noexception Exiv2::MemIo::size; -%noexception Exiv2::RemoteIo::size; -%noexception Exiv2::MemIo::tell; -%noexception Exiv2::RemoteIo::tell; -%noexception Exiv2::MemIo::write; // Convert path encoding on Windows WINDOWS_PATH(const std::string& path) @@ -81,48 +64,38 @@ WINDOWS_PATH(const std::string& orgPath) WINDOWS_PATH(const std::string& url) WINDOWS_PATH_OUT(path) -// Convert BasicIo return values to actual subclass -%fragment("basicio_subtype", "header") { -static swig_type_info* basicio_subtype(Exiv2::BasicIo* ptr) { - if (dynamic_cast(ptr)) - return $descriptor(Exiv2::MemIo*); - else if (dynamic_cast(ptr)) { - if (dynamic_cast(ptr)) - return $descriptor(Exiv2::XPathIo*); - else - return $descriptor(Exiv2::FileIo*); +// Add method to get the subclass type +%feature("docstring") Exiv2::BasicIo::ioType "Return the derived class type. + +You shouldn't usually need to know the type of IO as they all have +the same interface. +:rtype: str +:return: A class name such as ""FileIo""." +%extend Exiv2::BasicIo { + const char* ioType() { + if (dynamic_cast($self)) + return "MemIo"; + else if (dynamic_cast($self)) { + if (dynamic_cast($self)) + return "XPathIo"; + return "FileIo"; + } + else if (dynamic_cast($self)) { + if (dynamic_cast($self)) + return "HttpIo"; +%#ifdef EXV_USE_CURL + else if (dynamic_cast($self)) + return "CurlIo"; +%#endif +%#ifdef EXV_USE_SSH + else if (dynamic_cast($self)) + return "SshIo"; +%#endif + return "RemoteIo"; + } + return "unknown"; } - else if (dynamic_cast(ptr)) { - if (dynamic_cast(ptr)) - return $descriptor(Exiv2::HttpIo*); -#ifdef EXV_USE_CURL - else if (dynamic_cast(ptr)) - return $descriptor(Exiv2::CurlIo*); -#endif - else - return $descriptor(Exiv2::RemoteIo*); - } - return $descriptor(Exiv2::BasicIo*); -}; -} -%typemap(out, fragment="basicio_subtype") Exiv2::BasicIo& { - $result = SWIG_NewPointerObj($1, basicio_subtype($1), 0); -} -%typemap(out, fragment="basicio_subtype") Exiv2::BasicIo::SMART_PTR { - Exiv2::BasicIo* ptr = (&$1)->release(); - $result = SWIG_NewPointerObj( - ptr, basicio_subtype(ptr), SWIG_POINTER_OWN); -} - -// CurlIo destructor isn't seen by SWIG in v0.27.x -#if EXIV2_VERSION_HEX < 0x001c0000 -#ifdef EXV_USE_CURL -%extend Exiv2::CurlIo { - ~CurlIo() {}; } -%ignore Exiv2::CurlIo::~CurlIo; -#endif -#endif // readOrThrow & seekOrThrow use ErrorCode internally without Exiv2:: prefix // as if SWIG doesn't realise ErrorCode is in the Exiv2 namespace @@ -143,10 +116,6 @@ KEEP_REFERENCE(Exiv2::BasicIo&) INPUT_BUFFER_RO(const Exiv2::byte* data, long wcount) INPUT_BUFFER_RO(const Exiv2::byte* data, size_t wcount) -// Allow MemIo to be ceated from a buffer -INPUT_BUFFER_RO_EX(const Exiv2::byte* data, long size) -INPUT_BUFFER_RO_EX(const Exiv2::byte* data, size_t size) - // BasicIo::read can write to a Python buffer OUTPUT_BUFFER_RW(Exiv2::byte* buf, long rcount) OUTPUT_BUFFER_RW(Exiv2::byte* buf, size_t rcount) @@ -159,12 +128,12 @@ OUTPUT_BUFFER_RW(Exiv2::byte* buf, size_t rcount) RETURN_VIEW(Exiv2::byte* mmap, $1 ? arg1->size() : 0, arg2 ? PyBUF_WRITE : PyBUF_READ,) -%define EXTEND_BASICIO(io_type) -// Enable len(io_type) -%feature("python:slot", "sq_length", functype="lenfunc") io_type::size; -// Expose io_type contents as a Python buffer -%fragment("get_ptr_size"{io_type}, "header") { -static bool get_ptr_size(io_type* self, bool is_writeable, +// Enable len(Exiv2::BasicIo) +%feature("python:slot", "sq_length", functype="lenfunc") + Exiv2::BasicIo::size; +// Expose Exiv2::BasicIo contents as a Python buffer +%fragment("get_ptr_size"{Exiv2::BasicIo}, "header") { +static bool get_ptr_size(Exiv2::BasicIo* self, bool is_writeable, Exiv2::byte*& ptr, Py_ssize_t& size) { if (self->open()) return false; @@ -183,20 +152,15 @@ static bool get_ptr_size(io_type* self, bool is_writeable, return true; }; } -%fragment("release_ptr"{io_type}, "header") { -static void release_ptr(io_type* self) { +%fragment("release_ptr"{Exiv2::BasicIo}, "header") { +static void release_ptr(Exiv2::BasicIo* self) { SWIG_PYTHON_THREAD_BEGIN_ALLOW; self->munmap(); self->close(); SWIG_PYTHON_THREAD_END_ALLOW; }; } -EXPOSE_OBJECT_BUFFER(io_type, true, true) -%enddef // EXTEND_BASICIO - -EXTEND_BASICIO(Exiv2::FileIo) -EXTEND_BASICIO(Exiv2::MemIo) -EXTEND_BASICIO(Exiv2::RemoteIo) +EXPOSE_OBJECT_BUFFER(Exiv2::BasicIo, true, true) // Make enum more Pythonic DEFINE_CLASS_ENUM(BasicIo, Position, "Seek starting positions.", @@ -210,21 +174,21 @@ DEPRECATED_ENUM(BasicIo, Position, "Seek starting positions.", "cur", Exiv2::BasicIo::cur, "end", Exiv2::BasicIo::end); -%ignore Exiv2::BasicIo::~BasicIo; %ignore Exiv2::BasicIo::bigBlock_; +%ignore Exiv2::BasicIo::operator=; %ignore Exiv2::BasicIo::populateFakeData; %ignore Exiv2::curlWriter; %ignore Exiv2::IoCloser; %ignore Exiv2::ReplaceStringInPlace; %ignore Exiv2::readFile; %ignore Exiv2::writeFile; -%ignore Exiv2::XPathIo::GEN_FILE_EXT; -%ignore Exiv2::XPathIo::TEMP_FILE_EXT; -%ignore Exiv2::CurlIo::operator=; -%ignore Exiv2::FileIo::operator=; -%ignore Exiv2::HttpIo::operator=; -%ignore Exiv2::MemIo::operator=; -%ignore Exiv2::SshIo::operator=; +%ignore Exiv2::CurlIo; +%ignore Exiv2::FileIo; +%ignore Exiv2::HttpIo; +%ignore Exiv2::MemIo; +%ignore Exiv2::RemoteIo; +%ignore Exiv2::SshIo; +%ignore Exiv2::XPathIo; %ignore EXV_XPATH_MEMIO; %include "exiv2/basicio.hpp" diff --git a/src/interface/image.i b/src/interface/image.i index e31a088..01c36c0 100644 --- a/src/interface/image.i +++ b/src/interface/image.i @@ -29,7 +29,6 @@ %include "shared/enum.i" %include "shared/exception.i" %include "shared/keep_reference.i" -%include "shared/remoteio_derived.i" %include "shared/windows_path.i" %include "std_string.i" diff --git a/src/interface/preview.i b/src/interface/preview.i index 8306442..05f0ffa 100644 --- a/src/interface/preview.i +++ b/src/interface/preview.i @@ -30,7 +30,6 @@ For Exif thumbnail images see the :py:class:`ExifThumb` class."; %include "shared/buffers.i" %include "shared/exception.i" %include "shared/keep_reference.i" -%include "shared/remoteio_derived.i" %include "shared/struct_dict.i" %include "shared/windows_path.i" diff --git a/src/interface/shared/remoteio_derived.i b/src/interface/shared/remoteio_derived.i deleted file mode 100644 index 20cfbc7..0000000 --- a/src/interface/shared/remoteio_derived.i +++ /dev/null @@ -1,37 +0,0 @@ -// python-exiv2 - Python interface to libexiv2 -// http://github.com/jim-easterbrook/python-exiv2 -// Copyright (C) 2024 Jim Easterbrook jim@jim-easterbrook.me.uk -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - - -// Replacement for CurlIo missing from linked libexiv2 -// First ifdef EXV_USE_CURL detects SWIGging with EXV_USE_CURL set -// Second ifndef EXV_USE_CURL detects compiling with EXV_USE_CURL unset -#ifdef EXV_USE_CURL -%{ -#ifndef EXV_USE_CURL -namespace Exiv2 { - class CurlIo : public RemoteIo { - public: - CurlIo(const std::string& url, size_t blockSize=0) { - throw std::runtime_error( - "CurlIo not enabled in linked libexiv2"); - }; - }; -} -#endif -%} -#endif - diff --git a/src/interface/shared/windows_path.i b/src/interface/shared/windows_path.i index 32f2aea..be5fb7f 100644 --- a/src/interface/shared/windows_path.i +++ b/src/interface/shared/windows_path.i @@ -37,7 +37,7 @@ SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } %#endif - $result = SWIG_From_std_string($1); + $result = SWIG_FromCharPtrAndSize($1.data(), $1.size()); } %typemap(out, fragment="utf8_to_wcp") const std::string& function { std::string copy = *$1; @@ -46,6 +46,6 @@ SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } %#endif - $result = SWIG_From_std_string(copy); + $result = SWIG_FromCharPtrAndSize(copy.data(), copy.size()); } %enddef // WINDOWS_PATH_OUT diff --git a/src/interface/version.i b/src/interface/version.i index 7240af3..99eef3e 100644 --- a/src/interface/version.i +++ b/src/interface/version.i @@ -39,11 +39,6 @@ EXCEPTION() // Function to report build options used %feature("docstring") versionInfo "Return a dict of libexiv2 build options." -#ifndef EXV_USE_CURL -%{ -#undef EXV_USE_CURL -%} -#endif %inline %{ static PyObject* versionInfo() { bool nls = false; diff --git a/src/swig-0_27_3/__init__.py b/src/swig-0_27_3/__init__.py index 85c136a..62863e2 100644 --- a/src/swig-0_27_3/__init__.py +++ b/src/swig-0_27_3/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.4" +__version__ = "0.17.0" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 4)) +__version_tuple__ = tuple((0, 17, 0)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/src/swig-0_27_3/basicio_wrap.cxx b/src/swig-0_27_3/basicio_wrap.cxx index eb80575..2389990 100644 --- a/src/swig-0_27_3/basicio_wrap.cxx +++ b/src/swig-0_27_3/basicio_wrap.cxx @@ -3926,29 +3926,28 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_Exiv2__BasicIo swig_types[0] -#define SWIGTYPE_p_Exiv2__CurlIo swig_types[1] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[2] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[3] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[4] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[5] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[6] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[7] -#define SWIGTYPE_p_SwigPyObject swig_types[8] -#define SWIGTYPE_p_char swig_types[9] -#define SWIGTYPE_p_first_type swig_types[10] -#define SWIGTYPE_p_int swig_types[11] -#define SWIGTYPE_p_long_long swig_types[12] -#define SWIGTYPE_p_second_type swig_types[13] -#define SWIGTYPE_p_short swig_types[14] -#define SWIGTYPE_p_signed_char swig_types[15] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[16] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[17] -#define SWIGTYPE_p_unsigned_char swig_types[18] -#define SWIGTYPE_p_unsigned_int swig_types[19] -#define SWIGTYPE_p_unsigned_long_long swig_types[20] -#define SWIGTYPE_p_unsigned_short swig_types[21] -static swig_type_info *swig_types[23]; -static swig_module_info swig_module = {swig_types, 22, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[1] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[2] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[3] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[4] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[5] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[6] +#define SWIGTYPE_p_SwigPyObject swig_types[7] +#define SWIGTYPE_p_char swig_types[8] +#define SWIGTYPE_p_first_type swig_types[9] +#define SWIGTYPE_p_int swig_types[10] +#define SWIGTYPE_p_long_long swig_types[11] +#define SWIGTYPE_p_second_type swig_types[12] +#define SWIGTYPE_p_short swig_types[13] +#define SWIGTYPE_p_signed_char swig_types[14] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[15] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[16] +#define SWIGTYPE_p_unsigned_char swig_types[17] +#define SWIGTYPE_p_unsigned_int swig_types[18] +#define SWIGTYPE_p_unsigned_long_long swig_types[19] +#define SWIGTYPE_p_unsigned_short swig_types[20] +static swig_type_info *swig_types[22]; +static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4147,19 +4146,6 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" -#ifndef EXV_USE_CURL -namespace Exiv2 { - class CurlIo : public RemoteIo { - public: - CurlIo(const std::string& url, size_t blockSize=0) { - throw std::runtime_error( - "CurlIo not enabled in linked libexiv2"); - }; - }; -} -#endif - - #include @@ -4283,123 +4269,7 @@ static void _set_python_exception() { typedef Exiv2::ErrorCode ErrorCode; -static bool get_ptr_size(Exiv2::FileIo* self, bool is_writeable, - Exiv2::byte*& ptr, Py_ssize_t& size) { - if (self->open()) - return false; - try { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - ptr = self->mmap(is_writeable); - SWIG_PYTHON_THREAD_END_ALLOW; - - } catch(Exiv2::AnyError const& e) { - - - - return false; - } - size = self->size(); - return true; -}; - - -static int getbuffer_Exiv2_FileIo( - PyObject* exporter, Py_buffer* view, int flags) { - Exiv2::FileIo* self = 0; - Exiv2::byte* ptr = 0; - Py_ssize_t size = 0; - bool is_writeable = true && (flags && PyBUF_WRITABLE); - if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__FileIo, 0))) - goto fail; - if (!get_ptr_size(self, is_writeable, ptr, size)) - goto fail; - return PyBuffer_FillInfo(view, exporter, ptr, - ptr ? size : 0, is_writeable ? 0 : 1, flags); -fail: - PyErr_SetNone(PyExc_BufferError); - view->obj = NULL; - return -1; -}; - - -static void release_ptr(Exiv2::FileIo* self) { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - self->munmap(); - self->close(); - SWIG_PYTHON_THREAD_END_ALLOW; -}; - - -static void releasebuffer_Exiv2_FileIo( - PyObject* exporter, Py_buffer* view) { - Exiv2::FileIo* self = 0; - if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__FileIo, 0))) - return; - release_ptr(self); -}; - - -static bool get_ptr_size(Exiv2::MemIo* self, bool is_writeable, - Exiv2::byte*& ptr, Py_ssize_t& size) { - if (self->open()) - return false; - try { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - ptr = self->mmap(is_writeable); - SWIG_PYTHON_THREAD_END_ALLOW; - - } catch(Exiv2::AnyError const& e) { - - - - return false; - } - size = self->size(); - return true; -}; - - -static int getbuffer_Exiv2_MemIo( - PyObject* exporter, Py_buffer* view, int flags) { - Exiv2::MemIo* self = 0; - Exiv2::byte* ptr = 0; - Py_ssize_t size = 0; - bool is_writeable = true && (flags && PyBUF_WRITABLE); - if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__MemIo, 0))) - goto fail; - if (!get_ptr_size(self, is_writeable, ptr, size)) - goto fail; - return PyBuffer_FillInfo(view, exporter, ptr, - ptr ? size : 0, is_writeable ? 0 : 1, flags); -fail: - PyErr_SetNone(PyExc_BufferError); - view->obj = NULL; - return -1; -}; - - -static void release_ptr(Exiv2::MemIo* self) { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - self->munmap(); - self->close(); - SWIG_PYTHON_THREAD_END_ALLOW; -}; - - -static void releasebuffer_Exiv2_MemIo( - PyObject* exporter, Py_buffer* view) { - Exiv2::MemIo* self = 0; - if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__MemIo, 0))) - return; - release_ptr(self); -}; - - -static bool get_ptr_size(Exiv2::RemoteIo* self, bool is_writeable, +static bool get_ptr_size(Exiv2::BasicIo* self, bool is_writeable, Exiv2::byte*& ptr, Py_ssize_t& size) { if (self->open()) return false; @@ -4419,14 +4289,14 @@ static bool get_ptr_size(Exiv2::RemoteIo* self, bool is_writeable, }; -static int getbuffer_Exiv2_RemoteIo( +static int getbuffer_Exiv2_BasicIo( PyObject* exporter, Py_buffer* view, int flags) { - Exiv2::RemoteIo* self = 0; + Exiv2::BasicIo* self = 0; Exiv2::byte* ptr = 0; Py_ssize_t size = 0; bool is_writeable = true && (flags && PyBUF_WRITABLE); if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__RemoteIo, 0))) + exporter, (void**)&self, SWIGTYPE_p_Exiv2__BasicIo, 0))) goto fail; if (!get_ptr_size(self, is_writeable, ptr, size)) goto fail; @@ -4439,7 +4309,7 @@ static int getbuffer_Exiv2_RemoteIo( }; -static void release_ptr(Exiv2::RemoteIo* self) { +static void release_ptr(Exiv2::BasicIo* self) { SWIG_PYTHON_THREAD_BEGIN_ALLOW; self->munmap(); self->close(); @@ -4447,11 +4317,11 @@ static void release_ptr(Exiv2::RemoteIo* self) { }; -static void releasebuffer_Exiv2_RemoteIo( +static void releasebuffer_Exiv2_BasicIo( PyObject* exporter, Py_buffer* view) { - Exiv2::RemoteIo* self = 0; + Exiv2::BasicIo* self = 0; if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__RemoteIo, 0))) + exporter, (void**)&self, SWIGTYPE_p_Exiv2__BasicIo, 0))) return; release_ptr(self); }; @@ -4802,194 +4672,29 @@ SWIGINTERNINLINE PyObject* return PyBool_FromLong(value ? 1 : 0); } - -/* Return string from Python obj. NOTE: obj must remain in scope in order - to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */ -SWIGINTERN int -SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) -{ -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (PyBytes_Check(obj)) -#else - if (PyUnicode_Check(obj)) -#endif -#else - if (PyString_Check(obj)) -#endif - { - char *cstr; Py_ssize_t len; - PyObject *bytes = NULL; - int ret = SWIG_OK; - if (alloc) - *alloc = SWIG_OLDOBJ; -#if PY_VERSION_HEX>=0x03000000 && defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1) - return SWIG_TypeError; -#else - cstr = (char *)SWIG_PyUnicode_AsUTF8AndSize(obj, &len, &bytes); - if (!cstr) - return SWIG_TypeError; - /* The returned string is only duplicated if the char * returned is not owned and memory managed by obj */ - if (bytes && cptr) { - if (alloc) { - cstr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); - *alloc = SWIG_NEWOBJ; - } else { - /* alloc must be set in order to clean up allocated memory */ - return SWIG_RuntimeError; - } - } -#endif - if (cptr) *cptr = cstr; - if (psize) *psize = len + 1; - Py_XDECREF(bytes); - return ret; - } else { -#if defined(SWIG_PYTHON_2_UNICODE) -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) -#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" -#endif -#if PY_VERSION_HEX<0x03000000 - if (PyUnicode_Check(obj)) { - char *cstr; Py_ssize_t len; - if (!alloc && cptr) { - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if (!obj) - return SWIG_TypeError; - if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { - if (cptr) { - if (alloc) *alloc = SWIG_NEWOBJ; - *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); +SWIGINTERN char const *Exiv2_BasicIo_ioType(Exiv2::BasicIo *self){ + if (dynamic_cast(self)) + return "MemIo"; + else if (dynamic_cast(self)) { + if (dynamic_cast(self)) + return "XPathIo"; + return "FileIo"; } - if (psize) *psize = len + 1; - - Py_XDECREF(obj); - return SWIG_OK; - } else { - Py_XDECREF(obj); - } - } -#endif -#endif - - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void* vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) *cptr = (char *) vptr; - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; - if (alloc) *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } - } - return SWIG_TypeError; -} - - -SWIGINTERN int -SWIG_AsPtr_std_string (PyObject * obj, std::string **val) -{ - char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; - if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { - if (buf) { - if (val) *val = new std::string(buf, size - 1); - if (alloc == SWIG_NEWOBJ) delete[] buf; - return SWIG_NEWOBJ; - } else { - if (val) *val = 0; - return SWIG_OLDOBJ; - } - } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } - if (descriptor) { - std::string *vptr; - int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); - if (SWIG_IsOK(res) && val) *val = vptr; - return res; - } - } - return SWIG_ERROR; -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_std_string (const std::string& s) -{ - return SWIG_FromCharPtrAndSize(s.data(), s.size()); -} - - -#ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) -{ - int res = SWIG_TypeError; - if (PyLong_Check(obj)) { - unsigned long long v = PyLong_AsUnsignedLongLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - res = SWIG_OverflowError; - } - } else { - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj,&v); - if (SWIG_IsOK(res)) { - if (val) *val = v; - return res; - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - const double mant_max = 1LL << DBL_MANT_DIG; - double d; - res = SWIG_AsVal_double (obj,&d); - if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) - return SWIG_OverflowError; - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { - if (val) *val = (unsigned long long)(d); - return SWIG_AddCast(res); + else if (dynamic_cast(self)) { + if (dynamic_cast(self)) + return "HttpIo"; +#ifdef EXV_USE_CURL + else if (dynamic_cast(self)) + return "CurlIo"; +#endif +#ifdef EXV_USE_SSH + else if (dynamic_cast(self)) + return "SshIo"; +#endif + return "RemoteIo"; + } + return "unknown"; } - res = SWIG_TypeError; - } -#endif - return res; -} -#endif - - -SWIGINTERNINLINE int -SWIG_AsVal_size_t (PyObject * obj, size_t *val) -{ - int res = SWIG_TypeError; -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(size_t) <= sizeof(unsigned long)) { -#endif - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else if (sizeof(size_t) <= sizeof(unsigned long long)) { - unsigned long long v; - res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); - } -#endif - return res; -} - -SWIGINTERN void delete_Exiv2_CurlIo(Exiv2::CurlIo *self){} #ifdef __cplusplus extern "C" { #endif @@ -5006,6 +4711,34 @@ SWIGINTERN PyObject *_wrap__enum_list_Position(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_delete_BasicIo(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::BasicIo *arg1 = (Exiv2::BasicIo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_BasicIo takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BasicIo" "', argument " "1"" of type '" "Exiv2::BasicIo *""'"); + } + arg1 = reinterpret_cast< Exiv2::BasicIo * >(argp1); + { + try { + delete arg1; + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_BasicIo_open(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::BasicIo *arg1 = (Exiv2::BasicIo *) 0 ; @@ -5755,7 +5488,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_path(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } #endif - resultobj = SWIG_From_std_string(result); + resultobj = SWIG_FromCharPtrAndSize((&result)->data(), (&result)->size()); } return resultobj; fail: @@ -5763,5301 +5496,52 @@ SWIGINTERN PyObject *_wrap_BasicIo_path(PyObject *self, PyObject *args) { } -SWIGINTERN int _wrap_new_FileIo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - Exiv2::FileIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_FileIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_FileIo", 1, 1, &obj1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FileIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FileIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::FileIo *)new Exiv2::FileIo((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__FileIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN PyObject *_wrap_delete_FileIo(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_BasicIo_ioType(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; + Exiv2::BasicIo *arg1 = (Exiv2::BasicIo *) 0 ; void *argp1 = 0 ; int res1 = 0 ; + char *result = 0 ; - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_FileIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, SWIG_POINTER_DISOWN | 0 ); + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "BasicIo_ioType takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__BasicIo, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FileIo" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BasicIo_ioType" "', argument " "1"" of type '" "Exiv2::BasicIo *""'"); } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); + arg1 = reinterpret_cast< Exiv2::BasicIo * >(argp1); { try { - delete arg1; + result = (char *)Exiv2_BasicIo_ioType(arg1); } catch(std::exception const& e) { _set_python_exception(); SWIG_fail; } } - resultobj = SWIG_Py_Void(); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_FileIo_open__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "FileIo_open", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_open" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FileIo_open" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FileIo_open" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->open((std::string const &)*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_open__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_open takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_open" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->open(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_open(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 1) { - PyObject *retobj = _wrap_FileIo_open__SWIG_1(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - if (argc == 2) { - PyObject *retobj = _wrap_FileIo_open__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FileIo_open'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::FileIo::open(std::string const &)\n" - " Exiv2::FileIo::open()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FileIo_close(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_close takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_close" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->close(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_write__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "FileIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_write" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FileIo_write" "', argument " "2"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg2 = (Exiv2::byte *) buff->buf; - arg3 = (long) buff->len; - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write((Exiv2::byte const *)arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - Py_XDECREF(_global_view); - - return resultobj; -fail: - - Py_XDECREF(_global_view); - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_write__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "FileIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_write" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FileIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FileIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_write(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - return _wrap_FileIo_write__SWIG_1(self, args); - } -check_1: - - if (argc == 2) { - PyObject *retobj = _wrap_FileIo_write__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FileIo_write'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::FileIo::write(Exiv2::byte const *,long)\n" - " Exiv2::FileIo::write(Exiv2::BasicIo &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FileIo_putb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::byte arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned char val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "FileIo_putb", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_putb" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileIo_putb" "', argument " "2"" of type '" "Exiv2::byte""'"); - } - arg2 = static_cast< Exiv2::byte >(val2); - { - try { - result = (int)(arg1)->putb(arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_read__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - long arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::DataBuf result; - - if (!PyArg_UnpackTuple(args, "FileIo_read", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_read" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileIo_read" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj( - new Exiv2::DataBuf(result), SWIGTYPE_p_Exiv2__DataBuf, SWIG_POINTER_OWN); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_read__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - Py_buffer _global_view ; - long val3 ; - int ecode3 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "FileIo_read", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_read" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - _global_view.obj = NULL; - if (PyObject_GetBuffer( - obj1, &_global_view, PyBUF_CONTIG | PyBUF_WRITABLE) < 0) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FileIo_read" "', argument " "2"" of type '" "writable bytes-like object""'") - ; - } - arg2 = (Exiv2::byte *) _global_view.buf; - } - ecode3 = SWIG_AsVal_long(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FileIo_read" "', argument " "3"" of type '" "long""'"); - } - arg3 = static_cast< long >(val3); - { - if (arg3 > (long) _global_view.len) { - SWIG_exception_fail(SWIG_ArgError(SWIG_ValueError), "in method '" "FileIo_read" "', argument " "2"" of type '" "buffer too small""'") - ; - } - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->read(arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return resultobj; -fail: - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_read(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - PyObject *retobj = _wrap_FileIo_read__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - if (argc == 3) { - PyObject *retobj = _wrap_FileIo_read__SWIG_1(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FileIo_read'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::FileIo::read(long)\n" - " Exiv2::FileIo::read(Exiv2::byte *,long)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FileIo_getb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_getb takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_getb" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - result = (int)(arg1)->getb(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_transfer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "FileIo_transfer", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_transfer" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FileIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FileIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - (arg1)->transfer(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_seek(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - long arg2 ; - Exiv2::BasicIo::Position arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "FileIo_seek", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_seek" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileIo_seek" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - { - if (!PyObject_IsInstance(obj2, - get_enum_typeobject_Exiv2_BasicIo_Position())) { - // deprecated since 2024-01-09 - PyErr_WarnEx(PyExc_DeprecationWarning, - "FileIo_seek argument 3 type should be 'Exiv2::BasicIo::Position'.", 1); - } - if (!PyLong_Check(obj2)) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FileIo_seek" "', argument " "3"" of type '" "Exiv2::BasicIo::Position""'") - ; - } - arg3 = static_cast< Exiv2::BasicIo::Position >(PyLong_AsLong(obj2)); - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->seek(arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_mmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::byte *result = 0 ; - - { - arg2 = false; - } - if (!PyArg_UnpackTuple(args, "FileIo_mmap", 0, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_mmap" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileIo_mmap" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (Exiv2::byte *)(arg1)->mmap(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - - resultobj = PyMemoryView_FromMemory((char*)result, result ? arg1->size() : 0, arg2 ? PyBUF_WRITE : PyBUF_READ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_munmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_munmap takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_munmap" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->munmap(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_setPath(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "FileIo_setPath", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_setPath" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FileIo_setPath" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FileIo_setPath" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg2, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - (arg1)->setPath((std::string const &)*arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_tell(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - long result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_tell takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_tell" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)((Exiv2::FileIo const *)arg1)->tell(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_size(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_size takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_size" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = ((Exiv2::FileIo const *)arg1)->size(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_isopen(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_isopen takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_isopen" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - result = (bool)((Exiv2::FileIo const *)arg1)->isopen(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_error(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_error takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_error" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - result = (int)((Exiv2::FileIo const *)arg1)->error(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_eof(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_eof takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_eof" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - result = (bool)((Exiv2::FileIo const *)arg1)->eof(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_path(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::string result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_path takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_path" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - result = ((Exiv2::FileIo const *)arg1)->path(); - { -#ifdef _WIN32 - if (utf8_to_wcp(&result, false) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); - } -#endif - resultobj = SWIG_From_std_string(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_FileIo) /* defines _wrap_delete_FileIo_destructor_closure */ - -SWIGPY_LENFUNC_CLOSURE(_wrap_FileIo_size) /* defines _wrap_FileIo_size_lenfunc_closure */ - -SWIGINTERN int _wrap_new_MemIo__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - Exiv2::MemIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_MemIo")) SWIG_fail; - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "new_MemIo takes no arguments"); - { - try { - result = (Exiv2::MemIo *)new Exiv2::MemIo(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__MemIo, SWIG_BUILTIN_INIT | 0 ); - return resultobj == Py_None ? -1 : 0; -fail: - return -1; -} - - -SWIGINTERN int _wrap_new_MemIo__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - Exiv2::byte *arg1 = (Exiv2::byte *) 0 ; - long arg2 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - Exiv2::MemIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_MemIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_MemIo", 1, 1, &obj1)) SWIG_fail; - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "new_MemIo" "', argument " "1"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg1 = (Exiv2::byte *) buff->buf; - arg2 = (long) buff->len; - } - { - try { - result = (Exiv2::MemIo *)new Exiv2::MemIo((Exiv2::byte const *)arg1,arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__MemIo, SWIG_BUILTIN_INIT | 0 ); - - PyObject_SetAttrString(resultobj, "_refers_to", _global_view); - - - Py_XDECREF(_global_view); - - return resultobj == Py_None ? -1 : 0; -fail: - - Py_XDECREF(_global_view); - - return -1; -} - - -SWIGINTERN int _wrap_new_MemIo(PyObject *self, PyObject *args, PyObject *kwargs) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_MemIo")) SWIG_fail; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 0) { - int retval = _wrap_new_MemIo__SWIG_0(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - if (argc == 1) { - int retval = _wrap_new_MemIo__SWIG_1(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_MemIo'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::MemIo::MemIo()\n" - " Exiv2::MemIo::MemIo(Exiv2::byte const *,long)\n"); - return -1; -} - - -SWIGINTERN PyObject *_wrap_delete_MemIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_MemIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MemIo" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - { - try { - delete arg1; - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_open(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_open takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_open" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (int)(arg1)->open(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_close(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_close takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_close" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (int)(arg1)->close(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_write__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "MemIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_write" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MemIo_write" "', argument " "2"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg2 = (Exiv2::byte *) buff->buf; - arg3 = (long) buff->len; - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write((Exiv2::byte const *)arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - Py_XDECREF(_global_view); - - return resultobj; -fail: - - Py_XDECREF(_global_view); - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_write__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "MemIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_write" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MemIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MemIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_write(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - return _wrap_MemIo_write__SWIG_1(self, args); - } -check_1: - - if (argc == 2) { - PyObject *retobj = _wrap_MemIo_write__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MemIo_write'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::MemIo::write(Exiv2::byte const *,long)\n" - " Exiv2::MemIo::write(Exiv2::BasicIo &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MemIo_putb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::byte arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned char val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "MemIo_putb", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_putb" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MemIo_putb" "', argument " "2"" of type '" "Exiv2::byte""'"); - } - arg2 = static_cast< Exiv2::byte >(val2); - { - try { - result = (int)(arg1)->putb(arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_read__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - long arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::DataBuf result; - - if (!PyArg_UnpackTuple(args, "MemIo_read", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_read" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MemIo_read" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - - resultobj = SWIG_NewPointerObj( - new Exiv2::DataBuf(result), SWIGTYPE_p_Exiv2__DataBuf, SWIG_POINTER_OWN); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_read__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - Py_buffer _global_view ; - long val3 ; - int ecode3 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "MemIo_read", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_read" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - { - _global_view.obj = NULL; - if (PyObject_GetBuffer( - obj1, &_global_view, PyBUF_CONTIG | PyBUF_WRITABLE) < 0) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MemIo_read" "', argument " "2"" of type '" "writable bytes-like object""'") - ; - } - arg2 = (Exiv2::byte *) _global_view.buf; - } - ecode3 = SWIG_AsVal_long(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MemIo_read" "', argument " "3"" of type '" "long""'"); - } - arg3 = static_cast< long >(val3); - { - if (arg3 > (long) _global_view.len) { - SWIG_exception_fail(SWIG_ArgError(SWIG_ValueError), "in method '" "MemIo_read" "', argument " "2"" of type '" "buffer too small""'") - ; - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->read(arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return resultobj; -fail: - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_read(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - PyObject *retobj = _wrap_MemIo_read__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - if (argc == 3) { - PyObject *retobj = _wrap_MemIo_read__SWIG_1(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MemIo_read'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::MemIo::read(long)\n" - " Exiv2::MemIo::read(Exiv2::byte *,long)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MemIo_getb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_getb takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_getb" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - { - try { - result = (int)(arg1)->getb(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_transfer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "MemIo_transfer", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_transfer" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MemIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MemIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - (arg1)->transfer(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_seek(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - long arg2 ; - Exiv2::BasicIo::Position arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "MemIo_seek", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_seek" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MemIo_seek" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - { - if (!PyObject_IsInstance(obj2, - get_enum_typeobject_Exiv2_BasicIo_Position())) { - // deprecated since 2024-01-09 - PyErr_WarnEx(PyExc_DeprecationWarning, - "MemIo_seek argument 3 type should be 'Exiv2::BasicIo::Position'.", 1); - } - if (!PyLong_Check(obj2)) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MemIo_seek" "', argument " "3"" of type '" "Exiv2::BasicIo::Position""'") - ; - } - arg3 = static_cast< Exiv2::BasicIo::Position >(PyLong_AsLong(obj2)); - } - result = (int)(arg1)->seek(arg2,arg3); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_mmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::byte *result = 0 ; - - { - arg2 = false; - } - if (!PyArg_UnpackTuple(args, "MemIo_mmap", 0, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_mmap" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MemIo_mmap" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - result = (Exiv2::byte *)(arg1)->mmap(arg2); - - resultobj = PyMemoryView_FromMemory((char*)result, result ? arg1->size() : 0, arg2 ? PyBUF_WRITE : PyBUF_READ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_munmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_munmap takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_munmap" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (int)(arg1)->munmap(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_tell(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - long result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_tell takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_tell" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (long)((Exiv2::MemIo const *)arg1)->tell(); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_size(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_size takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_size" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = ((Exiv2::MemIo const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_isopen(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_isopen takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_isopen" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (bool)((Exiv2::MemIo const *)arg1)->isopen(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_error(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_error takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_error" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (int)((Exiv2::MemIo const *)arg1)->error(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_eof(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_eof takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_eof" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (bool)((Exiv2::MemIo const *)arg1)->eof(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_path(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::string result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_path takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_path" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = ((Exiv2::MemIo const *)arg1)->path(); - { -#ifdef _WIN32 - if (utf8_to_wcp(&result, false) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); - } -#endif - resultobj = SWIG_From_std_string(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_MemIo) /* defines _wrap_delete_MemIo_destructor_closure */ - -SWIGPY_LENFUNC_CLOSURE(_wrap_MemIo_size) /* defines _wrap_MemIo_size_lenfunc_closure */ - -SWIGINTERN int _wrap_new_XPathIo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - Exiv2::XPathIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_XPathIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_XPathIo", 1, 1, &obj1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XPathIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XPathIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::XPathIo *)new Exiv2::XPathIo((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__XPathIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN PyObject *_wrap_delete_XPathIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::XPathIo *arg1 = (Exiv2::XPathIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_XPathIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__XPathIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_XPathIo" "', argument " "1"" of type '" "Exiv2::XPathIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::XPathIo * >(argp1); - { - try { - delete arg1; - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XPathIo_transfer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::XPathIo *arg1 = (Exiv2::XPathIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "XPathIo_transfer", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__XPathIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XPathIo_transfer" "', argument " "1"" of type '" "Exiv2::XPathIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::XPathIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XPathIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XPathIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - (arg1)->transfer(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XPathIo_writeDataToFile(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_UnpackTuple(args, "XPathIo_writeDataToFile", 1, 1, &obj0)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj0, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XPathIo_writeDataToFile" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XPathIo_writeDataToFile" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = Exiv2::XPathIo::writeDataToFile((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_XPathIo) /* defines _wrap_delete_XPathIo_destructor_closure */ - -SWIGINTERN PyObject *_wrap_delete_RemoteIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_RemoteIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RemoteIo" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - try { - delete arg1; - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_open(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_open takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_open" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->open(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_close(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_close takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_close" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->close(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_write__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_write" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "RemoteIo_write" "', argument " "2"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg2 = (Exiv2::byte *) buff->buf; - arg3 = (long) buff->len; - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write((Exiv2::byte const *)arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - Py_XDECREF(_global_view); - - return resultobj; -fail: - - Py_XDECREF(_global_view); - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_write__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_write" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RemoteIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RemoteIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_write(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - return _wrap_RemoteIo_write__SWIG_1(self, args); - } -check_1: - - if (argc == 2) { - PyObject *retobj = _wrap_RemoteIo_write__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'RemoteIo_write'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::RemoteIo::write(Exiv2::byte const *,long)\n" - " Exiv2::RemoteIo::write(Exiv2::BasicIo &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_putb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::byte arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned char val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_putb", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_putb" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemoteIo_putb" "', argument " "2"" of type '" "Exiv2::byte""'"); - } - arg2 = static_cast< Exiv2::byte >(val2); - { - try { - result = (int)(arg1)->putb(arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_read__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - long arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::DataBuf result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_read", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_read" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemoteIo_read" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj( - new Exiv2::DataBuf(result), SWIGTYPE_p_Exiv2__DataBuf, SWIG_POINTER_OWN); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_read__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - Py_buffer _global_view ; - long val3 ; - int ecode3 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_read", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_read" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - _global_view.obj = NULL; - if (PyObject_GetBuffer( - obj1, &_global_view, PyBUF_CONTIG | PyBUF_WRITABLE) < 0) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "RemoteIo_read" "', argument " "2"" of type '" "writable bytes-like object""'") - ; - } - arg2 = (Exiv2::byte *) _global_view.buf; - } - ecode3 = SWIG_AsVal_long(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RemoteIo_read" "', argument " "3"" of type '" "long""'"); - } - arg3 = static_cast< long >(val3); - { - if (arg3 > (long) _global_view.len) { - SWIG_exception_fail(SWIG_ArgError(SWIG_ValueError), "in method '" "RemoteIo_read" "', argument " "2"" of type '" "buffer too small""'") - ; - } - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->read(arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return resultobj; -fail: - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_read(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - PyObject *retobj = _wrap_RemoteIo_read__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - if (argc == 3) { - PyObject *retobj = _wrap_RemoteIo_read__SWIG_1(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'RemoteIo_read'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::RemoteIo::read(long)\n" - " Exiv2::RemoteIo::read(Exiv2::byte *,long)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_getb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_getb takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_getb" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - try { - result = (int)(arg1)->getb(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_transfer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "RemoteIo_transfer", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_transfer" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RemoteIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RemoteIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - (arg1)->transfer(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_seek(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - long arg2 ; - Exiv2::BasicIo::Position arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_seek", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_seek" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemoteIo_seek" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - { - if (!PyObject_IsInstance(obj2, - get_enum_typeobject_Exiv2_BasicIo_Position())) { - // deprecated since 2024-01-09 - PyErr_WarnEx(PyExc_DeprecationWarning, - "RemoteIo_seek argument 3 type should be 'Exiv2::BasicIo::Position'.", 1); - } - if (!PyLong_Check(obj2)) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "RemoteIo_seek" "', argument " "3"" of type '" "Exiv2::BasicIo::Position""'") - ; - } - arg3 = static_cast< Exiv2::BasicIo::Position >(PyLong_AsLong(obj2)); - } - result = (int)(arg1)->seek(arg2,arg3); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_mmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::byte *result = 0 ; - - { - arg2 = false; - } - if (!PyArg_UnpackTuple(args, "RemoteIo_mmap", 0, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_mmap" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemoteIo_mmap" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (Exiv2::byte *)(arg1)->mmap(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - - resultobj = PyMemoryView_FromMemory((char*)result, result ? arg1->size() : 0, arg2 ? PyBUF_WRITE : PyBUF_READ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_munmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_munmap takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_munmap" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (int)(arg1)->munmap(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_tell(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - long result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_tell takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_tell" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (long)((Exiv2::RemoteIo const *)arg1)->tell(); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_size(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_size takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_size" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = ((Exiv2::RemoteIo const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_isopen(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_isopen takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_isopen" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (bool)((Exiv2::RemoteIo const *)arg1)->isopen(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_error(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_error takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_error" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (int)((Exiv2::RemoteIo const *)arg1)->error(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_eof(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_eof takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_eof" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (bool)((Exiv2::RemoteIo const *)arg1)->eof(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_path(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::string result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_path takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_path" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = ((Exiv2::RemoteIo const *)arg1)->path(); - { -#ifdef _WIN32 - if (utf8_to_wcp(&result, false) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); - } -#endif - resultobj = SWIG_From_std_string(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_RemoteIo) /* defines _wrap_delete_RemoteIo_destructor_closure */ - -SWIGPY_LENFUNC_CLOSURE(_wrap_RemoteIo_size) /* defines _wrap_RemoteIo_size_lenfunc_closure */ - -SWIGINTERN int _wrap_new_HttpIo__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - size_t arg2 ; - int res1 = SWIG_OLDOBJ ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Exiv2::HttpIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_HttpIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_HttpIo", 2, 2, &obj1, &obj2)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HttpIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HttpIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - ecode2 = SWIG_AsVal_size_t(obj2, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HttpIo" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::HttpIo *)new Exiv2::HttpIo((std::string const &)*arg1,arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__HttpIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN int _wrap_new_HttpIo__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - Exiv2::HttpIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_HttpIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_HttpIo", 1, 1, &obj1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HttpIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HttpIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::HttpIo *)new Exiv2::HttpIo((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__HttpIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN int _wrap_new_HttpIo(PyObject *self, PyObject *args, PyObject *kwargs) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_HttpIo")) SWIG_fail; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int retval = _wrap_new_HttpIo__SWIG_1(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - if (argc == 2) { - int retval = _wrap_new_HttpIo__SWIG_0(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HttpIo'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::HttpIo::HttpIo(std::string const &,size_t)\n" - " Exiv2::HttpIo::HttpIo(std::string const &)\n"); - return -1; -} - - -SWIGINTERN int _wrap_new_CurlIo__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - size_t arg2 ; - int res1 = SWIG_OLDOBJ ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Exiv2::CurlIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_CurlIo", 2, 2, &obj1, &obj2)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - ecode2 = SWIG_AsVal_size_t(obj2, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CurlIo" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::CurlIo *)new Exiv2::CurlIo((std::string const &)*arg1,arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__CurlIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN int _wrap_new_CurlIo__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - Exiv2::CurlIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_CurlIo", 1, 1, &obj1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::CurlIo *)new Exiv2::CurlIo((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__CurlIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN int _wrap_new_CurlIo(PyObject *self, PyObject *args, PyObject *kwargs) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int retval = _wrap_new_CurlIo__SWIG_1(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - if (argc == 2) { - int retval = _wrap_new_CurlIo__SWIG_0(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CurlIo'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::CurlIo::CurlIo(std::string const &,size_t)\n" - " Exiv2::CurlIo::CurlIo(std::string const &)\n"); - return -1; -} - - -SWIGINTERN PyObject *_wrap_CurlIo_write__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "CurlIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlIo_write" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "CurlIo_write" "', argument " "2"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg2 = (Exiv2::byte *) buff->buf; - arg3 = (long) buff->len; - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write((Exiv2::byte const *)arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - Py_XDECREF(_global_view); - - return resultobj; -fail: - - Py_XDECREF(_global_view); - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CurlIo_write__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "CurlIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlIo_write" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurlIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurlIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CurlIo_write(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - return _wrap_CurlIo_write__SWIG_1(self, args); - } -check_1: - - if (argc == 2) { - PyObject *retobj = _wrap_CurlIo_write__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CurlIo_write'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::CurlIo::write(Exiv2::byte const *,long)\n" - " Exiv2::CurlIo::write(Exiv2::BasicIo &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_CurlIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_CurlIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CurlIo" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); - { - try { - delete_Exiv2_CurlIo(arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CurlIo) /* defines _wrap_delete_CurlIo_destructor_closure */ - -static PyMethodDef SwigMethods[] = { - { "_enum_list_Position", _wrap__enum_list_Position, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } -}; - -static SwigPyGetSet BasicIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__BasicIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"", &BasicIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__BasicIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { - { "open", _wrap_BasicIo_open, METH_VARARGS, "\n" - "Open the IO source using the default access mode. The\n" - " default mode should allow for reading and writing.\n" - "\n" - "This method can also be used to \"reopen\" an IO source which will\n" - "flush any unwritten data and reset the IO position to the start.\n" - "Subclasses may provide custom methods to allow for\n" - "opening IO sources differently.\n" - "\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "close", _wrap_BasicIo_close, METH_VARARGS, "\n" - "Close the IO source. After closing a BasicIo instance can not\n" - " be read or written. Closing flushes any unwritten data. It is\n" - " safe to call close on a closed instance.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "write", _wrap_BasicIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Write data to the IO source. Current IO position is advanced\n" - " by the number of bytes written.\n" - ":type data: :py:term:`bytes-like object`\n" - ":param data: Pointer to data. Data must be at least *wcount*\n" - " bytes long\n" - ":type wcount: int\n" - ":param wcount: Number of bytes to be written.\n" - ":rtype: int\n" - ":return: Number of bytes written to IO source successfully;\n" - "\n" - " 0 if failure;\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to\n" - " the IO source. Current IO position is advanced by the number\n" - " of bytes written.\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: Number of bytes written to IO source successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "putb", _wrap_BasicIo_putb, METH_VARARGS, "\n" - "Write one byte to the IO source. Current IO position is\n" - " advanced by one byte.\n" - ":type data: int\n" - ":param data: The single byte to be written.\n" - ":rtype: int\n" - ":return: The value of the byte written if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "read", _wrap_BasicIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the IO source. Reading starts at the current\n" - " IO position and the position is advanced by the number of bytes\n" - " read.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the IO source. Reading starts at the current\n" - " IO position and the position is advanced by the number of bytes\n" - " read.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from IO source successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_BasicIo_getb, METH_VARARGS, "\n" - "Read one byte from the IO source. Current IO position is\n" - " advanced by one byte.\n" - ":rtype: int\n" - ":return: The byte read from the IO source if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_BasicIo_transfer, METH_VARARGS, "\n" - "Remove all data from this object's IO source and then transfer\n" - " data from the *src* BasicIo object into this object.\n" - "\n" - "The source object is invalidated by this operation and should not be\n" - "used after this method returns. This method exists primarily to\n" - "be used with the BasicIo::temporary() method.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "" }, - { "seek", _wrap_BasicIo_seek, METH_VARARGS, "\n" - "Move the current IO position.\n" - ":type offset: int\n" - ":param offset: Number of bytes to move the position relative\n" - " to the starting position specified by *pos*\n" - ":type pos: :py:class:`BasicIo.Position`\n" - ":param pos: Position from which the seek should start\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "mmap", _wrap_BasicIo_mmap, METH_VARARGS, "\n" - "Direct access to the IO data. For files, this is done by\n" - " mapping the file into the process's address space; for memory\n" - " blocks, this allows direct access to the memory block.\n" - ":type isWriteable: bool, optional\n" - ":param isWriteable: Set to true if the mapped area should be writeable\n" - " (default is false).\n" - ":rtype: memoryview\n" - ":return: A pointer to the mapped area.\n" - ":raises: Error In case of failure.\n" - "" }, - { "munmap", _wrap_BasicIo_munmap, METH_VARARGS, "\n" - "Remove a mapping established with mmap(). If the mapped area\n" - " is writeable, this ensures that changes are written back.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "tell", _wrap_BasicIo_tell, METH_VARARGS, "\n" - "Get the current IO position.\n" - ":rtype: int\n" - ":return: Offset from the start of IO if successful;\n" - "\n" - " -1 if failure;\n" - "" }, - { "size", _wrap_BasicIo_size, METH_VARARGS, "\n" - "Get the current size of the IO source in bytes.\n" - ":rtype: int\n" - ":return: Size of the IO source in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_BasicIo_isopen, METH_VARARGS, "Returns true if the IO source is open, otherwise false." }, - { "error", _wrap_BasicIo_error, METH_VARARGS, "Returns 0 if the IO source is in a valid state, otherwise nonzero." }, - { "eof", _wrap_BasicIo_eof, METH_VARARGS, "Returns true if the IO position has reached the end, otherwise false." }, - { "path", _wrap_BasicIo_path, METH_VARARGS, "\n" - "Return the path to the IO resource. Often used to form\n" - " comprehensive error messages where only a BasicIo instance is\n" - " available.\n" - "" }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.BasicIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - "\n" - "An interface for simple binary IO.\n" - "\n" - "Designed to have semantics and names similar to those of C style FILE*\n" - "operations. Subclasses should all behave the same so that they can be\n" - "interchanged.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__BasicIo_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__BasicIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__BasicIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__BasicIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type}; - -static SwigPyGetSet FileIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__FileIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "Constructor that accepts the file path on which IO will be\n" - " performed. The constructor does not open the file, and\n" - " therefore never failes.\n" - ":type path: str\n" - ":param path: The full path of a file\n" - "", &FileIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__FileIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__FileIo_methods[] = { - { "open", _wrap_FileIo_open, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Open the file using using the specified mode.\n" - "\n" - "This method can also be used to \"reopen\" a file which will flush any\n" - "unwritten data and reset the IO position to the start. Although\n" - "files can be opened in binary or text mode, this class has\n" - "only been tested carefully in binary mode.\n" - "\n" - ":type mode: str\n" - ":param mode: Specified that type of access allowed on the file.\n" - " Valid values match those of the C fopen command exactly.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Open the file using using the default access mode of \"rb\".\n" - " This method can also be used to \"reopen\" a file which will flush\n" - " any unwritten data and reset the IO position to the start.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "close", _wrap_FileIo_close, METH_VARARGS, "\n" - "Flush and unwritten data and close the file . It is\n" - " safe to call close on an already closed instance.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "write", _wrap_FileIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Write data to the file. The file position is advanced\n" - " by the number of bytes written.\n" - ":type data: :py:term:`bytes-like object`\n" - ":param data: Pointer to data. Data must be at least *wcount*\n" - " bytes long\n" - ":type wcount: int\n" - ":param wcount: Number of bytes to be written.\n" - ":rtype: int\n" - ":return: Number of bytes written to the file successfully;\n" - "\n" - " 0 if failure;\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to\n" - " the file. The file position is advanced by the number\n" - " of bytes written.\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: Number of bytes written to the file successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "putb", _wrap_FileIo_putb, METH_VARARGS, "\n" - "Write one byte to the file. The file position is\n" - " advanced by one byte.\n" - ":type data: int\n" - ":param data: The single byte to be written.\n" - ":rtype: int\n" - ":return: The value of the byte written if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "read", _wrap_FileIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the file. Reading starts at the current\n" - " file position and the position is advanced by the number of\n" - " bytes read.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the file. Reading starts at the current\n" - " file position and the position is advanced by the number of\n" - " bytes read.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from the file successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_FileIo_getb, METH_VARARGS, "\n" - "Read one byte from the file. The file position is\n" - " advanced by one byte.\n" - ":rtype: int\n" - ":return: The byte read from the file if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_FileIo_transfer, METH_VARARGS, "\n" - "Remove the contents of the file and then transfer data from\n" - " the *src* BasicIo object into the empty file.\n" - "\n" - "This method is optimized to simply rename the source file if the\n" - "source object is another FileIo instance. The source BasicIo object\n" - "is invalidated by this operation and should not be used after this\n" - "method returns. This method exists primarily to be used with\n" - "the BasicIo::temporary() method.\n" - "\n" - "Notes: If the caller doesn't have permissions to write to the file,\n" - " an exception is raised and *src* is deleted.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "" }, - { "seek", _wrap_FileIo_seek, METH_VARARGS, "\n" - "Move the current file position.\n" - ":type offset: int\n" - ":param offset: Number of bytes to move the file position\n" - " relative to the starting position specified by *pos*\n" - ":type pos: :py:class:`BasicIo.Position`\n" - ":param pos: Position from which the seek should start\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "mmap", _wrap_FileIo_mmap, METH_VARARGS, "\n" - "Map the file into the process's address space. The file must be\n" - " open before mmap() is called. If the mapped area is writeable,\n" - " changes may not be written back to the underlying file until\n" - " munmap() is called. The pointer is valid only as long as the\n" - " FileIo object exists.\n" - ":type isWriteable: bool, optional\n" - ":param isWriteable: Set to true if the mapped area should be writeable\n" - " (default is false).\n" - ":rtype: memoryview\n" - ":return: A pointer to the mapped area.\n" - ":raises: Error In case of failure.\n" - "" }, - { "munmap", _wrap_FileIo_munmap, METH_VARARGS, "\n" - "Remove a mapping established with mmap(). If the mapped area is\n" - " writeable, this ensures that changes are written back to the\n" - " underlying file.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "setPath", _wrap_FileIo_setPath, METH_VARARGS, " close the file source and set a new path." }, - { "tell", _wrap_FileIo_tell, METH_VARARGS, "\n" - "Get the current file position.\n" - ":rtype: int\n" - ":return: Offset from the start of the file if successful;\n" - "\n" - " -1 if failure;\n" - "" }, - { "size", _wrap_FileIo_size, METH_VARARGS, "\n" - "Flush any buffered writes and get the current file size\n" - " in bytes.\n" - ":rtype: int\n" - ":return: Size of the file in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_FileIo_isopen, METH_VARARGS, " Returns true if the file is open, otherwise false." }, - { "error", _wrap_FileIo_error, METH_VARARGS, " Returns 0 if the file is in a valid state, otherwise nonzero." }, - { "eof", _wrap_FileIo_eof, METH_VARARGS, " Returns true if the file position has reached the end, otherwise false." }, - { "path", _wrap_FileIo_path, METH_VARARGS, " Returns the path of the file" }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__FileIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.FileIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_FileIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - "\n" - "Provides binary file IO by implementing the BasicIo\n" - " interface.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__FileIo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__FileIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__FileIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_FileIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - _wrap_FileIo_size_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - getbuffer_Exiv2_FileIo, /* bf_getbuffer */ - releasebuffer_Exiv2_FileIo, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__FileIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__FileIo_type}; - -static SwigPyGetSet MemIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__MemIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "*Overload 1:*\n" - "Default constructor that results in an empty object\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - " Constructor that accepts a block of memory. A copy-on-write\n" - " algorithm allows read operations directly from the original data\n" - " and will create a copy of the buffer on the first write operation.\n" - " :type data: :py:term:`bytes-like object`\n" - " :param data: Pointer to data. Data must be at least *size*\n" - " bytes long\n" - " :type size: int\n" - " :param size: Number of bytes to copy.\n" - "", &MemIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__MemIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__MemIo_methods[] = { - { "open", _wrap_MemIo_open, METH_VARARGS, "\n" - "Memory IO is always open for reading and writing. This method\n" - " therefore only resets the IO position to the start.\n" - "\n" - ":rtype: int\n" - ":return: 0\n" - "" }, - { "close", _wrap_MemIo_close, METH_VARARGS, "\n" - "Does nothing on MemIo objects.\n" - ":rtype: int\n" - ":return: 0\n" - "" }, - { "write", _wrap_MemIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Write data to the memory block. If needed, the size of the\n" - " internal memory block is expanded. The IO position is advanced\n" - " by the number of bytes written.\n" - ":type data: :py:term:`bytes-like object`\n" - ":param data: Pointer to data. Data must be at least *wcount*\n" - " bytes long\n" - ":type wcount: int\n" - ":param wcount: Number of bytes to be written.\n" - ":rtype: int\n" - ":return: Number of bytes written to the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to\n" - " the memory block. If needed, the size of the internal memory\n" - " block is expanded. The IO position is advanced by the number\n" - " of bytes written.\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: Number of bytes written to the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "putb", _wrap_MemIo_putb, METH_VARARGS, "\n" - "Write one byte to the memory block. The IO position is\n" - " advanced by one byte.\n" - ":type data: int\n" - ":param data: The single byte to be written.\n" - ":rtype: int\n" - ":return: The value of the byte written if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "read", _wrap_MemIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the memory block. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the memory block. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_MemIo_getb, METH_VARARGS, "\n" - "Read one byte from the memory block. The IO position is\n" - " advanced by one byte.\n" - ":rtype: int\n" - ":return: The byte read from the memory block if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_MemIo_transfer, METH_VARARGS, "\n" - "Clear the memory block and then transfer data from\n" - " the *src* BasicIo object into a new block of memory.\n" - "\n" - "This method is optimized to simply swap memory block if the source\n" - "object is another MemIo instance. The source BasicIo instance\n" - "is invalidated by this operation and should not be used after this\n" - "method returns. This method exists primarily to be used with\n" - "the BasicIo::temporary() method.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "" }, - { "seek", _wrap_MemIo_seek, METH_VARARGS, "\n" - "Move the current IO position.\n" - ":type offset: int\n" - ":param offset: Number of bytes to move the IO position\n" - " relative to the starting position specified by *pos*\n" - ":type pos: :py:class:`BasicIo.Position`\n" - ":param pos: Position from which the seek should start\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "mmap", _wrap_MemIo_mmap, METH_VARARGS, "\n" - "Allow direct access to the underlying data buffer. The buffer\n" - " is not protected against write access in any way, the argument\n" - " is ignored.\n" - "Notes: The application must ensure that the memory pointed to by the\n" - " returned pointer remains valid and allocated as long as the\n" - " MemIo object exists.\n" - "" }, - { "munmap", _wrap_MemIo_munmap, METH_VARARGS, "" }, - { "tell", _wrap_MemIo_tell, METH_VARARGS, "\n" - "Get the current IO position.\n" - ":rtype: int\n" - ":return: Offset from the start of the memory block\n" - "" }, - { "size", _wrap_MemIo_size, METH_VARARGS, "\n" - "Get the current memory buffer size in bytes.\n" - ":rtype: int\n" - ":return: Size of the in memory data in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_MemIo_isopen, METH_VARARGS, "Always returns true" }, - { "error", _wrap_MemIo_error, METH_VARARGS, "Always returns 0" }, - { "eof", _wrap_MemIo_eof, METH_VARARGS, "Returns true if the IO position has reached the end, otherwise false." }, - { "path", _wrap_MemIo_path, METH_VARARGS, " Returns a dummy path, indicating that memory access is used" }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__MemIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.MemIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_MemIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - "\n" - "Provides binary IO on blocks of memory by implementing the BasicIo\n" - " interface. A copy-on-write implementation ensures that the data passed\n" - " in is only copied when necessary, i.e., as soon as data is written to\n" - " the MemIo. The original data is only used for reading. If writes are\n" - " performed, the changed data can be retrieved using the read methods\n" - " (since the data used in construction is never modified).\n" - "\n" - "Notes: If read only usage of this class is common, it might be worth\n" - " creating a specialized readonly class or changing this one to\n" - " have a readonly mode.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__MemIo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__MemIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__MemIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_MemIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - _wrap_MemIo_size_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - getbuffer_Exiv2_MemIo, /* bf_getbuffer */ - releasebuffer_Exiv2_MemIo, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__MemIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__MemIo_type}; - -static SwigPyGetSet XPathIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XPathIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Default constructor that reads data from stdin/data uri path and writes them to the temp file.", &XPathIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__XPathIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XPathIo_methods[] = { - { "transfer", _wrap_XPathIo_transfer, METH_VARARGS, "\n" - "Change the name of the temp file and make it untemporary before\n" - " calling the method of superclass FileIo::transfer.\n" - "" }, - { "writeDataToFile", (PyCFunction)(void(*)(void))_wrap_XPathIo_writeDataToFile, METH_STATIC|METH_VARARGS, "\n" - "Read the data from stdin/data uri path and write them to the file.\n" - ":type orgPath: str\n" - ":param orgPath: It equals \"-\" if the input data's from stdin. Otherwise, it's data uri path.\n" - ":rtype: str\n" - ":return: the name of the new file.\n" - ":raises: Error if it fails.\n" - "" }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__XPathIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.XPathIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XPathIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - " Provides binary IO for the data from stdin and data uri path.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XPathIo_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XPathIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XPathIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XPathIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XPathIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XPathIo_type}; - -static SwigPyGetSet RemoteIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__RemoteIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Destructor. Releases all managed memory.", &RemoteIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__RemoteIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__RemoteIo_methods[] = { - { "open", _wrap_RemoteIo_open, METH_VARARGS, "\n" - "Connect to the remote server, get the size of the remote file and\n" - " allocate the array of blocksMap.\n" - "\n" - " If the blocksMap is already allocated (this method has been called before),\n" - " it just reset IO position to the start and does not flush the old data.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "close", _wrap_RemoteIo_close, METH_VARARGS, "\n" - "Reset the IO position to the start. It does not release the data.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "write", _wrap_RemoteIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Not support this method.\n" - ":rtype: int\n" - ":return: 0 means failure\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to the remote file.\n" - "\n" - "The write access is done in an efficient way. It only sends the range of different\n" - "bytes between the current data and BasicIo instance to the remote machine.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: The size of BasicIo instance;\n" - "\n" - " 0 if failure;\n" - ":raises: Error In case of failure\n" - "\n" - "Notes: The write access is only supported by http, https, ssh.\n" - "" }, - { "putb", _wrap_RemoteIo_putb, METH_VARARGS, "\n" - "Not support\n" - ":rtype: int\n" - ":return: 0 means failure\n" - "" }, - { "read", _wrap_RemoteIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the memory blocks. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - " If the memory blocks are not populated (False), it will connect to server\n" - " and populate the data to memory blocks.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the the memory blocks. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - " If the memory blocks are not populated (!= bMemory), it will connect to server\n" - " and populate the data to memory blocks.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_RemoteIo_getb, METH_VARARGS, "\n" - "Read one byte from the memory blocks. The IO position is\n" - " advanced by one byte.\n" - " If the memory block is not populated (!= bMemory), it will connect to server\n" - " and populate the data to the memory block.\n" - ":rtype: int\n" - ":return: The byte read from the memory block if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_RemoteIo_transfer, METH_VARARGS, "\n" - "Remove the contents of the file and then transfer data from\n" - " the *src* BasicIo object into the empty file.\n" - "\n" - "The write access is done in an efficient way. It only sends the range of different\n" - "bytes between the current data and BasicIo instance to the remote machine.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "\n" - "Notes: The write access is only supported by http, https, ssh.\n" - "" }, - { "seek", _wrap_RemoteIo_seek, METH_VARARGS, "\n" - "Move the current IO position.\n" - ":type offset: int\n" - ":param offset: Number of bytes to move the IO position\n" - " relative to the starting position specified by *pos*\n" - ":type pos: :py:class:`BasicIo.Position`\n" - ":param pos: Position from which the seek should start\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "mmap", _wrap_RemoteIo_mmap, METH_VARARGS, "\n" - "Not support\n" - ":rtype: memoryview\n" - ":return: NULL\n" - "" }, - { "munmap", _wrap_RemoteIo_munmap, METH_VARARGS, "\n" - "Not support\n" - ":rtype: int\n" - ":return: 0\n" - "" }, - { "tell", _wrap_RemoteIo_tell, METH_VARARGS, "\n" - "Get the current IO position.\n" - ":rtype: int\n" - ":return: Offset from the start of the memory block\n" - "" }, - { "size", _wrap_RemoteIo_size, METH_VARARGS, "\n" - "Get the current memory buffer size in bytes.\n" - ":rtype: int\n" - ":return: Size of the in memory data in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_RemoteIo_isopen, METH_VARARGS, "Returns true if the memory area is allocated." }, - { "error", _wrap_RemoteIo_error, METH_VARARGS, "Always returns 0" }, - { "eof", _wrap_RemoteIo_eof, METH_VARARGS, "Returns true if the IO position has reached the end, otherwise false." }, - { "path", _wrap_RemoteIo_path, METH_VARARGS, "Returns the URL of the file." }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__RemoteIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.RemoteIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_RemoteIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - "\n" - "Provides remote binary file IO by implementing the BasicIo interface. This is an\n" - " abstract class. The logics for remote access are implemented in HttpIo, CurlIo, SshIo which\n" - " are the derived classes of RemoteIo.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__RemoteIo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__RemoteIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__RemoteIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - _wrap_RemoteIo_size_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - getbuffer_Exiv2_RemoteIo, /* bf_getbuffer */ - releasebuffer_Exiv2_RemoteIo, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__RemoteIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__RemoteIo_type}; - -static SwigPyGetSet HttpIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__HttpIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "Constructor that accepts the http URL on which IO will be\n" - " performed. The constructor does not open the file, and\n" - " therefore never failes.\n" - ":type url: str\n" - ":param url: The full path of url\n" - ":type blockSize: int, optional\n" - ":param blockSize: the size of the memory block. The file content is\n" - " divided into the memory blocks. These blocks are populated\n" - " on demand from the server, so it avoids copying the complete file.\n" - "", &HttpIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__HttpIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__HttpIo_methods[] = { - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__HttpIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.HttpIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - " Provides the http read/write access for the RemoteIo.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__HttpIo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__HttpIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__HttpIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_HttpIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif +SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_BasicIo) /* defines _wrap_delete_BasicIo_destructor_closure */ + +SWIGPY_LENFUNC_CLOSURE(_wrap_BasicIo_size) /* defines _wrap_BasicIo_size_lenfunc_closure */ + +static PyMethodDef SwigMethods[] = { + { "_enum_list_Position", _wrap__enum_list_Position, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__HttpIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__HttpIo_type}; - -static SwigPyGetSet CurlIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__CurlIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "Constructor that accepts the URL on which IO will be\n" - " performed.\n" - ":type url: str\n" - ":param url: The full path of url\n" - ":type blockSize: int, optional\n" - ":param blockSize: the size of the memory block. The file content is\n" - " divided into the memory blocks. These blocks are populated\n" - " on demand from the server, so it avoids copying the complete file.\n" - ":raises: Error if it is unable to init curl pointer.\n" - "", &CurlIo___dict___getset }, +static SwigPyGetSet BasicIo___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__BasicIo_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"", &BasicIo___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__CurlIo_richcompare(PyObject *self, PyObject *other, int op) { +SwigPyBuiltin__Exiv2__BasicIo_richcompare(PyObject *self, PyObject *other, int op) { PyObject *result = NULL; PyObject *tuple = PyTuple_New(1); assert(tuple); @@ -11075,26 +5559,190 @@ SwigPyBuiltin__Exiv2__CurlIo_richcompare(PyObject *self, PyObject *other, int op return result; } -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__CurlIo_methods[] = { - { "write", _wrap_CurlIo_write, METH_VARARGS, "\n" +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { + { "open", _wrap_BasicIo_open, METH_VARARGS, "\n" + "Open the IO source using the default access mode. The\n" + " default mode should allow for reading and writing.\n" + "\n" + "This method can also be used to \"reopen\" an IO source which will\n" + "flush any unwritten data and reset the IO position to the start.\n" + "Subclasses may provide custom methods to allow for\n" + "opening IO sources differently.\n" + "\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure.\n" + "" }, + { "close", _wrap_BasicIo_close, METH_VARARGS, "\n" + "Close the IO source. After closing a BasicIo instance can not\n" + " be read or written. Closing flushes any unwritten data. It is\n" + " safe to call close on a closed instance.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure.\n" + "" }, + { "write", _wrap_BasicIo_write, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Write data to the IO source. Current IO position is advanced\n" + " by the number of bytes written.\n" + ":type data: :py:term:`bytes-like object`\n" + ":param data: Pointer to data. Data must be at least *wcount*\n" + " bytes long\n" + ":type wcount: int\n" + ":param wcount: Number of bytes to be written.\n" + ":rtype: int\n" + ":return: Number of bytes written to IO source successfully;\n" + "\n" + " 0 if failure;\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Write data that is read from another BasicIo instance to\n" + " the IO source. Current IO position is advanced by the number\n" + " of bytes written.\n" + ":type src: :py:class:`BasicIo`\n" + ":param src: Reference to another BasicIo instance. Reading start\n" + " at the source's current IO position\n" + ":rtype: int\n" + ":return: Number of bytes written to IO source successfully;\n" + "\n" + " 0 if failure;\n" + "" }, + { "putb", _wrap_BasicIo_putb, METH_VARARGS, "\n" + "Write one byte to the IO source. Current IO position is\n" + " advanced by one byte.\n" + ":type data: int\n" + ":param data: The single byte to be written.\n" + ":rtype: int\n" + ":return: The value of the byte written if successful;\n" + "\n" + " EOF if failure;\n" + "" }, + { "read", _wrap_BasicIo_read, METH_VARARGS, "\n" "*Overload 1:*\n" "\n" - "Write access is only available for some protocols. This method\n" - " will call RemoteIo::write(const byte* data, long wcount) if the write\n" - " access is available for the protocol. Otherwise, it throws the Error.\n" + "Read data from the IO source. Reading starts at the current\n" + " IO position and the position is advanced by the number of bytes\n" + " read.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":rtype: :py:class:`DataBuf`\n" + ":return: DataBuf instance containing the bytes read. Use the\n" + " DataBuf::size_ member to find the number of bytes read.\n" + " DataBuf::size_ will be 0 on failure.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Read data from the IO source. Reading starts at the current\n" + " IO position and the position is advanced by the number of bytes\n" + " read.\n" + ":type buf: writeable :py:term:`bytes-like object`\n" + ":param buf: Pointer to a block of memory into which the read data\n" + " is stored. The memory block must be at least *rcount* bytes\n" + " long.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":rtype: int\n" + ":return: Number of bytes read from IO source successfully;\n" + "\n" + " 0 if failure;\n" + "" }, + { "getb", _wrap_BasicIo_getb, METH_VARARGS, "\n" + "Read one byte from the IO source. Current IO position is\n" + " advanced by one byte.\n" + ":rtype: int\n" + ":return: The byte read from the IO source if successful;\n" + "\n" + " EOF if failure;\n" + "" }, + { "transfer", _wrap_BasicIo_transfer, METH_VARARGS, "\n" + "Remove all data from this object's IO source and then transfer\n" + " data from the *src* BasicIo object into this object.\n" "\n" - "|\n" + "The source object is invalidated by this operation and should not be\n" + "used after this method returns. This method exists primarily to\n" + "be used with the BasicIo::temporary() method.\n" "\n" - "*Overload 2:*\n" + ":type src: :py:class:`BasicIo`\n" + ":param src: Reference to another BasicIo instance. The entire contents\n" + " of src are transferred to this object. The *src* object is\n" + " invalidated by the method.\n" + ":raises: Error In case of failure\n" + "" }, + { "seek", _wrap_BasicIo_seek, METH_VARARGS, "\n" + "Move the current IO position.\n" + ":type offset: int\n" + ":param offset: Number of bytes to move the position relative\n" + " to the starting position specified by *pos*\n" + ":type pos: :py:class:`BasicIo.Position`\n" + ":param pos: Position from which the seek should start\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure;\n" + "" }, + { "mmap", _wrap_BasicIo_mmap, METH_VARARGS, "\n" + "Direct access to the IO data. For files, this is done by\n" + " mapping the file into the process's address space; for memory\n" + " blocks, this allows direct access to the memory block.\n" + ":type isWriteable: bool, optional\n" + ":param isWriteable: Set to true if the mapped area should be writeable\n" + " (default is false).\n" + ":rtype: memoryview\n" + ":return: A pointer to the mapped area.\n" + ":raises: Error In case of failure.\n" + "" }, + { "munmap", _wrap_BasicIo_munmap, METH_VARARGS, "\n" + "Remove a mapping established with mmap(). If the mapped area\n" + " is writeable, this ensures that changes are written back.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure;\n" + "" }, + { "tell", _wrap_BasicIo_tell, METH_VARARGS, "\n" + "Get the current IO position.\n" + ":rtype: int\n" + ":return: Offset from the start of IO if successful;\n" + "\n" + " -1 if failure;\n" + "" }, + { "size", _wrap_BasicIo_size, METH_VARARGS, "\n" + "Get the current size of the IO source in bytes.\n" + ":rtype: int\n" + ":return: Size of the IO source in bytes;\n" + "\n" + " -1 if failure;\n" + "" }, + { "isopen", _wrap_BasicIo_isopen, METH_VARARGS, "Returns true if the IO source is open, otherwise false." }, + { "error", _wrap_BasicIo_error, METH_VARARGS, "Returns 0 if the IO source is in a valid state, otherwise nonzero." }, + { "eof", _wrap_BasicIo_eof, METH_VARARGS, "Returns true if the IO position has reached the end, otherwise false." }, + { "path", _wrap_BasicIo_path, METH_VARARGS, "\n" + "Return the path to the IO resource. Often used to form\n" + " comprehensive error messages where only a BasicIo instance is\n" + " available.\n" + "" }, + { "ioType", _wrap_BasicIo_ioType, METH_VARARGS, "\n" + "Return the derived class type.\n" "\n" - "Write access is only available for some protocols. This method\n" - " will call RemoteIo::write(BasicIo& src) if the write access is available\n" - " for the protocol. Otherwise, it throws the Error.\n" + "You shouldn't usually need to know the type of IO as they all have\n" + "the same interface.\n" + ":rtype: str\n" + ":return: A class name such as FileIo.\n" "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; -static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { +static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) @@ -11102,10 +5750,10 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "exiv2.basicio.CurlIo", /* tp_name */ + "exiv2.basicio.BasicIo", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ - _wrap_delete_CurlIo_destructor_closure, /* tp_dealloc */ + _wrap_delete_BasicIo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 (printfunc) 0, /* tp_print */ #else @@ -11119,39 +5767,42 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { (cmpfunc) 0, /* tp_compare */ #endif (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__CurlIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__CurlIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__CurlIo_type.as_mapping, /* tp_as_mapping */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping, /* tp_as_mapping */ SwigPyObject_hash, /* tp_hash */ (ternaryfunc) 0, /* tp_call */ (reprfunc) 0, /* tp_str */ (getattrofunc) 0, /* tp_getattro */ (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__CurlIo_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" - "Provides the http, https read/write access and ftp read access for the RemoteIo.\n" - " This class is based on libcurl.\n" + "An interface for simple binary IO.\n" + "\n" + "Designed to have semantics and names similar to those of C style FILE*\n" + "operations. Subclasses should all behave the same so that they can be\n" + "interchanged.\n" "",/* tp_doc */ (traverseproc) 0, /* tp_traverse */ (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__CurlIo_richcompare, /* tp_richcompare */ + SwigPyBuiltin__Exiv2__BasicIo_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc) 0, /* tp_iter */ (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__CurlIo_methods, /* tp_methods */ + SwigPyBuiltin__Exiv2__BasicIo_methods, /* tp_methods */ 0, /* tp_members */ - SwigPyBuiltin__Exiv2__CurlIo_getset, /* tp_getset */ + SwigPyBuiltin__Exiv2__BasicIo_getset, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ (descrgetfunc) 0, /* tp_descr_get */ (descrsetfunc) 0, /* tp_descr_set */ offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_CurlIo, /* tp_init */ + SwigPyBuiltin_BadInit, /* tp_init */ (allocfunc) 0, /* tp_alloc */ (newfunc) 0, /* tp_new */ (freefunc) 0, /* tp_free */ @@ -11256,7 +5907,7 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ + _wrap_BasicIo_size_lenfunc_closure, /* sq_length */ (binaryfunc) 0, /* sq_concat */ (ssizeargfunc) 0, /* sq_repeat */ (ssizeargfunc) 0, /* sq_item */ @@ -11282,8 +5933,8 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { (segcountproc) 0, /* bf_getsegcount */ (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + getbuffer_Exiv2_BasicIo, /* bf_getbuffer */ + releasebuffer_Exiv2_BasicIo, /* bf_releasebuffer */ }, (PyObject *) 0, /* ht_name */ (PyObject *) 0, /* ht_slots */ @@ -11305,14 +5956,11 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__CurlIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__CurlIo_type}; +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__BasicIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -11331,20 +5979,16 @@ static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(n static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } -static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__BasicIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__CurlIo_clientdata, 0}; +static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__FileIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__HttpIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__MemIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__RemoteIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", "Exiv2::XPathIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__XPathIo_clientdata, 0}; +static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SwigPyObject = {"_p_SwigPyObject", "SwigPyObject *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_first_type = {"_p_first_type", "first_type *", 0, 0, (void*)0, 0}; @@ -11362,7 +6006,6 @@ static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "uint16_t static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__BasicIo, - &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__FileIo, &_swigt__p_Exiv2__HttpIo, @@ -11385,14 +6028,13 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_unsigned_short, }; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__HttpIo[] = {{&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__MemIo[] = {{&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__XPathIo[] = {{&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__FileIo[] = { {&_swigt__p_Exiv2__FileIo, 0, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__FileIo, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__XPathIo[] = { {&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SwigPyObject[] = { {&_swigt__p_SwigPyObject, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_first_type[] = { {&_swigt__p_first_type, 0, 0, 0},{0, 0, 0, 0}}; @@ -11410,7 +6052,6 @@ static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__BasicIo, - _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__FileIo, _swigc__p_Exiv2__HttpIo, @@ -11442,7 +6083,7 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -static PyTypeObject *builtin_bases[3]; +static PyTypeObject *builtin_bases[2]; /* ----------------------------------------------------------------------------- * Type initialization: @@ -11899,7 +6540,7 @@ SWIG_init(void) { SWIG_InstallConstants(d,swig_const_table); - SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__doc__",SWIG_FromCharPtr("Classes to access files, memory and remote data.")); + SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__doc__",SWIG_FromCharPtr("Class interface to access files, memory and remote data.")); { exiv2_module = PyImport_ImportModule("exiv2"); @@ -11951,210 +6592,6 @@ SWIG_init(void) { SwigPyBuiltin_AddPublicSymbol(public_interface, "BasicIo"); d = md; - /* type 'Exiv2::FileIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__FileIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__BasicIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'FileIo' as base 'Exiv2::BasicIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'FileIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "FileIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "FileIo"); - d = md; - - /* type 'Exiv2::MemIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__MemIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__BasicIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'MemIo' as base 'Exiv2::BasicIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'MemIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "MemIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "MemIo"); - d = md; - - /* type 'Exiv2::XPathIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XPathIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__FileIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XPathIo' as base 'Exiv2::FileIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XPathIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "XPathIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "XPathIo"); - d = md; - - /* type 'Exiv2::RemoteIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__RemoteIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__BasicIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'RemoteIo' as base 'Exiv2::BasicIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'RemoteIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "RemoteIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "RemoteIo"); - d = md; - - /* type 'Exiv2::HttpIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__HttpIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__RemoteIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'HttpIo' as base 'Exiv2::RemoteIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'HttpIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "HttpIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "HttpIo"); - d = md; - - /* type 'Exiv2::CurlIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__CurlIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__RemoteIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'CurlIo' as base 'Exiv2::RemoteIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'CurlIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "CurlIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "CurlIo"); - d = md; - /* Initialize threading */ SWIG_PYTHON_INITIALIZE_THREADS; #if PY_VERSION_HEX >= 0x03000000 diff --git a/src/swig-0_27_3/image_wrap.cxx b/src/swig-0_27_3/image_wrap.cxx index d250444..432a225 100644 --- a/src/swig-0_27_3/image_wrap.cxx +++ b/src/swig-0_27_3/image_wrap.cxx @@ -3930,76 +3930,75 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__AsciiValue swig_types[2] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[3] #define SWIGTYPE_p_Exiv2__CommentValue swig_types[4] -#define SWIGTYPE_p_Exiv2__CurlIo swig_types[5] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[6] -#define SWIGTYPE_p_Exiv2__DataSet swig_types[7] -#define SWIGTYPE_p_Exiv2__DataValue swig_types[8] -#define SWIGTYPE_p_Exiv2__DateValue swig_types[9] -#define SWIGTYPE_p_Exiv2__ExifData swig_types[10] -#define SWIGTYPE_p_Exiv2__ExifKey swig_types[11] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[12] -#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[13] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[14] -#define SWIGTYPE_p_Exiv2__Image swig_types[15] -#define SWIGTYPE_p_Exiv2__ImageFactory swig_types[16] -#define SWIGTYPE_p_Exiv2__IptcData swig_types[17] -#define SWIGTYPE_p_Exiv2__IptcKey swig_types[18] -#define SWIGTYPE_p_Exiv2__Key swig_types[19] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[20] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[21] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[22] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[23] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[24] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[25] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[26] -#define SWIGTYPE_p_Exiv2__Value swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[34] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[35] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpData swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[40] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[41] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[42] -#define SWIGTYPE_p_IptcData_iterator swig_types[43] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[44] -#define SWIGTYPE_p_SwigPyObject swig_types[45] -#define SWIGTYPE_p_ValueType swig_types[46] -#define SWIGTYPE_p_XmpData_iterator swig_types[47] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[48] -#define SWIGTYPE_p_allocator_type swig_types[49] -#define SWIGTYPE_p_char swig_types[50] -#define SWIGTYPE_p_const_iterator swig_types[51] -#define SWIGTYPE_p_difference_type swig_types[52] -#define SWIGTYPE_p_first_type swig_types[53] -#define SWIGTYPE_p_int swig_types[54] -#define SWIGTYPE_p_iterator swig_types[55] -#define SWIGTYPE_p_key_type swig_types[56] -#define SWIGTYPE_p_long_long swig_types[57] -#define SWIGTYPE_p_mapped_type swig_types[58] -#define SWIGTYPE_p_second_type swig_types[59] -#define SWIGTYPE_p_short swig_types[60] -#define SWIGTYPE_p_signed_char swig_types[61] -#define SWIGTYPE_p_size_type swig_types[62] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[63] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[64] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[65] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[66] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[67] -#define SWIGTYPE_p_unsigned_char swig_types[68] -#define SWIGTYPE_p_unsigned_int swig_types[69] -#define SWIGTYPE_p_unsigned_long_long swig_types[70] -#define SWIGTYPE_p_unsigned_short swig_types[71] -#define SWIGTYPE_p_value_type swig_types[72] -static swig_type_info *swig_types[74]; -static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[5] +#define SWIGTYPE_p_Exiv2__DataSet swig_types[6] +#define SWIGTYPE_p_Exiv2__DataValue swig_types[7] +#define SWIGTYPE_p_Exiv2__DateValue swig_types[8] +#define SWIGTYPE_p_Exiv2__ExifData swig_types[9] +#define SWIGTYPE_p_Exiv2__ExifKey swig_types[10] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[11] +#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[13] +#define SWIGTYPE_p_Exiv2__Image swig_types[14] +#define SWIGTYPE_p_Exiv2__ImageFactory swig_types[15] +#define SWIGTYPE_p_Exiv2__IptcData swig_types[16] +#define SWIGTYPE_p_Exiv2__IptcKey swig_types[17] +#define SWIGTYPE_p_Exiv2__Key swig_types[18] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[19] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[20] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] +#define SWIGTYPE_p_Exiv2__Value swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpData swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] +#define SWIGTYPE_p_IptcData_iterator swig_types[42] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] +#define SWIGTYPE_p_SwigPyObject swig_types[44] +#define SWIGTYPE_p_ValueType swig_types[45] +#define SWIGTYPE_p_XmpData_iterator swig_types[46] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] +#define SWIGTYPE_p_allocator_type swig_types[48] +#define SWIGTYPE_p_char swig_types[49] +#define SWIGTYPE_p_const_iterator swig_types[50] +#define SWIGTYPE_p_difference_type swig_types[51] +#define SWIGTYPE_p_first_type swig_types[52] +#define SWIGTYPE_p_int swig_types[53] +#define SWIGTYPE_p_iterator swig_types[54] +#define SWIGTYPE_p_key_type swig_types[55] +#define SWIGTYPE_p_long_long swig_types[56] +#define SWIGTYPE_p_mapped_type swig_types[57] +#define SWIGTYPE_p_second_type swig_types[58] +#define SWIGTYPE_p_short swig_types[59] +#define SWIGTYPE_p_signed_char swig_types[60] +#define SWIGTYPE_p_size_type swig_types[61] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] +#define SWIGTYPE_p_unsigned_char swig_types[67] +#define SWIGTYPE_p_unsigned_int swig_types[68] +#define SWIGTYPE_p_unsigned_long_long swig_types[69] +#define SWIGTYPE_p_unsigned_short swig_types[70] +#define SWIGTYPE_p_value_type swig_types[71] +static swig_type_info *swig_types[73]; +static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4198,19 +4197,6 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" -#ifndef EXV_USE_CURL -namespace Exiv2 { - class CurlIo : public RemoteIo { - public: - CurlIo(const std::string& url, size_t blockSize=0) { - throw std::runtime_error( - "CurlIo not enabled in linked libexiv2"); - }; - }; -} -#endif - - #include @@ -4699,29 +4685,6 @@ SWIGINTERNINLINE PyObject* } -static swig_type_info* basicio_subtype(Exiv2::BasicIo* ptr) { - if (dynamic_cast(ptr)) - return SWIGTYPE_p_Exiv2__MemIo; - else if (dynamic_cast(ptr)) { - if (dynamic_cast(ptr)) - return SWIGTYPE_p_Exiv2__XPathIo; - else - return SWIGTYPE_p_Exiv2__FileIo; - } - else if (dynamic_cast(ptr)) { - if (dynamic_cast(ptr)) - return SWIGTYPE_p_Exiv2__HttpIo; - - else if (dynamic_cast(ptr)) - return SWIGTYPE_p_Exiv2__CurlIo; - - else - return SWIGTYPE_p_Exiv2__RemoteIo; - } - return SWIGTYPE_p_Exiv2__BasicIo; -}; - - static PyObject* PyEnum_Exiv2_MetadataId = NULL; @@ -6051,9 +6014,7 @@ SWIGINTERN PyObject *_wrap_Image_io(PyObject *self, PyObject *args) { SWIG_fail; } } - { - resultobj = SWIG_NewPointerObj(result, basicio_subtype(result), 0); - } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__BasicIo, 0 | 0 ); if (resultobj != Py_None) if (PyObject_SetAttrString(resultobj, "_refers_to", self)) { @@ -6351,11 +6312,9 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_0(PyObject *self, Py_ssiz SWIG_fail; } } - { - Exiv2::BasicIo* ptr = (&result)->release(); - resultobj = SWIG_NewPointerObj( - ptr, basicio_subtype(ptr), SWIG_POINTER_OWN); - } + + resultobj = SWIG_NewPointerObj((&result)->release(), SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_OWN | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -6959,11 +6918,9 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_1(PyObject *self, Py_ssiz SWIG_fail; } } - { - Exiv2::BasicIo* ptr = (&result)->release(); - resultobj = SWIG_NewPointerObj( - ptr, basicio_subtype(ptr), SWIG_POINTER_OWN); - } + + resultobj = SWIG_NewPointerObj((&result)->release(), SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_OWN | 0 ); + PyObject_SetAttrString(resultobj, "_refers_to", _global_view); @@ -7970,9 +7927,6 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ImageFactory_clientdata = {0, /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -7988,9 +7942,6 @@ static void *_p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM( static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) (Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } -static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); -} static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); } @@ -8000,12 +7951,6 @@ static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newme static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); } -static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} -static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); -} static void *_p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::StringValueBase *) ((Exiv2::AsciiValue *) x)); } @@ -8085,25 +8030,25 @@ static swig_type_info _swigt__p_ExifData_iterator = {"_p_ExifData_iterator", "Ex static swig_type_info _swigt__p_ExifData_iterator_base = {"_p_ExifData_iterator_base", "ExifData_iterator_base *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__AsciiValue = {"_p_Exiv2__AsciiValue", "Exiv2::AsciiValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_Exiv2__CommentValue = {"_p_Exiv2__CommentValue", "Exiv2::CommentValue *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataSet = {"_p_Exiv2__DataSet", "Exiv2::DataSet *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DateValue = {"_p_Exiv2__DateValue", "Exiv2::DateValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifData = {"_p_Exiv2__ExifData", "Exiv2::ExifData *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifKey = {"_p_Exiv2__ExifKey", "Exiv2::ExifKey *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__GroupInfo = {"_p_Exiv2__GroupInfo", "Exiv2::GroupInfo *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Image = {"_p_Exiv2__Image", "Exiv2::Image *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Image_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__ImageFactory = {"_p_Exiv2__ImageFactory", "Exiv2::ImageFactory *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__ImageFactory_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__IptcData = {"_p_Exiv2__IptcData", "Exiv2::IptcData *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValueBase = {"_p_Exiv2__StringValueBase", "Exiv2::StringValueBase *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__TagInfo = {"_p_Exiv2__TagInfo", "Exiv2::TagInfo *", 0, 0, (void*)0, 0}; @@ -8117,7 +8062,6 @@ static swig_type_info _swigt__p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t static swig_type_info _swigt__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t = {"_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t", "Exiv2::URationalValue *|Exiv2::ValueType< Exiv2::URational > *|Exiv2::ValueType< std::pair< uint32_t,uint32_t > > *|Exiv2::ValueType< std::pair< unsigned int,unsigned int > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ValueTypeT_uint16_t_t = {"_p_Exiv2__ValueTypeT_uint16_t_t", "Exiv2::UShortValue *|Exiv2::ValueType< uint16_t > *|Exiv2::ValueType< unsigned short > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ValueTypeT_uint32_t_t = {"_p_Exiv2__ValueTypeT_uint32_t_t", "Exiv2::ULongValue *|Exiv2::ValueType< uint32_t > *|Exiv2::ValueType< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", "Exiv2::XPathIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpArrayValue = {"_p_Exiv2__XmpArrayValue", "Exiv2::XmpArrayValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpData = {"_p_Exiv2__XmpData", "Exiv2::XmpData *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpKey = {"_p_Exiv2__XmpKey", "Exiv2::XmpKey *", 0, 0, (void*)0, 0}; @@ -8161,7 +8105,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__AsciiValue, &_swigt__p_Exiv2__BasicIo, &_swigt__p_Exiv2__CommentValue, - &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__DataSet, &_swigt__p_Exiv2__DataValue, @@ -8234,26 +8177,26 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_ExifData_iterator[] = { {&_swigt__p_ExifData_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ExifData_iterator_base[] = { {&_swigt__p_ExifData_iterator_base, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__AsciiValue[] = { {&_swigt__p_Exiv2__AsciiValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__FileIo[] = {{&_swigt__p_Exiv2__FileIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__HttpIo[] = {{&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__MemIo[] = {{&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = {{&_swigt__p_Exiv2__RemoteIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__XPathIo[] = {{&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__CommentValue[] = { {&_swigt__p_Exiv2__CommentValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataSet[] = { {&_swigt__p_Exiv2__DataSet, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DateValue[] = { {&_swigt__p_Exiv2__DateValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifData[] = { {&_swigt__p_Exiv2__ExifData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifKey[] = { {&_swigt__p_Exiv2__ExifKey, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__FileIo[] = { {&_swigt__p_Exiv2__FileIo, 0, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__FileIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__GroupInfo[] = { {&_swigt__p_Exiv2__GroupInfo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Image[] = { {&_swigt__p_Exiv2__Image, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ImageFactory[] = { {&_swigt__p_Exiv2__ImageFactory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcData[] = { {&_swigt__p_Exiv2__IptcData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValueBase[] = { {&_swigt__p_Exiv2__StringValueBase, 0, 0, 0}, {&_swigt__p_Exiv2__AsciiValue, _p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__CommentValue, _p_Exiv2__CommentValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__StringValue, _p_Exiv2__StringValueTo_p_Exiv2__StringValueBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__TagInfo[] = { {&_swigt__p_Exiv2__TagInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -8267,7 +8210,6 @@ static swig_cast_info _swigc__p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t static swig_cast_info _swigc__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ValueTypeT_uint16_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_uint16_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ValueTypeT_uint32_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__XPathIo[] = { {&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpArrayValue[] = { {&_swigt__p_Exiv2__XmpArrayValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpData[] = { {&_swigt__p_Exiv2__XmpData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpKey[] = { {&_swigt__p_Exiv2__XmpKey, 0, 0, 0},{0, 0, 0, 0}}; @@ -8311,7 +8253,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__AsciiValue, _swigc__p_Exiv2__BasicIo, _swigc__p_Exiv2__CommentValue, - _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__DataSet, _swigc__p_Exiv2__DataValue, diff --git a/src/swig-0_27_3/preview_wrap.cxx b/src/swig-0_27_3/preview_wrap.cxx index 2f2b02a..f236884 100644 --- a/src/swig-0_27_3/preview_wrap.cxx +++ b/src/swig-0_27_3/preview_wrap.cxx @@ -3932,76 +3932,75 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__AsciiValue swig_types[2] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[3] #define SWIGTYPE_p_Exiv2__CommentValue swig_types[4] -#define SWIGTYPE_p_Exiv2__CurlIo swig_types[5] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[6] -#define SWIGTYPE_p_Exiv2__DataSet swig_types[7] -#define SWIGTYPE_p_Exiv2__DataValue swig_types[8] -#define SWIGTYPE_p_Exiv2__DateValue swig_types[9] -#define SWIGTYPE_p_Exiv2__ExifKey swig_types[10] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[11] -#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[13] -#define SWIGTYPE_p_Exiv2__Image swig_types[14] -#define SWIGTYPE_p_Exiv2__IptcKey swig_types[15] -#define SWIGTYPE_p_Exiv2__Key swig_types[16] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[17] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[18] -#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[19] -#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[20] -#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[21] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[22] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[23] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[24] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[25] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[26] -#define SWIGTYPE_p_Exiv2__Value swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[34] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[35] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] -#define SWIGTYPE_p_IptcData_iterator swig_types[42] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] -#define SWIGTYPE_p_SwigPyObject swig_types[44] -#define SWIGTYPE_p_ValueType swig_types[45] -#define SWIGTYPE_p_XmpData_iterator swig_types[46] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] -#define SWIGTYPE_p_allocator_type swig_types[48] -#define SWIGTYPE_p_char swig_types[49] -#define SWIGTYPE_p_const_iterator swig_types[50] -#define SWIGTYPE_p_difference_type swig_types[51] -#define SWIGTYPE_p_first_type swig_types[52] -#define SWIGTYPE_p_int swig_types[53] -#define SWIGTYPE_p_iterator swig_types[54] -#define SWIGTYPE_p_key_type swig_types[55] -#define SWIGTYPE_p_long_long swig_types[56] -#define SWIGTYPE_p_mapped_type swig_types[57] -#define SWIGTYPE_p_second_type swig_types[58] -#define SWIGTYPE_p_short swig_types[59] -#define SWIGTYPE_p_signed_char swig_types[60] -#define SWIGTYPE_p_size_type swig_types[61] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] -#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[66] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[67] -#define SWIGTYPE_p_unsigned_char swig_types[68] -#define SWIGTYPE_p_unsigned_int swig_types[69] -#define SWIGTYPE_p_unsigned_long_long swig_types[70] -#define SWIGTYPE_p_unsigned_short swig_types[71] -#define SWIGTYPE_p_value_type swig_types[72] -static swig_type_info *swig_types[74]; -static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[5] +#define SWIGTYPE_p_Exiv2__DataSet swig_types[6] +#define SWIGTYPE_p_Exiv2__DataValue swig_types[7] +#define SWIGTYPE_p_Exiv2__DateValue swig_types[8] +#define SWIGTYPE_p_Exiv2__ExifKey swig_types[9] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[10] +#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[11] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[12] +#define SWIGTYPE_p_Exiv2__Image swig_types[13] +#define SWIGTYPE_p_Exiv2__IptcKey swig_types[14] +#define SWIGTYPE_p_Exiv2__Key swig_types[15] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[16] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[17] +#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[18] +#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[19] +#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[20] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] +#define SWIGTYPE_p_Exiv2__Value swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[40] +#define SWIGTYPE_p_IptcData_iterator swig_types[41] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[42] +#define SWIGTYPE_p_SwigPyObject swig_types[43] +#define SWIGTYPE_p_ValueType swig_types[44] +#define SWIGTYPE_p_XmpData_iterator swig_types[45] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[46] +#define SWIGTYPE_p_allocator_type swig_types[47] +#define SWIGTYPE_p_char swig_types[48] +#define SWIGTYPE_p_const_iterator swig_types[49] +#define SWIGTYPE_p_difference_type swig_types[50] +#define SWIGTYPE_p_first_type swig_types[51] +#define SWIGTYPE_p_int swig_types[52] +#define SWIGTYPE_p_iterator swig_types[53] +#define SWIGTYPE_p_key_type swig_types[54] +#define SWIGTYPE_p_long_long swig_types[55] +#define SWIGTYPE_p_mapped_type swig_types[56] +#define SWIGTYPE_p_second_type swig_types[57] +#define SWIGTYPE_p_short swig_types[58] +#define SWIGTYPE_p_signed_char swig_types[59] +#define SWIGTYPE_p_size_type swig_types[60] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[61] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[62] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[63] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] +#define SWIGTYPE_p_unsigned_char swig_types[67] +#define SWIGTYPE_p_unsigned_int swig_types[68] +#define SWIGTYPE_p_unsigned_long_long swig_types[69] +#define SWIGTYPE_p_unsigned_short swig_types[70] +#define SWIGTYPE_p_value_type swig_types[71] +static swig_type_info *swig_types[73]; +static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4200,19 +4199,6 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" -#ifndef EXV_USE_CURL -namespace Exiv2 { - class CurlIo : public RemoteIo { - public: - CurlIo(const std::string& url, size_t blockSize=0) { - throw std::runtime_error( - "CurlIo not enabled in linked libexiv2"); - }; - }; -} -#endif - - #include @@ -6426,7 +6412,7 @@ SWIGINTERN PyObject *_wrap_PreviewImage_extension(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } #endif - resultobj = SWIG_From_std_string(result); + resultobj = SWIG_FromCharPtrAndSize((&result)->data(), (&result)->size()); } return resultobj; fail: @@ -7446,9 +7432,6 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewManager_clientdata = {0 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -7464,9 +7447,6 @@ static void *_p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM( static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) (Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } -static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); -} static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); } @@ -7476,12 +7456,6 @@ static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newme static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); } -static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} -static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); -} static void *_p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::StringValueBase *) ((Exiv2::AsciiValue *) x)); } @@ -7561,25 +7535,25 @@ static swig_type_info _swigt__p_ExifData_iterator = {"_p_ExifData_iterator", "Ex static swig_type_info _swigt__p_ExifData_iterator_base = {"_p_ExifData_iterator_base", "ExifData_iterator_base *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__AsciiValue = {"_p_Exiv2__AsciiValue", "Exiv2::AsciiValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_Exiv2__CommentValue = {"_p_Exiv2__CommentValue", "Exiv2::CommentValue *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataSet = {"_p_Exiv2__DataSet", "Exiv2::DataSet *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DateValue = {"_p_Exiv2__DateValue", "Exiv2::DateValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifKey = {"_p_Exiv2__ExifKey", "Exiv2::ExifKey *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__GroupInfo = {"_p_Exiv2__GroupInfo", "Exiv2::GroupInfo *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Image = {"_p_Exiv2__Image", "Exiv2::Image *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__PreviewImage = {"_p_Exiv2__PreviewImage", "Exiv2::PreviewImage *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__PreviewImage_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__PreviewManager = {"_p_Exiv2__PreviewManager", "Exiv2::PreviewManager *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__PreviewManager_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__PreviewProperties = {"_p_Exiv2__PreviewProperties", "Exiv2::PreviewProperties *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__PreviewProperties_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValueBase = {"_p_Exiv2__StringValueBase", "Exiv2::StringValueBase *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__TagInfo = {"_p_Exiv2__TagInfo", "Exiv2::TagInfo *", 0, 0, (void*)0, 0}; @@ -7593,7 +7567,6 @@ static swig_type_info _swigt__p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t static swig_type_info _swigt__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t = {"_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t", "Exiv2::URationalValue *|Exiv2::ValueType< Exiv2::URational > *|Exiv2::ValueType< std::pair< uint32_t,uint32_t > > *|Exiv2::ValueType< std::pair< unsigned int,unsigned int > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ValueTypeT_uint16_t_t = {"_p_Exiv2__ValueTypeT_uint16_t_t", "Exiv2::UShortValue *|Exiv2::ValueType< uint16_t > *|Exiv2::ValueType< unsigned short > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ValueTypeT_uint32_t_t = {"_p_Exiv2__ValueTypeT_uint32_t_t", "Exiv2::ULongValue *|Exiv2::ValueType< uint32_t > *|Exiv2::ValueType< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", "Exiv2::XPathIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpArrayValue = {"_p_Exiv2__XmpArrayValue", "Exiv2::XmpArrayValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpKey = {"_p_Exiv2__XmpKey", "Exiv2::XmpKey *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpPropertyInfo = {"_p_Exiv2__XmpPropertyInfo", "Exiv2::XmpPropertyInfo *", 0, 0, (void*)0, 0}; @@ -7637,7 +7610,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__AsciiValue, &_swigt__p_Exiv2__BasicIo, &_swigt__p_Exiv2__CommentValue, - &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__DataSet, &_swigt__p_Exiv2__DataValue, @@ -7710,26 +7682,26 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_ExifData_iterator[] = { {&_swigt__p_ExifData_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ExifData_iterator_base[] = { {&_swigt__p_ExifData_iterator_base, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__AsciiValue[] = { {&_swigt__p_Exiv2__AsciiValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__FileIo[] = {{&_swigt__p_Exiv2__FileIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__HttpIo[] = {{&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__MemIo[] = {{&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = {{&_swigt__p_Exiv2__RemoteIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__XPathIo[] = {{&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__CommentValue[] = { {&_swigt__p_Exiv2__CommentValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataSet[] = { {&_swigt__p_Exiv2__DataSet, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DateValue[] = { {&_swigt__p_Exiv2__DateValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifKey[] = { {&_swigt__p_Exiv2__ExifKey, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__FileIo[] = { {&_swigt__p_Exiv2__FileIo, 0, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__FileIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__GroupInfo[] = { {&_swigt__p_Exiv2__GroupInfo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Image[] = { {&_swigt__p_Exiv2__Image, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewImage[] = { {&_swigt__p_Exiv2__PreviewImage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewManager[] = { {&_swigt__p_Exiv2__PreviewManager, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewProperties[] = { {&_swigt__p_Exiv2__PreviewProperties, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValueBase[] = { {&_swigt__p_Exiv2__StringValueBase, 0, 0, 0}, {&_swigt__p_Exiv2__AsciiValue, _p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__CommentValue, _p_Exiv2__CommentValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__StringValue, _p_Exiv2__StringValueTo_p_Exiv2__StringValueBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__TagInfo[] = { {&_swigt__p_Exiv2__TagInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -7743,7 +7715,6 @@ static swig_cast_info _swigc__p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t static swig_cast_info _swigc__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ValueTypeT_uint16_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_uint16_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ValueTypeT_uint32_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__XPathIo[] = { {&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpArrayValue[] = { {&_swigt__p_Exiv2__XmpArrayValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpKey[] = { {&_swigt__p_Exiv2__XmpKey, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpPropertyInfo[] = { {&_swigt__p_Exiv2__XmpPropertyInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -7787,7 +7758,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__AsciiValue, _swigc__p_Exiv2__BasicIo, _swigc__p_Exiv2__CommentValue, - _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__DataSet, _swigc__p_Exiv2__DataValue, diff --git a/src/swig-0_27_7/__init__.py b/src/swig-0_27_7/__init__.py index 85c136a..62863e2 100644 --- a/src/swig-0_27_7/__init__.py +++ b/src/swig-0_27_7/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.4" +__version__ = "0.17.0" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 4)) +__version_tuple__ = tuple((0, 17, 0)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/src/swig-0_27_7/basicio_wrap.cxx b/src/swig-0_27_7/basicio_wrap.cxx index eb80575..2389990 100644 --- a/src/swig-0_27_7/basicio_wrap.cxx +++ b/src/swig-0_27_7/basicio_wrap.cxx @@ -3926,29 +3926,28 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_Exiv2__BasicIo swig_types[0] -#define SWIGTYPE_p_Exiv2__CurlIo swig_types[1] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[2] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[3] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[4] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[5] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[6] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[7] -#define SWIGTYPE_p_SwigPyObject swig_types[8] -#define SWIGTYPE_p_char swig_types[9] -#define SWIGTYPE_p_first_type swig_types[10] -#define SWIGTYPE_p_int swig_types[11] -#define SWIGTYPE_p_long_long swig_types[12] -#define SWIGTYPE_p_second_type swig_types[13] -#define SWIGTYPE_p_short swig_types[14] -#define SWIGTYPE_p_signed_char swig_types[15] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[16] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[17] -#define SWIGTYPE_p_unsigned_char swig_types[18] -#define SWIGTYPE_p_unsigned_int swig_types[19] -#define SWIGTYPE_p_unsigned_long_long swig_types[20] -#define SWIGTYPE_p_unsigned_short swig_types[21] -static swig_type_info *swig_types[23]; -static swig_module_info swig_module = {swig_types, 22, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[1] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[2] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[3] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[4] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[5] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[6] +#define SWIGTYPE_p_SwigPyObject swig_types[7] +#define SWIGTYPE_p_char swig_types[8] +#define SWIGTYPE_p_first_type swig_types[9] +#define SWIGTYPE_p_int swig_types[10] +#define SWIGTYPE_p_long_long swig_types[11] +#define SWIGTYPE_p_second_type swig_types[12] +#define SWIGTYPE_p_short swig_types[13] +#define SWIGTYPE_p_signed_char swig_types[14] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[15] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[16] +#define SWIGTYPE_p_unsigned_char swig_types[17] +#define SWIGTYPE_p_unsigned_int swig_types[18] +#define SWIGTYPE_p_unsigned_long_long swig_types[19] +#define SWIGTYPE_p_unsigned_short swig_types[20] +static swig_type_info *swig_types[22]; +static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4147,19 +4146,6 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" -#ifndef EXV_USE_CURL -namespace Exiv2 { - class CurlIo : public RemoteIo { - public: - CurlIo(const std::string& url, size_t blockSize=0) { - throw std::runtime_error( - "CurlIo not enabled in linked libexiv2"); - }; - }; -} -#endif - - #include @@ -4283,123 +4269,7 @@ static void _set_python_exception() { typedef Exiv2::ErrorCode ErrorCode; -static bool get_ptr_size(Exiv2::FileIo* self, bool is_writeable, - Exiv2::byte*& ptr, Py_ssize_t& size) { - if (self->open()) - return false; - try { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - ptr = self->mmap(is_writeable); - SWIG_PYTHON_THREAD_END_ALLOW; - - } catch(Exiv2::AnyError const& e) { - - - - return false; - } - size = self->size(); - return true; -}; - - -static int getbuffer_Exiv2_FileIo( - PyObject* exporter, Py_buffer* view, int flags) { - Exiv2::FileIo* self = 0; - Exiv2::byte* ptr = 0; - Py_ssize_t size = 0; - bool is_writeable = true && (flags && PyBUF_WRITABLE); - if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__FileIo, 0))) - goto fail; - if (!get_ptr_size(self, is_writeable, ptr, size)) - goto fail; - return PyBuffer_FillInfo(view, exporter, ptr, - ptr ? size : 0, is_writeable ? 0 : 1, flags); -fail: - PyErr_SetNone(PyExc_BufferError); - view->obj = NULL; - return -1; -}; - - -static void release_ptr(Exiv2::FileIo* self) { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - self->munmap(); - self->close(); - SWIG_PYTHON_THREAD_END_ALLOW; -}; - - -static void releasebuffer_Exiv2_FileIo( - PyObject* exporter, Py_buffer* view) { - Exiv2::FileIo* self = 0; - if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__FileIo, 0))) - return; - release_ptr(self); -}; - - -static bool get_ptr_size(Exiv2::MemIo* self, bool is_writeable, - Exiv2::byte*& ptr, Py_ssize_t& size) { - if (self->open()) - return false; - try { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - ptr = self->mmap(is_writeable); - SWIG_PYTHON_THREAD_END_ALLOW; - - } catch(Exiv2::AnyError const& e) { - - - - return false; - } - size = self->size(); - return true; -}; - - -static int getbuffer_Exiv2_MemIo( - PyObject* exporter, Py_buffer* view, int flags) { - Exiv2::MemIo* self = 0; - Exiv2::byte* ptr = 0; - Py_ssize_t size = 0; - bool is_writeable = true && (flags && PyBUF_WRITABLE); - if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__MemIo, 0))) - goto fail; - if (!get_ptr_size(self, is_writeable, ptr, size)) - goto fail; - return PyBuffer_FillInfo(view, exporter, ptr, - ptr ? size : 0, is_writeable ? 0 : 1, flags); -fail: - PyErr_SetNone(PyExc_BufferError); - view->obj = NULL; - return -1; -}; - - -static void release_ptr(Exiv2::MemIo* self) { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - self->munmap(); - self->close(); - SWIG_PYTHON_THREAD_END_ALLOW; -}; - - -static void releasebuffer_Exiv2_MemIo( - PyObject* exporter, Py_buffer* view) { - Exiv2::MemIo* self = 0; - if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__MemIo, 0))) - return; - release_ptr(self); -}; - - -static bool get_ptr_size(Exiv2::RemoteIo* self, bool is_writeable, +static bool get_ptr_size(Exiv2::BasicIo* self, bool is_writeable, Exiv2::byte*& ptr, Py_ssize_t& size) { if (self->open()) return false; @@ -4419,14 +4289,14 @@ static bool get_ptr_size(Exiv2::RemoteIo* self, bool is_writeable, }; -static int getbuffer_Exiv2_RemoteIo( +static int getbuffer_Exiv2_BasicIo( PyObject* exporter, Py_buffer* view, int flags) { - Exiv2::RemoteIo* self = 0; + Exiv2::BasicIo* self = 0; Exiv2::byte* ptr = 0; Py_ssize_t size = 0; bool is_writeable = true && (flags && PyBUF_WRITABLE); if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__RemoteIo, 0))) + exporter, (void**)&self, SWIGTYPE_p_Exiv2__BasicIo, 0))) goto fail; if (!get_ptr_size(self, is_writeable, ptr, size)) goto fail; @@ -4439,7 +4309,7 @@ static int getbuffer_Exiv2_RemoteIo( }; -static void release_ptr(Exiv2::RemoteIo* self) { +static void release_ptr(Exiv2::BasicIo* self) { SWIG_PYTHON_THREAD_BEGIN_ALLOW; self->munmap(); self->close(); @@ -4447,11 +4317,11 @@ static void release_ptr(Exiv2::RemoteIo* self) { }; -static void releasebuffer_Exiv2_RemoteIo( +static void releasebuffer_Exiv2_BasicIo( PyObject* exporter, Py_buffer* view) { - Exiv2::RemoteIo* self = 0; + Exiv2::BasicIo* self = 0; if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__RemoteIo, 0))) + exporter, (void**)&self, SWIGTYPE_p_Exiv2__BasicIo, 0))) return; release_ptr(self); }; @@ -4802,194 +4672,29 @@ SWIGINTERNINLINE PyObject* return PyBool_FromLong(value ? 1 : 0); } - -/* Return string from Python obj. NOTE: obj must remain in scope in order - to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */ -SWIGINTERN int -SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) -{ -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (PyBytes_Check(obj)) -#else - if (PyUnicode_Check(obj)) -#endif -#else - if (PyString_Check(obj)) -#endif - { - char *cstr; Py_ssize_t len; - PyObject *bytes = NULL; - int ret = SWIG_OK; - if (alloc) - *alloc = SWIG_OLDOBJ; -#if PY_VERSION_HEX>=0x03000000 && defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1) - return SWIG_TypeError; -#else - cstr = (char *)SWIG_PyUnicode_AsUTF8AndSize(obj, &len, &bytes); - if (!cstr) - return SWIG_TypeError; - /* The returned string is only duplicated if the char * returned is not owned and memory managed by obj */ - if (bytes && cptr) { - if (alloc) { - cstr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); - *alloc = SWIG_NEWOBJ; - } else { - /* alloc must be set in order to clean up allocated memory */ - return SWIG_RuntimeError; - } - } -#endif - if (cptr) *cptr = cstr; - if (psize) *psize = len + 1; - Py_XDECREF(bytes); - return ret; - } else { -#if defined(SWIG_PYTHON_2_UNICODE) -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) -#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" -#endif -#if PY_VERSION_HEX<0x03000000 - if (PyUnicode_Check(obj)) { - char *cstr; Py_ssize_t len; - if (!alloc && cptr) { - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if (!obj) - return SWIG_TypeError; - if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { - if (cptr) { - if (alloc) *alloc = SWIG_NEWOBJ; - *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); +SWIGINTERN char const *Exiv2_BasicIo_ioType(Exiv2::BasicIo *self){ + if (dynamic_cast(self)) + return "MemIo"; + else if (dynamic_cast(self)) { + if (dynamic_cast(self)) + return "XPathIo"; + return "FileIo"; } - if (psize) *psize = len + 1; - - Py_XDECREF(obj); - return SWIG_OK; - } else { - Py_XDECREF(obj); - } - } -#endif -#endif - - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void* vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) *cptr = (char *) vptr; - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; - if (alloc) *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } - } - return SWIG_TypeError; -} - - -SWIGINTERN int -SWIG_AsPtr_std_string (PyObject * obj, std::string **val) -{ - char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; - if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { - if (buf) { - if (val) *val = new std::string(buf, size - 1); - if (alloc == SWIG_NEWOBJ) delete[] buf; - return SWIG_NEWOBJ; - } else { - if (val) *val = 0; - return SWIG_OLDOBJ; - } - } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } - if (descriptor) { - std::string *vptr; - int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); - if (SWIG_IsOK(res) && val) *val = vptr; - return res; - } - } - return SWIG_ERROR; -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_std_string (const std::string& s) -{ - return SWIG_FromCharPtrAndSize(s.data(), s.size()); -} - - -#ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) -{ - int res = SWIG_TypeError; - if (PyLong_Check(obj)) { - unsigned long long v = PyLong_AsUnsignedLongLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - res = SWIG_OverflowError; - } - } else { - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj,&v); - if (SWIG_IsOK(res)) { - if (val) *val = v; - return res; - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - const double mant_max = 1LL << DBL_MANT_DIG; - double d; - res = SWIG_AsVal_double (obj,&d); - if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) - return SWIG_OverflowError; - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { - if (val) *val = (unsigned long long)(d); - return SWIG_AddCast(res); + else if (dynamic_cast(self)) { + if (dynamic_cast(self)) + return "HttpIo"; +#ifdef EXV_USE_CURL + else if (dynamic_cast(self)) + return "CurlIo"; +#endif +#ifdef EXV_USE_SSH + else if (dynamic_cast(self)) + return "SshIo"; +#endif + return "RemoteIo"; + } + return "unknown"; } - res = SWIG_TypeError; - } -#endif - return res; -} -#endif - - -SWIGINTERNINLINE int -SWIG_AsVal_size_t (PyObject * obj, size_t *val) -{ - int res = SWIG_TypeError; -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(size_t) <= sizeof(unsigned long)) { -#endif - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else if (sizeof(size_t) <= sizeof(unsigned long long)) { - unsigned long long v; - res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); - } -#endif - return res; -} - -SWIGINTERN void delete_Exiv2_CurlIo(Exiv2::CurlIo *self){} #ifdef __cplusplus extern "C" { #endif @@ -5006,6 +4711,34 @@ SWIGINTERN PyObject *_wrap__enum_list_Position(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_delete_BasicIo(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::BasicIo *arg1 = (Exiv2::BasicIo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_BasicIo takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BasicIo" "', argument " "1"" of type '" "Exiv2::BasicIo *""'"); + } + arg1 = reinterpret_cast< Exiv2::BasicIo * >(argp1); + { + try { + delete arg1; + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_BasicIo_open(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::BasicIo *arg1 = (Exiv2::BasicIo *) 0 ; @@ -5755,7 +5488,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_path(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } #endif - resultobj = SWIG_From_std_string(result); + resultobj = SWIG_FromCharPtrAndSize((&result)->data(), (&result)->size()); } return resultobj; fail: @@ -5763,5301 +5496,52 @@ SWIGINTERN PyObject *_wrap_BasicIo_path(PyObject *self, PyObject *args) { } -SWIGINTERN int _wrap_new_FileIo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - Exiv2::FileIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_FileIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_FileIo", 1, 1, &obj1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FileIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FileIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::FileIo *)new Exiv2::FileIo((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__FileIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN PyObject *_wrap_delete_FileIo(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_BasicIo_ioType(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; + Exiv2::BasicIo *arg1 = (Exiv2::BasicIo *) 0 ; void *argp1 = 0 ; int res1 = 0 ; + char *result = 0 ; - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_FileIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, SWIG_POINTER_DISOWN | 0 ); + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "BasicIo_ioType takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__BasicIo, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FileIo" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BasicIo_ioType" "', argument " "1"" of type '" "Exiv2::BasicIo *""'"); } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); + arg1 = reinterpret_cast< Exiv2::BasicIo * >(argp1); { try { - delete arg1; + result = (char *)Exiv2_BasicIo_ioType(arg1); } catch(std::exception const& e) { _set_python_exception(); SWIG_fail; } } - resultobj = SWIG_Py_Void(); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_FileIo_open__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "FileIo_open", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_open" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FileIo_open" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FileIo_open" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->open((std::string const &)*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_open__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_open takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_open" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->open(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_open(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 1) { - PyObject *retobj = _wrap_FileIo_open__SWIG_1(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - if (argc == 2) { - PyObject *retobj = _wrap_FileIo_open__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FileIo_open'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::FileIo::open(std::string const &)\n" - " Exiv2::FileIo::open()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FileIo_close(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_close takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_close" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->close(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_write__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "FileIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_write" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FileIo_write" "', argument " "2"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg2 = (Exiv2::byte *) buff->buf; - arg3 = (long) buff->len; - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write((Exiv2::byte const *)arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - Py_XDECREF(_global_view); - - return resultobj; -fail: - - Py_XDECREF(_global_view); - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_write__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "FileIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_write" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FileIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FileIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_write(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - return _wrap_FileIo_write__SWIG_1(self, args); - } -check_1: - - if (argc == 2) { - PyObject *retobj = _wrap_FileIo_write__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FileIo_write'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::FileIo::write(Exiv2::byte const *,long)\n" - " Exiv2::FileIo::write(Exiv2::BasicIo &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FileIo_putb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::byte arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned char val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "FileIo_putb", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_putb" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileIo_putb" "', argument " "2"" of type '" "Exiv2::byte""'"); - } - arg2 = static_cast< Exiv2::byte >(val2); - { - try { - result = (int)(arg1)->putb(arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_read__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - long arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::DataBuf result; - - if (!PyArg_UnpackTuple(args, "FileIo_read", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_read" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileIo_read" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj( - new Exiv2::DataBuf(result), SWIGTYPE_p_Exiv2__DataBuf, SWIG_POINTER_OWN); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_read__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - Py_buffer _global_view ; - long val3 ; - int ecode3 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "FileIo_read", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_read" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - _global_view.obj = NULL; - if (PyObject_GetBuffer( - obj1, &_global_view, PyBUF_CONTIG | PyBUF_WRITABLE) < 0) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FileIo_read" "', argument " "2"" of type '" "writable bytes-like object""'") - ; - } - arg2 = (Exiv2::byte *) _global_view.buf; - } - ecode3 = SWIG_AsVal_long(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FileIo_read" "', argument " "3"" of type '" "long""'"); - } - arg3 = static_cast< long >(val3); - { - if (arg3 > (long) _global_view.len) { - SWIG_exception_fail(SWIG_ArgError(SWIG_ValueError), "in method '" "FileIo_read" "', argument " "2"" of type '" "buffer too small""'") - ; - } - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->read(arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return resultobj; -fail: - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_read(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - PyObject *retobj = _wrap_FileIo_read__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - if (argc == 3) { - PyObject *retobj = _wrap_FileIo_read__SWIG_1(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FileIo_read'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::FileIo::read(long)\n" - " Exiv2::FileIo::read(Exiv2::byte *,long)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FileIo_getb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_getb takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_getb" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - result = (int)(arg1)->getb(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_transfer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "FileIo_transfer", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_transfer" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FileIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FileIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - (arg1)->transfer(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_seek(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - long arg2 ; - Exiv2::BasicIo::Position arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "FileIo_seek", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_seek" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileIo_seek" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - { - if (!PyObject_IsInstance(obj2, - get_enum_typeobject_Exiv2_BasicIo_Position())) { - // deprecated since 2024-01-09 - PyErr_WarnEx(PyExc_DeprecationWarning, - "FileIo_seek argument 3 type should be 'Exiv2::BasicIo::Position'.", 1); - } - if (!PyLong_Check(obj2)) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FileIo_seek" "', argument " "3"" of type '" "Exiv2::BasicIo::Position""'") - ; - } - arg3 = static_cast< Exiv2::BasicIo::Position >(PyLong_AsLong(obj2)); - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->seek(arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_mmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::byte *result = 0 ; - - { - arg2 = false; - } - if (!PyArg_UnpackTuple(args, "FileIo_mmap", 0, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_mmap" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileIo_mmap" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (Exiv2::byte *)(arg1)->mmap(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - - resultobj = PyMemoryView_FromMemory((char*)result, result ? arg1->size() : 0, arg2 ? PyBUF_WRITE : PyBUF_READ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_munmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_munmap takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_munmap" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->munmap(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_setPath(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "FileIo_setPath", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_setPath" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FileIo_setPath" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FileIo_setPath" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg2, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - (arg1)->setPath((std::string const &)*arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_tell(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - long result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_tell takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_tell" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)((Exiv2::FileIo const *)arg1)->tell(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_size(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_size takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_size" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = ((Exiv2::FileIo const *)arg1)->size(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_isopen(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_isopen takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_isopen" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - result = (bool)((Exiv2::FileIo const *)arg1)->isopen(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_error(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_error takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_error" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - result = (int)((Exiv2::FileIo const *)arg1)->error(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_eof(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_eof takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_eof" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - result = (bool)((Exiv2::FileIo const *)arg1)->eof(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_path(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::string result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_path takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_path" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - result = ((Exiv2::FileIo const *)arg1)->path(); - { -#ifdef _WIN32 - if (utf8_to_wcp(&result, false) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); - } -#endif - resultobj = SWIG_From_std_string(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_FileIo) /* defines _wrap_delete_FileIo_destructor_closure */ - -SWIGPY_LENFUNC_CLOSURE(_wrap_FileIo_size) /* defines _wrap_FileIo_size_lenfunc_closure */ - -SWIGINTERN int _wrap_new_MemIo__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - Exiv2::MemIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_MemIo")) SWIG_fail; - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "new_MemIo takes no arguments"); - { - try { - result = (Exiv2::MemIo *)new Exiv2::MemIo(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__MemIo, SWIG_BUILTIN_INIT | 0 ); - return resultobj == Py_None ? -1 : 0; -fail: - return -1; -} - - -SWIGINTERN int _wrap_new_MemIo__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - Exiv2::byte *arg1 = (Exiv2::byte *) 0 ; - long arg2 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - Exiv2::MemIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_MemIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_MemIo", 1, 1, &obj1)) SWIG_fail; - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "new_MemIo" "', argument " "1"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg1 = (Exiv2::byte *) buff->buf; - arg2 = (long) buff->len; - } - { - try { - result = (Exiv2::MemIo *)new Exiv2::MemIo((Exiv2::byte const *)arg1,arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__MemIo, SWIG_BUILTIN_INIT | 0 ); - - PyObject_SetAttrString(resultobj, "_refers_to", _global_view); - - - Py_XDECREF(_global_view); - - return resultobj == Py_None ? -1 : 0; -fail: - - Py_XDECREF(_global_view); - - return -1; -} - - -SWIGINTERN int _wrap_new_MemIo(PyObject *self, PyObject *args, PyObject *kwargs) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_MemIo")) SWIG_fail; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 0) { - int retval = _wrap_new_MemIo__SWIG_0(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - if (argc == 1) { - int retval = _wrap_new_MemIo__SWIG_1(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_MemIo'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::MemIo::MemIo()\n" - " Exiv2::MemIo::MemIo(Exiv2::byte const *,long)\n"); - return -1; -} - - -SWIGINTERN PyObject *_wrap_delete_MemIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_MemIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MemIo" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - { - try { - delete arg1; - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_open(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_open takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_open" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (int)(arg1)->open(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_close(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_close takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_close" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (int)(arg1)->close(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_write__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "MemIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_write" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MemIo_write" "', argument " "2"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg2 = (Exiv2::byte *) buff->buf; - arg3 = (long) buff->len; - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write((Exiv2::byte const *)arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - Py_XDECREF(_global_view); - - return resultobj; -fail: - - Py_XDECREF(_global_view); - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_write__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "MemIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_write" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MemIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MemIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_write(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - return _wrap_MemIo_write__SWIG_1(self, args); - } -check_1: - - if (argc == 2) { - PyObject *retobj = _wrap_MemIo_write__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MemIo_write'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::MemIo::write(Exiv2::byte const *,long)\n" - " Exiv2::MemIo::write(Exiv2::BasicIo &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MemIo_putb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::byte arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned char val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "MemIo_putb", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_putb" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MemIo_putb" "', argument " "2"" of type '" "Exiv2::byte""'"); - } - arg2 = static_cast< Exiv2::byte >(val2); - { - try { - result = (int)(arg1)->putb(arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_read__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - long arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::DataBuf result; - - if (!PyArg_UnpackTuple(args, "MemIo_read", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_read" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MemIo_read" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - - resultobj = SWIG_NewPointerObj( - new Exiv2::DataBuf(result), SWIGTYPE_p_Exiv2__DataBuf, SWIG_POINTER_OWN); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_read__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - Py_buffer _global_view ; - long val3 ; - int ecode3 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "MemIo_read", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_read" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - { - _global_view.obj = NULL; - if (PyObject_GetBuffer( - obj1, &_global_view, PyBUF_CONTIG | PyBUF_WRITABLE) < 0) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MemIo_read" "', argument " "2"" of type '" "writable bytes-like object""'") - ; - } - arg2 = (Exiv2::byte *) _global_view.buf; - } - ecode3 = SWIG_AsVal_long(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MemIo_read" "', argument " "3"" of type '" "long""'"); - } - arg3 = static_cast< long >(val3); - { - if (arg3 > (long) _global_view.len) { - SWIG_exception_fail(SWIG_ArgError(SWIG_ValueError), "in method '" "MemIo_read" "', argument " "2"" of type '" "buffer too small""'") - ; - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->read(arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return resultobj; -fail: - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_read(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - PyObject *retobj = _wrap_MemIo_read__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - if (argc == 3) { - PyObject *retobj = _wrap_MemIo_read__SWIG_1(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MemIo_read'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::MemIo::read(long)\n" - " Exiv2::MemIo::read(Exiv2::byte *,long)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MemIo_getb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_getb takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_getb" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - { - try { - result = (int)(arg1)->getb(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_transfer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "MemIo_transfer", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_transfer" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MemIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MemIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - (arg1)->transfer(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_seek(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - long arg2 ; - Exiv2::BasicIo::Position arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "MemIo_seek", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_seek" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MemIo_seek" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - { - if (!PyObject_IsInstance(obj2, - get_enum_typeobject_Exiv2_BasicIo_Position())) { - // deprecated since 2024-01-09 - PyErr_WarnEx(PyExc_DeprecationWarning, - "MemIo_seek argument 3 type should be 'Exiv2::BasicIo::Position'.", 1); - } - if (!PyLong_Check(obj2)) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MemIo_seek" "', argument " "3"" of type '" "Exiv2::BasicIo::Position""'") - ; - } - arg3 = static_cast< Exiv2::BasicIo::Position >(PyLong_AsLong(obj2)); - } - result = (int)(arg1)->seek(arg2,arg3); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_mmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::byte *result = 0 ; - - { - arg2 = false; - } - if (!PyArg_UnpackTuple(args, "MemIo_mmap", 0, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_mmap" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MemIo_mmap" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - result = (Exiv2::byte *)(arg1)->mmap(arg2); - - resultobj = PyMemoryView_FromMemory((char*)result, result ? arg1->size() : 0, arg2 ? PyBUF_WRITE : PyBUF_READ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_munmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_munmap takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_munmap" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (int)(arg1)->munmap(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_tell(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - long result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_tell takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_tell" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (long)((Exiv2::MemIo const *)arg1)->tell(); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_size(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_size takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_size" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = ((Exiv2::MemIo const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_isopen(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_isopen takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_isopen" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (bool)((Exiv2::MemIo const *)arg1)->isopen(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_error(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_error takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_error" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (int)((Exiv2::MemIo const *)arg1)->error(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_eof(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_eof takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_eof" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (bool)((Exiv2::MemIo const *)arg1)->eof(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_path(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::string result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_path takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_path" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = ((Exiv2::MemIo const *)arg1)->path(); - { -#ifdef _WIN32 - if (utf8_to_wcp(&result, false) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); - } -#endif - resultobj = SWIG_From_std_string(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_MemIo) /* defines _wrap_delete_MemIo_destructor_closure */ - -SWIGPY_LENFUNC_CLOSURE(_wrap_MemIo_size) /* defines _wrap_MemIo_size_lenfunc_closure */ - -SWIGINTERN int _wrap_new_XPathIo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - Exiv2::XPathIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_XPathIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_XPathIo", 1, 1, &obj1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XPathIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XPathIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::XPathIo *)new Exiv2::XPathIo((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__XPathIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN PyObject *_wrap_delete_XPathIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::XPathIo *arg1 = (Exiv2::XPathIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_XPathIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__XPathIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_XPathIo" "', argument " "1"" of type '" "Exiv2::XPathIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::XPathIo * >(argp1); - { - try { - delete arg1; - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XPathIo_transfer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::XPathIo *arg1 = (Exiv2::XPathIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "XPathIo_transfer", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__XPathIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XPathIo_transfer" "', argument " "1"" of type '" "Exiv2::XPathIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::XPathIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XPathIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XPathIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - (arg1)->transfer(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XPathIo_writeDataToFile(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_UnpackTuple(args, "XPathIo_writeDataToFile", 1, 1, &obj0)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj0, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XPathIo_writeDataToFile" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XPathIo_writeDataToFile" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = Exiv2::XPathIo::writeDataToFile((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_XPathIo) /* defines _wrap_delete_XPathIo_destructor_closure */ - -SWIGINTERN PyObject *_wrap_delete_RemoteIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_RemoteIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RemoteIo" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - try { - delete arg1; - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_open(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_open takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_open" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->open(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_close(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_close takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_close" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->close(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_write__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_write" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "RemoteIo_write" "', argument " "2"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg2 = (Exiv2::byte *) buff->buf; - arg3 = (long) buff->len; - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write((Exiv2::byte const *)arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - Py_XDECREF(_global_view); - - return resultobj; -fail: - - Py_XDECREF(_global_view); - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_write__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_write" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RemoteIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RemoteIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_write(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - return _wrap_RemoteIo_write__SWIG_1(self, args); - } -check_1: - - if (argc == 2) { - PyObject *retobj = _wrap_RemoteIo_write__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'RemoteIo_write'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::RemoteIo::write(Exiv2::byte const *,long)\n" - " Exiv2::RemoteIo::write(Exiv2::BasicIo &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_putb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::byte arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned char val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_putb", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_putb" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemoteIo_putb" "', argument " "2"" of type '" "Exiv2::byte""'"); - } - arg2 = static_cast< Exiv2::byte >(val2); - { - try { - result = (int)(arg1)->putb(arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_read__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - long arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::DataBuf result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_read", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_read" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemoteIo_read" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj( - new Exiv2::DataBuf(result), SWIGTYPE_p_Exiv2__DataBuf, SWIG_POINTER_OWN); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_read__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - Py_buffer _global_view ; - long val3 ; - int ecode3 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_read", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_read" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - _global_view.obj = NULL; - if (PyObject_GetBuffer( - obj1, &_global_view, PyBUF_CONTIG | PyBUF_WRITABLE) < 0) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "RemoteIo_read" "', argument " "2"" of type '" "writable bytes-like object""'") - ; - } - arg2 = (Exiv2::byte *) _global_view.buf; - } - ecode3 = SWIG_AsVal_long(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RemoteIo_read" "', argument " "3"" of type '" "long""'"); - } - arg3 = static_cast< long >(val3); - { - if (arg3 > (long) _global_view.len) { - SWIG_exception_fail(SWIG_ArgError(SWIG_ValueError), "in method '" "RemoteIo_read" "', argument " "2"" of type '" "buffer too small""'") - ; - } - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->read(arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return resultobj; -fail: - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_read(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - PyObject *retobj = _wrap_RemoteIo_read__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - if (argc == 3) { - PyObject *retobj = _wrap_RemoteIo_read__SWIG_1(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'RemoteIo_read'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::RemoteIo::read(long)\n" - " Exiv2::RemoteIo::read(Exiv2::byte *,long)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_getb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_getb takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_getb" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - try { - result = (int)(arg1)->getb(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_transfer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "RemoteIo_transfer", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_transfer" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RemoteIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RemoteIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - (arg1)->transfer(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_seek(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - long arg2 ; - Exiv2::BasicIo::Position arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_seek", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_seek" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - ecode2 = SWIG_AsVal_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemoteIo_seek" "', argument " "2"" of type '" "long""'"); - } - arg2 = static_cast< long >(val2); - { - if (!PyObject_IsInstance(obj2, - get_enum_typeobject_Exiv2_BasicIo_Position())) { - // deprecated since 2024-01-09 - PyErr_WarnEx(PyExc_DeprecationWarning, - "RemoteIo_seek argument 3 type should be 'Exiv2::BasicIo::Position'.", 1); - } - if (!PyLong_Check(obj2)) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "RemoteIo_seek" "', argument " "3"" of type '" "Exiv2::BasicIo::Position""'") - ; - } - arg3 = static_cast< Exiv2::BasicIo::Position >(PyLong_AsLong(obj2)); - } - result = (int)(arg1)->seek(arg2,arg3); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_mmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::byte *result = 0 ; - - { - arg2 = false; - } - if (!PyArg_UnpackTuple(args, "RemoteIo_mmap", 0, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_mmap" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemoteIo_mmap" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (Exiv2::byte *)(arg1)->mmap(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - - resultobj = PyMemoryView_FromMemory((char*)result, result ? arg1->size() : 0, arg2 ? PyBUF_WRITE : PyBUF_READ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_munmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_munmap takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_munmap" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (int)(arg1)->munmap(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_tell(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - long result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_tell takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_tell" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (long)((Exiv2::RemoteIo const *)arg1)->tell(); - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_size(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_size takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_size" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = ((Exiv2::RemoteIo const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_isopen(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_isopen takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_isopen" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (bool)((Exiv2::RemoteIo const *)arg1)->isopen(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_error(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_error takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_error" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (int)((Exiv2::RemoteIo const *)arg1)->error(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_eof(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_eof takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_eof" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (bool)((Exiv2::RemoteIo const *)arg1)->eof(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_path(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::string result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_path takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_path" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = ((Exiv2::RemoteIo const *)arg1)->path(); - { -#ifdef _WIN32 - if (utf8_to_wcp(&result, false) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); - } -#endif - resultobj = SWIG_From_std_string(result); - } - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_RemoteIo) /* defines _wrap_delete_RemoteIo_destructor_closure */ - -SWIGPY_LENFUNC_CLOSURE(_wrap_RemoteIo_size) /* defines _wrap_RemoteIo_size_lenfunc_closure */ - -SWIGINTERN int _wrap_new_HttpIo__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - size_t arg2 ; - int res1 = SWIG_OLDOBJ ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Exiv2::HttpIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_HttpIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_HttpIo", 2, 2, &obj1, &obj2)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HttpIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HttpIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - ecode2 = SWIG_AsVal_size_t(obj2, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HttpIo" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::HttpIo *)new Exiv2::HttpIo((std::string const &)*arg1,arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__HttpIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN int _wrap_new_HttpIo__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - Exiv2::HttpIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_HttpIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_HttpIo", 1, 1, &obj1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HttpIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HttpIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::HttpIo *)new Exiv2::HttpIo((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__HttpIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN int _wrap_new_HttpIo(PyObject *self, PyObject *args, PyObject *kwargs) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_HttpIo")) SWIG_fail; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int retval = _wrap_new_HttpIo__SWIG_1(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - if (argc == 2) { - int retval = _wrap_new_HttpIo__SWIG_0(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HttpIo'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::HttpIo::HttpIo(std::string const &,size_t)\n" - " Exiv2::HttpIo::HttpIo(std::string const &)\n"); - return -1; -} - - -SWIGINTERN int _wrap_new_CurlIo__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - size_t arg2 ; - int res1 = SWIG_OLDOBJ ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Exiv2::CurlIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_CurlIo", 2, 2, &obj1, &obj2)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - ecode2 = SWIG_AsVal_size_t(obj2, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CurlIo" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::CurlIo *)new Exiv2::CurlIo((std::string const &)*arg1,arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__CurlIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN int _wrap_new_CurlIo__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - Exiv2::CurlIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_CurlIo", 1, 1, &obj1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::CurlIo *)new Exiv2::CurlIo((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__CurlIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN int _wrap_new_CurlIo(PyObject *self, PyObject *args, PyObject *kwargs) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int retval = _wrap_new_CurlIo__SWIG_1(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - if (argc == 2) { - int retval = _wrap_new_CurlIo__SWIG_0(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CurlIo'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::CurlIo::CurlIo(std::string const &,size_t)\n" - " Exiv2::CurlIo::CurlIo(std::string const &)\n"); - return -1; -} - - -SWIGINTERN PyObject *_wrap_CurlIo_write__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - long arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "CurlIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlIo_write" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "CurlIo_write" "', argument " "2"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg2 = (Exiv2::byte *) buff->buf; - arg3 = (long) buff->len; - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write((Exiv2::byte const *)arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - - Py_XDECREF(_global_view); - - return resultobj; -fail: - - Py_XDECREF(_global_view); - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CurlIo_write__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - long result; - - if (!PyArg_UnpackTuple(args, "CurlIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlIo_write" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurlIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurlIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (long)(arg1)->write(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_long(static_cast< long >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CurlIo_write(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - return _wrap_CurlIo_write__SWIG_1(self, args); - } -check_1: - - if (argc == 2) { - PyObject *retobj = _wrap_CurlIo_write__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CurlIo_write'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::CurlIo::write(Exiv2::byte const *,long)\n" - " Exiv2::CurlIo::write(Exiv2::BasicIo &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_CurlIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_CurlIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CurlIo" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); - { - try { - delete_Exiv2_CurlIo(arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CurlIo) /* defines _wrap_delete_CurlIo_destructor_closure */ - -static PyMethodDef SwigMethods[] = { - { "_enum_list_Position", _wrap__enum_list_Position, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } -}; - -static SwigPyGetSet BasicIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__BasicIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"", &BasicIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__BasicIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { - { "open", _wrap_BasicIo_open, METH_VARARGS, "\n" - "Open the IO source using the default access mode. The\n" - " default mode should allow for reading and writing.\n" - "\n" - "This method can also be used to \"reopen\" an IO source which will\n" - "flush any unwritten data and reset the IO position to the start.\n" - "Subclasses may provide custom methods to allow for\n" - "opening IO sources differently.\n" - "\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "close", _wrap_BasicIo_close, METH_VARARGS, "\n" - "Close the IO source. After closing a BasicIo instance can not\n" - " be read or written. Closing flushes any unwritten data. It is\n" - " safe to call close on a closed instance.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "write", _wrap_BasicIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Write data to the IO source. Current IO position is advanced\n" - " by the number of bytes written.\n" - ":type data: :py:term:`bytes-like object`\n" - ":param data: Pointer to data. Data must be at least *wcount*\n" - " bytes long\n" - ":type wcount: int\n" - ":param wcount: Number of bytes to be written.\n" - ":rtype: int\n" - ":return: Number of bytes written to IO source successfully;\n" - "\n" - " 0 if failure;\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to\n" - " the IO source. Current IO position is advanced by the number\n" - " of bytes written.\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: Number of bytes written to IO source successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "putb", _wrap_BasicIo_putb, METH_VARARGS, "\n" - "Write one byte to the IO source. Current IO position is\n" - " advanced by one byte.\n" - ":type data: int\n" - ":param data: The single byte to be written.\n" - ":rtype: int\n" - ":return: The value of the byte written if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "read", _wrap_BasicIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the IO source. Reading starts at the current\n" - " IO position and the position is advanced by the number of bytes\n" - " read.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the IO source. Reading starts at the current\n" - " IO position and the position is advanced by the number of bytes\n" - " read.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from IO source successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_BasicIo_getb, METH_VARARGS, "\n" - "Read one byte from the IO source. Current IO position is\n" - " advanced by one byte.\n" - ":rtype: int\n" - ":return: The byte read from the IO source if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_BasicIo_transfer, METH_VARARGS, "\n" - "Remove all data from this object's IO source and then transfer\n" - " data from the *src* BasicIo object into this object.\n" - "\n" - "The source object is invalidated by this operation and should not be\n" - "used after this method returns. This method exists primarily to\n" - "be used with the BasicIo::temporary() method.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "" }, - { "seek", _wrap_BasicIo_seek, METH_VARARGS, "\n" - "Move the current IO position.\n" - ":type offset: int\n" - ":param offset: Number of bytes to move the position relative\n" - " to the starting position specified by *pos*\n" - ":type pos: :py:class:`BasicIo.Position`\n" - ":param pos: Position from which the seek should start\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "mmap", _wrap_BasicIo_mmap, METH_VARARGS, "\n" - "Direct access to the IO data. For files, this is done by\n" - " mapping the file into the process's address space; for memory\n" - " blocks, this allows direct access to the memory block.\n" - ":type isWriteable: bool, optional\n" - ":param isWriteable: Set to true if the mapped area should be writeable\n" - " (default is false).\n" - ":rtype: memoryview\n" - ":return: A pointer to the mapped area.\n" - ":raises: Error In case of failure.\n" - "" }, - { "munmap", _wrap_BasicIo_munmap, METH_VARARGS, "\n" - "Remove a mapping established with mmap(). If the mapped area\n" - " is writeable, this ensures that changes are written back.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "tell", _wrap_BasicIo_tell, METH_VARARGS, "\n" - "Get the current IO position.\n" - ":rtype: int\n" - ":return: Offset from the start of IO if successful;\n" - "\n" - " -1 if failure;\n" - "" }, - { "size", _wrap_BasicIo_size, METH_VARARGS, "\n" - "Get the current size of the IO source in bytes.\n" - ":rtype: int\n" - ":return: Size of the IO source in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_BasicIo_isopen, METH_VARARGS, "Returns true if the IO source is open, otherwise false." }, - { "error", _wrap_BasicIo_error, METH_VARARGS, "Returns 0 if the IO source is in a valid state, otherwise nonzero." }, - { "eof", _wrap_BasicIo_eof, METH_VARARGS, "Returns true if the IO position has reached the end, otherwise false." }, - { "path", _wrap_BasicIo_path, METH_VARARGS, "\n" - "Return the path to the IO resource. Often used to form\n" - " comprehensive error messages where only a BasicIo instance is\n" - " available.\n" - "" }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.BasicIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - "\n" - "An interface for simple binary IO.\n" - "\n" - "Designed to have semantics and names similar to those of C style FILE*\n" - "operations. Subclasses should all behave the same so that they can be\n" - "interchanged.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__BasicIo_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__BasicIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__BasicIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__BasicIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type}; - -static SwigPyGetSet FileIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__FileIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "Constructor that accepts the file path on which IO will be\n" - " performed. The constructor does not open the file, and\n" - " therefore never failes.\n" - ":type path: str\n" - ":param path: The full path of a file\n" - "", &FileIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__FileIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__FileIo_methods[] = { - { "open", _wrap_FileIo_open, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Open the file using using the specified mode.\n" - "\n" - "This method can also be used to \"reopen\" a file which will flush any\n" - "unwritten data and reset the IO position to the start. Although\n" - "files can be opened in binary or text mode, this class has\n" - "only been tested carefully in binary mode.\n" - "\n" - ":type mode: str\n" - ":param mode: Specified that type of access allowed on the file.\n" - " Valid values match those of the C fopen command exactly.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Open the file using using the default access mode of \"rb\".\n" - " This method can also be used to \"reopen\" a file which will flush\n" - " any unwritten data and reset the IO position to the start.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "close", _wrap_FileIo_close, METH_VARARGS, "\n" - "Flush and unwritten data and close the file . It is\n" - " safe to call close on an already closed instance.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "write", _wrap_FileIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Write data to the file. The file position is advanced\n" - " by the number of bytes written.\n" - ":type data: :py:term:`bytes-like object`\n" - ":param data: Pointer to data. Data must be at least *wcount*\n" - " bytes long\n" - ":type wcount: int\n" - ":param wcount: Number of bytes to be written.\n" - ":rtype: int\n" - ":return: Number of bytes written to the file successfully;\n" - "\n" - " 0 if failure;\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to\n" - " the file. The file position is advanced by the number\n" - " of bytes written.\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: Number of bytes written to the file successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "putb", _wrap_FileIo_putb, METH_VARARGS, "\n" - "Write one byte to the file. The file position is\n" - " advanced by one byte.\n" - ":type data: int\n" - ":param data: The single byte to be written.\n" - ":rtype: int\n" - ":return: The value of the byte written if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "read", _wrap_FileIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the file. Reading starts at the current\n" - " file position and the position is advanced by the number of\n" - " bytes read.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the file. Reading starts at the current\n" - " file position and the position is advanced by the number of\n" - " bytes read.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from the file successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_FileIo_getb, METH_VARARGS, "\n" - "Read one byte from the file. The file position is\n" - " advanced by one byte.\n" - ":rtype: int\n" - ":return: The byte read from the file if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_FileIo_transfer, METH_VARARGS, "\n" - "Remove the contents of the file and then transfer data from\n" - " the *src* BasicIo object into the empty file.\n" - "\n" - "This method is optimized to simply rename the source file if the\n" - "source object is another FileIo instance. The source BasicIo object\n" - "is invalidated by this operation and should not be used after this\n" - "method returns. This method exists primarily to be used with\n" - "the BasicIo::temporary() method.\n" - "\n" - "Notes: If the caller doesn't have permissions to write to the file,\n" - " an exception is raised and *src* is deleted.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "" }, - { "seek", _wrap_FileIo_seek, METH_VARARGS, "\n" - "Move the current file position.\n" - ":type offset: int\n" - ":param offset: Number of bytes to move the file position\n" - " relative to the starting position specified by *pos*\n" - ":type pos: :py:class:`BasicIo.Position`\n" - ":param pos: Position from which the seek should start\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "mmap", _wrap_FileIo_mmap, METH_VARARGS, "\n" - "Map the file into the process's address space. The file must be\n" - " open before mmap() is called. If the mapped area is writeable,\n" - " changes may not be written back to the underlying file until\n" - " munmap() is called. The pointer is valid only as long as the\n" - " FileIo object exists.\n" - ":type isWriteable: bool, optional\n" - ":param isWriteable: Set to true if the mapped area should be writeable\n" - " (default is false).\n" - ":rtype: memoryview\n" - ":return: A pointer to the mapped area.\n" - ":raises: Error In case of failure.\n" - "" }, - { "munmap", _wrap_FileIo_munmap, METH_VARARGS, "\n" - "Remove a mapping established with mmap(). If the mapped area is\n" - " writeable, this ensures that changes are written back to the\n" - " underlying file.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "setPath", _wrap_FileIo_setPath, METH_VARARGS, " close the file source and set a new path." }, - { "tell", _wrap_FileIo_tell, METH_VARARGS, "\n" - "Get the current file position.\n" - ":rtype: int\n" - ":return: Offset from the start of the file if successful;\n" - "\n" - " -1 if failure;\n" - "" }, - { "size", _wrap_FileIo_size, METH_VARARGS, "\n" - "Flush any buffered writes and get the current file size\n" - " in bytes.\n" - ":rtype: int\n" - ":return: Size of the file in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_FileIo_isopen, METH_VARARGS, " Returns true if the file is open, otherwise false." }, - { "error", _wrap_FileIo_error, METH_VARARGS, " Returns 0 if the file is in a valid state, otherwise nonzero." }, - { "eof", _wrap_FileIo_eof, METH_VARARGS, " Returns true if the file position has reached the end, otherwise false." }, - { "path", _wrap_FileIo_path, METH_VARARGS, " Returns the path of the file" }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__FileIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.FileIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_FileIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - "\n" - "Provides binary file IO by implementing the BasicIo\n" - " interface.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__FileIo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__FileIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__FileIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_FileIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - _wrap_FileIo_size_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - getbuffer_Exiv2_FileIo, /* bf_getbuffer */ - releasebuffer_Exiv2_FileIo, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__FileIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__FileIo_type}; - -static SwigPyGetSet MemIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__MemIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "*Overload 1:*\n" - "Default constructor that results in an empty object\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - " Constructor that accepts a block of memory. A copy-on-write\n" - " algorithm allows read operations directly from the original data\n" - " and will create a copy of the buffer on the first write operation.\n" - " :type data: :py:term:`bytes-like object`\n" - " :param data: Pointer to data. Data must be at least *size*\n" - " bytes long\n" - " :type size: int\n" - " :param size: Number of bytes to copy.\n" - "", &MemIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__MemIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__MemIo_methods[] = { - { "open", _wrap_MemIo_open, METH_VARARGS, "\n" - "Memory IO is always open for reading and writing. This method\n" - " therefore only resets the IO position to the start.\n" - "\n" - ":rtype: int\n" - ":return: 0\n" - "" }, - { "close", _wrap_MemIo_close, METH_VARARGS, "\n" - "Does nothing on MemIo objects.\n" - ":rtype: int\n" - ":return: 0\n" - "" }, - { "write", _wrap_MemIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Write data to the memory block. If needed, the size of the\n" - " internal memory block is expanded. The IO position is advanced\n" - " by the number of bytes written.\n" - ":type data: :py:term:`bytes-like object`\n" - ":param data: Pointer to data. Data must be at least *wcount*\n" - " bytes long\n" - ":type wcount: int\n" - ":param wcount: Number of bytes to be written.\n" - ":rtype: int\n" - ":return: Number of bytes written to the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to\n" - " the memory block. If needed, the size of the internal memory\n" - " block is expanded. The IO position is advanced by the number\n" - " of bytes written.\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: Number of bytes written to the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "putb", _wrap_MemIo_putb, METH_VARARGS, "\n" - "Write one byte to the memory block. The IO position is\n" - " advanced by one byte.\n" - ":type data: int\n" - ":param data: The single byte to be written.\n" - ":rtype: int\n" - ":return: The value of the byte written if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "read", _wrap_MemIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the memory block. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the memory block. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_MemIo_getb, METH_VARARGS, "\n" - "Read one byte from the memory block. The IO position is\n" - " advanced by one byte.\n" - ":rtype: int\n" - ":return: The byte read from the memory block if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_MemIo_transfer, METH_VARARGS, "\n" - "Clear the memory block and then transfer data from\n" - " the *src* BasicIo object into a new block of memory.\n" - "\n" - "This method is optimized to simply swap memory block if the source\n" - "object is another MemIo instance. The source BasicIo instance\n" - "is invalidated by this operation and should not be used after this\n" - "method returns. This method exists primarily to be used with\n" - "the BasicIo::temporary() method.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "" }, - { "seek", _wrap_MemIo_seek, METH_VARARGS, "\n" - "Move the current IO position.\n" - ":type offset: int\n" - ":param offset: Number of bytes to move the IO position\n" - " relative to the starting position specified by *pos*\n" - ":type pos: :py:class:`BasicIo.Position`\n" - ":param pos: Position from which the seek should start\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "mmap", _wrap_MemIo_mmap, METH_VARARGS, "\n" - "Allow direct access to the underlying data buffer. The buffer\n" - " is not protected against write access in any way, the argument\n" - " is ignored.\n" - "Notes: The application must ensure that the memory pointed to by the\n" - " returned pointer remains valid and allocated as long as the\n" - " MemIo object exists.\n" - "" }, - { "munmap", _wrap_MemIo_munmap, METH_VARARGS, "" }, - { "tell", _wrap_MemIo_tell, METH_VARARGS, "\n" - "Get the current IO position.\n" - ":rtype: int\n" - ":return: Offset from the start of the memory block\n" - "" }, - { "size", _wrap_MemIo_size, METH_VARARGS, "\n" - "Get the current memory buffer size in bytes.\n" - ":rtype: int\n" - ":return: Size of the in memory data in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_MemIo_isopen, METH_VARARGS, "Always returns true" }, - { "error", _wrap_MemIo_error, METH_VARARGS, "Always returns 0" }, - { "eof", _wrap_MemIo_eof, METH_VARARGS, "Returns true if the IO position has reached the end, otherwise false." }, - { "path", _wrap_MemIo_path, METH_VARARGS, " Returns a dummy path, indicating that memory access is used" }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__MemIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.MemIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_MemIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - "\n" - "Provides binary IO on blocks of memory by implementing the BasicIo\n" - " interface. A copy-on-write implementation ensures that the data passed\n" - " in is only copied when necessary, i.e., as soon as data is written to\n" - " the MemIo. The original data is only used for reading. If writes are\n" - " performed, the changed data can be retrieved using the read methods\n" - " (since the data used in construction is never modified).\n" - "\n" - "Notes: If read only usage of this class is common, it might be worth\n" - " creating a specialized readonly class or changing this one to\n" - " have a readonly mode.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__MemIo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__MemIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__MemIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_MemIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - _wrap_MemIo_size_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - getbuffer_Exiv2_MemIo, /* bf_getbuffer */ - releasebuffer_Exiv2_MemIo, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__MemIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__MemIo_type}; - -static SwigPyGetSet XPathIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XPathIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Default constructor that reads data from stdin/data uri path and writes them to the temp file.", &XPathIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__XPathIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XPathIo_methods[] = { - { "transfer", _wrap_XPathIo_transfer, METH_VARARGS, "\n" - "Change the name of the temp file and make it untemporary before\n" - " calling the method of superclass FileIo::transfer.\n" - "" }, - { "writeDataToFile", (PyCFunction)(void(*)(void))_wrap_XPathIo_writeDataToFile, METH_STATIC|METH_VARARGS, "\n" - "Read the data from stdin/data uri path and write them to the file.\n" - ":type orgPath: str\n" - ":param orgPath: It equals \"-\" if the input data's from stdin. Otherwise, it's data uri path.\n" - ":rtype: str\n" - ":return: the name of the new file.\n" - ":raises: Error if it fails.\n" - "" }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__XPathIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.XPathIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XPathIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - " Provides binary IO for the data from stdin and data uri path.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XPathIo_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XPathIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XPathIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XPathIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XPathIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XPathIo_type}; - -static SwigPyGetSet RemoteIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__RemoteIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Destructor. Releases all managed memory.", &RemoteIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__RemoteIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__RemoteIo_methods[] = { - { "open", _wrap_RemoteIo_open, METH_VARARGS, "\n" - "Connect to the remote server, get the size of the remote file and\n" - " allocate the array of blocksMap.\n" - "\n" - " If the blocksMap is already allocated (this method has been called before),\n" - " it just reset IO position to the start and does not flush the old data.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "close", _wrap_RemoteIo_close, METH_VARARGS, "\n" - "Reset the IO position to the start. It does not release the data.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "write", _wrap_RemoteIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Not support this method.\n" - ":rtype: int\n" - ":return: 0 means failure\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to the remote file.\n" - "\n" - "The write access is done in an efficient way. It only sends the range of different\n" - "bytes between the current data and BasicIo instance to the remote machine.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: The size of BasicIo instance;\n" - "\n" - " 0 if failure;\n" - ":raises: Error In case of failure\n" - "\n" - "Notes: The write access is only supported by http, https, ssh.\n" - "" }, - { "putb", _wrap_RemoteIo_putb, METH_VARARGS, "\n" - "Not support\n" - ":rtype: int\n" - ":return: 0 means failure\n" - "" }, - { "read", _wrap_RemoteIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the memory blocks. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - " If the memory blocks are not populated (False), it will connect to server\n" - " and populate the data to memory blocks.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the the memory blocks. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - " If the memory blocks are not populated (!= bMemory), it will connect to server\n" - " and populate the data to memory blocks.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_RemoteIo_getb, METH_VARARGS, "\n" - "Read one byte from the memory blocks. The IO position is\n" - " advanced by one byte.\n" - " If the memory block is not populated (!= bMemory), it will connect to server\n" - " and populate the data to the memory block.\n" - ":rtype: int\n" - ":return: The byte read from the memory block if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_RemoteIo_transfer, METH_VARARGS, "\n" - "Remove the contents of the file and then transfer data from\n" - " the *src* BasicIo object into the empty file.\n" - "\n" - "The write access is done in an efficient way. It only sends the range of different\n" - "bytes between the current data and BasicIo instance to the remote machine.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "\n" - "Notes: The write access is only supported by http, https, ssh.\n" - "" }, - { "seek", _wrap_RemoteIo_seek, METH_VARARGS, "\n" - "Move the current IO position.\n" - ":type offset: int\n" - ":param offset: Number of bytes to move the IO position\n" - " relative to the starting position specified by *pos*\n" - ":type pos: :py:class:`BasicIo.Position`\n" - ":param pos: Position from which the seek should start\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "mmap", _wrap_RemoteIo_mmap, METH_VARARGS, "\n" - "Not support\n" - ":rtype: memoryview\n" - ":return: NULL\n" - "" }, - { "munmap", _wrap_RemoteIo_munmap, METH_VARARGS, "\n" - "Not support\n" - ":rtype: int\n" - ":return: 0\n" - "" }, - { "tell", _wrap_RemoteIo_tell, METH_VARARGS, "\n" - "Get the current IO position.\n" - ":rtype: int\n" - ":return: Offset from the start of the memory block\n" - "" }, - { "size", _wrap_RemoteIo_size, METH_VARARGS, "\n" - "Get the current memory buffer size in bytes.\n" - ":rtype: int\n" - ":return: Size of the in memory data in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_RemoteIo_isopen, METH_VARARGS, "Returns true if the memory area is allocated." }, - { "error", _wrap_RemoteIo_error, METH_VARARGS, "Always returns 0" }, - { "eof", _wrap_RemoteIo_eof, METH_VARARGS, "Returns true if the IO position has reached the end, otherwise false." }, - { "path", _wrap_RemoteIo_path, METH_VARARGS, "Returns the URL of the file." }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__RemoteIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.RemoteIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_RemoteIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - "\n" - "Provides remote binary file IO by implementing the BasicIo interface. This is an\n" - " abstract class. The logics for remote access are implemented in HttpIo, CurlIo, SshIo which\n" - " are the derived classes of RemoteIo.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__RemoteIo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__RemoteIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__RemoteIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - _wrap_RemoteIo_size_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - getbuffer_Exiv2_RemoteIo, /* bf_getbuffer */ - releasebuffer_Exiv2_RemoteIo, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__RemoteIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__RemoteIo_type}; - -static SwigPyGetSet HttpIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__HttpIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "Constructor that accepts the http URL on which IO will be\n" - " performed. The constructor does not open the file, and\n" - " therefore never failes.\n" - ":type url: str\n" - ":param url: The full path of url\n" - ":type blockSize: int, optional\n" - ":param blockSize: the size of the memory block. The file content is\n" - " divided into the memory blocks. These blocks are populated\n" - " on demand from the server, so it avoids copying the complete file.\n" - "", &HttpIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__HttpIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__HttpIo_methods[] = { - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__HttpIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.HttpIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - " Provides the http read/write access for the RemoteIo.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__HttpIo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__HttpIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__HttpIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_HttpIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif +SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_BasicIo) /* defines _wrap_delete_BasicIo_destructor_closure */ + +SWIGPY_LENFUNC_CLOSURE(_wrap_BasicIo_size) /* defines _wrap_BasicIo_size_lenfunc_closure */ + +static PyMethodDef SwigMethods[] = { + { "_enum_list_Position", _wrap__enum_list_Position, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__HttpIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__HttpIo_type}; - -static SwigPyGetSet CurlIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__CurlIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "Constructor that accepts the URL on which IO will be\n" - " performed.\n" - ":type url: str\n" - ":param url: The full path of url\n" - ":type blockSize: int, optional\n" - ":param blockSize: the size of the memory block. The file content is\n" - " divided into the memory blocks. These blocks are populated\n" - " on demand from the server, so it avoids copying the complete file.\n" - ":raises: Error if it is unable to init curl pointer.\n" - "", &CurlIo___dict___getset }, +static SwigPyGetSet BasicIo___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__BasicIo_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"", &BasicIo___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__CurlIo_richcompare(PyObject *self, PyObject *other, int op) { +SwigPyBuiltin__Exiv2__BasicIo_richcompare(PyObject *self, PyObject *other, int op) { PyObject *result = NULL; PyObject *tuple = PyTuple_New(1); assert(tuple); @@ -11075,26 +5559,190 @@ SwigPyBuiltin__Exiv2__CurlIo_richcompare(PyObject *self, PyObject *other, int op return result; } -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__CurlIo_methods[] = { - { "write", _wrap_CurlIo_write, METH_VARARGS, "\n" +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { + { "open", _wrap_BasicIo_open, METH_VARARGS, "\n" + "Open the IO source using the default access mode. The\n" + " default mode should allow for reading and writing.\n" + "\n" + "This method can also be used to \"reopen\" an IO source which will\n" + "flush any unwritten data and reset the IO position to the start.\n" + "Subclasses may provide custom methods to allow for\n" + "opening IO sources differently.\n" + "\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure.\n" + "" }, + { "close", _wrap_BasicIo_close, METH_VARARGS, "\n" + "Close the IO source. After closing a BasicIo instance can not\n" + " be read or written. Closing flushes any unwritten data. It is\n" + " safe to call close on a closed instance.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure.\n" + "" }, + { "write", _wrap_BasicIo_write, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Write data to the IO source. Current IO position is advanced\n" + " by the number of bytes written.\n" + ":type data: :py:term:`bytes-like object`\n" + ":param data: Pointer to data. Data must be at least *wcount*\n" + " bytes long\n" + ":type wcount: int\n" + ":param wcount: Number of bytes to be written.\n" + ":rtype: int\n" + ":return: Number of bytes written to IO source successfully;\n" + "\n" + " 0 if failure;\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Write data that is read from another BasicIo instance to\n" + " the IO source. Current IO position is advanced by the number\n" + " of bytes written.\n" + ":type src: :py:class:`BasicIo`\n" + ":param src: Reference to another BasicIo instance. Reading start\n" + " at the source's current IO position\n" + ":rtype: int\n" + ":return: Number of bytes written to IO source successfully;\n" + "\n" + " 0 if failure;\n" + "" }, + { "putb", _wrap_BasicIo_putb, METH_VARARGS, "\n" + "Write one byte to the IO source. Current IO position is\n" + " advanced by one byte.\n" + ":type data: int\n" + ":param data: The single byte to be written.\n" + ":rtype: int\n" + ":return: The value of the byte written if successful;\n" + "\n" + " EOF if failure;\n" + "" }, + { "read", _wrap_BasicIo_read, METH_VARARGS, "\n" "*Overload 1:*\n" "\n" - "Write access is only available for some protocols. This method\n" - " will call RemoteIo::write(const byte* data, long wcount) if the write\n" - " access is available for the protocol. Otherwise, it throws the Error.\n" + "Read data from the IO source. Reading starts at the current\n" + " IO position and the position is advanced by the number of bytes\n" + " read.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":rtype: :py:class:`DataBuf`\n" + ":return: DataBuf instance containing the bytes read. Use the\n" + " DataBuf::size_ member to find the number of bytes read.\n" + " DataBuf::size_ will be 0 on failure.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Read data from the IO source. Reading starts at the current\n" + " IO position and the position is advanced by the number of bytes\n" + " read.\n" + ":type buf: writeable :py:term:`bytes-like object`\n" + ":param buf: Pointer to a block of memory into which the read data\n" + " is stored. The memory block must be at least *rcount* bytes\n" + " long.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":rtype: int\n" + ":return: Number of bytes read from IO source successfully;\n" + "\n" + " 0 if failure;\n" + "" }, + { "getb", _wrap_BasicIo_getb, METH_VARARGS, "\n" + "Read one byte from the IO source. Current IO position is\n" + " advanced by one byte.\n" + ":rtype: int\n" + ":return: The byte read from the IO source if successful;\n" + "\n" + " EOF if failure;\n" + "" }, + { "transfer", _wrap_BasicIo_transfer, METH_VARARGS, "\n" + "Remove all data from this object's IO source and then transfer\n" + " data from the *src* BasicIo object into this object.\n" "\n" - "|\n" + "The source object is invalidated by this operation and should not be\n" + "used after this method returns. This method exists primarily to\n" + "be used with the BasicIo::temporary() method.\n" "\n" - "*Overload 2:*\n" + ":type src: :py:class:`BasicIo`\n" + ":param src: Reference to another BasicIo instance. The entire contents\n" + " of src are transferred to this object. The *src* object is\n" + " invalidated by the method.\n" + ":raises: Error In case of failure\n" + "" }, + { "seek", _wrap_BasicIo_seek, METH_VARARGS, "\n" + "Move the current IO position.\n" + ":type offset: int\n" + ":param offset: Number of bytes to move the position relative\n" + " to the starting position specified by *pos*\n" + ":type pos: :py:class:`BasicIo.Position`\n" + ":param pos: Position from which the seek should start\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure;\n" + "" }, + { "mmap", _wrap_BasicIo_mmap, METH_VARARGS, "\n" + "Direct access to the IO data. For files, this is done by\n" + " mapping the file into the process's address space; for memory\n" + " blocks, this allows direct access to the memory block.\n" + ":type isWriteable: bool, optional\n" + ":param isWriteable: Set to true if the mapped area should be writeable\n" + " (default is false).\n" + ":rtype: memoryview\n" + ":return: A pointer to the mapped area.\n" + ":raises: Error In case of failure.\n" + "" }, + { "munmap", _wrap_BasicIo_munmap, METH_VARARGS, "\n" + "Remove a mapping established with mmap(). If the mapped area\n" + " is writeable, this ensures that changes are written back.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure;\n" + "" }, + { "tell", _wrap_BasicIo_tell, METH_VARARGS, "\n" + "Get the current IO position.\n" + ":rtype: int\n" + ":return: Offset from the start of IO if successful;\n" + "\n" + " -1 if failure;\n" + "" }, + { "size", _wrap_BasicIo_size, METH_VARARGS, "\n" + "Get the current size of the IO source in bytes.\n" + ":rtype: int\n" + ":return: Size of the IO source in bytes;\n" + "\n" + " -1 if failure;\n" + "" }, + { "isopen", _wrap_BasicIo_isopen, METH_VARARGS, "Returns true if the IO source is open, otherwise false." }, + { "error", _wrap_BasicIo_error, METH_VARARGS, "Returns 0 if the IO source is in a valid state, otherwise nonzero." }, + { "eof", _wrap_BasicIo_eof, METH_VARARGS, "Returns true if the IO position has reached the end, otherwise false." }, + { "path", _wrap_BasicIo_path, METH_VARARGS, "\n" + "Return the path to the IO resource. Often used to form\n" + " comprehensive error messages where only a BasicIo instance is\n" + " available.\n" + "" }, + { "ioType", _wrap_BasicIo_ioType, METH_VARARGS, "\n" + "Return the derived class type.\n" "\n" - "Write access is only available for some protocols. This method\n" - " will call RemoteIo::write(BasicIo& src) if the write access is available\n" - " for the protocol. Otherwise, it throws the Error.\n" + "You shouldn't usually need to know the type of IO as they all have\n" + "the same interface.\n" + ":rtype: str\n" + ":return: A class name such as FileIo.\n" "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; -static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { +static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) @@ -11102,10 +5750,10 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "exiv2.basicio.CurlIo", /* tp_name */ + "exiv2.basicio.BasicIo", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ - _wrap_delete_CurlIo_destructor_closure, /* tp_dealloc */ + _wrap_delete_BasicIo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 (printfunc) 0, /* tp_print */ #else @@ -11119,39 +5767,42 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { (cmpfunc) 0, /* tp_compare */ #endif (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__CurlIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__CurlIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__CurlIo_type.as_mapping, /* tp_as_mapping */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping, /* tp_as_mapping */ SwigPyObject_hash, /* tp_hash */ (ternaryfunc) 0, /* tp_call */ (reprfunc) 0, /* tp_str */ (getattrofunc) 0, /* tp_getattro */ (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__CurlIo_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" - "Provides the http, https read/write access and ftp read access for the RemoteIo.\n" - " This class is based on libcurl.\n" + "An interface for simple binary IO.\n" + "\n" + "Designed to have semantics and names similar to those of C style FILE*\n" + "operations. Subclasses should all behave the same so that they can be\n" + "interchanged.\n" "",/* tp_doc */ (traverseproc) 0, /* tp_traverse */ (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__CurlIo_richcompare, /* tp_richcompare */ + SwigPyBuiltin__Exiv2__BasicIo_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc) 0, /* tp_iter */ (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__CurlIo_methods, /* tp_methods */ + SwigPyBuiltin__Exiv2__BasicIo_methods, /* tp_methods */ 0, /* tp_members */ - SwigPyBuiltin__Exiv2__CurlIo_getset, /* tp_getset */ + SwigPyBuiltin__Exiv2__BasicIo_getset, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ (descrgetfunc) 0, /* tp_descr_get */ (descrsetfunc) 0, /* tp_descr_set */ offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_CurlIo, /* tp_init */ + SwigPyBuiltin_BadInit, /* tp_init */ (allocfunc) 0, /* tp_alloc */ (newfunc) 0, /* tp_new */ (freefunc) 0, /* tp_free */ @@ -11256,7 +5907,7 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ + _wrap_BasicIo_size_lenfunc_closure, /* sq_length */ (binaryfunc) 0, /* sq_concat */ (ssizeargfunc) 0, /* sq_repeat */ (ssizeargfunc) 0, /* sq_item */ @@ -11282,8 +5933,8 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { (segcountproc) 0, /* bf_getsegcount */ (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + getbuffer_Exiv2_BasicIo, /* bf_getbuffer */ + releasebuffer_Exiv2_BasicIo, /* bf_releasebuffer */ }, (PyObject *) 0, /* ht_name */ (PyObject *) 0, /* ht_slots */ @@ -11305,14 +5956,11 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__CurlIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__CurlIo_type}; +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__BasicIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -11331,20 +5979,16 @@ static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(n static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } -static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__BasicIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__CurlIo_clientdata, 0}; +static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__FileIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__HttpIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__MemIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__RemoteIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", "Exiv2::XPathIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__XPathIo_clientdata, 0}; +static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SwigPyObject = {"_p_SwigPyObject", "SwigPyObject *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_first_type = {"_p_first_type", "first_type *", 0, 0, (void*)0, 0}; @@ -11362,7 +6006,6 @@ static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "uint16_t static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__BasicIo, - &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__FileIo, &_swigt__p_Exiv2__HttpIo, @@ -11385,14 +6028,13 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_unsigned_short, }; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__HttpIo[] = {{&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__MemIo[] = {{&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__XPathIo[] = {{&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__FileIo[] = { {&_swigt__p_Exiv2__FileIo, 0, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__FileIo, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__XPathIo[] = { {&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SwigPyObject[] = { {&_swigt__p_SwigPyObject, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_first_type[] = { {&_swigt__p_first_type, 0, 0, 0},{0, 0, 0, 0}}; @@ -11410,7 +6052,6 @@ static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__BasicIo, - _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__FileIo, _swigc__p_Exiv2__HttpIo, @@ -11442,7 +6083,7 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -static PyTypeObject *builtin_bases[3]; +static PyTypeObject *builtin_bases[2]; /* ----------------------------------------------------------------------------- * Type initialization: @@ -11899,7 +6540,7 @@ SWIG_init(void) { SWIG_InstallConstants(d,swig_const_table); - SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__doc__",SWIG_FromCharPtr("Classes to access files, memory and remote data.")); + SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__doc__",SWIG_FromCharPtr("Class interface to access files, memory and remote data.")); { exiv2_module = PyImport_ImportModule("exiv2"); @@ -11951,210 +6592,6 @@ SWIG_init(void) { SwigPyBuiltin_AddPublicSymbol(public_interface, "BasicIo"); d = md; - /* type 'Exiv2::FileIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__FileIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__BasicIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'FileIo' as base 'Exiv2::BasicIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'FileIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "FileIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "FileIo"); - d = md; - - /* type 'Exiv2::MemIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__MemIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__BasicIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'MemIo' as base 'Exiv2::BasicIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'MemIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "MemIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "MemIo"); - d = md; - - /* type 'Exiv2::XPathIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XPathIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__FileIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XPathIo' as base 'Exiv2::FileIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XPathIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "XPathIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "XPathIo"); - d = md; - - /* type 'Exiv2::RemoteIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__RemoteIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__BasicIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'RemoteIo' as base 'Exiv2::BasicIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'RemoteIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "RemoteIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "RemoteIo"); - d = md; - - /* type 'Exiv2::HttpIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__HttpIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__RemoteIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'HttpIo' as base 'Exiv2::RemoteIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'HttpIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "HttpIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "HttpIo"); - d = md; - - /* type 'Exiv2::CurlIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__CurlIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__RemoteIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'CurlIo' as base 'Exiv2::RemoteIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'CurlIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "CurlIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "CurlIo"); - d = md; - /* Initialize threading */ SWIG_PYTHON_INITIALIZE_THREADS; #if PY_VERSION_HEX >= 0x03000000 diff --git a/src/swig-0_27_7/image_wrap.cxx b/src/swig-0_27_7/image_wrap.cxx index d250444..432a225 100644 --- a/src/swig-0_27_7/image_wrap.cxx +++ b/src/swig-0_27_7/image_wrap.cxx @@ -3930,76 +3930,75 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__AsciiValue swig_types[2] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[3] #define SWIGTYPE_p_Exiv2__CommentValue swig_types[4] -#define SWIGTYPE_p_Exiv2__CurlIo swig_types[5] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[6] -#define SWIGTYPE_p_Exiv2__DataSet swig_types[7] -#define SWIGTYPE_p_Exiv2__DataValue swig_types[8] -#define SWIGTYPE_p_Exiv2__DateValue swig_types[9] -#define SWIGTYPE_p_Exiv2__ExifData swig_types[10] -#define SWIGTYPE_p_Exiv2__ExifKey swig_types[11] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[12] -#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[13] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[14] -#define SWIGTYPE_p_Exiv2__Image swig_types[15] -#define SWIGTYPE_p_Exiv2__ImageFactory swig_types[16] -#define SWIGTYPE_p_Exiv2__IptcData swig_types[17] -#define SWIGTYPE_p_Exiv2__IptcKey swig_types[18] -#define SWIGTYPE_p_Exiv2__Key swig_types[19] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[20] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[21] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[22] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[23] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[24] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[25] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[26] -#define SWIGTYPE_p_Exiv2__Value swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[34] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[35] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpData swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[40] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[41] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[42] -#define SWIGTYPE_p_IptcData_iterator swig_types[43] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[44] -#define SWIGTYPE_p_SwigPyObject swig_types[45] -#define SWIGTYPE_p_ValueType swig_types[46] -#define SWIGTYPE_p_XmpData_iterator swig_types[47] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[48] -#define SWIGTYPE_p_allocator_type swig_types[49] -#define SWIGTYPE_p_char swig_types[50] -#define SWIGTYPE_p_const_iterator swig_types[51] -#define SWIGTYPE_p_difference_type swig_types[52] -#define SWIGTYPE_p_first_type swig_types[53] -#define SWIGTYPE_p_int swig_types[54] -#define SWIGTYPE_p_iterator swig_types[55] -#define SWIGTYPE_p_key_type swig_types[56] -#define SWIGTYPE_p_long_long swig_types[57] -#define SWIGTYPE_p_mapped_type swig_types[58] -#define SWIGTYPE_p_second_type swig_types[59] -#define SWIGTYPE_p_short swig_types[60] -#define SWIGTYPE_p_signed_char swig_types[61] -#define SWIGTYPE_p_size_type swig_types[62] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[63] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[64] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[65] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[66] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[67] -#define SWIGTYPE_p_unsigned_char swig_types[68] -#define SWIGTYPE_p_unsigned_int swig_types[69] -#define SWIGTYPE_p_unsigned_long_long swig_types[70] -#define SWIGTYPE_p_unsigned_short swig_types[71] -#define SWIGTYPE_p_value_type swig_types[72] -static swig_type_info *swig_types[74]; -static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[5] +#define SWIGTYPE_p_Exiv2__DataSet swig_types[6] +#define SWIGTYPE_p_Exiv2__DataValue swig_types[7] +#define SWIGTYPE_p_Exiv2__DateValue swig_types[8] +#define SWIGTYPE_p_Exiv2__ExifData swig_types[9] +#define SWIGTYPE_p_Exiv2__ExifKey swig_types[10] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[11] +#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[13] +#define SWIGTYPE_p_Exiv2__Image swig_types[14] +#define SWIGTYPE_p_Exiv2__ImageFactory swig_types[15] +#define SWIGTYPE_p_Exiv2__IptcData swig_types[16] +#define SWIGTYPE_p_Exiv2__IptcKey swig_types[17] +#define SWIGTYPE_p_Exiv2__Key swig_types[18] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[19] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[20] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] +#define SWIGTYPE_p_Exiv2__Value swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpData swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] +#define SWIGTYPE_p_IptcData_iterator swig_types[42] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] +#define SWIGTYPE_p_SwigPyObject swig_types[44] +#define SWIGTYPE_p_ValueType swig_types[45] +#define SWIGTYPE_p_XmpData_iterator swig_types[46] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] +#define SWIGTYPE_p_allocator_type swig_types[48] +#define SWIGTYPE_p_char swig_types[49] +#define SWIGTYPE_p_const_iterator swig_types[50] +#define SWIGTYPE_p_difference_type swig_types[51] +#define SWIGTYPE_p_first_type swig_types[52] +#define SWIGTYPE_p_int swig_types[53] +#define SWIGTYPE_p_iterator swig_types[54] +#define SWIGTYPE_p_key_type swig_types[55] +#define SWIGTYPE_p_long_long swig_types[56] +#define SWIGTYPE_p_mapped_type swig_types[57] +#define SWIGTYPE_p_second_type swig_types[58] +#define SWIGTYPE_p_short swig_types[59] +#define SWIGTYPE_p_signed_char swig_types[60] +#define SWIGTYPE_p_size_type swig_types[61] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] +#define SWIGTYPE_p_unsigned_char swig_types[67] +#define SWIGTYPE_p_unsigned_int swig_types[68] +#define SWIGTYPE_p_unsigned_long_long swig_types[69] +#define SWIGTYPE_p_unsigned_short swig_types[70] +#define SWIGTYPE_p_value_type swig_types[71] +static swig_type_info *swig_types[73]; +static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4198,19 +4197,6 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" -#ifndef EXV_USE_CURL -namespace Exiv2 { - class CurlIo : public RemoteIo { - public: - CurlIo(const std::string& url, size_t blockSize=0) { - throw std::runtime_error( - "CurlIo not enabled in linked libexiv2"); - }; - }; -} -#endif - - #include @@ -4699,29 +4685,6 @@ SWIGINTERNINLINE PyObject* } -static swig_type_info* basicio_subtype(Exiv2::BasicIo* ptr) { - if (dynamic_cast(ptr)) - return SWIGTYPE_p_Exiv2__MemIo; - else if (dynamic_cast(ptr)) { - if (dynamic_cast(ptr)) - return SWIGTYPE_p_Exiv2__XPathIo; - else - return SWIGTYPE_p_Exiv2__FileIo; - } - else if (dynamic_cast(ptr)) { - if (dynamic_cast(ptr)) - return SWIGTYPE_p_Exiv2__HttpIo; - - else if (dynamic_cast(ptr)) - return SWIGTYPE_p_Exiv2__CurlIo; - - else - return SWIGTYPE_p_Exiv2__RemoteIo; - } - return SWIGTYPE_p_Exiv2__BasicIo; -}; - - static PyObject* PyEnum_Exiv2_MetadataId = NULL; @@ -6051,9 +6014,7 @@ SWIGINTERN PyObject *_wrap_Image_io(PyObject *self, PyObject *args) { SWIG_fail; } } - { - resultobj = SWIG_NewPointerObj(result, basicio_subtype(result), 0); - } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__BasicIo, 0 | 0 ); if (resultobj != Py_None) if (PyObject_SetAttrString(resultobj, "_refers_to", self)) { @@ -6351,11 +6312,9 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_0(PyObject *self, Py_ssiz SWIG_fail; } } - { - Exiv2::BasicIo* ptr = (&result)->release(); - resultobj = SWIG_NewPointerObj( - ptr, basicio_subtype(ptr), SWIG_POINTER_OWN); - } + + resultobj = SWIG_NewPointerObj((&result)->release(), SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_OWN | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -6959,11 +6918,9 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_1(PyObject *self, Py_ssiz SWIG_fail; } } - { - Exiv2::BasicIo* ptr = (&result)->release(); - resultobj = SWIG_NewPointerObj( - ptr, basicio_subtype(ptr), SWIG_POINTER_OWN); - } + + resultobj = SWIG_NewPointerObj((&result)->release(), SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_OWN | 0 ); + PyObject_SetAttrString(resultobj, "_refers_to", _global_view); @@ -7970,9 +7927,6 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ImageFactory_clientdata = {0, /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -7988,9 +7942,6 @@ static void *_p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM( static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) (Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } -static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); -} static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); } @@ -8000,12 +7951,6 @@ static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newme static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); } -static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} -static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); -} static void *_p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::StringValueBase *) ((Exiv2::AsciiValue *) x)); } @@ -8085,25 +8030,25 @@ static swig_type_info _swigt__p_ExifData_iterator = {"_p_ExifData_iterator", "Ex static swig_type_info _swigt__p_ExifData_iterator_base = {"_p_ExifData_iterator_base", "ExifData_iterator_base *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__AsciiValue = {"_p_Exiv2__AsciiValue", "Exiv2::AsciiValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_Exiv2__CommentValue = {"_p_Exiv2__CommentValue", "Exiv2::CommentValue *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataSet = {"_p_Exiv2__DataSet", "Exiv2::DataSet *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DateValue = {"_p_Exiv2__DateValue", "Exiv2::DateValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifData = {"_p_Exiv2__ExifData", "Exiv2::ExifData *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifKey = {"_p_Exiv2__ExifKey", "Exiv2::ExifKey *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__GroupInfo = {"_p_Exiv2__GroupInfo", "Exiv2::GroupInfo *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Image = {"_p_Exiv2__Image", "Exiv2::Image *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Image_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__ImageFactory = {"_p_Exiv2__ImageFactory", "Exiv2::ImageFactory *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__ImageFactory_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__IptcData = {"_p_Exiv2__IptcData", "Exiv2::IptcData *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValueBase = {"_p_Exiv2__StringValueBase", "Exiv2::StringValueBase *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__TagInfo = {"_p_Exiv2__TagInfo", "Exiv2::TagInfo *", 0, 0, (void*)0, 0}; @@ -8117,7 +8062,6 @@ static swig_type_info _swigt__p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t static swig_type_info _swigt__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t = {"_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t", "Exiv2::URationalValue *|Exiv2::ValueType< Exiv2::URational > *|Exiv2::ValueType< std::pair< uint32_t,uint32_t > > *|Exiv2::ValueType< std::pair< unsigned int,unsigned int > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ValueTypeT_uint16_t_t = {"_p_Exiv2__ValueTypeT_uint16_t_t", "Exiv2::UShortValue *|Exiv2::ValueType< uint16_t > *|Exiv2::ValueType< unsigned short > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ValueTypeT_uint32_t_t = {"_p_Exiv2__ValueTypeT_uint32_t_t", "Exiv2::ULongValue *|Exiv2::ValueType< uint32_t > *|Exiv2::ValueType< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", "Exiv2::XPathIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpArrayValue = {"_p_Exiv2__XmpArrayValue", "Exiv2::XmpArrayValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpData = {"_p_Exiv2__XmpData", "Exiv2::XmpData *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpKey = {"_p_Exiv2__XmpKey", "Exiv2::XmpKey *", 0, 0, (void*)0, 0}; @@ -8161,7 +8105,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__AsciiValue, &_swigt__p_Exiv2__BasicIo, &_swigt__p_Exiv2__CommentValue, - &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__DataSet, &_swigt__p_Exiv2__DataValue, @@ -8234,26 +8177,26 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_ExifData_iterator[] = { {&_swigt__p_ExifData_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ExifData_iterator_base[] = { {&_swigt__p_ExifData_iterator_base, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__AsciiValue[] = { {&_swigt__p_Exiv2__AsciiValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__FileIo[] = {{&_swigt__p_Exiv2__FileIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__HttpIo[] = {{&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__MemIo[] = {{&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = {{&_swigt__p_Exiv2__RemoteIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__XPathIo[] = {{&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__CommentValue[] = { {&_swigt__p_Exiv2__CommentValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataSet[] = { {&_swigt__p_Exiv2__DataSet, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DateValue[] = { {&_swigt__p_Exiv2__DateValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifData[] = { {&_swigt__p_Exiv2__ExifData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifKey[] = { {&_swigt__p_Exiv2__ExifKey, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__FileIo[] = { {&_swigt__p_Exiv2__FileIo, 0, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__FileIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__GroupInfo[] = { {&_swigt__p_Exiv2__GroupInfo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Image[] = { {&_swigt__p_Exiv2__Image, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ImageFactory[] = { {&_swigt__p_Exiv2__ImageFactory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcData[] = { {&_swigt__p_Exiv2__IptcData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValueBase[] = { {&_swigt__p_Exiv2__StringValueBase, 0, 0, 0}, {&_swigt__p_Exiv2__AsciiValue, _p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__CommentValue, _p_Exiv2__CommentValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__StringValue, _p_Exiv2__StringValueTo_p_Exiv2__StringValueBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__TagInfo[] = { {&_swigt__p_Exiv2__TagInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -8267,7 +8210,6 @@ static swig_cast_info _swigc__p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t static swig_cast_info _swigc__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ValueTypeT_uint16_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_uint16_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ValueTypeT_uint32_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__XPathIo[] = { {&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpArrayValue[] = { {&_swigt__p_Exiv2__XmpArrayValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpData[] = { {&_swigt__p_Exiv2__XmpData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpKey[] = { {&_swigt__p_Exiv2__XmpKey, 0, 0, 0},{0, 0, 0, 0}}; @@ -8311,7 +8253,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__AsciiValue, _swigc__p_Exiv2__BasicIo, _swigc__p_Exiv2__CommentValue, - _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__DataSet, _swigc__p_Exiv2__DataValue, diff --git a/src/swig-0_27_7/preview_wrap.cxx b/src/swig-0_27_7/preview_wrap.cxx index 2f2b02a..f236884 100644 --- a/src/swig-0_27_7/preview_wrap.cxx +++ b/src/swig-0_27_7/preview_wrap.cxx @@ -3932,76 +3932,75 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__AsciiValue swig_types[2] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[3] #define SWIGTYPE_p_Exiv2__CommentValue swig_types[4] -#define SWIGTYPE_p_Exiv2__CurlIo swig_types[5] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[6] -#define SWIGTYPE_p_Exiv2__DataSet swig_types[7] -#define SWIGTYPE_p_Exiv2__DataValue swig_types[8] -#define SWIGTYPE_p_Exiv2__DateValue swig_types[9] -#define SWIGTYPE_p_Exiv2__ExifKey swig_types[10] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[11] -#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[13] -#define SWIGTYPE_p_Exiv2__Image swig_types[14] -#define SWIGTYPE_p_Exiv2__IptcKey swig_types[15] -#define SWIGTYPE_p_Exiv2__Key swig_types[16] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[17] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[18] -#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[19] -#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[20] -#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[21] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[22] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[23] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[24] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[25] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[26] -#define SWIGTYPE_p_Exiv2__Value swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[34] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[35] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] -#define SWIGTYPE_p_IptcData_iterator swig_types[42] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] -#define SWIGTYPE_p_SwigPyObject swig_types[44] -#define SWIGTYPE_p_ValueType swig_types[45] -#define SWIGTYPE_p_XmpData_iterator swig_types[46] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] -#define SWIGTYPE_p_allocator_type swig_types[48] -#define SWIGTYPE_p_char swig_types[49] -#define SWIGTYPE_p_const_iterator swig_types[50] -#define SWIGTYPE_p_difference_type swig_types[51] -#define SWIGTYPE_p_first_type swig_types[52] -#define SWIGTYPE_p_int swig_types[53] -#define SWIGTYPE_p_iterator swig_types[54] -#define SWIGTYPE_p_key_type swig_types[55] -#define SWIGTYPE_p_long_long swig_types[56] -#define SWIGTYPE_p_mapped_type swig_types[57] -#define SWIGTYPE_p_second_type swig_types[58] -#define SWIGTYPE_p_short swig_types[59] -#define SWIGTYPE_p_signed_char swig_types[60] -#define SWIGTYPE_p_size_type swig_types[61] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] -#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[66] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[67] -#define SWIGTYPE_p_unsigned_char swig_types[68] -#define SWIGTYPE_p_unsigned_int swig_types[69] -#define SWIGTYPE_p_unsigned_long_long swig_types[70] -#define SWIGTYPE_p_unsigned_short swig_types[71] -#define SWIGTYPE_p_value_type swig_types[72] -static swig_type_info *swig_types[74]; -static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[5] +#define SWIGTYPE_p_Exiv2__DataSet swig_types[6] +#define SWIGTYPE_p_Exiv2__DataValue swig_types[7] +#define SWIGTYPE_p_Exiv2__DateValue swig_types[8] +#define SWIGTYPE_p_Exiv2__ExifKey swig_types[9] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[10] +#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[11] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[12] +#define SWIGTYPE_p_Exiv2__Image swig_types[13] +#define SWIGTYPE_p_Exiv2__IptcKey swig_types[14] +#define SWIGTYPE_p_Exiv2__Key swig_types[15] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[16] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[17] +#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[18] +#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[19] +#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[20] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] +#define SWIGTYPE_p_Exiv2__Value swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[40] +#define SWIGTYPE_p_IptcData_iterator swig_types[41] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[42] +#define SWIGTYPE_p_SwigPyObject swig_types[43] +#define SWIGTYPE_p_ValueType swig_types[44] +#define SWIGTYPE_p_XmpData_iterator swig_types[45] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[46] +#define SWIGTYPE_p_allocator_type swig_types[47] +#define SWIGTYPE_p_char swig_types[48] +#define SWIGTYPE_p_const_iterator swig_types[49] +#define SWIGTYPE_p_difference_type swig_types[50] +#define SWIGTYPE_p_first_type swig_types[51] +#define SWIGTYPE_p_int swig_types[52] +#define SWIGTYPE_p_iterator swig_types[53] +#define SWIGTYPE_p_key_type swig_types[54] +#define SWIGTYPE_p_long_long swig_types[55] +#define SWIGTYPE_p_mapped_type swig_types[56] +#define SWIGTYPE_p_second_type swig_types[57] +#define SWIGTYPE_p_short swig_types[58] +#define SWIGTYPE_p_signed_char swig_types[59] +#define SWIGTYPE_p_size_type swig_types[60] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[61] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[62] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[63] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] +#define SWIGTYPE_p_unsigned_char swig_types[67] +#define SWIGTYPE_p_unsigned_int swig_types[68] +#define SWIGTYPE_p_unsigned_long_long swig_types[69] +#define SWIGTYPE_p_unsigned_short swig_types[70] +#define SWIGTYPE_p_value_type swig_types[71] +static swig_type_info *swig_types[73]; +static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4200,19 +4199,6 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" -#ifndef EXV_USE_CURL -namespace Exiv2 { - class CurlIo : public RemoteIo { - public: - CurlIo(const std::string& url, size_t blockSize=0) { - throw std::runtime_error( - "CurlIo not enabled in linked libexiv2"); - }; - }; -} -#endif - - #include @@ -6426,7 +6412,7 @@ SWIGINTERN PyObject *_wrap_PreviewImage_extension(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } #endif - resultobj = SWIG_From_std_string(result); + resultobj = SWIG_FromCharPtrAndSize((&result)->data(), (&result)->size()); } return resultobj; fail: @@ -7446,9 +7432,6 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewManager_clientdata = {0 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -7464,9 +7447,6 @@ static void *_p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM( static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) (Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } -static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); -} static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); } @@ -7476,12 +7456,6 @@ static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newme static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); } -static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} -static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); -} static void *_p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::StringValueBase *) ((Exiv2::AsciiValue *) x)); } @@ -7561,25 +7535,25 @@ static swig_type_info _swigt__p_ExifData_iterator = {"_p_ExifData_iterator", "Ex static swig_type_info _swigt__p_ExifData_iterator_base = {"_p_ExifData_iterator_base", "ExifData_iterator_base *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__AsciiValue = {"_p_Exiv2__AsciiValue", "Exiv2::AsciiValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_Exiv2__CommentValue = {"_p_Exiv2__CommentValue", "Exiv2::CommentValue *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataSet = {"_p_Exiv2__DataSet", "Exiv2::DataSet *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DateValue = {"_p_Exiv2__DateValue", "Exiv2::DateValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifKey = {"_p_Exiv2__ExifKey", "Exiv2::ExifKey *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__GroupInfo = {"_p_Exiv2__GroupInfo", "Exiv2::GroupInfo *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Image = {"_p_Exiv2__Image", "Exiv2::Image *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__PreviewImage = {"_p_Exiv2__PreviewImage", "Exiv2::PreviewImage *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__PreviewImage_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__PreviewManager = {"_p_Exiv2__PreviewManager", "Exiv2::PreviewManager *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__PreviewManager_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__PreviewProperties = {"_p_Exiv2__PreviewProperties", "Exiv2::PreviewProperties *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__PreviewProperties_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValueBase = {"_p_Exiv2__StringValueBase", "Exiv2::StringValueBase *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__TagInfo = {"_p_Exiv2__TagInfo", "Exiv2::TagInfo *", 0, 0, (void*)0, 0}; @@ -7593,7 +7567,6 @@ static swig_type_info _swigt__p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t static swig_type_info _swigt__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t = {"_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t", "Exiv2::URationalValue *|Exiv2::ValueType< Exiv2::URational > *|Exiv2::ValueType< std::pair< uint32_t,uint32_t > > *|Exiv2::ValueType< std::pair< unsigned int,unsigned int > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ValueTypeT_uint16_t_t = {"_p_Exiv2__ValueTypeT_uint16_t_t", "Exiv2::UShortValue *|Exiv2::ValueType< uint16_t > *|Exiv2::ValueType< unsigned short > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ValueTypeT_uint32_t_t = {"_p_Exiv2__ValueTypeT_uint32_t_t", "Exiv2::ULongValue *|Exiv2::ValueType< uint32_t > *|Exiv2::ValueType< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", "Exiv2::XPathIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpArrayValue = {"_p_Exiv2__XmpArrayValue", "Exiv2::XmpArrayValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpKey = {"_p_Exiv2__XmpKey", "Exiv2::XmpKey *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpPropertyInfo = {"_p_Exiv2__XmpPropertyInfo", "Exiv2::XmpPropertyInfo *", 0, 0, (void*)0, 0}; @@ -7637,7 +7610,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__AsciiValue, &_swigt__p_Exiv2__BasicIo, &_swigt__p_Exiv2__CommentValue, - &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__DataSet, &_swigt__p_Exiv2__DataValue, @@ -7710,26 +7682,26 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_ExifData_iterator[] = { {&_swigt__p_ExifData_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ExifData_iterator_base[] = { {&_swigt__p_ExifData_iterator_base, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__AsciiValue[] = { {&_swigt__p_Exiv2__AsciiValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__FileIo[] = {{&_swigt__p_Exiv2__FileIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__HttpIo[] = {{&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__MemIo[] = {{&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = {{&_swigt__p_Exiv2__RemoteIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__XPathIo[] = {{&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__CommentValue[] = { {&_swigt__p_Exiv2__CommentValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataSet[] = { {&_swigt__p_Exiv2__DataSet, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DateValue[] = { {&_swigt__p_Exiv2__DateValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifKey[] = { {&_swigt__p_Exiv2__ExifKey, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__FileIo[] = { {&_swigt__p_Exiv2__FileIo, 0, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__FileIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__GroupInfo[] = { {&_swigt__p_Exiv2__GroupInfo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Image[] = { {&_swigt__p_Exiv2__Image, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewImage[] = { {&_swigt__p_Exiv2__PreviewImage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewManager[] = { {&_swigt__p_Exiv2__PreviewManager, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewProperties[] = { {&_swigt__p_Exiv2__PreviewProperties, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValueBase[] = { {&_swigt__p_Exiv2__StringValueBase, 0, 0, 0}, {&_swigt__p_Exiv2__AsciiValue, _p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__CommentValue, _p_Exiv2__CommentValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__StringValue, _p_Exiv2__StringValueTo_p_Exiv2__StringValueBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__TagInfo[] = { {&_swigt__p_Exiv2__TagInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -7743,7 +7715,6 @@ static swig_cast_info _swigc__p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t static swig_cast_info _swigc__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ValueTypeT_uint16_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_uint16_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ValueTypeT_uint32_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__XPathIo[] = { {&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpArrayValue[] = { {&_swigt__p_Exiv2__XmpArrayValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpKey[] = { {&_swigt__p_Exiv2__XmpKey, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpPropertyInfo[] = { {&_swigt__p_Exiv2__XmpPropertyInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -7787,7 +7758,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__AsciiValue, _swigc__p_Exiv2__BasicIo, _swigc__p_Exiv2__CommentValue, - _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__DataSet, _swigc__p_Exiv2__DataValue, diff --git a/src/swig-0_28_2/__init__.py b/src/swig-0_28_2/__init__.py index 85c136a..62863e2 100644 --- a/src/swig-0_28_2/__init__.py +++ b/src/swig-0_28_2/__init__.py @@ -20,9 +20,9 @@ def __init__(self, code, message): self.message = message #: python-exiv2 version as a string -__version__ = "0.16.4" +__version__ = "0.17.0" #: python-exiv2 version as a tuple of ints -__version_tuple__ = tuple((0, 16, 4)) +__version_tuple__ = tuple((0, 17, 0)) __all__ = ["Exiv2Error"] from exiv2.basicio import * diff --git a/src/swig-0_28_2/basicio_wrap.cxx b/src/swig-0_28_2/basicio_wrap.cxx index 8ef1228..86fede7 100644 --- a/src/swig-0_28_2/basicio_wrap.cxx +++ b/src/swig-0_28_2/basicio_wrap.cxx @@ -3927,29 +3927,28 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_ErrorCode swig_types[0] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[1] -#define SWIGTYPE_p_Exiv2__CurlIo swig_types[2] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[3] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[4] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[5] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[6] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[7] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[8] -#define SWIGTYPE_p_SwigPyObject swig_types[9] -#define SWIGTYPE_p_char swig_types[10] -#define SWIGTYPE_p_first_type swig_types[11] -#define SWIGTYPE_p_int swig_types[12] -#define SWIGTYPE_p_long_long swig_types[13] -#define SWIGTYPE_p_second_type swig_types[14] -#define SWIGTYPE_p_short swig_types[15] -#define SWIGTYPE_p_signed_char swig_types[16] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[17] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[18] -#define SWIGTYPE_p_unsigned_char swig_types[19] -#define SWIGTYPE_p_unsigned_int swig_types[20] -#define SWIGTYPE_p_unsigned_long_long swig_types[21] -#define SWIGTYPE_p_unsigned_short swig_types[22] -static swig_type_info *swig_types[24]; -static swig_module_info swig_module = {swig_types, 23, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[2] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[3] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[4] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[5] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[6] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[7] +#define SWIGTYPE_p_SwigPyObject swig_types[8] +#define SWIGTYPE_p_char swig_types[9] +#define SWIGTYPE_p_first_type swig_types[10] +#define SWIGTYPE_p_int swig_types[11] +#define SWIGTYPE_p_long_long swig_types[12] +#define SWIGTYPE_p_second_type swig_types[13] +#define SWIGTYPE_p_short swig_types[14] +#define SWIGTYPE_p_signed_char swig_types[15] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[16] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[17] +#define SWIGTYPE_p_unsigned_char swig_types[18] +#define SWIGTYPE_p_unsigned_int swig_types[19] +#define SWIGTYPE_p_unsigned_long_long swig_types[20] +#define SWIGTYPE_p_unsigned_short swig_types[21] +static swig_type_info *swig_types[23]; +static swig_module_info swig_module = {swig_types, 22, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4148,19 +4147,6 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" -#ifndef EXV_USE_CURL -namespace Exiv2 { - class CurlIo : public RemoteIo { - public: - CurlIo(const std::string& url, size_t blockSize=0) { - throw std::runtime_error( - "CurlIo not enabled in linked libexiv2"); - }; - }; -} -#endif - - #include @@ -4284,123 +4270,7 @@ static void _set_python_exception() { typedef Exiv2::ErrorCode ErrorCode; -static bool get_ptr_size(Exiv2::FileIo* self, bool is_writeable, - Exiv2::byte*& ptr, Py_ssize_t& size) { - if (self->open()) - return false; - try { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - ptr = self->mmap(is_writeable); - SWIG_PYTHON_THREAD_END_ALLOW; - - - - } catch(Exiv2::Error const& e) { - - return false; - } - size = self->size(); - return true; -}; - - -static int getbuffer_Exiv2_FileIo( - PyObject* exporter, Py_buffer* view, int flags) { - Exiv2::FileIo* self = 0; - Exiv2::byte* ptr = 0; - Py_ssize_t size = 0; - bool is_writeable = true && (flags && PyBUF_WRITABLE); - if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__FileIo, 0))) - goto fail; - if (!get_ptr_size(self, is_writeable, ptr, size)) - goto fail; - return PyBuffer_FillInfo(view, exporter, ptr, - ptr ? size : 0, is_writeable ? 0 : 1, flags); -fail: - PyErr_SetNone(PyExc_BufferError); - view->obj = NULL; - return -1; -}; - - -static void release_ptr(Exiv2::FileIo* self) { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - self->munmap(); - self->close(); - SWIG_PYTHON_THREAD_END_ALLOW; -}; - - -static void releasebuffer_Exiv2_FileIo( - PyObject* exporter, Py_buffer* view) { - Exiv2::FileIo* self = 0; - if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__FileIo, 0))) - return; - release_ptr(self); -}; - - -static bool get_ptr_size(Exiv2::MemIo* self, bool is_writeable, - Exiv2::byte*& ptr, Py_ssize_t& size) { - if (self->open()) - return false; - try { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - ptr = self->mmap(is_writeable); - SWIG_PYTHON_THREAD_END_ALLOW; - - - - } catch(Exiv2::Error const& e) { - - return false; - } - size = self->size(); - return true; -}; - - -static int getbuffer_Exiv2_MemIo( - PyObject* exporter, Py_buffer* view, int flags) { - Exiv2::MemIo* self = 0; - Exiv2::byte* ptr = 0; - Py_ssize_t size = 0; - bool is_writeable = true && (flags && PyBUF_WRITABLE); - if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__MemIo, 0))) - goto fail; - if (!get_ptr_size(self, is_writeable, ptr, size)) - goto fail; - return PyBuffer_FillInfo(view, exporter, ptr, - ptr ? size : 0, is_writeable ? 0 : 1, flags); -fail: - PyErr_SetNone(PyExc_BufferError); - view->obj = NULL; - return -1; -}; - - -static void release_ptr(Exiv2::MemIo* self) { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - self->munmap(); - self->close(); - SWIG_PYTHON_THREAD_END_ALLOW; -}; - - -static void releasebuffer_Exiv2_MemIo( - PyObject* exporter, Py_buffer* view) { - Exiv2::MemIo* self = 0; - if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__MemIo, 0))) - return; - release_ptr(self); -}; - - -static bool get_ptr_size(Exiv2::RemoteIo* self, bool is_writeable, +static bool get_ptr_size(Exiv2::BasicIo* self, bool is_writeable, Exiv2::byte*& ptr, Py_ssize_t& size) { if (self->open()) return false; @@ -4420,14 +4290,14 @@ static bool get_ptr_size(Exiv2::RemoteIo* self, bool is_writeable, }; -static int getbuffer_Exiv2_RemoteIo( +static int getbuffer_Exiv2_BasicIo( PyObject* exporter, Py_buffer* view, int flags) { - Exiv2::RemoteIo* self = 0; + Exiv2::BasicIo* self = 0; Exiv2::byte* ptr = 0; Py_ssize_t size = 0; bool is_writeable = true && (flags && PyBUF_WRITABLE); if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__RemoteIo, 0))) + exporter, (void**)&self, SWIGTYPE_p_Exiv2__BasicIo, 0))) goto fail; if (!get_ptr_size(self, is_writeable, ptr, size)) goto fail; @@ -4440,7 +4310,7 @@ static int getbuffer_Exiv2_RemoteIo( }; -static void release_ptr(Exiv2::RemoteIo* self) { +static void release_ptr(Exiv2::BasicIo* self) { SWIG_PYTHON_THREAD_BEGIN_ALLOW; self->munmap(); self->close(); @@ -4448,11 +4318,11 @@ static void release_ptr(Exiv2::RemoteIo* self) { }; -static void releasebuffer_Exiv2_RemoteIo( +static void releasebuffer_Exiv2_BasicIo( PyObject* exporter, Py_buffer* view) { - Exiv2::RemoteIo* self = 0; + Exiv2::BasicIo* self = 0; if (!SWIG_IsOK(SWIG_ConvertPtr( - exporter, (void**)&self, SWIGTYPE_p_Exiv2__RemoteIo, 0))) + exporter, (void**)&self, SWIGTYPE_p_Exiv2__BasicIo, 0))) return; release_ptr(self); }; @@ -4907,131 +4777,29 @@ SWIGINTERNINLINE PyObject* return PyBool_FromLong(value ? 1 : 0); } - -/* Return string from Python obj. NOTE: obj must remain in scope in order - to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */ -SWIGINTERN int -SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc) -{ -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (PyBytes_Check(obj)) -#else - if (PyUnicode_Check(obj)) -#endif -#else - if (PyString_Check(obj)) -#endif - { - char *cstr; Py_ssize_t len; - PyObject *bytes = NULL; - int ret = SWIG_OK; - if (alloc) - *alloc = SWIG_OLDOBJ; -#if PY_VERSION_HEX>=0x03000000 && defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1) - return SWIG_TypeError; -#else - cstr = (char *)SWIG_PyUnicode_AsUTF8AndSize(obj, &len, &bytes); - if (!cstr) - return SWIG_TypeError; - /* The returned string is only duplicated if the char * returned is not owned and memory managed by obj */ - if (bytes && cptr) { - if (alloc) { - cstr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); - *alloc = SWIG_NEWOBJ; - } else { - /* alloc must be set in order to clean up allocated memory */ - return SWIG_RuntimeError; - } - } -#endif - if (cptr) *cptr = cstr; - if (psize) *psize = len + 1; - Py_XDECREF(bytes); - return ret; - } else { -#if defined(SWIG_PYTHON_2_UNICODE) -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) -#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" -#endif -#if PY_VERSION_HEX<0x03000000 - if (PyUnicode_Check(obj)) { - char *cstr; Py_ssize_t len; - if (!alloc && cptr) { - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if (!obj) - return SWIG_TypeError; - if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { - if (cptr) { - if (alloc) *alloc = SWIG_NEWOBJ; - *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1))); +SWIGINTERN char const *Exiv2_BasicIo_ioType(Exiv2::BasicIo *self){ + if (dynamic_cast(self)) + return "MemIo"; + else if (dynamic_cast(self)) { + if (dynamic_cast(self)) + return "XPathIo"; + return "FileIo"; } - if (psize) *psize = len + 1; - - Py_XDECREF(obj); - return SWIG_OK; - } else { - Py_XDECREF(obj); - } - } -#endif -#endif - - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void* vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) *cptr = (char *) vptr; - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; - if (alloc) *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } - } - return SWIG_TypeError; -} - - -SWIGINTERN int -SWIG_AsPtr_std_string (PyObject * obj, std::string **val) -{ - char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; - if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { - if (buf) { - if (val) *val = new std::string(buf, size - 1); - if (alloc == SWIG_NEWOBJ) delete[] buf; - return SWIG_NEWOBJ; - } else { - if (val) *val = 0; - return SWIG_OLDOBJ; - } - } else { - static int init = 0; - static swig_type_info* descriptor = 0; - if (!init) { - descriptor = SWIG_TypeQuery("std::string" " *"); - init = 1; - } - if (descriptor) { - std::string *vptr; - int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); - if (SWIG_IsOK(res) && val) *val = vptr; - return res; + else if (dynamic_cast(self)) { + if (dynamic_cast(self)) + return "HttpIo"; +#ifdef EXV_USE_CURL + else if (dynamic_cast(self)) + return "CurlIo"; +#endif +#ifdef EXV_USE_SSH + else if (dynamic_cast(self)) + return "SshIo"; +#endif + return "RemoteIo"; + } + return "unknown"; } - } - return SWIG_ERROR; -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_std_string (const std::string& s) -{ - return SWIG_FromCharPtrAndSize(s.data(), s.size()); -} - #ifdef __cplusplus extern "C" { #endif @@ -5048,6 +4816,34 @@ SWIGINTERN PyObject *_wrap__enum_list_Position(PyObject *self, PyObject *args) { } +SWIGINTERN PyObject *_wrap_delete_BasicIo(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Exiv2::BasicIo *arg1 = (Exiv2::BasicIo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_BasicIo takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BasicIo" "', argument " "1"" of type '" "Exiv2::BasicIo *""'"); + } + arg1 = reinterpret_cast< Exiv2::BasicIo * >(argp1); + { + try { + delete arg1; + } + catch(std::exception const& e) { + _set_python_exception(); + SWIG_fail; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_BasicIo_open(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::BasicIo *arg1 = (Exiv2::BasicIo *) 0 ; @@ -5960,7 +5756,7 @@ SWIGINTERN PyObject *_wrap_BasicIo_path(PyObject *self, PyObject *args) { SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } #endif - resultobj = SWIG_From_std_string(copy); + resultobj = SWIG_FromCharPtrAndSize(copy.data(), copy.size()); } return resultobj; fail: @@ -5968,5342 +5764,52 @@ SWIGINTERN PyObject *_wrap_BasicIo_path(PyObject *self, PyObject *args) { } -SWIGINTERN int _wrap_new_FileIo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - Exiv2::FileIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_FileIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_FileIo", 1, 1, &obj1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FileIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FileIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::FileIo *)new Exiv2::FileIo((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__FileIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN PyObject *_wrap_delete_FileIo(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_BasicIo_ioType(PyObject *self, PyObject *args) { PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; + Exiv2::BasicIo *arg1 = (Exiv2::BasicIo *) 0 ; void *argp1 = 0 ; int res1 = 0 ; + char *result = 0 ; - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_FileIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, SWIG_POINTER_DISOWN | 0 ); + if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "BasicIo_ioType takes no arguments"); + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__BasicIo, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FileIo" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BasicIo_ioType" "', argument " "1"" of type '" "Exiv2::BasicIo *""'"); } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); + arg1 = reinterpret_cast< Exiv2::BasicIo * >(argp1); { try { - delete arg1; + result = (char *)Exiv2_BasicIo_ioType(arg1); } catch(std::exception const& e) { _set_python_exception(); SWIG_fail; } } - resultobj = SWIG_Py_Void(); + resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_FileIo_open__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "FileIo_open", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_open" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FileIo_open" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FileIo_open" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->open((std::string const &)*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} +SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_BasicIo) /* defines _wrap_delete_BasicIo_destructor_closure */ +SWIGPY_LENFUNC_CLOSURE(_wrap_BasicIo_size) /* defines _wrap_BasicIo_size_lenfunc_closure */ -SWIGINTERN PyObject *_wrap_FileIo_open__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_open takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_open" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->open(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_open(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 1) { - PyObject *retobj = _wrap_FileIo_open__SWIG_1(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - if (argc == 2) { - PyObject *retobj = _wrap_FileIo_open__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FileIo_open'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::FileIo::open(std::string const &)\n" - " Exiv2::FileIo::open()\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FileIo_close(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_close takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_close" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->close(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_write__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - size_t arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - size_t result; - - if (!PyArg_UnpackTuple(args, "FileIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_write" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FileIo_write" "', argument " "2"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg2 = (Exiv2::byte *) buff->buf; - arg3 = (size_t) buff->len; - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->write((Exiv2::byte const *)arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - - Py_XDECREF(_global_view); - - return resultobj; -fail: - - Py_XDECREF(_global_view); - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_write__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - size_t result; - - if (!PyArg_UnpackTuple(args, "FileIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_write" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FileIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FileIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->write(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_write(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - return _wrap_FileIo_write__SWIG_1(self, args); - } -check_1: - - if (argc == 2) { - PyObject *retobj = _wrap_FileIo_write__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FileIo_write'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::FileIo::write(Exiv2::byte const *,size_t)\n" - " Exiv2::FileIo::write(Exiv2::BasicIo &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FileIo_putb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::byte arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned char val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "FileIo_putb", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_putb" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileIo_putb" "', argument " "2"" of type '" "Exiv2::byte""'"); - } - arg2 = static_cast< Exiv2::byte >(val2); - { - try { - result = (int)(arg1)->putb(arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_read__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::DataBuf result; - - if (!PyArg_UnpackTuple(args, "FileIo_read", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_read" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileIo_read" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj( - new Exiv2::DataBuf(result), SWIGTYPE_p_Exiv2__DataBuf, SWIG_POINTER_OWN); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_read__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - size_t arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - Py_buffer _global_view ; - size_t val3 ; - int ecode3 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - size_t result; - - if (!PyArg_UnpackTuple(args, "FileIo_read", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_read" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - _global_view.obj = NULL; - if (PyObject_GetBuffer( - obj1, &_global_view, PyBUF_CONTIG | PyBUF_WRITABLE) < 0) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FileIo_read" "', argument " "2"" of type '" "writable bytes-like object""'") - ; - } - arg2 = (Exiv2::byte *) _global_view.buf; - } - ecode3 = SWIG_AsVal_size_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FileIo_read" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - { - if (arg3 > (size_t) _global_view.len) { - SWIG_exception_fail(SWIG_ArgError(SWIG_ValueError), "in method '" "FileIo_read" "', argument " "2"" of type '" "buffer too small""'") - ; - } - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return resultobj; -fail: - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_read(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - PyObject *retobj = _wrap_FileIo_read__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - if (argc == 3) { - PyObject *retobj = _wrap_FileIo_read__SWIG_1(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FileIo_read'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::FileIo::read(size_t)\n" - " Exiv2::FileIo::read(Exiv2::byte *,size_t)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_FileIo_getb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_getb takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_getb" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - result = (int)(arg1)->getb(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_transfer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "FileIo_transfer", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_transfer" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FileIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FileIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - (arg1)->transfer(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_seek(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - int64_t arg2 ; - Exiv2::BasicIo::Position arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - long long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "FileIo_seek", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_seek" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileIo_seek" "', argument " "2"" of type '" "int64_t""'"); - } - arg2 = static_cast< int64_t >(val2); - { - if (!PyObject_IsInstance(obj2, - get_enum_typeobject_Exiv2_BasicIo_Position())) { - // deprecated since 2024-01-09 - PyErr_WarnEx(PyExc_DeprecationWarning, - "FileIo_seek argument 3 type should be 'Exiv2::BasicIo::Position'.", 1); - } - if (!PyLong_Check(obj2)) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FileIo_seek" "', argument " "3"" of type '" "Exiv2::BasicIo::Position""'") - ; - } - arg3 = static_cast< Exiv2::BasicIo::Position >(PyLong_AsLong(obj2)); - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->seek(arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_mmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::byte *result = 0 ; - - { - arg2 = false; - } - if (!PyArg_UnpackTuple(args, "FileIo_mmap", 0, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_mmap" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileIo_mmap" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (Exiv2::byte *)(arg1)->mmap(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - - resultobj = PyMemoryView_FromMemory((char*)result, result ? arg1->size() : 0, arg2 ? PyBUF_WRITE : PyBUF_READ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_munmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_munmap takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_munmap" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->munmap(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_setPath(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - std::string *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int res2 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "FileIo_setPath", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_setPath" "', argument " "1"" of type '" "Exiv2::FileIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - std::string *ptr = (std::string *)0; - res2 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FileIo_setPath" "', argument " "2"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FileIo_setPath" "', argument " "2"" of type '" "std::string const &""'"); - } - arg2 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg2, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - (arg1)->setPath((std::string const &)*arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - if (SWIG_IsNewObj(res2)) delete arg2; - return resultobj; -fail: - if (SWIG_IsNewObj(res2)) delete arg2; - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_tell(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_tell takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_tell" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = ((Exiv2::FileIo const *)arg1)->tell(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_size(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_size takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_size" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = ((Exiv2::FileIo const *)arg1)->size(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_isopen(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_isopen takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_isopen" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - result = (bool)((Exiv2::FileIo const *)arg1)->isopen(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_error(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_error takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_error" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - result = (int)((Exiv2::FileIo const *)arg1)->error(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_eof(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_eof takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_eof" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - result = (bool)((Exiv2::FileIo const *)arg1)->eof(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FileIo_path(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::FileIo *arg1 = (Exiv2::FileIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::string *result = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "FileIo_path takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__FileIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FileIo_path" "', argument " "1"" of type '" "Exiv2::FileIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::FileIo * >(argp1); - result = (std::string *) &((Exiv2::FileIo const *)arg1)->path(); - { - std::string copy = *result; -#ifdef _WIN32 - if (utf8_to_wcp(©, false) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); - } -#endif - resultobj = SWIG_From_std_string(copy); - } - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_FileIo) /* defines _wrap_delete_FileIo_destructor_closure */ - -SWIGPY_LENFUNC_CLOSURE(_wrap_FileIo_size) /* defines _wrap_FileIo_size_lenfunc_closure */ - -SWIGINTERN int _wrap_new_MemIo__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - Exiv2::MemIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_MemIo")) SWIG_fail; - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "new_MemIo takes no arguments"); - { - try { - result = (Exiv2::MemIo *)new Exiv2::MemIo(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__MemIo, SWIG_BUILTIN_INIT | 0 ); - return resultobj == Py_None ? -1 : 0; -fail: - return -1; -} - - -SWIGINTERN int _wrap_new_MemIo__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - Exiv2::byte *arg1 = (Exiv2::byte *) 0 ; - size_t arg2 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - Exiv2::MemIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_MemIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_MemIo", 1, 1, &obj1)) SWIG_fail; - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "new_MemIo" "', argument " "1"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg1 = (Exiv2::byte *) buff->buf; - arg2 = (size_t) buff->len; - } - { - try { - result = (Exiv2::MemIo *)new Exiv2::MemIo((Exiv2::byte const *)arg1,arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__MemIo, SWIG_BUILTIN_INIT | 0 ); - - PyObject_SetAttrString(resultobj, "_refers_to", _global_view); - - - Py_XDECREF(_global_view); - - return resultobj == Py_None ? -1 : 0; -fail: - - Py_XDECREF(_global_view); - - return -1; -} - - -SWIGINTERN int _wrap_new_MemIo(PyObject *self, PyObject *args, PyObject *kwargs) { - Py_ssize_t argc; - PyObject *argv[2] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_MemIo")) SWIG_fail; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 0) { - int retval = _wrap_new_MemIo__SWIG_0(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - if (argc == 1) { - int retval = _wrap_new_MemIo__SWIG_1(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_MemIo'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::MemIo::MemIo()\n" - " Exiv2::MemIo::MemIo(Exiv2::byte const *,size_t)\n"); - return -1; -} - - -SWIGINTERN PyObject *_wrap_delete_MemIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_MemIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MemIo" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - { - try { - delete arg1; - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_open(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_open takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_open" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (int)(arg1)->open(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_close(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_close takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_close" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (int)(arg1)->close(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_write__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - size_t arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - size_t result; - - if (!PyArg_UnpackTuple(args, "MemIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_write" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MemIo_write" "', argument " "2"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg2 = (Exiv2::byte *) buff->buf; - arg3 = (size_t) buff->len; - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->write((Exiv2::byte const *)arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - - Py_XDECREF(_global_view); - - return resultobj; -fail: - - Py_XDECREF(_global_view); - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_write__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - size_t result; - - if (!PyArg_UnpackTuple(args, "MemIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_write" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MemIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MemIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->write(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_write(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - return _wrap_MemIo_write__SWIG_1(self, args); - } -check_1: - - if (argc == 2) { - PyObject *retobj = _wrap_MemIo_write__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MemIo_write'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::MemIo::write(Exiv2::byte const *,size_t)\n" - " Exiv2::MemIo::write(Exiv2::BasicIo &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MemIo_putb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::byte arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned char val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "MemIo_putb", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_putb" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MemIo_putb" "', argument " "2"" of type '" "Exiv2::byte""'"); - } - arg2 = static_cast< Exiv2::byte >(val2); - { - try { - result = (int)(arg1)->putb(arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_read__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::DataBuf result; - - if (!PyArg_UnpackTuple(args, "MemIo_read", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_read" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MemIo_read" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - - resultobj = SWIG_NewPointerObj( - new Exiv2::DataBuf(result), SWIGTYPE_p_Exiv2__DataBuf, SWIG_POINTER_OWN); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_read__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - size_t arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - Py_buffer _global_view ; - size_t val3 ; - int ecode3 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - size_t result; - - if (!PyArg_UnpackTuple(args, "MemIo_read", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_read" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - { - _global_view.obj = NULL; - if (PyObject_GetBuffer( - obj1, &_global_view, PyBUF_CONTIG | PyBUF_WRITABLE) < 0) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MemIo_read" "', argument " "2"" of type '" "writable bytes-like object""'") - ; - } - arg2 = (Exiv2::byte *) _global_view.buf; - } - ecode3 = SWIG_AsVal_size_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MemIo_read" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - { - if (arg3 > (size_t) _global_view.len) { - SWIG_exception_fail(SWIG_ArgError(SWIG_ValueError), "in method '" "MemIo_read" "', argument " "2"" of type '" "buffer too small""'") - ; - } - } - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return resultobj; -fail: - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_read(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - PyObject *retobj = _wrap_MemIo_read__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - if (argc == 3) { - PyObject *retobj = _wrap_MemIo_read__SWIG_1(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MemIo_read'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::MemIo::read(size_t)\n" - " Exiv2::MemIo::read(Exiv2::byte *,size_t)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_MemIo_getb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_getb takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_getb" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - { - try { - result = (int)(arg1)->getb(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_transfer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "MemIo_transfer", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_transfer" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MemIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MemIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - (arg1)->transfer(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_seek(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - int64_t arg2 ; - Exiv2::BasicIo::Position arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - long long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "MemIo_seek", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_seek" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MemIo_seek" "', argument " "2"" of type '" "int64_t""'"); - } - arg2 = static_cast< int64_t >(val2); - { - if (!PyObject_IsInstance(obj2, - get_enum_typeobject_Exiv2_BasicIo_Position())) { - // deprecated since 2024-01-09 - PyErr_WarnEx(PyExc_DeprecationWarning, - "MemIo_seek argument 3 type should be 'Exiv2::BasicIo::Position'.", 1); - } - if (!PyLong_Check(obj2)) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "MemIo_seek" "', argument " "3"" of type '" "Exiv2::BasicIo::Position""'") - ; - } - arg3 = static_cast< Exiv2::BasicIo::Position >(PyLong_AsLong(obj2)); - } - result = (int)(arg1)->seek(arg2,arg3); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_mmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::byte *result = 0 ; - - { - arg2 = false; - } - if (!PyArg_UnpackTuple(args, "MemIo_mmap", 0, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_mmap" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MemIo_mmap" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - result = (Exiv2::byte *)(arg1)->mmap(arg2); - - resultobj = PyMemoryView_FromMemory((char*)result, result ? arg1->size() : 0, arg2 ? PyBUF_WRITE : PyBUF_READ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_munmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_munmap takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_munmap" "', argument " "1"" of type '" "Exiv2::MemIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (int)(arg1)->munmap(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_tell(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_tell takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_tell" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = ((Exiv2::MemIo const *)arg1)->tell(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_size(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_size takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_size" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = ((Exiv2::MemIo const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_isopen(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_isopen takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_isopen" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (bool)((Exiv2::MemIo const *)arg1)->isopen(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_error(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_error takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_error" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (int)((Exiv2::MemIo const *)arg1)->error(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_eof(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_eof takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_eof" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (bool)((Exiv2::MemIo const *)arg1)->eof(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_MemIo_path(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::MemIo *arg1 = (Exiv2::MemIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::string *result = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "MemIo_path takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__MemIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MemIo_path" "', argument " "1"" of type '" "Exiv2::MemIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::MemIo * >(argp1); - result = (std::string *) &((Exiv2::MemIo const *)arg1)->path(); - { - std::string copy = *result; -#ifdef _WIN32 - if (utf8_to_wcp(©, false) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); - } -#endif - resultobj = SWIG_From_std_string(copy); - } - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_MemIo) /* defines _wrap_delete_MemIo_destructor_closure */ - -SWIGPY_LENFUNC_CLOSURE(_wrap_MemIo_size) /* defines _wrap_MemIo_size_lenfunc_closure */ - -SWIGINTERN int _wrap_new_XPathIo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - Exiv2::XPathIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_XPathIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_XPathIo", 1, 1, &obj1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_XPathIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_XPathIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::XPathIo *)new Exiv2::XPathIo((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__XPathIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN PyObject *_wrap_delete_XPathIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::XPathIo *arg1 = (Exiv2::XPathIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_XPathIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__XPathIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_XPathIo" "', argument " "1"" of type '" "Exiv2::XPathIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::XPathIo * >(argp1); - { - try { - delete arg1; - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XPathIo_transfer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::XPathIo *arg1 = (Exiv2::XPathIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "XPathIo_transfer", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__XPathIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XPathIo_transfer" "', argument " "1"" of type '" "Exiv2::XPathIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::XPathIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XPathIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XPathIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - (arg1)->transfer(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XPathIo_writeDataToFile(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj0 = 0 ; - std::string result; - - if (!PyArg_UnpackTuple(args, "XPathIo_writeDataToFile", 1, 1, &obj0)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj0, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XPathIo_writeDataToFile" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "XPathIo_writeDataToFile" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = Exiv2::XPathIo::writeDataToFile((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_XPathIo) /* defines _wrap_delete_XPathIo_destructor_closure */ - -SWIGINTERN int _wrap_new_RemoteIo(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_RemoteIo")) SWIG_fail; - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "new_RemoteIo takes no arguments"); - { - try { - result = (Exiv2::RemoteIo *)new Exiv2::RemoteIo(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__RemoteIo, SWIG_BUILTIN_INIT | 0 ); - return resultobj == Py_None ? -1 : 0; -fail: - return -1; -} - - -SWIGINTERN PyObject *_wrap_delete_RemoteIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_RemoteIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RemoteIo" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - try { - delete arg1; - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_open(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_open takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_open" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->open(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_close(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_close takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_close" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (int)(arg1)->close(); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_write__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - size_t arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - size_t result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_write" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "RemoteIo_write" "', argument " "2"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg2 = (Exiv2::byte *) buff->buf; - arg3 = (size_t) buff->len; - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->write((Exiv2::byte const *)arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - - Py_XDECREF(_global_view); - - return resultobj; -fail: - - Py_XDECREF(_global_view); - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_write__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - size_t result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_write" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RemoteIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RemoteIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->write(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_write(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - return _wrap_RemoteIo_write__SWIG_1(self, args); - } -check_1: - - if (argc == 2) { - PyObject *retobj = _wrap_RemoteIo_write__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'RemoteIo_write'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::RemoteIo::write(Exiv2::byte const *,size_t)\n" - " Exiv2::RemoteIo::write(Exiv2::BasicIo &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_putb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::byte arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned char val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_putb", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_putb" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemoteIo_putb" "', argument " "2"" of type '" "Exiv2::byte""'"); - } - arg2 = static_cast< Exiv2::byte >(val2); - { - try { - result = (int)(arg1)->putb(arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_read__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::DataBuf result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_read", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_read" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemoteIo_read" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - - resultobj = SWIG_NewPointerObj( - new Exiv2::DataBuf(result), SWIGTYPE_p_Exiv2__DataBuf, SWIG_POINTER_OWN); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_read__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - size_t arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - Py_buffer _global_view ; - size_t val3 ; - int ecode3 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - size_t result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_read", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_read" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - _global_view.obj = NULL; - if (PyObject_GetBuffer( - obj1, &_global_view, PyBUF_CONTIG | PyBUF_WRITABLE) < 0) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "RemoteIo_read" "', argument " "2"" of type '" "writable bytes-like object""'") - ; - } - arg2 = (Exiv2::byte *) _global_view.buf; - } - ecode3 = SWIG_AsVal_size_t(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "RemoteIo_read" "', argument " "3"" of type '" "size_t""'"); - } - arg3 = static_cast< size_t >(val3); - { - if (arg3 > (size_t) _global_view.len) { - SWIG_exception_fail(SWIG_ArgError(SWIG_ValueError), "in method '" "RemoteIo_read" "', argument " "2"" of type '" "buffer too small""'") - ; - } - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->read(arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return resultobj; -fail: - - if (_global_view.obj) { - PyBuffer_Release(&_global_view); - } - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_read(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[4] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - PyObject *retobj = _wrap_RemoteIo_read__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - if (argc == 3) { - PyObject *retobj = _wrap_RemoteIo_read__SWIG_1(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'RemoteIo_read'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::RemoteIo::read(size_t)\n" - " Exiv2::RemoteIo::read(Exiv2::byte *,size_t)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_getb(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_getb takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_getb" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - { - try { - result = (int)(arg1)->getb(); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_transfer(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_UnpackTuple(args, "RemoteIo_transfer", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_transfer" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RemoteIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RemoteIo_transfer" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - (arg1)->transfer(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_seek(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - int64_t arg2 ; - Exiv2::BasicIo::Position arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - long long val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - int result; - - if (!PyArg_UnpackTuple(args, "RemoteIo_seek", 2, 2, &obj1, &obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_seek" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - ecode2 = SWIG_AsVal_long_SS_long(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemoteIo_seek" "', argument " "2"" of type '" "int64_t""'"); - } - arg2 = static_cast< int64_t >(val2); - { - if (!PyObject_IsInstance(obj2, - get_enum_typeobject_Exiv2_BasicIo_Position())) { - // deprecated since 2024-01-09 - PyErr_WarnEx(PyExc_DeprecationWarning, - "RemoteIo_seek argument 3 type should be 'Exiv2::BasicIo::Position'.", 1); - } - if (!PyLong_Check(obj2)) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "RemoteIo_seek" "', argument " "3"" of type '" "Exiv2::BasicIo::Position""'") - ; - } - arg3 = static_cast< Exiv2::BasicIo::Position >(PyLong_AsLong(obj2)); - } - result = (int)(arg1)->seek(arg2,arg3); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_mmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - bool arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - Exiv2::byte *result = 0 ; - - { - arg2 = false; - } - if (!PyArg_UnpackTuple(args, "RemoteIo_mmap", 0, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_mmap" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - if (obj1) { - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemoteIo_mmap" "', argument " "2"" of type '" "bool""'"); - } - arg2 = static_cast< bool >(val2); - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (Exiv2::byte *)(arg1)->mmap(arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - - resultobj = PyMemoryView_FromMemory((char*)result, result ? arg1->size() : 0, arg2 ? PyBUF_WRITE : PyBUF_READ); - - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_munmap(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_munmap takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_munmap" "', argument " "1"" of type '" "Exiv2::RemoteIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (int)(arg1)->munmap(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_tell(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_tell takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_tell" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = ((Exiv2::RemoteIo const *)arg1)->tell(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_size(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_size takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_size" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = ((Exiv2::RemoteIo const *)arg1)->size(); - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_isopen(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_isopen takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_isopen" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (bool)((Exiv2::RemoteIo const *)arg1)->isopen(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_error(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - int result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_error takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_error" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (int)((Exiv2::RemoteIo const *)arg1)->error(); - resultobj = SWIG_From_int(static_cast< int >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_eof(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool result; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_eof takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_eof" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (bool)((Exiv2::RemoteIo const *)arg1)->eof(); - resultobj = SWIG_From_bool(static_cast< bool >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_RemoteIo_path(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::RemoteIo *arg1 = (Exiv2::RemoteIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - std::string *result = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "RemoteIo_path takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__RemoteIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemoteIo_path" "', argument " "1"" of type '" "Exiv2::RemoteIo const *""'"); - } - arg1 = reinterpret_cast< Exiv2::RemoteIo * >(argp1); - result = (std::string *) &((Exiv2::RemoteIo const *)arg1)->path(); - { - std::string copy = *result; -#ifdef _WIN32 - if (utf8_to_wcp(©, false) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); - } -#endif - resultobj = SWIG_From_std_string(copy); - } - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_RemoteIo) /* defines _wrap_delete_RemoteIo_destructor_closure */ - -SWIGPY_LENFUNC_CLOSURE(_wrap_RemoteIo_size) /* defines _wrap_RemoteIo_size_lenfunc_closure */ - -SWIGINTERN int _wrap_new_HttpIo__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - size_t arg2 ; - int res1 = SWIG_OLDOBJ ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Exiv2::HttpIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_HttpIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_HttpIo", 2, 2, &obj1, &obj2)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HttpIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HttpIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - ecode2 = SWIG_AsVal_size_t(obj2, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HttpIo" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::HttpIo *)new Exiv2::HttpIo((std::string const &)*arg1,arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__HttpIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN int _wrap_new_HttpIo__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - Exiv2::HttpIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_HttpIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_HttpIo", 1, 1, &obj1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HttpIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HttpIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::HttpIo *)new Exiv2::HttpIo((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__HttpIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN int _wrap_new_HttpIo(PyObject *self, PyObject *args, PyObject *kwargs) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_HttpIo")) SWIG_fail; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int retval = _wrap_new_HttpIo__SWIG_1(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - if (argc == 2) { - int retval = _wrap_new_HttpIo__SWIG_0(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_HttpIo'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::HttpIo::HttpIo(std::string const &,size_t)\n" - " Exiv2::HttpIo::HttpIo(std::string const &)\n"); - return -1; -} - - -SWIGINTERN PyObject *_wrap_delete_HttpIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::HttpIo *arg1 = (Exiv2::HttpIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_HttpIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__HttpIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HttpIo" "', argument " "1"" of type '" "Exiv2::HttpIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::HttpIo * >(argp1); - { - try { - delete arg1; - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_HttpIo) /* defines _wrap_delete_HttpIo_destructor_closure */ - -SWIGINTERN int _wrap_new_CurlIo__SWIG_0(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - size_t arg2 ; - int res1 = SWIG_OLDOBJ ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - Exiv2::CurlIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_CurlIo", 2, 2, &obj1, &obj2)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - ecode2 = SWIG_AsVal_size_t(obj2, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CurlIo" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = static_cast< size_t >(val2); - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::CurlIo *)new Exiv2::CurlIo((std::string const &)*arg1,arg2); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__CurlIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN int _wrap_new_CurlIo__SWIG_1(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - std::string *arg1 = 0 ; - int res1 = SWIG_OLDOBJ ; - PyObject * obj1 = 0 ; - Exiv2::CurlIo *result = 0 ; - - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; - if (!PyArg_UnpackTuple(args, "new_CurlIo", 1, 1, &obj1)) SWIG_fail; - { - std::string *ptr = (std::string *)0; - res1 = SWIG_AsPtr_std_string(obj1, &ptr); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); - } - if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurlIo" "', argument " "1"" of type '" "std::string const &""'"); - } - arg1 = ptr; - } - { -#ifdef _WIN32 - if (utf8_to_wcp(arg1, true) < 0) { - SWIG_exception_fail(SWIG_ValueError, "failed to transcode path"); - } -#endif - } - { - try { - result = (Exiv2::CurlIo *)new Exiv2::CurlIo((std::string const &)*arg1); - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__CurlIo, SWIG_BUILTIN_INIT | 0 ); - if (SWIG_IsNewObj(res1)) delete arg1; - return resultobj == Py_None ? -1 : 0; -fail: - if (SWIG_IsNewObj(res1)) delete arg1; - return -1; -} - - -SWIGINTERN int _wrap_new_CurlIo(PyObject *self, PyObject *args, PyObject *kwargs) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CurlIo")) SWIG_fail; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < 2) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int retval = _wrap_new_CurlIo__SWIG_1(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - if (argc == 2) { - int retval = _wrap_new_CurlIo__SWIG_0(self, args, NULL); - if (retval == 0 || !SWIG_Python_TypeErrorOccurred(NULL)) return retval; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CurlIo'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::CurlIo::CurlIo(std::string const &,size_t)\n" - " Exiv2::CurlIo::CurlIo(std::string const &)\n"); - return -1; -} - - -SWIGINTERN PyObject *_wrap_CurlIo_write__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; - Exiv2::byte *arg2 = (Exiv2::byte *) 0 ; - size_t arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *_global_view = NULL ; - PyObject * obj1 = 0 ; - size_t result; - - if (!PyArg_UnpackTuple(args, "CurlIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlIo_write" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); - { - _global_view = PyMemoryView_GetContiguous(obj1, PyBUF_READ, 'A'); - if (!_global_view) { - PyErr_Clear(); - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "CurlIo_write" "', argument " "2"" of type '" "bytes-like object""'") - ; - } - Py_buffer* buff = PyMemoryView_GET_BUFFER(_global_view); - arg2 = (Exiv2::byte *) buff->buf; - arg3 = (size_t) buff->len; - } - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->write((Exiv2::byte const *)arg2,arg3); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - - Py_XDECREF(_global_view); - - return resultobj; -fail: - - Py_XDECREF(_global_view); - - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CurlIo_write__SWIG_1(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; - Exiv2::BasicIo *arg2 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - PyObject * obj1 = 0 ; - size_t result; - - if (!PyArg_UnpackTuple(args, "CurlIo_write", 1, 1, &obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurlIo_write" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Exiv2__BasicIo, 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurlIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurlIo_write" "', argument " "2"" of type '" "Exiv2::BasicIo &""'"); - } - arg2 = reinterpret_cast< Exiv2::BasicIo * >(argp2); - { - try { - { - SWIG_PYTHON_THREAD_BEGIN_ALLOW; - result = (arg1)->write(*arg2); - SWIG_PYTHON_THREAD_END_ALLOW; - } - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_From_size_t(static_cast< size_t >(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_CurlIo_write(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - Py_ssize_t ii; - - (void)self; - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - argv[0] = self; - for (ii = 0; (ii < 1) && (ii < argc); ii++) { - argv[ii + 1] = PyTuple_GET_ITEM(args,ii); - } - argc++; - if (argc == 2) { - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_NO_NULL); - _v = SWIG_CheckState(res); - } - if (!_v) goto check_1; - return _wrap_CurlIo_write__SWIG_1(self, args); - } -check_1: - - if (argc == 2) { - PyObject *retobj = _wrap_CurlIo_write__SWIG_0(self, args); - if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj; - SWIG_fail; - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CurlIo_write'.\n" - " Possible C/C++ prototypes are:\n" - " Exiv2::CurlIo::write(Exiv2::byte const *,size_t)\n" - " Exiv2::CurlIo::write(Exiv2::BasicIo &)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_delete_CurlIo(PyObject *self, PyObject *args) { - PyObject *resultobj = 0; - Exiv2::CurlIo *arg1 = (Exiv2::CurlIo *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - - if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_CurlIo takes no arguments"); - res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_Exiv2__CurlIo, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CurlIo" "', argument " "1"" of type '" "Exiv2::CurlIo *""'"); - } - arg1 = reinterpret_cast< Exiv2::CurlIo * >(argp1); - { - try { - delete arg1; - } - catch(std::exception const& e) { - _set_python_exception(); - SWIG_fail; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CurlIo) /* defines _wrap_delete_CurlIo_destructor_closure */ - -static PyMethodDef SwigMethods[] = { - { "_enum_list_Position", _wrap__enum_list_Position, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } -}; - -static SwigPyGetSet BasicIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__BasicIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"", &BasicIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__BasicIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { - { "open", _wrap_BasicIo_open, METH_VARARGS, "\n" - "Open the IO source using the default access mode. The\n" - " default mode should allow for reading and writing.\n" - "\n" - "This method can also be used to \"reopen\" an IO source which will\n" - "flush any unwritten data and reset the IO position to the start.\n" - "Subclasses may provide custom methods to allow for\n" - "opening IO sources differently.\n" - "\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "close", _wrap_BasicIo_close, METH_VARARGS, "\n" - "Close the IO source. After closing a BasicIo instance can not\n" - " be read or written. Closing flushes any unwritten data. It is\n" - " safe to call close on a closed instance.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "write", _wrap_BasicIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Write data to the IO source. Current IO position is advanced\n" - " by the number of bytes written.\n" - ":type data: :py:term:`bytes-like object`\n" - ":param data: Pointer to data. Data must be at least *wcount*\n" - " bytes long\n" - ":type wcount: int\n" - ":param wcount: Number of bytes to be written.\n" - ":rtype: int\n" - ":return: Number of bytes written to IO source successfully;\n" - "\n" - " 0 if failure;\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to\n" - " the IO source. Current IO position is advanced by the number\n" - " of bytes written.\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: Number of bytes written to IO source successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "putb", _wrap_BasicIo_putb, METH_VARARGS, "\n" - "Write one byte to the IO source. Current IO position is\n" - " advanced by one byte.\n" - ":type data: int\n" - ":param data: The single byte to be written.\n" - ":rtype: int\n" - ":return: The value of the byte written if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "read", _wrap_BasicIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the IO source. Reading starts at the current\n" - " IO position and the position is advanced by the number of bytes\n" - " read.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the IO source. Reading starts at the current\n" - " IO position and the position is advanced by the number of bytes\n" - " read.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from IO source successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "readOrThrow", _wrap_BasicIo_readOrThrow, METH_VARARGS, "\n" - "Safe version of `read()` that checks for errors and throws\n" - " an exception if the read was unsuccessful.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":type err: ErrorCode, optional\n" - ":param err: Error code to use if an exception is thrown.\n" - "" }, - { "getb", _wrap_BasicIo_getb, METH_VARARGS, "\n" - "Read one byte from the IO source. Current IO position is\n" - " advanced by one byte.\n" - ":rtype: int\n" - ":return: The byte read from the IO source if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_BasicIo_transfer, METH_VARARGS, "\n" - "Remove all data from this object's IO source and then transfer\n" - " data from the *src* BasicIo object into this object.\n" - "\n" - "The source object is invalidated by this operation and should not be\n" - "used after this method returns. This method exists primarily to\n" - "be used with the BasicIo::temporary() method.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "" }, - { "seek", _wrap_BasicIo_seek, METH_VARARGS, "\n" - "Move the current IO position.\n" - ":type offset: int\n" - ":param offset: Number of bytes to move the position relative\n" - " to the starting position specified by *pos*\n" - ":type pos: :py:class:`BasicIo.Position`\n" - ":param pos: Position from which the seek should start\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "seekOrThrow", _wrap_BasicIo_seekOrThrow, METH_VARARGS, "\n" - "Safe version of `seek()` that checks for errors and throws\n" - " an exception if the seek was unsuccessful.\n" - ":type offset: int\n" - ":param offset: Number of bytes to move the position relative\n" - " to the starting position specified by *pos*\n" - ":type pos: :py:class:`BasicIo.Position`\n" - ":param pos: Position from which the seek should start\n" - ":type err: ErrorCode\n" - ":param err: Error code to use if an exception is thrown.\n" - "" }, - { "mmap", _wrap_BasicIo_mmap, METH_VARARGS, "\n" - "Direct access to the IO data. For files, this is done by\n" - " mapping the file into the process's address space; for memory\n" - " blocks, this allows direct access to the memory block.\n" - ":type isWriteable: bool, optional\n" - ":param isWriteable: Set to true if the mapped area should be writeable\n" - " (default is false).\n" - ":rtype: memoryview\n" - ":return: A pointer to the mapped area.\n" - ":raises: Error In case of failure.\n" - "" }, - { "munmap", _wrap_BasicIo_munmap, METH_VARARGS, "\n" - "Remove a mapping established with mmap(). If the mapped area\n" - " is writeable, this ensures that changes are written back.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "tell", _wrap_BasicIo_tell, METH_VARARGS, "\n" - "Get the current IO position.\n" - ":rtype: int\n" - ":return: Offset from the start of IO\n" - "" }, - { "size", _wrap_BasicIo_size, METH_VARARGS, "\n" - "Get the current size of the IO source in bytes.\n" - ":rtype: int\n" - ":return: Size of the IO source in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_BasicIo_isopen, METH_VARARGS, " Returns true if the IO source is open, otherwise false." }, - { "error", _wrap_BasicIo_error, METH_VARARGS, " Returns 0 if the IO source is in a valid state, otherwise nonzero." }, - { "eof", _wrap_BasicIo_eof, METH_VARARGS, " Returns true if the IO position has reached the end, otherwise false." }, - { "path", _wrap_BasicIo_path, METH_VARARGS, "\n" - "Return the path to the IO resource. Often used to form\n" - " comprehensive error messages where only a BasicIo instance is\n" - " available.\n" - "" }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.BasicIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - SwigPyBuiltin_BadDealloc, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__BasicIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - "\n" - "An interface for simple binary IO.\n" - "\n" - "Designed to have semantics and names similar to those of C style FILE*\n" - "operations. Subclasses should all behave the same so that they can be\n" - "interchanged.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__BasicIo_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__BasicIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__BasicIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - SwigPyBuiltin_BadInit, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__BasicIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type}; - -static SwigPyGetSet FileIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__FileIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "Constructor that accepts the file path on which IO will be\n" - " performed. The constructor does not open the file, and\n" - " therefore never fails.\n" - ":type path: str\n" - ":param path: The full path of a file\n" - "", &FileIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__FileIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__FileIo_methods[] = { - { "open", _wrap_FileIo_open, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Open the file using the specified mode.\n" - "\n" - "This method can also be used to \"reopen\" a file which will flush any\n" - "unwritten data and reset the IO position to the start. Although\n" - "files can be opened in binary or text mode, this class has\n" - "only been tested carefully in binary mode.\n" - "\n" - ":type mode: str\n" - ":param mode: Specified that type of access allowed on the file.\n" - " Valid values match those of the C fopen command exactly.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Open the file using the default access mode of \"rb\".\n" - " This method can also be used to \"reopen\" a file which will flush\n" - " any unwritten data and reset the IO position to the start.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "close", _wrap_FileIo_close, METH_VARARGS, "\n" - "Flush and unwritten data and close the file . It is\n" - " safe to call close on an already closed instance.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "write", _wrap_FileIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Write data to the file. The file position is advanced\n" - " by the number of bytes written.\n" - ":type data: :py:term:`bytes-like object`\n" - ":param data: Pointer to data. Data must be at least *wcount*\n" - " bytes long\n" - ":type wcount: int\n" - ":param wcount: Number of bytes to be written.\n" - ":rtype: int\n" - ":return: Number of bytes written to the file successfully;\n" - "\n" - " 0 if failure;\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to\n" - " the file. The file position is advanced by the number\n" - " of bytes written.\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: Number of bytes written to the file successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "putb", _wrap_FileIo_putb, METH_VARARGS, "\n" - "Write one byte to the file. The file position is\n" - " advanced by one byte.\n" - ":type data: int\n" - ":param data: The single byte to be written.\n" - ":rtype: int\n" - ":return: The value of the byte written if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "read", _wrap_FileIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the file. Reading starts at the current\n" - " file position and the position is advanced by the number of\n" - " bytes read.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the file. Reading starts at the current\n" - " file position and the position is advanced by the number of\n" - " bytes read.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from the file successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_FileIo_getb, METH_VARARGS, "\n" - "Read one byte from the file. The file position is\n" - " advanced by one byte.\n" - ":rtype: int\n" - ":return: The byte read from the file if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_FileIo_transfer, METH_VARARGS, "\n" - "Remove the contents of the file and then transfer data from\n" - " the *src* BasicIo object into the empty file.\n" - "\n" - "This method is optimized to simply rename the source file if the\n" - "source object is another FileIo instance. The source BasicIo object\n" - "is invalidated by this operation and should not be used after this\n" - "method returns. This method exists primarily to be used with\n" - "the BasicIo::temporary() method.\n" - "\n" - "Notes: If the caller doesn't have permissions to write to the file,\n" - " an exception is raised and *src* is deleted.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "" }, - { "seek", _wrap_FileIo_seek, METH_VARARGS, "" }, - { "mmap", _wrap_FileIo_mmap, METH_VARARGS, "\n" - "Map the file into the process's address space. The file must be\n" - " open before mmap() is called. If the mapped area is writeable,\n" - " changes may not be written back to the underlying file until\n" - " munmap() is called. The pointer is valid only as long as the\n" - " FileIo object exists.\n" - ":type isWriteable: bool, optional\n" - ":param isWriteable: Set to true if the mapped area should be writeable\n" - " (default is false).\n" - ":rtype: memoryview\n" - ":return: A pointer to the mapped area.\n" - ":raises: Error In case of failure.\n" - "" }, - { "munmap", _wrap_FileIo_munmap, METH_VARARGS, "\n" - "Remove a mapping established with mmap(). If the mapped area is\n" - " writeable, this ensures that changes are written back to the\n" - " underlying file.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure;\n" - "" }, - { "setPath", _wrap_FileIo_setPath, METH_VARARGS, " close the file source and set a new path." }, - { "tell", _wrap_FileIo_tell, METH_VARARGS, "\n" - "Get the current file position.\n" - ":rtype: int\n" - ":return: Offset from the start of the file\n" - "" }, - { "size", _wrap_FileIo_size, METH_VARARGS, "\n" - "Flush any buffered writes and get the current file size\n" - " in bytes.\n" - ":rtype: int\n" - ":return: Size of the file in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_FileIo_isopen, METH_VARARGS, " Returns true if the file is open, otherwise false." }, - { "error", _wrap_FileIo_error, METH_VARARGS, " Returns 0 if the file is in a valid state, otherwise nonzero." }, - { "eof", _wrap_FileIo_eof, METH_VARARGS, " Returns true if the file position has reached the end, otherwise false." }, - { "path", _wrap_FileIo_path, METH_VARARGS, " Returns the path of the file" }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__FileIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.FileIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_FileIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__FileIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - "\n" - "Provides binary file IO by implementing the BasicIo\n" - " interface.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__FileIo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__FileIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__FileIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_FileIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - _wrap_FileIo_size_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - getbuffer_Exiv2_FileIo, /* bf_getbuffer */ - releasebuffer_Exiv2_FileIo, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__FileIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__FileIo_type}; - -static SwigPyGetSet MemIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__MemIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "*Overload 1:*\n" - "Default constructor that results in an empty object\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - " Constructor that accepts a block of memory. A copy-on-write\n" - " algorithm allows read operations directly from the original data\n" - " and will create a copy of the buffer on the first write operation.\n" - " :type data: :py:term:`bytes-like object`\n" - " :param data: Pointer to data. Data must be at least *size* bytes long\n" - " :type size: int\n" - " :param size: Number of bytes to copy.\n" - "", &MemIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__MemIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__MemIo_methods[] = { - { "open", _wrap_MemIo_open, METH_VARARGS, "\n" - "Memory IO is always open for reading and writing. This method\n" - " therefore only resets the IO position to the start.\n" - "\n" - ":rtype: int\n" - ":return: 0\n" - "" }, - { "close", _wrap_MemIo_close, METH_VARARGS, "\n" - "Does nothing on MemIo objects.\n" - ":rtype: int\n" - ":return: 0\n" - "" }, - { "write", _wrap_MemIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Write data to the memory block. If needed, the size of the\n" - " internal memory block is expanded. The IO position is advanced\n" - " by the number of bytes written.\n" - ":type data: :py:term:`bytes-like object`\n" - ":param data: Pointer to data. Data must be at least *wcount*\n" - " bytes long\n" - ":type wcount: int\n" - ":param wcount: Number of bytes to be written.\n" - ":rtype: int\n" - ":return: Number of bytes written to the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to\n" - " the memory block. If needed, the size of the internal memory\n" - " block is expanded. The IO position is advanced by the number\n" - " of bytes written.\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: Number of bytes written to the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "putb", _wrap_MemIo_putb, METH_VARARGS, "\n" - "Write one byte to the memory block. The IO position is\n" - " advanced by one byte.\n" - ":type data: int\n" - ":param data: The single byte to be written.\n" - ":rtype: int\n" - ":return: The value of the byte written if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "read", _wrap_MemIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the memory block. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the memory block. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_MemIo_getb, METH_VARARGS, "\n" - "Read one byte from the memory block. The IO position is\n" - " advanced by one byte.\n" - ":rtype: int\n" - ":return: The byte read from the memory block if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_MemIo_transfer, METH_VARARGS, "\n" - "Clear the memory block and then transfer data from\n" - " the *src* BasicIo object into a new block of memory.\n" - "\n" - "This method is optimized to simply swap memory block if the source\n" - "object is another MemIo instance. The source BasicIo instance\n" - "is invalidated by this operation and should not be used after this\n" - "method returns. This method exists primarily to be used with\n" - "the BasicIo::temporary() method.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "" }, - { "seek", _wrap_MemIo_seek, METH_VARARGS, "" }, - { "mmap", _wrap_MemIo_mmap, METH_VARARGS, "\n" - "Allow direct access to the underlying data buffer. The buffer\n" - " is not protected against write access in any way, the argument\n" - " is ignored.\n" - "Notes: The application must ensure that the memory pointed to by the\n" - " returned pointer remains valid and allocated as long as the\n" - " MemIo object exists.\n" - "" }, - { "munmap", _wrap_MemIo_munmap, METH_VARARGS, "" }, - { "tell", _wrap_MemIo_tell, METH_VARARGS, "\n" - "Get the current IO position.\n" - ":rtype: int\n" - ":return: Offset from the start of the memory block\n" - "" }, - { "size", _wrap_MemIo_size, METH_VARARGS, "\n" - "Get the current memory buffer size in bytes.\n" - ":rtype: int\n" - ":return: Size of the in memory data in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_MemIo_isopen, METH_VARARGS, " Always returns true" }, - { "error", _wrap_MemIo_error, METH_VARARGS, " Always returns 0" }, - { "eof", _wrap_MemIo_eof, METH_VARARGS, " Returns true if the IO position has reached the end, otherwise false." }, - { "path", _wrap_MemIo_path, METH_VARARGS, " Returns a dummy path, indicating that memory access is used" }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__MemIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.MemIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_MemIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__MemIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - "\n" - "Provides binary IO on blocks of memory by implementing the BasicIo\n" - " interface. A copy-on-write implementation ensures that the data passed\n" - " in is only copied when necessary, i.e., as soon as data is written to\n" - " the MemIo. The original data is only used for reading. If writes are\n" - " performed, the changed data can be retrieved using the read methods\n" - " (since the data used in construction is never modified).\n" - "\n" - "Notes: If read only usage of this class is common, it might be worth\n" - " creating a specialized readonly class or changing this one to\n" - " have a readonly mode.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__MemIo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__MemIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__MemIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_MemIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - _wrap_MemIo_size_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - getbuffer_Exiv2_MemIo, /* bf_getbuffer */ - releasebuffer_Exiv2_MemIo, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__MemIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__MemIo_type}; - -static SwigPyGetSet XPathIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__XPathIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Default constructor that reads data from stdin/data uri path and writes them to the temp file.", &XPathIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__XPathIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__XPathIo_methods[] = { - { "transfer", _wrap_XPathIo_transfer, METH_VARARGS, "\n" - "Change the name of the temp file and make it untemporary before\n" - " calling the method of superclass FileIo::transfer.\n" - "" }, - { "writeDataToFile", (PyCFunction)(void(*)(void))_wrap_XPathIo_writeDataToFile, METH_STATIC|METH_VARARGS, "\n" - "Read the data from stdin/data uri path and write them to the file.\n" - ":type orgPath: str\n" - ":param orgPath: It equals \"-\" if the input data's from stdin. Otherwise, it's data uri path.\n" - ":rtype: str\n" - ":return: the name of the new file.\n" - ":raises: Error if it fails.\n" - "" }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__XPathIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.XPathIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_XPathIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__XPathIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - " Provides binary IO for the data from stdin and data uri path.",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__XPathIo_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__XPathIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__XPathIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_XPathIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__XPathIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__XPathIo_type}; - -static SwigPyGetSet RemoteIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__RemoteIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)" Destructor. Releases all managed memory.", &RemoteIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__RemoteIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__RemoteIo_methods[] = { - { "open", _wrap_RemoteIo_open, METH_VARARGS, "\n" - "Connect to the remote server, get the size of the remote file and\n" - " allocate the array of blocksMap.\n" - "\n" - " If the blocksMap is already allocated (this method has been called before),\n" - " it just reset IO position to the start and does not flush the old data.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "close", _wrap_RemoteIo_close, METH_VARARGS, "\n" - "Reset the IO position to the start. It does not release the data.\n" - ":rtype: int\n" - ":return: 0 if successful;\n" - "\n" - " Nonzero if failure.\n" - "" }, - { "write", _wrap_RemoteIo_write, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Not support this method.\n" - ":rtype: int\n" - ":return: 0 means failure\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Write data that is read from another BasicIo instance to the remote file.\n" - "\n" - "The write access is done in an efficient way. It only sends the range of different\n" - "bytes between the current data and BasicIo instance to the remote machine.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. Reading start\n" - " at the source's current IO position\n" - ":rtype: int\n" - ":return: The size of BasicIo instance;\n" - "\n" - " 0 if failure;\n" - ":raises: Error In case of failure\n" - "\n" - "Notes: The write access is only supported by http, https, ssh.\n" - "" }, - { "putb", _wrap_RemoteIo_putb, METH_VARARGS, "\n" - "Not support\n" - ":rtype: int\n" - ":return: 0 means failure\n" - "" }, - { "read", _wrap_RemoteIo_read, METH_VARARGS, "\n" - "*Overload 1:*\n" - "\n" - "Read data from the memory blocks. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - " If the memory blocks are not populated (False), it will connect to server\n" - " and populate the data to memory blocks.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: :py:class:`DataBuf`\n" - ":return: DataBuf instance containing the bytes read. Use the\n" - " DataBuf::size_ member to find the number of bytes read.\n" - " DataBuf::size_ will be 0 on failure.\n" - "\n" - "|\n" - "\n" - "*Overload 2:*\n" - "\n" - "Read data from the memory blocks. Reading starts at the current\n" - " IO position and the position is advanced by the number of\n" - " bytes read.\n" - " If the memory blocks are not populated (!= bMemory), it will connect to server\n" - " and populate the data to memory blocks.\n" - ":type buf: writeable :py:term:`bytes-like object`\n" - ":param buf: Pointer to a block of memory into which the read data\n" - " is stored. The memory block must be at least *rcount* bytes\n" - " long.\n" - ":type rcount: int\n" - ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" - " read if *rcount* bytes are not available.\n" - ":rtype: int\n" - ":return: Number of bytes read from the memory block successfully;\n" - "\n" - " 0 if failure;\n" - "" }, - { "getb", _wrap_RemoteIo_getb, METH_VARARGS, "\n" - "Read one byte from the memory blocks. The IO position is\n" - " advanced by one byte.\n" - " If the memory block is not populated (!= bMemory), it will connect to server\n" - " and populate the data to the memory block.\n" - ":rtype: int\n" - ":return: The byte read from the memory block if successful;\n" - "\n" - " EOF if failure;\n" - "" }, - { "transfer", _wrap_RemoteIo_transfer, METH_VARARGS, "\n" - "Remove the contents of the file and then transfer data from\n" - " the *src* BasicIo object into the empty file.\n" - "\n" - "The write access is done in an efficient way. It only sends the range of different\n" - "bytes between the current data and BasicIo instance to the remote machine.\n" - "\n" - ":type src: :py:class:`BasicIo`\n" - ":param src: Reference to another BasicIo instance. The entire contents\n" - " of src are transferred to this object. The *src* object is\n" - " invalidated by the method.\n" - ":raises: Error In case of failure\n" - "\n" - "Notes: The write access is only supported by http, https, ssh.\n" - "" }, - { "seek", _wrap_RemoteIo_seek, METH_VARARGS, "" }, - { "mmap", _wrap_RemoteIo_mmap, METH_VARARGS, "\n" - "Not support\n" - ":rtype: memoryview\n" - ":return: NULL\n" - "" }, - { "munmap", _wrap_RemoteIo_munmap, METH_VARARGS, "\n" - "Not support\n" - ":rtype: int\n" - ":return: 0\n" - "" }, - { "tell", _wrap_RemoteIo_tell, METH_VARARGS, "\n" - "Get the current IO position.\n" - ":rtype: int\n" - ":return: Offset from the start of the memory block\n" - "" }, - { "size", _wrap_RemoteIo_size, METH_VARARGS, "\n" - "Get the current memory buffer size in bytes.\n" - ":rtype: int\n" - ":return: Size of the in memory data in bytes;\n" - "\n" - " -1 if failure;\n" - "" }, - { "isopen", _wrap_RemoteIo_isopen, METH_VARARGS, " Returns true if the memory area is allocated." }, - { "error", _wrap_RemoteIo_error, METH_VARARGS, " Always returns 0" }, - { "eof", _wrap_RemoteIo_eof, METH_VARARGS, " Returns true if the IO position has reached the end, otherwise false." }, - { "path", _wrap_RemoteIo_path, METH_VARARGS, " Returns the URL of the file." }, - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__RemoteIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.RemoteIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_RemoteIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__RemoteIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - "\n" - "Provides remote binary file IO by implementing the BasicIo interface. This is an\n" - " abstract class. The logics for remote access are implemented in HttpIo, CurlIo, SshIo which\n" - " are the derived classes of RemoteIo.\n" - "",/* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__RemoteIo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__RemoteIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__RemoteIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_RemoteIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - _wrap_RemoteIo_size_lenfunc_closure, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - getbuffer_Exiv2_RemoteIo, /* bf_getbuffer */ - releasebuffer_Exiv2_RemoteIo, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif -}; - -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__RemoteIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__RemoteIo_type}; - -static SwigPyGetSet HttpIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__HttpIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "Constructor that accepts the http URL on which IO will be\n" - " performed. The constructor does not open the file, and\n" - " therefore never fails.\n" - ":type url: str\n" - ":param url: The full path of url\n" - ":type blockSize: int, optional\n" - ":param blockSize: the size of the memory block. The file content is\n" - " divided into the memory blocks. These blocks are populated\n" - " on demand from the server, so it avoids copying the complete file.\n" - "", &HttpIo___dict___getset }, - { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ -}; - -SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__HttpIo_richcompare(PyObject *self, PyObject *other, int op) { - PyObject *result = NULL; - PyObject *tuple = PyTuple_New(1); - assert(tuple); - PyTuple_SET_ITEM(tuple, 0, other); - Py_XINCREF(other); - if (!result && !PyErr_Occurred()) { - if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) { - result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op); - } else { - result = Py_NotImplemented; - Py_INCREF(result); - } - } - Py_DECREF(tuple); - return result; -} - -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__HttpIo_methods[] = { - { NULL, NULL, 0, NULL } /* Sentinel */ -}; - -static PyHeapTypeObject SwigPyBuiltin__Exiv2__HttpIo_type = { - { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - "exiv2.basicio.HttpIo", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - _wrap_delete_HttpIo_destructor_closure, /* tp_dealloc */ -#if PY_VERSION_HEX < 0x030800b4 - (printfunc) 0, /* tp_print */ -#else - (Py_ssize_t) 0, /* tp_vectorcall_offset */ -#endif - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_compare */ -#else - (cmpfunc) 0, /* tp_compare */ -#endif - (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_mapping, /* tp_as_mapping */ - SwigPyObject_hash, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) 0, /* tp_str */ - (getattrofunc) 0, /* tp_getattro */ - (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__HttpIo_type.as_buffer, /* tp_as_buffer */ -#if PY_VERSION_HEX >= 0x03000000 - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ -#else - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ -#endif - " Provides the http read/write access for the RemoteIo.", /* tp_doc */ - (traverseproc) 0, /* tp_traverse */ - (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__HttpIo_richcompare, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc) 0, /* tp_iter */ - (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__HttpIo_methods, /* tp_methods */ - 0, /* tp_members */ - SwigPyBuiltin__Exiv2__HttpIo_getset, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - (descrgetfunc) 0, /* tp_descr_get */ - (descrsetfunc) 0, /* tp_descr_set */ - offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_HttpIo, /* tp_init */ - (allocfunc) 0, /* tp_alloc */ - (newfunc) 0, /* tp_new */ - (freefunc) 0, /* tp_free */ - (inquiry) 0, /* tp_is_gc */ - (PyObject *) 0, /* tp_bases */ - (PyObject *) 0, /* tp_mro */ - (PyObject *) 0, /* tp_cache */ - (PyObject *) 0, /* tp_subclasses */ - (PyObject *) 0, /* tp_weaklist */ - (destructor) 0, /* tp_del */ - (int) 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x03040000 - (destructor) 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x03080000 - (vectorcallfunc) 0, /* tp_vectorcall */ -#endif -#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000) - 0, /* tp_print */ -#endif -#if PY_VERSION_HEX >= 0x030c0000 - (char) 0, /* tp_watched */ -#endif -#ifdef COUNT_ALLOCS - (Py_ssize_t) 0, /* tp_allocs */ - (Py_ssize_t) 0, /* tp_frees */ - (Py_ssize_t) 0, /* tp_maxalloc */ - 0, /* tp_prev */ - 0, /* tp_next */ -#endif - }, -#if PY_VERSION_HEX >= 0x03050000 - { - (unaryfunc) 0, /* am_await */ - (unaryfunc) 0, /* am_aiter */ - (unaryfunc) 0, /* am_anext */ -# if PY_VERSION_HEX >= 0x030a0000 - (sendfunc) 0, /* am_send */ -# endif - }, -#endif - { - (binaryfunc) 0, /* nb_add */ - (binaryfunc) 0, /* nb_subtract */ - (binaryfunc) 0, /* nb_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_divide */ -#endif - (binaryfunc) 0, /* nb_remainder */ - (binaryfunc) 0, /* nb_divmod */ - (ternaryfunc) 0, /* nb_power */ - (unaryfunc) 0, /* nb_negative */ - (unaryfunc) 0, /* nb_positive */ - (unaryfunc) 0, /* nb_absolute */ - (inquiry) 0, /* nb_nonzero */ - (unaryfunc) 0, /* nb_invert */ - (binaryfunc) 0, /* nb_lshift */ - (binaryfunc) 0, /* nb_rshift */ - (binaryfunc) 0, /* nb_and */ - (binaryfunc) 0, /* nb_xor */ - (binaryfunc) 0, /* nb_or */ -#if PY_VERSION_HEX < 0x03000000 - (coercion) 0, /* nb_coerce */ -#endif - (unaryfunc) 0, /* nb_int */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* nb_reserved */ -#else - (unaryfunc) 0, /* nb_long */ -#endif - (unaryfunc) 0, /* nb_float */ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc) 0, /* nb_oct */ - (unaryfunc) 0, /* nb_hex */ -#endif - (binaryfunc) 0, /* nb_inplace_add */ - (binaryfunc) 0, /* nb_inplace_subtract */ - (binaryfunc) 0, /* nb_inplace_multiply */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc) 0, /* nb_inplace_divide */ -#endif - (binaryfunc) 0, /* nb_inplace_remainder */ - (ternaryfunc) 0, /* nb_inplace_power */ - (binaryfunc) 0, /* nb_inplace_lshift */ - (binaryfunc) 0, /* nb_inplace_rshift */ - (binaryfunc) 0, /* nb_inplace_and */ - (binaryfunc) 0, /* nb_inplace_xor */ - (binaryfunc) 0, /* nb_inplace_or */ - (binaryfunc) 0, /* nb_floor_divide */ - (binaryfunc) 0, /* nb_true_divide */ - (binaryfunc) 0, /* nb_inplace_floor_divide */ - (binaryfunc) 0, /* nb_inplace_true_divide */ - (unaryfunc) 0, /* nb_index */ -#if PY_VERSION_HEX >= 0x03050000 - (binaryfunc) 0, /* nb_matrix_multiply */ - (binaryfunc) 0, /* nb_inplace_matrix_multiply */ -#endif - }, - { - (lenfunc) 0, /* mp_length */ - (binaryfunc) 0, /* mp_subscript */ - (objobjargproc) 0, /* mp_ass_subscript */ - }, - { - (lenfunc) 0, /* sq_length */ - (binaryfunc) 0, /* sq_concat */ - (ssizeargfunc) 0, /* sq_repeat */ - (ssizeargfunc) 0, /* sq_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_slice */ -#else - (ssizessizeargfunc) 0, /* sq_slice */ -#endif - (ssizeobjargproc) 0, /* sq_ass_item */ -#if PY_VERSION_HEX >= 0x03000000 - (void *) 0, /* was_sq_ass_slice */ -#else - (ssizessizeobjargproc) 0, /* sq_ass_slice */ -#endif - (objobjproc) 0, /* sq_contains */ - (binaryfunc) 0, /* sq_inplace_concat */ - (ssizeargfunc) 0, /* sq_inplace_repeat */ - }, - { -#if PY_VERSION_HEX < 0x03000000 - (readbufferproc) 0, /* bf_getreadbuffer */ - (writebufferproc) 0, /* bf_getwritebuffer */ - (segcountproc) 0, /* bf_getsegcount */ - (charbufferproc) 0, /* bf_getcharbuffer */ -#endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ - }, - (PyObject *) 0, /* ht_name */ - (PyObject *) 0, /* ht_slots */ -#if PY_VERSION_HEX >= 0x03030000 - (PyObject *) 0, /* ht_qualname */ - 0, /* ht_cached_keys */ -#endif -#if PY_VERSION_HEX >= 0x03090000 - (PyObject *) 0, /* ht_module */ -#endif -#if PY_VERSION_HEX >= 0x030b0000 - (char *) 0, /* _ht_tpname */ - { - (PyObject *) 0, /* getitem */ -#if PY_VERSION_HEX >= 0x030c0000 - (uint32_t) 0, /* getitem_version */ -#endif - } -#endif +static PyMethodDef SwigMethods[] = { + { "_enum_list_Position", _wrap__enum_list_Position, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__HttpIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__HttpIo_type}; - -static SwigPyGetSet CurlIo___dict___getset = { SwigPyObject_get___dict__, 0 }; -SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__CurlIo_getset[] = { - { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"\n" - "Constructor that accepts the URL on which IO will be\n" - " performed.\n" - ":type url: str\n" - ":param url: The full path of url\n" - ":type blockSize: int, optional\n" - ":param blockSize: the size of the memory block. The file content is\n" - " divided into the memory blocks. These blocks are populated\n" - " on demand from the server, so it avoids copying the complete file.\n" - ":raises: Error if it is unable to init curl pointer.\n" - "", &CurlIo___dict___getset }, +static SwigPyGetSet BasicIo___dict___getset = { SwigPyObject_get___dict__, 0 }; +SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__BasicIo_getset[] = { + { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"", &BasicIo___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; SWIGINTERN PyObject * -SwigPyBuiltin__Exiv2__CurlIo_richcompare(PyObject *self, PyObject *other, int op) { +SwigPyBuiltin__Exiv2__BasicIo_richcompare(PyObject *self, PyObject *other, int op) { PyObject *result = NULL; PyObject *tuple = PyTuple_New(1); assert(tuple); @@ -11321,26 +5827,212 @@ SwigPyBuiltin__Exiv2__CurlIo_richcompare(PyObject *self, PyObject *other, int op return result; } -SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__CurlIo_methods[] = { - { "write", _wrap_CurlIo_write, METH_VARARGS, "\n" +SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { + { "open", _wrap_BasicIo_open, METH_VARARGS, "\n" + "Open the IO source using the default access mode. The\n" + " default mode should allow for reading and writing.\n" + "\n" + "This method can also be used to \"reopen\" an IO source which will\n" + "flush any unwritten data and reset the IO position to the start.\n" + "Subclasses may provide custom methods to allow for\n" + "opening IO sources differently.\n" + "\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure.\n" + "" }, + { "close", _wrap_BasicIo_close, METH_VARARGS, "\n" + "Close the IO source. After closing a BasicIo instance can not\n" + " be read or written. Closing flushes any unwritten data. It is\n" + " safe to call close on a closed instance.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure.\n" + "" }, + { "write", _wrap_BasicIo_write, METH_VARARGS, "\n" + "*Overload 1:*\n" + "\n" + "Write data to the IO source. Current IO position is advanced\n" + " by the number of bytes written.\n" + ":type data: :py:term:`bytes-like object`\n" + ":param data: Pointer to data. Data must be at least *wcount*\n" + " bytes long\n" + ":type wcount: int\n" + ":param wcount: Number of bytes to be written.\n" + ":rtype: int\n" + ":return: Number of bytes written to IO source successfully;\n" + "\n" + " 0 if failure;\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Write data that is read from another BasicIo instance to\n" + " the IO source. Current IO position is advanced by the number\n" + " of bytes written.\n" + ":type src: :py:class:`BasicIo`\n" + ":param src: Reference to another BasicIo instance. Reading start\n" + " at the source's current IO position\n" + ":rtype: int\n" + ":return: Number of bytes written to IO source successfully;\n" + "\n" + " 0 if failure;\n" + "" }, + { "putb", _wrap_BasicIo_putb, METH_VARARGS, "\n" + "Write one byte to the IO source. Current IO position is\n" + " advanced by one byte.\n" + ":type data: int\n" + ":param data: The single byte to be written.\n" + ":rtype: int\n" + ":return: The value of the byte written if successful;\n" + "\n" + " EOF if failure;\n" + "" }, + { "read", _wrap_BasicIo_read, METH_VARARGS, "\n" "*Overload 1:*\n" "\n" - "Write access is only available for some protocols. This method\n" - " will call RemoteIo::write(const byte* data, long wcount) if the write\n" - " access is available for the protocol. Otherwise, it throws the Error.\n" + "Read data from the IO source. Reading starts at the current\n" + " IO position and the position is advanced by the number of bytes\n" + " read.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":rtype: :py:class:`DataBuf`\n" + ":return: DataBuf instance containing the bytes read. Use the\n" + " DataBuf::size_ member to find the number of bytes read.\n" + " DataBuf::size_ will be 0 on failure.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Read data from the IO source. Reading starts at the current\n" + " IO position and the position is advanced by the number of bytes\n" + " read.\n" + ":type buf: writeable :py:term:`bytes-like object`\n" + ":param buf: Pointer to a block of memory into which the read data\n" + " is stored. The memory block must be at least *rcount* bytes\n" + " long.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":rtype: int\n" + ":return: Number of bytes read from IO source successfully;\n" + "\n" + " 0 if failure;\n" + "" }, + { "readOrThrow", _wrap_BasicIo_readOrThrow, METH_VARARGS, "\n" + "Safe version of `read()` that checks for errors and throws\n" + " an exception if the read was unsuccessful.\n" + ":type buf: writeable :py:term:`bytes-like object`\n" + ":param buf: Pointer to a block of memory into which the read data\n" + " is stored. The memory block must be at least *rcount* bytes\n" + " long.\n" + ":type rcount: int\n" + ":param rcount: Maximum number of bytes to read. Fewer bytes may be\n" + " read if *rcount* bytes are not available.\n" + ":type err: ErrorCode, optional\n" + ":param err: Error code to use if an exception is thrown.\n" + "" }, + { "getb", _wrap_BasicIo_getb, METH_VARARGS, "\n" + "Read one byte from the IO source. Current IO position is\n" + " advanced by one byte.\n" + ":rtype: int\n" + ":return: The byte read from the IO source if successful;\n" + "\n" + " EOF if failure;\n" + "" }, + { "transfer", _wrap_BasicIo_transfer, METH_VARARGS, "\n" + "Remove all data from this object's IO source and then transfer\n" + " data from the *src* BasicIo object into this object.\n" "\n" - "|\n" + "The source object is invalidated by this operation and should not be\n" + "used after this method returns. This method exists primarily to\n" + "be used with the BasicIo::temporary() method.\n" "\n" - "*Overload 2:*\n" + ":type src: :py:class:`BasicIo`\n" + ":param src: Reference to another BasicIo instance. The entire contents\n" + " of src are transferred to this object. The *src* object is\n" + " invalidated by the method.\n" + ":raises: Error In case of failure\n" + "" }, + { "seek", _wrap_BasicIo_seek, METH_VARARGS, "\n" + "Move the current IO position.\n" + ":type offset: int\n" + ":param offset: Number of bytes to move the position relative\n" + " to the starting position specified by *pos*\n" + ":type pos: :py:class:`BasicIo.Position`\n" + ":param pos: Position from which the seek should start\n" + ":rtype: int\n" + ":return: 0 if successful;\n" + "\n" + " Nonzero if failure;\n" + "" }, + { "seekOrThrow", _wrap_BasicIo_seekOrThrow, METH_VARARGS, "\n" + "Safe version of `seek()` that checks for errors and throws\n" + " an exception if the seek was unsuccessful.\n" + ":type offset: int\n" + ":param offset: Number of bytes to move the position relative\n" + " to the starting position specified by *pos*\n" + ":type pos: :py:class:`BasicIo.Position`\n" + ":param pos: Position from which the seek should start\n" + ":type err: ErrorCode\n" + ":param err: Error code to use if an exception is thrown.\n" + "" }, + { "mmap", _wrap_BasicIo_mmap, METH_VARARGS, "\n" + "Direct access to the IO data. For files, this is done by\n" + " mapping the file into the process's address space; for memory\n" + " blocks, this allows direct access to the memory block.\n" + ":type isWriteable: bool, optional\n" + ":param isWriteable: Set to true if the mapped area should be writeable\n" + " (default is false).\n" + ":rtype: memoryview\n" + ":return: A pointer to the mapped area.\n" + ":raises: Error In case of failure.\n" + "" }, + { "munmap", _wrap_BasicIo_munmap, METH_VARARGS, "\n" + "Remove a mapping established with mmap(). If the mapped area\n" + " is writeable, this ensures that changes are written back.\n" + ":rtype: int\n" + ":return: 0 if successful;\n" "\n" - "Write access is only available for some protocols. This method\n" - " will call RemoteIo::write(BasicIo& src) if the write access is available\n" - " for the protocol. Otherwise, it throws the Error.\n" + " Nonzero if failure;\n" + "" }, + { "tell", _wrap_BasicIo_tell, METH_VARARGS, "\n" + "Get the current IO position.\n" + ":rtype: int\n" + ":return: Offset from the start of IO\n" + "" }, + { "size", _wrap_BasicIo_size, METH_VARARGS, "\n" + "Get the current size of the IO source in bytes.\n" + ":rtype: int\n" + ":return: Size of the IO source in bytes;\n" + "\n" + " -1 if failure;\n" + "" }, + { "isopen", _wrap_BasicIo_isopen, METH_VARARGS, " Returns true if the IO source is open, otherwise false." }, + { "error", _wrap_BasicIo_error, METH_VARARGS, " Returns 0 if the IO source is in a valid state, otherwise nonzero." }, + { "eof", _wrap_BasicIo_eof, METH_VARARGS, " Returns true if the IO position has reached the end, otherwise false." }, + { "path", _wrap_BasicIo_path, METH_VARARGS, "\n" + "Return the path to the IO resource. Often used to form\n" + " comprehensive error messages where only a BasicIo instance is\n" + " available.\n" + "" }, + { "ioType", _wrap_BasicIo_ioType, METH_VARARGS, "\n" + "Return the derived class type.\n" + "\n" + "You shouldn't usually need to know the type of IO as they all have\n" + "the same interface.\n" + ":rtype: str\n" + ":return: A class name such as FileIo.\n" "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; -static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { +static PyHeapTypeObject SwigPyBuiltin__Exiv2__BasicIo_type = { { #if PY_VERSION_HEX >= 0x03000000 PyVarObject_HEAD_INIT(NULL, 0) @@ -11348,10 +6040,10 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { PyObject_HEAD_INIT(NULL) 0, /* ob_size */ #endif - "exiv2.basicio.CurlIo", /* tp_name */ + "exiv2.basicio.BasicIo", /* tp_name */ sizeof(SwigPyObject), /* tp_basicsize */ 0, /* tp_itemsize */ - _wrap_delete_CurlIo_destructor_closure, /* tp_dealloc */ + _wrap_delete_BasicIo_destructor_closure, /* tp_dealloc */ #if PY_VERSION_HEX < 0x030800b4 (printfunc) 0, /* tp_print */ #else @@ -11365,39 +6057,42 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { (cmpfunc) 0, /* tp_compare */ #endif (reprfunc) 0, /* tp_repr */ - &SwigPyBuiltin__Exiv2__CurlIo_type.as_number, /* tp_as_number */ - &SwigPyBuiltin__Exiv2__CurlIo_type.as_sequence, /* tp_as_sequence */ - &SwigPyBuiltin__Exiv2__CurlIo_type.as_mapping, /* tp_as_mapping */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_number, /* tp_as_number */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_sequence, /* tp_as_sequence */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_mapping, /* tp_as_mapping */ SwigPyObject_hash, /* tp_hash */ (ternaryfunc) 0, /* tp_call */ (reprfunc) 0, /* tp_str */ (getattrofunc) 0, /* tp_getattro */ (setattrofunc) 0, /* tp_setattro */ - &SwigPyBuiltin__Exiv2__CurlIo_type.as_buffer, /* tp_as_buffer */ + &SwigPyBuiltin__Exiv2__BasicIo_type.as_buffer, /* tp_as_buffer */ #if PY_VERSION_HEX >= 0x03000000 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ #else Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */ #endif "\n" - "Provides the http, https read/write access and ftp read access for the RemoteIo.\n" - " This class is based on libcurl.\n" + "An interface for simple binary IO.\n" + "\n" + "Designed to have semantics and names similar to those of C style FILE*\n" + "operations. Subclasses should all behave the same so that they can be\n" + "interchanged.\n" "",/* tp_doc */ (traverseproc) 0, /* tp_traverse */ (inquiry) 0, /* tp_clear */ - SwigPyBuiltin__Exiv2__CurlIo_richcompare, /* tp_richcompare */ + SwigPyBuiltin__Exiv2__BasicIo_richcompare,/* tp_richcompare */ 0, /* tp_weaklistoffset */ (getiterfunc) 0, /* tp_iter */ (iternextfunc) 0, /* tp_iternext */ - SwigPyBuiltin__Exiv2__CurlIo_methods, /* tp_methods */ + SwigPyBuiltin__Exiv2__BasicIo_methods, /* tp_methods */ 0, /* tp_members */ - SwigPyBuiltin__Exiv2__CurlIo_getset, /* tp_getset */ + SwigPyBuiltin__Exiv2__BasicIo_getset, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ (descrgetfunc) 0, /* tp_descr_get */ (descrsetfunc) 0, /* tp_descr_set */ offsetof(SwigPyObject, dict), /* tp_dictoffset */ - _wrap_new_CurlIo, /* tp_init */ + SwigPyBuiltin_BadInit, /* tp_init */ (allocfunc) 0, /* tp_alloc */ (newfunc) 0, /* tp_new */ (freefunc) 0, /* tp_free */ @@ -11502,7 +6197,7 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { (objobjargproc) 0, /* mp_ass_subscript */ }, { - (lenfunc) 0, /* sq_length */ + _wrap_BasicIo_size_lenfunc_closure, /* sq_length */ (binaryfunc) 0, /* sq_concat */ (ssizeargfunc) 0, /* sq_repeat */ (ssizeargfunc) 0, /* sq_item */ @@ -11528,8 +6223,8 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { (segcountproc) 0, /* bf_getsegcount */ (charbufferproc) 0, /* bf_getcharbuffer */ #endif - (getbufferproc) 0, /* bf_getbuffer */ - (releasebufferproc) 0, /* bf_releasebuffer */ + getbuffer_Exiv2_BasicIo, /* bf_getbuffer */ + releasebuffer_Exiv2_BasicIo, /* bf_releasebuffer */ }, (PyObject *) 0, /* ht_name */ (PyObject *) 0, /* ht_slots */ @@ -11551,14 +6246,11 @@ static PyHeapTypeObject SwigPyBuiltin__Exiv2__CurlIo_type = { #endif }; -SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__CurlIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__CurlIo_type}; +SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__BasicIo_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__Exiv2__BasicIo_type}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -11577,21 +6269,17 @@ static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(n static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } -static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); } static swig_type_info _swigt__p_ErrorCode = {"_p_ErrorCode", "ErrorCode *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__BasicIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__CurlIo_clientdata, 0}; +static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__FileIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__HttpIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__MemIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__RemoteIo_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", "Exiv2::XPathIo *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__XPathIo_clientdata, 0}; +static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_SwigPyObject = {"_p_SwigPyObject", "SwigPyObject *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_first_type = {"_p_first_type", "first_type *", 0, 0, (void*)0, 0}; @@ -11610,7 +6298,6 @@ static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "uint16_t static swig_type_info *swig_type_initial[] = { &_swigt__p_ErrorCode, &_swigt__p_Exiv2__BasicIo, - &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__FileIo, &_swigt__p_Exiv2__HttpIo, @@ -11634,14 +6321,13 @@ static swig_type_info *swig_type_initial[] = { }; static swig_cast_info _swigc__p_ErrorCode[] = { {&_swigt__p_ErrorCode, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__HttpIo[] = {{&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__MemIo[] = {{&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__XPathIo[] = {{&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__FileIo[] = { {&_swigt__p_Exiv2__FileIo, 0, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__FileIo, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__XPathIo[] = { {&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SwigPyObject[] = { {&_swigt__p_SwigPyObject, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_first_type[] = { {&_swigt__p_first_type, 0, 0, 0},{0, 0, 0, 0}}; @@ -11660,7 +6346,6 @@ static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short static swig_cast_info *swig_cast_initial[] = { _swigc__p_ErrorCode, _swigc__p_Exiv2__BasicIo, - _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__FileIo, _swigc__p_Exiv2__HttpIo, @@ -11692,7 +6377,7 @@ static swig_const_info swig_const_table[] = { #ifdef __cplusplus } #endif -static PyTypeObject *builtin_bases[3]; +static PyTypeObject *builtin_bases[2]; /* ----------------------------------------------------------------------------- * Type initialization: @@ -12149,7 +6834,7 @@ SWIG_init(void) { SWIG_InstallConstants(d,swig_const_table); - SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__doc__",SWIG_FromCharPtr("Classes to access files, memory and remote data.")); + SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__doc__",SWIG_FromCharPtr("Class interface to access files, memory and remote data.")); { exiv2_module = PyImport_ImportModule("exiv2"); @@ -12201,210 +6886,6 @@ SWIG_init(void) { SwigPyBuiltin_AddPublicSymbol(public_interface, "BasicIo"); d = md; - /* type 'Exiv2::FileIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__FileIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__BasicIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'FileIo' as base 'Exiv2::BasicIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'FileIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "FileIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "FileIo"); - d = md; - - /* type 'Exiv2::MemIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__MemIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__BasicIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'MemIo' as base 'Exiv2::BasicIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'MemIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "MemIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "MemIo"); - d = md; - - /* type 'Exiv2::XPathIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__XPathIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__FileIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XPathIo' as base 'Exiv2::FileIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'XPathIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "XPathIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "XPathIo"); - d = md; - - /* type 'Exiv2::RemoteIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__RemoteIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__BasicIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'RemoteIo' as base 'Exiv2::BasicIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'RemoteIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "RemoteIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "RemoteIo"); - d = md; - - /* type 'Exiv2::HttpIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__HttpIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__RemoteIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'HttpIo' as base 'Exiv2::RemoteIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'HttpIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "HttpIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "HttpIo"); - d = md; - - /* type 'Exiv2::CurlIo' */ - builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__Exiv2__CurlIo_type; - builtin_pytype->tp_dict = d = PyDict_New(); - SwigPyBuiltin_SetMetaType(builtin_pytype, metatype); - builtin_pytype->tp_new = PyType_GenericNew; - builtin_base_count = 0; - builtin_basetype = SWIG_MangledTypeQuery("_p_Exiv2__RemoteIo"); - if (builtin_basetype && builtin_basetype->clientdata && ((SwigPyClientData *) builtin_basetype->clientdata)->pytype) { - builtin_bases[builtin_base_count++] = ((SwigPyClientData *) builtin_basetype->clientdata)->pytype; - } else { - PyErr_SetString(PyExc_TypeError, "Could not create type 'CurlIo' as base 'Exiv2::RemoteIo' has not been initialized.\n"); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - builtin_bases[builtin_base_count] = NULL; - SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases); - PyDict_SetItemString(d, "this", this_descr); - PyDict_SetItemString(d, "thisown", thisown_descr); - if (PyType_Ready(builtin_pytype) < 0) { - PyErr_SetString(PyExc_TypeError, "Could not create type 'CurlIo'."); -#if PY_VERSION_HEX >= 0x03000000 - return NULL; -#else - return; -#endif - } - Py_INCREF(builtin_pytype); - PyModule_AddObject(m, "CurlIo", (PyObject *)builtin_pytype); - SwigPyBuiltin_AddPublicSymbol(public_interface, "CurlIo"); - d = md; - /* Initialize threading */ SWIG_PYTHON_INITIALIZE_THREADS; #if PY_VERSION_HEX >= 0x03000000 diff --git a/src/swig-0_28_2/image_wrap.cxx b/src/swig-0_28_2/image_wrap.cxx index 0e2316f..f0ad6ef 100644 --- a/src/swig-0_28_2/image_wrap.cxx +++ b/src/swig-0_28_2/image_wrap.cxx @@ -3930,76 +3930,75 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__AsciiValue swig_types[2] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[3] #define SWIGTYPE_p_Exiv2__CommentValue swig_types[4] -#define SWIGTYPE_p_Exiv2__CurlIo swig_types[5] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[6] -#define SWIGTYPE_p_Exiv2__DataSet swig_types[7] -#define SWIGTYPE_p_Exiv2__DataValue swig_types[8] -#define SWIGTYPE_p_Exiv2__DateValue swig_types[9] -#define SWIGTYPE_p_Exiv2__ExifData swig_types[10] -#define SWIGTYPE_p_Exiv2__ExifKey swig_types[11] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[12] -#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[13] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[14] -#define SWIGTYPE_p_Exiv2__Image swig_types[15] -#define SWIGTYPE_p_Exiv2__ImageFactory swig_types[16] -#define SWIGTYPE_p_Exiv2__IptcData swig_types[17] -#define SWIGTYPE_p_Exiv2__IptcKey swig_types[18] -#define SWIGTYPE_p_Exiv2__Key swig_types[19] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[20] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[21] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[22] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[23] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[24] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[25] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[26] -#define SWIGTYPE_p_Exiv2__Value swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[34] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[35] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpData swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[40] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[41] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[42] -#define SWIGTYPE_p_IptcData_iterator swig_types[43] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[44] -#define SWIGTYPE_p_SwigPyObject swig_types[45] -#define SWIGTYPE_p_ValueType swig_types[46] -#define SWIGTYPE_p_XmpData_iterator swig_types[47] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[48] -#define SWIGTYPE_p_allocator_type swig_types[49] -#define SWIGTYPE_p_char swig_types[50] -#define SWIGTYPE_p_const_iterator swig_types[51] -#define SWIGTYPE_p_difference_type swig_types[52] -#define SWIGTYPE_p_first_type swig_types[53] -#define SWIGTYPE_p_int swig_types[54] -#define SWIGTYPE_p_iterator swig_types[55] -#define SWIGTYPE_p_key_type swig_types[56] -#define SWIGTYPE_p_long_long swig_types[57] -#define SWIGTYPE_p_mapped_type swig_types[58] -#define SWIGTYPE_p_second_type swig_types[59] -#define SWIGTYPE_p_short swig_types[60] -#define SWIGTYPE_p_signed_char swig_types[61] -#define SWIGTYPE_p_size_type swig_types[62] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[63] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[64] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[65] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[66] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[67] -#define SWIGTYPE_p_unsigned_char swig_types[68] -#define SWIGTYPE_p_unsigned_int swig_types[69] -#define SWIGTYPE_p_unsigned_long_long swig_types[70] -#define SWIGTYPE_p_unsigned_short swig_types[71] -#define SWIGTYPE_p_value_type swig_types[72] -static swig_type_info *swig_types[74]; -static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[5] +#define SWIGTYPE_p_Exiv2__DataSet swig_types[6] +#define SWIGTYPE_p_Exiv2__DataValue swig_types[7] +#define SWIGTYPE_p_Exiv2__DateValue swig_types[8] +#define SWIGTYPE_p_Exiv2__ExifData swig_types[9] +#define SWIGTYPE_p_Exiv2__ExifKey swig_types[10] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[11] +#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[13] +#define SWIGTYPE_p_Exiv2__Image swig_types[14] +#define SWIGTYPE_p_Exiv2__ImageFactory swig_types[15] +#define SWIGTYPE_p_Exiv2__IptcData swig_types[16] +#define SWIGTYPE_p_Exiv2__IptcKey swig_types[17] +#define SWIGTYPE_p_Exiv2__Key swig_types[18] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[19] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[20] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] +#define SWIGTYPE_p_Exiv2__Value swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpData swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] +#define SWIGTYPE_p_IptcData_iterator swig_types[42] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] +#define SWIGTYPE_p_SwigPyObject swig_types[44] +#define SWIGTYPE_p_ValueType swig_types[45] +#define SWIGTYPE_p_XmpData_iterator swig_types[46] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] +#define SWIGTYPE_p_allocator_type swig_types[48] +#define SWIGTYPE_p_char swig_types[49] +#define SWIGTYPE_p_const_iterator swig_types[50] +#define SWIGTYPE_p_difference_type swig_types[51] +#define SWIGTYPE_p_first_type swig_types[52] +#define SWIGTYPE_p_int swig_types[53] +#define SWIGTYPE_p_iterator swig_types[54] +#define SWIGTYPE_p_key_type swig_types[55] +#define SWIGTYPE_p_long_long swig_types[56] +#define SWIGTYPE_p_mapped_type swig_types[57] +#define SWIGTYPE_p_second_type swig_types[58] +#define SWIGTYPE_p_short swig_types[59] +#define SWIGTYPE_p_signed_char swig_types[60] +#define SWIGTYPE_p_size_type swig_types[61] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] +#define SWIGTYPE_p_unsigned_char swig_types[67] +#define SWIGTYPE_p_unsigned_int swig_types[68] +#define SWIGTYPE_p_unsigned_long_long swig_types[69] +#define SWIGTYPE_p_unsigned_short swig_types[70] +#define SWIGTYPE_p_value_type swig_types[71] +static swig_type_info *swig_types[73]; +static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4198,19 +4197,6 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" -#ifndef EXV_USE_CURL -namespace Exiv2 { - class CurlIo : public RemoteIo { - public: - CurlIo(const std::string& url, size_t blockSize=0) { - throw std::runtime_error( - "CurlIo not enabled in linked libexiv2"); - }; - }; -} -#endif - - #include @@ -4699,29 +4685,6 @@ SWIGINTERNINLINE PyObject* } -static swig_type_info* basicio_subtype(Exiv2::BasicIo* ptr) { - if (dynamic_cast(ptr)) - return SWIGTYPE_p_Exiv2__MemIo; - else if (dynamic_cast(ptr)) { - if (dynamic_cast(ptr)) - return SWIGTYPE_p_Exiv2__XPathIo; - else - return SWIGTYPE_p_Exiv2__FileIo; - } - else if (dynamic_cast(ptr)) { - if (dynamic_cast(ptr)) - return SWIGTYPE_p_Exiv2__HttpIo; - - else if (dynamic_cast(ptr)) - return SWIGTYPE_p_Exiv2__CurlIo; - - else - return SWIGTYPE_p_Exiv2__RemoteIo; - } - return SWIGTYPE_p_Exiv2__BasicIo; -}; - - static PyObject* PyEnum_Exiv2_MetadataId = NULL; @@ -6051,9 +6014,7 @@ SWIGINTERN PyObject *_wrap_Image_io(PyObject *self, PyObject *args) { SWIG_fail; } } - { - resultobj = SWIG_NewPointerObj(result, basicio_subtype(result), 0); - } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exiv2__BasicIo, 0 | 0 ); if (resultobj != Py_None) if (PyObject_SetAttrString(resultobj, "_refers_to", self)) { @@ -6351,11 +6312,9 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_0(PyObject *self, Py_ssiz SWIG_fail; } } - { - Exiv2::BasicIo* ptr = (&result)->release(); - resultobj = SWIG_NewPointerObj( - ptr, basicio_subtype(ptr), SWIG_POINTER_OWN); - } + + resultobj = SWIG_NewPointerObj((&result)->release(), SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_OWN | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -6959,11 +6918,9 @@ SWIGINTERN PyObject *_wrap_ImageFactory_createIo__SWIG_1(PyObject *self, Py_ssiz SWIG_fail; } } - { - Exiv2::BasicIo* ptr = (&result)->release(); - resultobj = SWIG_NewPointerObj( - ptr, basicio_subtype(ptr), SWIG_POINTER_OWN); - } + + resultobj = SWIG_NewPointerObj((&result)->release(), SWIGTYPE_p_Exiv2__BasicIo, SWIG_POINTER_OWN | 0 ); + PyObject_SetAttrString(resultobj, "_refers_to", _global_view); @@ -7983,9 +7940,6 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__ImageFactory_clientdata = {0, /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -8001,9 +7955,6 @@ static void *_p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM( static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) (Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } -static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); -} static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); } @@ -8013,12 +7964,6 @@ static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newme static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); } -static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} -static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); -} static void *_p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::StringValueBase *) ((Exiv2::AsciiValue *) x)); } @@ -8098,25 +8043,25 @@ static swig_type_info _swigt__p_ExifData_iterator = {"_p_ExifData_iterator", "Ex static swig_type_info _swigt__p_ExifData_iterator_base = {"_p_ExifData_iterator_base", "ExifData_iterator_base *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__AsciiValue = {"_p_Exiv2__AsciiValue", "Exiv2::AsciiValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_Exiv2__CommentValue = {"_p_Exiv2__CommentValue", "Exiv2::CommentValue *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataSet = {"_p_Exiv2__DataSet", "Exiv2::DataSet *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DateValue = {"_p_Exiv2__DateValue", "Exiv2::DateValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifData = {"_p_Exiv2__ExifData", "Exiv2::ExifData *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifKey = {"_p_Exiv2__ExifKey", "Exiv2::ExifKey *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__GroupInfo = {"_p_Exiv2__GroupInfo", "Exiv2::GroupInfo *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Image = {"_p_Exiv2__Image", "Exiv2::Image *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__Image_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__ImageFactory = {"_p_Exiv2__ImageFactory", "Exiv2::ImageFactory *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__ImageFactory_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__IptcData = {"_p_Exiv2__IptcData", "Exiv2::IptcData *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValueBase = {"_p_Exiv2__StringValueBase", "Exiv2::StringValueBase *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__TagInfo = {"_p_Exiv2__TagInfo", "Exiv2::TagInfo *", 0, 0, (void*)0, 0}; @@ -8130,7 +8075,6 @@ static swig_type_info _swigt__p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t static swig_type_info _swigt__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t = {"_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t", "Exiv2::URationalValue *|Exiv2::ValueType< Exiv2::URational > *|Exiv2::ValueType< std::pair< uint32_t,uint32_t > > *|Exiv2::ValueType< std::pair< unsigned int,unsigned int > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ValueTypeT_uint16_t_t = {"_p_Exiv2__ValueTypeT_uint16_t_t", "Exiv2::UShortValue *|Exiv2::ValueType< uint16_t > *|Exiv2::ValueType< unsigned short > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ValueTypeT_uint32_t_t = {"_p_Exiv2__ValueTypeT_uint32_t_t", "Exiv2::ULongValue *|Exiv2::ValueType< uint32_t > *|Exiv2::ValueType< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", "Exiv2::XPathIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpArrayValue = {"_p_Exiv2__XmpArrayValue", "Exiv2::XmpArrayValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpData = {"_p_Exiv2__XmpData", "Exiv2::XmpData *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpKey = {"_p_Exiv2__XmpKey", "Exiv2::XmpKey *", 0, 0, (void*)0, 0}; @@ -8174,7 +8118,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__AsciiValue, &_swigt__p_Exiv2__BasicIo, &_swigt__p_Exiv2__CommentValue, - &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__DataSet, &_swigt__p_Exiv2__DataValue, @@ -8247,26 +8190,26 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_ExifData_iterator[] = { {&_swigt__p_ExifData_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ExifData_iterator_base[] = { {&_swigt__p_ExifData_iterator_base, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__AsciiValue[] = { {&_swigt__p_Exiv2__AsciiValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__FileIo[] = {{&_swigt__p_Exiv2__FileIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__HttpIo[] = {{&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__MemIo[] = {{&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = {{&_swigt__p_Exiv2__RemoteIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__XPathIo[] = {{&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__CommentValue[] = { {&_swigt__p_Exiv2__CommentValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataSet[] = { {&_swigt__p_Exiv2__DataSet, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DateValue[] = { {&_swigt__p_Exiv2__DateValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifData[] = { {&_swigt__p_Exiv2__ExifData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifKey[] = { {&_swigt__p_Exiv2__ExifKey, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__FileIo[] = { {&_swigt__p_Exiv2__FileIo, 0, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__FileIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__GroupInfo[] = { {&_swigt__p_Exiv2__GroupInfo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Image[] = { {&_swigt__p_Exiv2__Image, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ImageFactory[] = { {&_swigt__p_Exiv2__ImageFactory, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcData[] = { {&_swigt__p_Exiv2__IptcData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValueBase[] = { {&_swigt__p_Exiv2__StringValueBase, 0, 0, 0}, {&_swigt__p_Exiv2__AsciiValue, _p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__CommentValue, _p_Exiv2__CommentValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__StringValue, _p_Exiv2__StringValueTo_p_Exiv2__StringValueBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__TagInfo[] = { {&_swigt__p_Exiv2__TagInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -8280,7 +8223,6 @@ static swig_cast_info _swigc__p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t static swig_cast_info _swigc__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ValueTypeT_uint16_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_uint16_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ValueTypeT_uint32_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__XPathIo[] = { {&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpArrayValue[] = { {&_swigt__p_Exiv2__XmpArrayValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpData[] = { {&_swigt__p_Exiv2__XmpData, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpKey[] = { {&_swigt__p_Exiv2__XmpKey, 0, 0, 0},{0, 0, 0, 0}}; @@ -8324,7 +8266,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__AsciiValue, _swigc__p_Exiv2__BasicIo, _swigc__p_Exiv2__CommentValue, - _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__DataSet, _swigc__p_Exiv2__DataValue, diff --git a/src/swig-0_28_2/preview_wrap.cxx b/src/swig-0_28_2/preview_wrap.cxx index 1c8de1d..31f60f3 100644 --- a/src/swig-0_28_2/preview_wrap.cxx +++ b/src/swig-0_28_2/preview_wrap.cxx @@ -3932,76 +3932,75 @@ SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) { #define SWIGTYPE_p_Exiv2__AsciiValue swig_types[2] #define SWIGTYPE_p_Exiv2__BasicIo swig_types[3] #define SWIGTYPE_p_Exiv2__CommentValue swig_types[4] -#define SWIGTYPE_p_Exiv2__CurlIo swig_types[5] -#define SWIGTYPE_p_Exiv2__DataBuf swig_types[6] -#define SWIGTYPE_p_Exiv2__DataSet swig_types[7] -#define SWIGTYPE_p_Exiv2__DataValue swig_types[8] -#define SWIGTYPE_p_Exiv2__DateValue swig_types[9] -#define SWIGTYPE_p_Exiv2__ExifKey swig_types[10] -#define SWIGTYPE_p_Exiv2__FileIo swig_types[11] -#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[12] -#define SWIGTYPE_p_Exiv2__HttpIo swig_types[13] -#define SWIGTYPE_p_Exiv2__Image swig_types[14] -#define SWIGTYPE_p_Exiv2__IptcKey swig_types[15] -#define SWIGTYPE_p_Exiv2__Key swig_types[16] -#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[17] -#define SWIGTYPE_p_Exiv2__MemIo swig_types[18] -#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[19] -#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[20] -#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[21] -#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[22] -#define SWIGTYPE_p_Exiv2__StringValue swig_types[23] -#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[24] -#define SWIGTYPE_p_Exiv2__TagInfo swig_types[25] -#define SWIGTYPE_p_Exiv2__TimeValue swig_types[26] -#define SWIGTYPE_p_Exiv2__Value swig_types[27] -#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[28] -#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[29] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[30] -#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[31] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[32] -#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[33] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[34] -#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[35] -#define SWIGTYPE_p_Exiv2__XPathIo swig_types[36] -#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[37] -#define SWIGTYPE_p_Exiv2__XmpKey swig_types[38] -#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[39] -#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[40] -#define SWIGTYPE_p_Exiv2__XmpValue swig_types[41] -#define SWIGTYPE_p_IptcData_iterator swig_types[42] -#define SWIGTYPE_p_IptcData_iterator_base swig_types[43] -#define SWIGTYPE_p_SwigPyObject swig_types[44] -#define SWIGTYPE_p_ValueType swig_types[45] -#define SWIGTYPE_p_XmpData_iterator swig_types[46] -#define SWIGTYPE_p_XmpData_iterator_base swig_types[47] -#define SWIGTYPE_p_allocator_type swig_types[48] -#define SWIGTYPE_p_char swig_types[49] -#define SWIGTYPE_p_const_iterator swig_types[50] -#define SWIGTYPE_p_difference_type swig_types[51] -#define SWIGTYPE_p_first_type swig_types[52] -#define SWIGTYPE_p_int swig_types[53] -#define SWIGTYPE_p_iterator swig_types[54] -#define SWIGTYPE_p_key_type swig_types[55] -#define SWIGTYPE_p_long_long swig_types[56] -#define SWIGTYPE_p_mapped_type swig_types[57] -#define SWIGTYPE_p_second_type swig_types[58] -#define SWIGTYPE_p_short swig_types[59] -#define SWIGTYPE_p_signed_char swig_types[60] -#define SWIGTYPE_p_size_type swig_types[61] -#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[62] -#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[63] -#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[64] -#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[65] -#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[66] -#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[67] -#define SWIGTYPE_p_unsigned_char swig_types[68] -#define SWIGTYPE_p_unsigned_int swig_types[69] -#define SWIGTYPE_p_unsigned_long_long swig_types[70] -#define SWIGTYPE_p_unsigned_short swig_types[71] -#define SWIGTYPE_p_value_type swig_types[72] -static swig_type_info *swig_types[74]; -static swig_module_info swig_module = {swig_types, 73, 0, 0, 0, 0}; +#define SWIGTYPE_p_Exiv2__DataBuf swig_types[5] +#define SWIGTYPE_p_Exiv2__DataSet swig_types[6] +#define SWIGTYPE_p_Exiv2__DataValue swig_types[7] +#define SWIGTYPE_p_Exiv2__DateValue swig_types[8] +#define SWIGTYPE_p_Exiv2__ExifKey swig_types[9] +#define SWIGTYPE_p_Exiv2__FileIo swig_types[10] +#define SWIGTYPE_p_Exiv2__GroupInfo swig_types[11] +#define SWIGTYPE_p_Exiv2__HttpIo swig_types[12] +#define SWIGTYPE_p_Exiv2__Image swig_types[13] +#define SWIGTYPE_p_Exiv2__IptcKey swig_types[14] +#define SWIGTYPE_p_Exiv2__Key swig_types[15] +#define SWIGTYPE_p_Exiv2__LangAltValue swig_types[16] +#define SWIGTYPE_p_Exiv2__MemIo swig_types[17] +#define SWIGTYPE_p_Exiv2__PreviewImage swig_types[18] +#define SWIGTYPE_p_Exiv2__PreviewManager swig_types[19] +#define SWIGTYPE_p_Exiv2__PreviewProperties swig_types[20] +#define SWIGTYPE_p_Exiv2__RemoteIo swig_types[21] +#define SWIGTYPE_p_Exiv2__StringValue swig_types[22] +#define SWIGTYPE_p_Exiv2__StringValueBase swig_types[23] +#define SWIGTYPE_p_Exiv2__TagInfo swig_types[24] +#define SWIGTYPE_p_Exiv2__TimeValue swig_types[25] +#define SWIGTYPE_p_Exiv2__Value swig_types[26] +#define SWIGTYPE_p_Exiv2__ValueTypeT_double_t swig_types[27] +#define SWIGTYPE_p_Exiv2__ValueTypeT_float_t swig_types[28] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int16_t_t swig_types[29] +#define SWIGTYPE_p_Exiv2__ValueTypeT_int32_t_t swig_types[30] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t swig_types[31] +#define SWIGTYPE_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t swig_types[32] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint16_t_t swig_types[33] +#define SWIGTYPE_p_Exiv2__ValueTypeT_uint32_t_t swig_types[34] +#define SWIGTYPE_p_Exiv2__XPathIo swig_types[35] +#define SWIGTYPE_p_Exiv2__XmpArrayValue swig_types[36] +#define SWIGTYPE_p_Exiv2__XmpKey swig_types[37] +#define SWIGTYPE_p_Exiv2__XmpPropertyInfo swig_types[38] +#define SWIGTYPE_p_Exiv2__XmpTextValue swig_types[39] +#define SWIGTYPE_p_Exiv2__XmpValue swig_types[40] +#define SWIGTYPE_p_IptcData_iterator swig_types[41] +#define SWIGTYPE_p_IptcData_iterator_base swig_types[42] +#define SWIGTYPE_p_SwigPyObject swig_types[43] +#define SWIGTYPE_p_ValueType swig_types[44] +#define SWIGTYPE_p_XmpData_iterator swig_types[45] +#define SWIGTYPE_p_XmpData_iterator_base swig_types[46] +#define SWIGTYPE_p_allocator_type swig_types[47] +#define SWIGTYPE_p_char swig_types[48] +#define SWIGTYPE_p_const_iterator swig_types[49] +#define SWIGTYPE_p_difference_type swig_types[50] +#define SWIGTYPE_p_first_type swig_types[51] +#define SWIGTYPE_p_int swig_types[52] +#define SWIGTYPE_p_iterator swig_types[53] +#define SWIGTYPE_p_key_type swig_types[54] +#define SWIGTYPE_p_long_long swig_types[55] +#define SWIGTYPE_p_mapped_type swig_types[56] +#define SWIGTYPE_p_second_type swig_types[57] +#define SWIGTYPE_p_short swig_types[58] +#define SWIGTYPE_p_signed_char swig_types[59] +#define SWIGTYPE_p_size_type swig_types[60] +#define SWIGTYPE_p_std__listT_Exiv2__Exifdatum_t swig_types[61] +#define SWIGTYPE_p_std__pairT_int32_t_int32_t_t swig_types[62] +#define SWIGTYPE_p_std__pairT_uint32_t_uint32_t_t swig_types[63] +#define SWIGTYPE_p_std__vectorT_Exiv2__Iptcdatum_std__allocatorT_Exiv2__Iptcdatum_t_t swig_types[64] +#define SWIGTYPE_p_std__vectorT_Exiv2__PreviewProperties_t swig_types[65] +#define SWIGTYPE_p_std__vectorT_Exiv2__Xmpdatum_std__allocatorT_Exiv2__Xmpdatum_t_t swig_types[66] +#define SWIGTYPE_p_unsigned_char swig_types[67] +#define SWIGTYPE_p_unsigned_int swig_types[68] +#define SWIGTYPE_p_unsigned_long_long swig_types[69] +#define SWIGTYPE_p_unsigned_short swig_types[70] +#define SWIGTYPE_p_value_type swig_types[71] +static swig_type_info *swig_types[73]; +static swig_module_info swig_module = {swig_types, 72, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -4200,19 +4199,6 @@ SWIG_FromCharPtr(const char *cptr) #include "exiv2/exiv2.hpp" -#ifndef EXV_USE_CURL -namespace Exiv2 { - class CurlIo : public RemoteIo { - public: - CurlIo(const std::string& url, size_t blockSize=0) { - throw std::runtime_error( - "CurlIo not enabled in linked libexiv2"); - }; - }; -} -#endif - - #include @@ -6426,7 +6412,7 @@ SWIGINTERN PyObject *_wrap_PreviewImage_extension(PyObject *self, PyObject *args SWIG_exception_fail(SWIG_ValueError, "failed to transcode result"); } #endif - resultobj = SWIG_From_std_string(result); + resultobj = SWIG_FromCharPtrAndSize((&result)->data(), (&result)->size()); } return resultobj; fail: @@ -7446,9 +7432,6 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__PreviewManager_clientdata = {0 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_Exiv2__CurlIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::BasicIo *) (Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} static void *_p_Exiv2__FileIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) ((Exiv2::FileIo *) x)); } @@ -7464,9 +7447,6 @@ static void *_p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM( static void *_p_Exiv2__XPathIoTo_p_Exiv2__BasicIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::BasicIo *) (Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); } -static void *_p_Exiv2__XPathIoTo_p_Exiv2__FileIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::FileIo *) ((Exiv2::XPathIo *) x)); -} static void *_p_Exiv2__ExifKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::ExifKey *) x)); } @@ -7476,12 +7456,6 @@ static void *_p_Exiv2__IptcKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newme static void *_p_Exiv2__XmpKeyTo_p_Exiv2__Key(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::Key *) ((Exiv2::XmpKey *) x)); } -static void *_p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::CurlIo *) x)); -} -static void *_p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((Exiv2::RemoteIo *) ((Exiv2::HttpIo *) x)); -} static void *_p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase(void *x, int *SWIGUNUSEDPARM(newmemory)) { return (void *)((Exiv2::StringValueBase *) ((Exiv2::AsciiValue *) x)); } @@ -7561,25 +7535,25 @@ static swig_type_info _swigt__p_ExifData_iterator = {"_p_ExifData_iterator", "Ex static swig_type_info _swigt__p_ExifData_iterator_base = {"_p_ExifData_iterator_base", "ExifData_iterator_base *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__AsciiValue = {"_p_Exiv2__AsciiValue", "Exiv2::AsciiValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__BasicIo = {"_p_Exiv2__BasicIo", "Exiv2::BasicIo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", 0, 0, 0, 0, 0}; +static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", 0, 0, 0, 0, 0}; static swig_type_info _swigt__p_Exiv2__CommentValue = {"_p_Exiv2__CommentValue", "Exiv2::CommentValue *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__CurlIo = {"_p_Exiv2__CurlIo", "Exiv2::CurlIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataBuf = {"_p_Exiv2__DataBuf", "Exiv2::DataBuf *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataSet = {"_p_Exiv2__DataSet", "Exiv2::DataSet *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DataValue = {"_p_Exiv2__DataValue", "Exiv2::DataValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__DateValue = {"_p_Exiv2__DateValue", "Exiv2::DateValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ExifKey = {"_p_Exiv2__ExifKey", "Exiv2::ExifKey *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__FileIo = {"_p_Exiv2__FileIo", "Exiv2::FileIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__GroupInfo = {"_p_Exiv2__GroupInfo", "Exiv2::GroupInfo *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__HttpIo = {"_p_Exiv2__HttpIo", "Exiv2::HttpIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Image = {"_p_Exiv2__Image", "Exiv2::Image *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__IptcKey = {"_p_Exiv2__IptcKey", "Exiv2::IptcKey *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__Key = {"_p_Exiv2__Key", "Exiv2::Key *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__LangAltValue = {"_p_Exiv2__LangAltValue", "Exiv2::LangAltValue *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__MemIo = {"_p_Exiv2__MemIo", "Exiv2::MemIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__PreviewImage = {"_p_Exiv2__PreviewImage", "Exiv2::PreviewImage *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__PreviewImage_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__PreviewManager = {"_p_Exiv2__PreviewManager", "Exiv2::PreviewManager *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__PreviewManager_clientdata, 0}; static swig_type_info _swigt__p_Exiv2__PreviewProperties = {"_p_Exiv2__PreviewProperties", "Exiv2::PreviewProperties *", 0, 0, (void*)&SwigPyBuiltin__Exiv2__PreviewProperties_clientdata, 0}; -static swig_type_info _swigt__p_Exiv2__RemoteIo = {"_p_Exiv2__RemoteIo", "Exiv2::RemoteIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValue = {"_p_Exiv2__StringValue", "Exiv2::StringValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__StringValueBase = {"_p_Exiv2__StringValueBase", "Exiv2::StringValueBase *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__TagInfo = {"_p_Exiv2__TagInfo", "Exiv2::TagInfo *", 0, 0, (void*)0, 0}; @@ -7593,7 +7567,6 @@ static swig_type_info _swigt__p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t static swig_type_info _swigt__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t = {"_p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t", "Exiv2::URationalValue *|Exiv2::ValueType< Exiv2::URational > *|Exiv2::ValueType< std::pair< uint32_t,uint32_t > > *|Exiv2::ValueType< std::pair< unsigned int,unsigned int > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ValueTypeT_uint16_t_t = {"_p_Exiv2__ValueTypeT_uint16_t_t", "Exiv2::UShortValue *|Exiv2::ValueType< uint16_t > *|Exiv2::ValueType< unsigned short > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__ValueTypeT_uint32_t_t = {"_p_Exiv2__ValueTypeT_uint32_t_t", "Exiv2::ULongValue *|Exiv2::ValueType< uint32_t > *|Exiv2::ValueType< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Exiv2__XPathIo = {"_p_Exiv2__XPathIo", "Exiv2::XPathIo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpArrayValue = {"_p_Exiv2__XmpArrayValue", "Exiv2::XmpArrayValue *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpKey = {"_p_Exiv2__XmpKey", "Exiv2::XmpKey *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Exiv2__XmpPropertyInfo = {"_p_Exiv2__XmpPropertyInfo", "Exiv2::XmpPropertyInfo *", 0, 0, (void*)0, 0}; @@ -7637,7 +7610,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_Exiv2__AsciiValue, &_swigt__p_Exiv2__BasicIo, &_swigt__p_Exiv2__CommentValue, - &_swigt__p_Exiv2__CurlIo, &_swigt__p_Exiv2__DataBuf, &_swigt__p_Exiv2__DataSet, &_swigt__p_Exiv2__DataValue, @@ -7710,26 +7682,26 @@ static swig_type_info *swig_type_initial[] = { static swig_cast_info _swigc__p_ExifData_iterator[] = { {&_swigt__p_ExifData_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ExifData_iterator_base[] = { {&_swigt__p_ExifData_iterator_base, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__AsciiValue[] = { {&_swigt__p_Exiv2__AsciiValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__FileIo[] = {{&_swigt__p_Exiv2__FileIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__HttpIo[] = {{&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__MemIo[] = {{&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = {{&_swigt__p_Exiv2__RemoteIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__XPathIo[] = {{&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Exiv2__BasicIo[] = { {&_swigt__p_Exiv2__BasicIo, 0, 0, 0}, {&_swigt__p_Exiv2__FileIo, _p_Exiv2__FileIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__MemIo, _p_Exiv2__MemIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__RemoteIo, _p_Exiv2__RemoteIoTo_p_Exiv2__BasicIo, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__BasicIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__CommentValue[] = { {&_swigt__p_Exiv2__CommentValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__CurlIo[] = { {&_swigt__p_Exiv2__CurlIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataBuf[] = { {&_swigt__p_Exiv2__DataBuf, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataSet[] = { {&_swigt__p_Exiv2__DataSet, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DataValue[] = { {&_swigt__p_Exiv2__DataValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__DateValue[] = { {&_swigt__p_Exiv2__DateValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ExifKey[] = { {&_swigt__p_Exiv2__ExifKey, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__FileIo[] = { {&_swigt__p_Exiv2__FileIo, 0, 0, 0}, {&_swigt__p_Exiv2__XPathIo, _p_Exiv2__XPathIoTo_p_Exiv2__FileIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__GroupInfo[] = { {&_swigt__p_Exiv2__GroupInfo, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__HttpIo[] = { {&_swigt__p_Exiv2__HttpIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Image[] = { {&_swigt__p_Exiv2__Image, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__IptcKey[] = { {&_swigt__p_Exiv2__IptcKey, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__Key[] = { {&_swigt__p_Exiv2__Key, 0, 0, 0}, {&_swigt__p_Exiv2__ExifKey, _p_Exiv2__ExifKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__IptcKey, _p_Exiv2__IptcKeyTo_p_Exiv2__Key, 0, 0}, {&_swigt__p_Exiv2__XmpKey, _p_Exiv2__XmpKeyTo_p_Exiv2__Key, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__LangAltValue[] = { {&_swigt__p_Exiv2__LangAltValue, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__MemIo[] = { {&_swigt__p_Exiv2__MemIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewImage[] = { {&_swigt__p_Exiv2__PreviewImage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewManager[] = { {&_swigt__p_Exiv2__PreviewManager, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__PreviewProperties[] = { {&_swigt__p_Exiv2__PreviewProperties, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__RemoteIo[] = { {&_swigt__p_Exiv2__RemoteIo, 0, 0, 0}, {&_swigt__p_Exiv2__CurlIo, _p_Exiv2__CurlIoTo_p_Exiv2__RemoteIo, 0, 0}, {&_swigt__p_Exiv2__HttpIo, _p_Exiv2__HttpIoTo_p_Exiv2__RemoteIo, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValue[] = { {&_swigt__p_Exiv2__StringValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__StringValueBase[] = { {&_swigt__p_Exiv2__StringValueBase, 0, 0, 0}, {&_swigt__p_Exiv2__AsciiValue, _p_Exiv2__AsciiValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__CommentValue, _p_Exiv2__CommentValueTo_p_Exiv2__StringValueBase, 0, 0}, {&_swigt__p_Exiv2__StringValue, _p_Exiv2__StringValueTo_p_Exiv2__StringValueBase, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__TagInfo[] = { {&_swigt__p_Exiv2__TagInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -7743,7 +7715,6 @@ static swig_cast_info _swigc__p_Exiv2__ValueTypeT_std__pairT_int32_t_int32_t_t_t static swig_cast_info _swigc__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_std__pairT_uint32_t_uint32_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ValueTypeT_uint16_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_uint16_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__ValueTypeT_uint32_t_t[] = { {&_swigt__p_Exiv2__ValueTypeT_uint32_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Exiv2__XPathIo[] = { {&_swigt__p_Exiv2__XPathIo, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpArrayValue[] = { {&_swigt__p_Exiv2__XmpArrayValue, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpKey[] = { {&_swigt__p_Exiv2__XmpKey, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Exiv2__XmpPropertyInfo[] = { {&_swigt__p_Exiv2__XmpPropertyInfo, 0, 0, 0},{0, 0, 0, 0}}; @@ -7787,7 +7758,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_Exiv2__AsciiValue, _swigc__p_Exiv2__BasicIo, _swigc__p_Exiv2__CommentValue, - _swigc__p_Exiv2__CurlIo, _swigc__p_Exiv2__DataBuf, _swigc__p_Exiv2__DataSet, _swigc__p_Exiv2__DataValue, diff --git a/tests/test_basicio.py b/tests/test_basicio.py index bf76299..0c245c7 100644 --- a/tests/test_basicio.py +++ b/tests/test_basicio.py @@ -38,13 +38,9 @@ def setUpClass(cls): def test_CurlIo(self): https_image = ('https://raw.githubusercontent.com/jim-easterbrook' '/python-exiv2/main/tests/image_02.jpg') - io = exiv2.CurlIo(https_image) - self.assertIsInstance(io, exiv2.CurlIo) - self.assertEqual(io.error(), False) - self.assertEqual(io.path(), https_image) - self.assertEqual(io.size(), 0) io = exiv2.ImageFactory.createIo(https_image) - self.assertIsInstance(io, exiv2.CurlIo) + self.assertIsInstance(io, exiv2.BasicIo) + self.assertEqual(io.ioType(), 'CurlIo') self.assertEqual(io.error(), False) self.assertEqual(io.path(), https_image) self.assertEqual(io.size(), 0) @@ -58,8 +54,9 @@ def test_CurlIo(self): def test_FileIo(self): # most functions are tested in test_MemIo - io = exiv2.FileIo(self.image_path) - self.assertIsInstance(io, exiv2.FileIo) + io = exiv2.ImageFactory.createIo(self.image_path) + self.assertIsInstance(io, exiv2.BasicIo) + self.assertEqual(io.ioType(), 'FileIo') self.assertEqual(io.error(), False) self.assertEqual(io.path(), self.image_path) self.assertEqual(io.size(), 15125) @@ -72,8 +69,9 @@ def test_FileIo(self): def test_MemIo(self): # empty buffer - io = exiv2.MemIo() - self.assertIsInstance(io, exiv2.MemIo) + io = exiv2.ImageFactory.createIo(b'') + self.assertIsInstance(io, exiv2.BasicIo) + self.assertEqual(io.ioType(), 'MemIo') self.assertEqual(io.size(), 0) # mmap data access with io.mmap(False) as view: @@ -98,8 +96,9 @@ def test_MemIo(self): with self.assertRaises(IndexError): view[0] = 0 # non-empty buffer - io = exiv2.MemIo(self.data) - self.assertIsInstance(io, exiv2.MemIo) + io = exiv2.ImageFactory.createIo(self.data) + self.assertIsInstance(io, exiv2.BasicIo) + self.assertEqual(io.ioType(), 'MemIo') self.assertEqual(io.error(), False) self.assertEqual(io.path(), 'MemIo') self.assertEqual(io.size(), len(self.data)) @@ -159,7 +158,7 @@ def test_MemIo(self): self.assertEqual(io.putb(ord('+')), ord('+')) self.assertEqual(io.eof(), True) self.assertEqual(len(io), len(self.data) + 1) - self.assertEqual(io.write(exiv2.MemIo(b'fred')), 4) + self.assertEqual(io.write(exiv2.ImageFactory.createIo(b'fred')), 4) self.assertEqual(len(io), len(self.data) + 5) self.assertEqual(io.write(b'+jim'), 4) self.assertEqual(len(io), len(self.data) + 9) @@ -168,7 +167,7 @@ def test_MemIo(self): def test_ref_counts(self): # MemIo keeps a reference to the data buffer self.assertEqual(sys.getrefcount(self.data), 3) - io = exiv2.MemIo(self.data) + io = exiv2.ImageFactory.createIo(self.data) self.assertEqual(sys.getrefcount(self.data), 4) del io self.assertEqual(sys.getrefcount(self.data), 3) @@ -184,7 +183,7 @@ def test_unicode_paths(self): with self.subTest(file_name=file_name, codes=codes): tmp_path = os.path.normcase(os.path.join(tmp_dir, file_name)) shutil.copyfile(self.image_path, tmp_path) - io = exiv2.FileIo(tmp_path) + io = exiv2.ImageFactory.createIo(tmp_path) if cp in codes: self.assertEqual(io.path(), tmp_path) else: diff --git a/tests/test_image.py b/tests/test_image.py index d485c8f..3014e13 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -107,7 +107,7 @@ def test_Image(self): self.check_result(image.iccProfileDefined(), bool, True) self.check_result(image.imageType(), exiv2.ImageType, exiv2.ImageType.jpeg) - self.assertIsInstance(image.io(), exiv2.MemIo) + self.assertIsInstance(image.io(), exiv2.BasicIo) self.check_result(image.mimeType(), str, 'image/jpeg') self.check_result(image.pixelHeight(), int, 200) self.check_result(image.pixelWidth(), int, 200) @@ -122,7 +122,7 @@ def test_ImageFactory(self): self.check_result( factory.checkMode(exiv2.ImageType.jpeg, exiv2.MetadataId.Exif), exiv2.AccessMode, exiv2.AccessMode.ReadWrite) - io = exiv2.MemIo(self.image_data) + io = factory.createIo(self.image_data) with self.assertWarns(DeprecationWarning): factory.checkType(int(exiv2.ImageType.jpeg), io, False) self.check_result( @@ -135,8 +135,8 @@ def test_ImageFactory(self): temp_file = os.path.join(tmp_dir, 'image.jpg') self.assertIsInstance( factory.create(exiv2.ImageType.jpeg, temp_file), exiv2.Image) - self.assertIsInstance(factory.createIo(self.image_path), exiv2.FileIo) - self.assertIsInstance(factory.createIo(self.image_data), exiv2.MemIo) + self.assertIsInstance(factory.createIo(self.image_path), exiv2.BasicIo) + self.assertIsInstance(factory.createIo(self.image_data), exiv2.BasicIo) self.check_result(factory.getType(self.image_path), exiv2.ImageType, exiv2.ImageType.jpeg) self.check_result(factory.getType(self.image_data), diff --git a/utils/build_swig.py b/utils/build_swig.py index a4fbbf8..84d08bc 100644 --- a/utils/build_swig.py +++ b/utils/build_swig.py @@ -71,27 +71,6 @@ def main(): return 3 # get exiv2 version exiv2_version = get_version(incl_dir) - # get exiv2 build options - options = { - 'EXV_ENABLE_WEBREADY': False, - 'EXV_USE_CURL': False, - } - with open(os.path.join(incl_dir, 'exv_conf.h')) as cnf: - for line in cnf.readlines(): - words = line.split() - for key in options: - if key not in line: - continue - if words[1] != key: - continue - if words[0] == '#define': - options[key] = True - elif words[0] == '#undef': - options[key] = False - for key in options: - if not options[key]: - print(f'WARNING: option {key} is not set.' - ' Some functionality will not be available to Python.') # get python-exiv2 version with open('README.rst') as rst: py_exiv2_version = rst.readline().split()[-1] @@ -153,9 +132,6 @@ def main(): '-fastdispatch', '-fastproxy', '-Wextra', '-Werror', '-DEXIV2_VERSION_HEX=' + exiv2_version_hex, '-I' + copy_dir, '-outdir', output_dir] - for key in options: - if options[key]: - swig_opts.append('-D' + key) # do each swig module for ext_name in ext_names: cmd = ['swig'] + swig_opts From bafcb950e72119fcb3d2aa9930e01d88ff80c1ee Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Tue, 20 Feb 2024 11:35:02 +0000 Subject: [PATCH 28/29] Improved docs relating to BasicIo --- USAGE.rst | 11 +++--- src/interface/basicio.i | 2 +- src/interface/image.i | 33 ++++++++++++++++++ src/swig-0_27_3/basicio_wrap.cxx | 2 +- src/swig-0_27_3/image_wrap.cxx | 60 +++++++++++++++++++++++++------- src/swig-0_27_7/basicio_wrap.cxx | 2 +- src/swig-0_27_7/image_wrap.cxx | 60 +++++++++++++++++++++++++------- src/swig-0_28_2/basicio_wrap.cxx | 2 +- src/swig-0_28_2/image_wrap.cxx | 60 +++++++++++++++++++++++++------- 9 files changed, 185 insertions(+), 47 deletions(-) diff --git a/USAGE.rst b/USAGE.rst index 56ae824..f1f5238 100644 --- a/USAGE.rst +++ b/USAGE.rst @@ -387,8 +387,8 @@ Doing so will invalidate the memoryview and may cause a segmentation fault: Buffer interface ---------------- -The ``Exiv2::DataBuf``, ``Exiv2::PreviewImage``, and ``Exiv2::MemIO`` classes are all wrappers around a potentially large block of memory. -They each have methods to access that memory without copying, such as ``Exiv2::DataBuf::data()`` and ``Exiv2::MemIo::mmap()`` but in Python these classes also expose a `buffer interface`_. This allows them to be used almost anywhere that a `bytes-like object`_ is expected. +The ``Exiv2::DataBuf``, ``Exiv2::PreviewImage``, and ``Exiv2::BasicIO`` classes are all wrappers around a potentially large block of memory. +They each have methods to access that memory without copying, such as ``Exiv2::DataBuf::data()`` and ``Exiv2::BasicIo::mmap()`` but in Python these classes also expose a `buffer interface`_. This allows them to be used almost anywhere that a `bytes-like object`_ is expected. For example, you could save a photograph's thumbnail in a separate file like this: @@ -406,8 +406,7 @@ In python-exiv2 the ``data`` and ``size`` parameters are replaced with a single The buffered data isn't actually read until ``Image::readMetadata`` is called, so python-exiv2 stores a reference to the buffer to stop the user accidentally deleting it. When ``Image::writeMetadata`` is called exiv2 allocates a new block of memory to store the modified data. -The ``Image::io`` method returns an `Exiv2::MemIo`_ object that provides access to this data. -(`Exiv2::MemIo`_ is derived from `Exiv2::BasicIo`_.) +The ``Image::io`` method returns an `Exiv2::BasicIo`_ object that provides access to this data. The ``BasicIo::mmap`` method allows access to the image file data without unnecessary copying. However it is rather error prone, crashing your Python program with a segmentation fault if anything goes wrong. @@ -453,7 +452,7 @@ Since python-exiv2 v0.15.0 this buffer can be writeable: data[23] = 157 # modifies data buffer image.readMetadata() # reads modified buffer data -The modified data is written back to the file (for ``Exiv2::FileIo``) or memory buffer (for `Exiv2::MemIo`_) when the memoryview_ is released. +The modified data is written back to the file or memory buffer when the memoryview_ is released. .. _bytearray: https://docs.python.org/3/library/stdtypes.html#bytearray @@ -483,8 +482,6 @@ The modified data is written back to the file (for ``Exiv2::FileIo``) or memory https://exiv2.org/doc/classExiv2_1_1Image.html .. _Exiv2::ImageFactory: https://exiv2.org/doc/classExiv2_1_1ImageFactory.html -.. _Exiv2::MemIo: - https://exiv2.org/doc/classExiv2_1_1MemIo.html .. _Exiv2::Metadatum: https://exiv2.org/doc/classExiv2_1_1Metadatum.html .. _Exiv2::TagInfo: diff --git a/src/interface/basicio.i b/src/interface/basicio.i index 13b1d0d..4c67660 100644 --- a/src/interface/basicio.i +++ b/src/interface/basicio.i @@ -70,7 +70,7 @@ WINDOWS_PATH_OUT(path) You shouldn't usually need to know the type of IO as they all have the same interface. :rtype: str -:return: A class name such as ""FileIo""." +:return: A class name such as \"FileIo\"." %extend Exiv2::BasicIo { const char* ioType() { if (dynamic_cast($self)) diff --git a/src/interface/image.i b/src/interface/image.i index 01c36c0..89ec08f 100644 --- a/src/interface/image.i +++ b/src/interface/image.i @@ -88,6 +88,39 @@ WINDOWS_PATH(const std::string& path) %ignore Exiv2::enableBMFF(); // Extend ImageFactory to allow creation of a MemIo from a buffer +%feature("docstring") Exiv2::ImageFactory::createIo " +*Overload 1:* + +Create the appropriate class type implemented BasicIo based on the +protocol of the input. + +\"-\" path implies the data from stdin and it is handled by StdinIo. +Http path can be handled by either HttpIo or CurlIo. Https, ftp paths +are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are +handled by FileIo. + +:type path: str +:param path: %Image file. +:type useCurl: bool, optional +:param useCurl: Indicate whether the libcurl is used or not. + If it's true, http is handled by CurlIo. Otherwise it is + handled by HttpIo. +:rtype: :py:class:`BasicIo` +:return: An auto-pointer that owns a BasicIo instance. +:raises: Error If the file is not found or it is unable to connect to + the server to read the remote file. + +| + +*Overload 2:* + +Create a MemIo subclass of BasicIo using the provided memory. + +:type data: :py:term:`bytes-like object` +:param data: A data buffer. +:rtype: :py:class:`BasicIo` +:return: A BasicIo object. +" %extend Exiv2::ImageFactory { static Exiv2::BasicIo::SMART_PTR createIo( const Exiv2::byte* data, size_t B) { diff --git a/src/swig-0_27_3/basicio_wrap.cxx b/src/swig-0_27_3/basicio_wrap.cxx index 2389990..2f378bd 100644 --- a/src/swig-0_27_3/basicio_wrap.cxx +++ b/src/swig-0_27_3/basicio_wrap.cxx @@ -5737,7 +5737,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { "You shouldn't usually need to know the type of IO as they all have\n" "the same interface.\n" ":rtype: str\n" - ":return: A class name such as FileIo.\n" + ":return: A class name such as \"FileIo\".\n" "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; diff --git a/src/swig-0_27_3/image_wrap.cxx b/src/swig-0_27_3/image_wrap.cxx index 432a225..74c2697 100644 --- a/src/swig-0_27_3/image_wrap.cxx +++ b/src/swig-0_27_3/image_wrap.cxx @@ -7525,21 +7525,39 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Image_clientdata = {0, 0, 0, 0 static SwigPyGetSet ImageFactory___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ImageFactory_getset[] = { { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"\n" - "Create the appropriate class type implemented BasicIo based on the protocol of the input.\n" + "\n" + "*Overload 1:*\n" + "\n" + "Create the appropriate class type implemented BasicIo based on the\n" + "protocol of the input.\n" "\n" "\"-\" path implies the data from stdin and it is handled by StdinIo.\n" "Http path can be handled by either HttpIo or CurlIo. Https, ftp paths\n" - "are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are handled by FileIo.\n" + "are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are\n" + "handled by FileIo.\n" "\n" ":type path: str\n" ":param path: %Image file.\n" ":type useCurl: bool, optional\n" ":param useCurl: Indicate whether the libcurl is used or not.\n" - " If it's true, http is handled by CurlIo. Otherwise it is handled by HttpIo.\n" + " If it's true, http is handled by CurlIo. Otherwise it is\n" + " handled by HttpIo.\n" ":rtype: :py:class:`BasicIo`\n" - ":return: An auto-pointer that owns an BasicIo instance.\n" - ":raises: Error If the file is not found or it is unable to connect to the server to\n" - " read the remote file.\n" + ":return: An auto-pointer that owns a BasicIo instance.\n" + ":raises: Error If the file is not found or it is unable to connect to\n" + " the server to read the remote file.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Create a MemIo subclass of BasicIo using the provided memory.\n" + "\n" + ":type data: :py:term:`bytes-like object`\n" + ":param data: A data buffer.\n" + ":rtype: :py:class:`BasicIo`\n" + ":return: A BasicIo object.\n" + "\n" "", &ImageFactory___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -7560,21 +7578,39 @@ SwigPyBuiltin__Exiv2__ImageFactory_richcompare(PyObject *self, PyObject *other, SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ImageFactory_methods[] = { { "createIo", (PyCFunction)(void(*)(void))_wrap_ImageFactory_createIo, METH_STATIC|METH_VARARGS, "\n" - "Create the appropriate class type implemented BasicIo based on the protocol of the input.\n" + "\n" + "*Overload 1:*\n" + "\n" + "Create the appropriate class type implemented BasicIo based on the\n" + "protocol of the input.\n" "\n" "\"-\" path implies the data from stdin and it is handled by StdinIo.\n" "Http path can be handled by either HttpIo or CurlIo. Https, ftp paths\n" - "are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are handled by FileIo.\n" + "are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are\n" + "handled by FileIo.\n" "\n" ":type path: str\n" ":param path: %Image file.\n" ":type useCurl: bool, optional\n" ":param useCurl: Indicate whether the libcurl is used or not.\n" - " If it's true, http is handled by CurlIo. Otherwise it is handled by HttpIo.\n" + " If it's true, http is handled by CurlIo. Otherwise it is\n" + " handled by HttpIo.\n" ":rtype: :py:class:`BasicIo`\n" - ":return: An auto-pointer that owns an BasicIo instance.\n" - ":raises: Error If the file is not found or it is unable to connect to the server to\n" - " read the remote file.\n" + ":return: An auto-pointer that owns a BasicIo instance.\n" + ":raises: Error If the file is not found or it is unable to connect to\n" + " the server to read the remote file.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Create a MemIo subclass of BasicIo using the provided memory.\n" + "\n" + ":type data: :py:term:`bytes-like object`\n" + ":param data: A data buffer.\n" + ":rtype: :py:class:`BasicIo`\n" + ":return: A BasicIo object.\n" + "\n" "" }, { "open", (PyCFunction)(void(*)(void))_wrap_ImageFactory_open, METH_STATIC|METH_VARARGS, "\n" "*Overload 1:*\n" diff --git a/src/swig-0_27_7/basicio_wrap.cxx b/src/swig-0_27_7/basicio_wrap.cxx index 2389990..2f378bd 100644 --- a/src/swig-0_27_7/basicio_wrap.cxx +++ b/src/swig-0_27_7/basicio_wrap.cxx @@ -5737,7 +5737,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { "You shouldn't usually need to know the type of IO as they all have\n" "the same interface.\n" ":rtype: str\n" - ":return: A class name such as FileIo.\n" + ":return: A class name such as \"FileIo\".\n" "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; diff --git a/src/swig-0_27_7/image_wrap.cxx b/src/swig-0_27_7/image_wrap.cxx index 432a225..74c2697 100644 --- a/src/swig-0_27_7/image_wrap.cxx +++ b/src/swig-0_27_7/image_wrap.cxx @@ -7525,21 +7525,39 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Image_clientdata = {0, 0, 0, 0 static SwigPyGetSet ImageFactory___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ImageFactory_getset[] = { { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"\n" - "Create the appropriate class type implemented BasicIo based on the protocol of the input.\n" + "\n" + "*Overload 1:*\n" + "\n" + "Create the appropriate class type implemented BasicIo based on the\n" + "protocol of the input.\n" "\n" "\"-\" path implies the data from stdin and it is handled by StdinIo.\n" "Http path can be handled by either HttpIo or CurlIo. Https, ftp paths\n" - "are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are handled by FileIo.\n" + "are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are\n" + "handled by FileIo.\n" "\n" ":type path: str\n" ":param path: %Image file.\n" ":type useCurl: bool, optional\n" ":param useCurl: Indicate whether the libcurl is used or not.\n" - " If it's true, http is handled by CurlIo. Otherwise it is handled by HttpIo.\n" + " If it's true, http is handled by CurlIo. Otherwise it is\n" + " handled by HttpIo.\n" ":rtype: :py:class:`BasicIo`\n" - ":return: An auto-pointer that owns an BasicIo instance.\n" - ":raises: Error If the file is not found or it is unable to connect to the server to\n" - " read the remote file.\n" + ":return: An auto-pointer that owns a BasicIo instance.\n" + ":raises: Error If the file is not found or it is unable to connect to\n" + " the server to read the remote file.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Create a MemIo subclass of BasicIo using the provided memory.\n" + "\n" + ":type data: :py:term:`bytes-like object`\n" + ":param data: A data buffer.\n" + ":rtype: :py:class:`BasicIo`\n" + ":return: A BasicIo object.\n" + "\n" "", &ImageFactory___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -7560,21 +7578,39 @@ SwigPyBuiltin__Exiv2__ImageFactory_richcompare(PyObject *self, PyObject *other, SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ImageFactory_methods[] = { { "createIo", (PyCFunction)(void(*)(void))_wrap_ImageFactory_createIo, METH_STATIC|METH_VARARGS, "\n" - "Create the appropriate class type implemented BasicIo based on the protocol of the input.\n" + "\n" + "*Overload 1:*\n" + "\n" + "Create the appropriate class type implemented BasicIo based on the\n" + "protocol of the input.\n" "\n" "\"-\" path implies the data from stdin and it is handled by StdinIo.\n" "Http path can be handled by either HttpIo or CurlIo. Https, ftp paths\n" - "are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are handled by FileIo.\n" + "are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are\n" + "handled by FileIo.\n" "\n" ":type path: str\n" ":param path: %Image file.\n" ":type useCurl: bool, optional\n" ":param useCurl: Indicate whether the libcurl is used or not.\n" - " If it's true, http is handled by CurlIo. Otherwise it is handled by HttpIo.\n" + " If it's true, http is handled by CurlIo. Otherwise it is\n" + " handled by HttpIo.\n" ":rtype: :py:class:`BasicIo`\n" - ":return: An auto-pointer that owns an BasicIo instance.\n" - ":raises: Error If the file is not found or it is unable to connect to the server to\n" - " read the remote file.\n" + ":return: An auto-pointer that owns a BasicIo instance.\n" + ":raises: Error If the file is not found or it is unable to connect to\n" + " the server to read the remote file.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Create a MemIo subclass of BasicIo using the provided memory.\n" + "\n" + ":type data: :py:term:`bytes-like object`\n" + ":param data: A data buffer.\n" + ":rtype: :py:class:`BasicIo`\n" + ":return: A BasicIo object.\n" + "\n" "" }, { "open", (PyCFunction)(void(*)(void))_wrap_ImageFactory_open, METH_STATIC|METH_VARARGS, "\n" "*Overload 1:*\n" diff --git a/src/swig-0_28_2/basicio_wrap.cxx b/src/swig-0_28_2/basicio_wrap.cxx index 86fede7..1633e07 100644 --- a/src/swig-0_28_2/basicio_wrap.cxx +++ b/src/swig-0_28_2/basicio_wrap.cxx @@ -6027,7 +6027,7 @@ SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__BasicIo_methods[] = { "You shouldn't usually need to know the type of IO as they all have\n" "the same interface.\n" ":rtype: str\n" - ":return: A class name such as FileIo.\n" + ":return: A class name such as \"FileIo\".\n" "" }, { NULL, NULL, 0, NULL } /* Sentinel */ }; diff --git a/src/swig-0_28_2/image_wrap.cxx b/src/swig-0_28_2/image_wrap.cxx index f0ad6ef..795c218 100644 --- a/src/swig-0_28_2/image_wrap.cxx +++ b/src/swig-0_28_2/image_wrap.cxx @@ -7538,21 +7538,39 @@ SWIGINTERN SwigPyClientData SwigPyBuiltin__Exiv2__Image_clientdata = {0, 0, 0, 0 static SwigPyGetSet ImageFactory___dict___getset = { SwigPyObject_get___dict__, 0 }; SWIGINTERN PyGetSetDef SwigPyBuiltin__Exiv2__ImageFactory_getset[] = { { (char *)"__dict__", SwigPyBuiltin_FunpackGetterClosure, 0, (char *)"\n" - "Create the appropriate class type implemented BasicIo based on the protocol of the input.\n" + "\n" + "*Overload 1:*\n" + "\n" + "Create the appropriate class type implemented BasicIo based on the\n" + "protocol of the input.\n" "\n" "\"-\" path implies the data from stdin and it is handled by StdinIo.\n" "Http path can be handled by either HttpIo or CurlIo. Https, ftp paths\n" - "are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are handled by FileIo.\n" + "are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are\n" + "handled by FileIo.\n" "\n" ":type path: str\n" ":param path: %Image file.\n" ":type useCurl: bool, optional\n" ":param useCurl: Indicate whether the libcurl is used or not.\n" - " If it's true, http is handled by CurlIo. Otherwise it is handled by HttpIo.\n" + " If it's true, http is handled by CurlIo. Otherwise it is\n" + " handled by HttpIo.\n" ":rtype: :py:class:`BasicIo`\n" - ":return: An auto-pointer that owns an BasicIo instance.\n" - ":raises: Error If the file is not found or it is unable to connect to the server to\n" - " read the remote file.\n" + ":return: An auto-pointer that owns a BasicIo instance.\n" + ":raises: Error If the file is not found or it is unable to connect to\n" + " the server to read the remote file.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Create a MemIo subclass of BasicIo using the provided memory.\n" + "\n" + ":type data: :py:term:`bytes-like object`\n" + ":param data: A data buffer.\n" + ":rtype: :py:class:`BasicIo`\n" + ":return: A BasicIo object.\n" + "\n" "", &ImageFactory___dict___getset }, { NULL, NULL, NULL, NULL, NULL } /* Sentinel */ }; @@ -7573,21 +7591,39 @@ SwigPyBuiltin__Exiv2__ImageFactory_richcompare(PyObject *self, PyObject *other, SWIGINTERN PyMethodDef SwigPyBuiltin__Exiv2__ImageFactory_methods[] = { { "createIo", (PyCFunction)(void(*)(void))_wrap_ImageFactory_createIo, METH_STATIC|METH_VARARGS, "\n" - "Create the appropriate class type implemented BasicIo based on the protocol of the input.\n" + "\n" + "*Overload 1:*\n" + "\n" + "Create the appropriate class type implemented BasicIo based on the\n" + "protocol of the input.\n" "\n" "\"-\" path implies the data from stdin and it is handled by StdinIo.\n" "Http path can be handled by either HttpIo or CurlIo. Https, ftp paths\n" - "are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are handled by FileIo.\n" + "are handled by CurlIo. Ssh, sftp paths are handled by SshIo. Others are\n" + "handled by FileIo.\n" "\n" ":type path: str\n" ":param path: %Image file.\n" ":type useCurl: bool, optional\n" ":param useCurl: Indicate whether the libcurl is used or not.\n" - " If it's true, http is handled by CurlIo. Otherwise it is handled by HttpIo.\n" + " If it's true, http is handled by CurlIo. Otherwise it is\n" + " handled by HttpIo.\n" ":rtype: :py:class:`BasicIo`\n" - ":return: An auto-pointer that owns an BasicIo instance.\n" - ":raises: Error If the file is not found or it is unable to connect to the server to\n" - " read the remote file.\n" + ":return: An auto-pointer that owns a BasicIo instance.\n" + ":raises: Error If the file is not found or it is unable to connect to\n" + " the server to read the remote file.\n" + "\n" + "|\n" + "\n" + "*Overload 2:*\n" + "\n" + "Create a MemIo subclass of BasicIo using the provided memory.\n" + "\n" + ":type data: :py:term:`bytes-like object`\n" + ":param data: A data buffer.\n" + ":rtype: :py:class:`BasicIo`\n" + ":return: A BasicIo object.\n" + "\n" "" }, { "open", (PyCFunction)(void(*)(void))_wrap_ImageFactory_open, METH_STATIC|METH_VARARGS, "\n" "*Overload 1:*\n" From cd7e0e2d11aaa35a6897c4b758261970dfefe103 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Tue, 20 Feb 2024 16:51:09 +0000 Subject: [PATCH 29/29] Replace Py_ssize_t with long for array value index --- src/interface/value.i | 21 ++- src/swig-0_27_3/value_wrap.cxx | 250 +++++++++++++++++---------------- src/swig-0_27_7/value_wrap.cxx | 250 +++++++++++++++++---------------- src/swig-0_28_2/value_wrap.cxx | 250 +++++++++++++++++---------------- tests/test_value.py | 3 + 5 files changed, 396 insertions(+), 378 deletions(-) diff --git a/src/interface/value.i b/src/interface/value.i index 66ff16b..f4a0afb 100644 --- a/src/interface/value.i +++ b/src/interface/value.i @@ -60,9 +60,6 @@ UNIQUE_PTR(Exiv2::Value); %noexception Exiv2::XmpValue::xmpStruct; // ---- Typemaps ---- -// SWIG doesn't have typemaps for Py_ssize_t -%apply long {Py_ssize_t}; - // Convert std::ostream inputs and outputs %typemap(in) std::ostream& os (PyObject* _global_io, std::ostringstream temp) { $1 = &temp; @@ -79,8 +76,8 @@ UNIQUE_PTR(Exiv2::Value); } // for indexing multi-value values, assumes arg1 points to self -%typemap(check) Py_ssize_t i %{ - if ($1 < 0 || $1 >= static_cast< Py_ssize_t >(arg1->count())) { +%typemap(check) long idx %{ + if ($1 < 0 || $1 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", $1); SWIG_fail; } @@ -355,14 +352,14 @@ VALUE_SUBCLASS(Exiv2::ValueType, type_name) result->value_ = value; return result; } - item_type __getitem__(Py_ssize_t i) { - return $self->value_[i]; + item_type __getitem__(long idx) { + return $self->value_[idx]; } - void __setitem__(Py_ssize_t i, const item_type* INPUT) { + void __setitem__(long idx, const item_type* INPUT) { if (INPUT) - $self->value_[i] = *INPUT; + $self->value_[idx] = *INPUT; else - $self->value_.erase($self->value_.begin() + i); + $self->value_.erase($self->value_.begin() + idx); } void append(item_type value) { $self->value_.push_back(value); @@ -574,8 +571,8 @@ RAW_STRING_DATA(Exiv2::XmpTextValue) XmpArrayValue(Exiv2::TypeId typeId_xmpBag) { return new Exiv2::XmpArrayValue(typeId_xmpBag); } - std::string __getitem__(long i) { - return $self->toString(i); + std::string __getitem__(long idx) { + return $self->toString(idx); } void append(std::string value) { $self->read(value); diff --git a/src/swig-0_27_3/value_wrap.cxx b/src/swig-0_27_3/value_wrap.cxx index 6cd47c7..c8629fe 100644 --- a/src/swig-0_27_3/value_wrap.cxx +++ b/src/swig-0_27_3/value_wrap.cxx @@ -6450,8 +6450,8 @@ SWIGINTERN Exiv2::XmpArrayValue *new_Exiv2_XmpArrayValue__SWIG_1(std::vector< st SWIGINTERN Exiv2::XmpArrayValue *new_Exiv2_XmpArrayValue__SWIG_2(Exiv2::TypeId typeId_xmpBag){ return new Exiv2::XmpArrayValue(typeId_xmpBag); } -SWIGINTERN std::string Exiv2_XmpArrayValue___getitem__(Exiv2::XmpArrayValue *self,long i){ - return self->toString(i); +SWIGINTERN std::string Exiv2_XmpArrayValue___getitem__(Exiv2::XmpArrayValue *self,long idx){ + return self->toString(idx); } SWIGINTERN void Exiv2_XmpArrayValue_append(Exiv2::XmpArrayValue *self,std::string value){ self->read(value); @@ -7016,14 +7016,14 @@ SWIGINTERN Exiv2::ValueType< uint16_t > *new_Exiv2_ValueType_Sl_uint16_t_Sg___SW result->value_ = value; return result; } -SWIGINTERN uint16_t Exiv2_ValueType_Sl_uint16_t_Sg____getitem__(Exiv2::ValueType< uint16_t > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN uint16_t Exiv2_ValueType_Sl_uint16_t_Sg____getitem__(Exiv2::ValueType< uint16_t > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_uint16_t_Sg____setitem__(Exiv2::ValueType< uint16_t > *self,Py_ssize_t i,uint16_t const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_uint16_t_Sg____setitem__(Exiv2::ValueType< uint16_t > *self,long idx,uint16_t const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_uint16_t_Sg__append(Exiv2::ValueType< uint16_t > *self,uint16_t value){ self->value_.push_back(value); @@ -7105,14 +7105,14 @@ SWIGINTERN Exiv2::ValueType< uint32_t > *new_Exiv2_ValueType_Sl_uint32_t_Sg___SW result->value_ = value; return result; } -SWIGINTERN uint32_t Exiv2_ValueType_Sl_uint32_t_Sg____getitem__(Exiv2::ValueType< uint32_t > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN uint32_t Exiv2_ValueType_Sl_uint32_t_Sg____getitem__(Exiv2::ValueType< uint32_t > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_uint32_t_Sg____setitem__(Exiv2::ValueType< uint32_t > *self,Py_ssize_t i,uint32_t const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_uint32_t_Sg____setitem__(Exiv2::ValueType< uint32_t > *self,long idx,uint32_t const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_uint32_t_Sg__append(Exiv2::ValueType< uint32_t > *self,uint32_t value){ self->value_.push_back(value); @@ -7161,14 +7161,14 @@ SWIGINTERN Exiv2::ValueType< Exiv2::URational > *new_Exiv2_ValueType_Sl_Exiv2_UR result->value_ = value; return result; } -SWIGINTERN Exiv2::URational Exiv2_ValueType_Sl_Exiv2_URational_Sg____getitem__(Exiv2::ValueType< Exiv2::URational > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN Exiv2::URational Exiv2_ValueType_Sl_Exiv2_URational_Sg____getitem__(Exiv2::ValueType< Exiv2::URational > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_URational_Sg____setitem__(Exiv2::ValueType< Exiv2::URational > *self,Py_ssize_t i,Exiv2::URational const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_URational_Sg____setitem__(Exiv2::ValueType< Exiv2::URational > *self,long idx,Exiv2::URational const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_URational_Sg__append(Exiv2::ValueType< Exiv2::URational > *self,Exiv2::URational value){ self->value_.push_back(value); @@ -7250,14 +7250,14 @@ SWIGINTERN Exiv2::ValueType< int16_t > *new_Exiv2_ValueType_Sl_int16_t_Sg___SWIG result->value_ = value; return result; } -SWIGINTERN int16_t Exiv2_ValueType_Sl_int16_t_Sg____getitem__(Exiv2::ValueType< int16_t > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN int16_t Exiv2_ValueType_Sl_int16_t_Sg____getitem__(Exiv2::ValueType< int16_t > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_int16_t_Sg____setitem__(Exiv2::ValueType< int16_t > *self,Py_ssize_t i,int16_t const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_int16_t_Sg____setitem__(Exiv2::ValueType< int16_t > *self,long idx,int16_t const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_int16_t_Sg__append(Exiv2::ValueType< int16_t > *self,int16_t value){ self->value_.push_back(value); @@ -7296,14 +7296,14 @@ SWIGINTERN Exiv2::ValueType< int32_t > *new_Exiv2_ValueType_Sl_int32_t_Sg___SWIG result->value_ = value; return result; } -SWIGINTERN int32_t Exiv2_ValueType_Sl_int32_t_Sg____getitem__(Exiv2::ValueType< int32_t > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN int32_t Exiv2_ValueType_Sl_int32_t_Sg____getitem__(Exiv2::ValueType< int32_t > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_int32_t_Sg____setitem__(Exiv2::ValueType< int32_t > *self,Py_ssize_t i,int32_t const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_int32_t_Sg____setitem__(Exiv2::ValueType< int32_t > *self,long idx,int32_t const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_int32_t_Sg__append(Exiv2::ValueType< int32_t > *self,int32_t value){ self->value_.push_back(value); @@ -7342,14 +7342,14 @@ SWIGINTERN Exiv2::ValueType< Exiv2::Rational > *new_Exiv2_ValueType_Sl_Exiv2_Rat result->value_ = value; return result; } -SWIGINTERN Exiv2::Rational Exiv2_ValueType_Sl_Exiv2_Rational_Sg____getitem__(Exiv2::ValueType< Exiv2::Rational > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN Exiv2::Rational Exiv2_ValueType_Sl_Exiv2_Rational_Sg____getitem__(Exiv2::ValueType< Exiv2::Rational > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_Rational_Sg____setitem__(Exiv2::ValueType< Exiv2::Rational > *self,Py_ssize_t i,Exiv2::Rational const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_Rational_Sg____setitem__(Exiv2::ValueType< Exiv2::Rational > *self,long idx,Exiv2::Rational const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_Rational_Sg__append(Exiv2::ValueType< Exiv2::Rational > *self,Exiv2::Rational value){ self->value_.push_back(value); @@ -7464,14 +7464,14 @@ SWIGINTERN Exiv2::ValueType< float > *new_Exiv2_ValueType_Sl_float_Sg___SWIG_5(E result->value_ = value; return result; } -SWIGINTERN float Exiv2_ValueType_Sl_float_Sg____getitem__(Exiv2::ValueType< float > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN float Exiv2_ValueType_Sl_float_Sg____getitem__(Exiv2::ValueType< float > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_float_Sg____setitem__(Exiv2::ValueType< float > *self,Py_ssize_t i,float const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_float_Sg____setitem__(Exiv2::ValueType< float > *self,long idx,float const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_float_Sg__append(Exiv2::ValueType< float > *self,float value){ self->value_.push_back(value); @@ -7530,14 +7530,14 @@ SWIGINTERN Exiv2::ValueType< double > *new_Exiv2_ValueType_Sl_double_Sg___SWIG_5 result->value_ = value; return result; } -SWIGINTERN double Exiv2_ValueType_Sl_double_Sg____getitem__(Exiv2::ValueType< double > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN double Exiv2_ValueType_Sl_double_Sg____getitem__(Exiv2::ValueType< double > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_double_Sg____setitem__(Exiv2::ValueType< double > *self,Py_ssize_t i,double const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_double_Sg____setitem__(Exiv2::ValueType< double > *self,long idx,double const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_double_Sg__append(Exiv2::ValueType< double > *self,double value){ self->value_.push_back(value); @@ -12706,6 +12706,12 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue___getitem__(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XmpArrayValue___getitem__" "', argument " "2"" of type '" "long""'"); } arg2 = static_cast< long >(val2); + + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { + PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); + SWIG_fail; + } + result = Exiv2_XmpArrayValue___getitem__(arg1,arg2); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; @@ -17578,7 +17584,7 @@ SWIGINTERN int _wrap_new_UShortValue(PyObject *self, PyObject *args, PyObject *k SWIGINTERN PyObject *_wrap_UShortValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint16_t > *arg1 = (Exiv2::ValueType< uint16_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -17594,16 +17600,16 @@ SWIGINTERN PyObject *_wrap_UShortValue___getitem__(PyObject *self, PyObject *arg arg1 = reinterpret_cast< Exiv2::ValueType< uint16_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UShortValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UShortValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (uint16_t)Exiv2_ValueType_Sl_uint16_t_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (uint16_t)Exiv2_ValueType_Sl_uint16_t_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: @@ -17614,7 +17620,7 @@ SWIGINTERN PyObject *_wrap_UShortValue___getitem__(PyObject *self, PyObject *arg SWIGINTERN PyObject *_wrap_UShortValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint16_t > *arg1 = (Exiv2::ValueType< uint16_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; uint16_t *arg3 = (uint16_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -17636,9 +17642,9 @@ SWIGINTERN PyObject *_wrap_UShortValue___setitem__(PyObject *self, PyObject *arg arg1 = reinterpret_cast< Exiv2::ValueType< uint16_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UShortValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UShortValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_unsigned_short,0))))) { unsigned short val; @@ -17652,12 +17658,12 @@ SWIGINTERN PyObject *_wrap_UShortValue___setitem__(PyObject *self, PyObject *arg } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_uint16_t_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(unsigned short const *)arg3); + Exiv2_ValueType_Sl_uint16_t_Sg____setitem__(arg1,arg2,(unsigned short const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -18713,7 +18719,7 @@ SWIGINTERN int _wrap_new_ULongValue(PyObject *self, PyObject *args, PyObject *kw SWIGINTERN PyObject *_wrap_ULongValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint32_t > *arg1 = (Exiv2::ValueType< uint32_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -18729,16 +18735,16 @@ SWIGINTERN PyObject *_wrap_ULongValue___getitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< uint32_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ULongValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ULongValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (uint32_t)Exiv2_ValueType_Sl_uint32_t_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (uint32_t)Exiv2_ValueType_Sl_uint32_t_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: @@ -18749,7 +18755,7 @@ SWIGINTERN PyObject *_wrap_ULongValue___getitem__(PyObject *self, PyObject *args SWIGINTERN PyObject *_wrap_ULongValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint32_t > *arg1 = (Exiv2::ValueType< uint32_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; uint32_t *arg3 = (uint32_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -18771,9 +18777,9 @@ SWIGINTERN PyObject *_wrap_ULongValue___setitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< uint32_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ULongValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ULongValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_unsigned_int,0))))) { unsigned int val; @@ -18787,12 +18793,12 @@ SWIGINTERN PyObject *_wrap_ULongValue___setitem__(PyObject *self, PyObject *args } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_uint32_t_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(unsigned int const *)arg3); + Exiv2_ValueType_Sl_uint32_t_Sg____setitem__(arg1,arg2,(unsigned int const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -19851,7 +19857,7 @@ SWIGINTERN int _wrap_new_URationalValue(PyObject *self, PyObject *args, PyObject SWIGINTERN PyObject *_wrap_URationalValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::URational > *arg1 = (Exiv2::ValueType< Exiv2::URational > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -19867,16 +19873,16 @@ SWIGINTERN PyObject *_wrap_URationalValue___getitem__(PyObject *self, PyObject * arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::URational > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "URationalValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "URationalValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = Exiv2_ValueType_Sl_Exiv2_URational_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = Exiv2_ValueType_Sl_Exiv2_URational_Sg____getitem__(arg1,arg2); resultobj = swig::from(static_cast< std::pair< unsigned int,unsigned int > >(result)); return resultobj; fail: @@ -19887,7 +19893,7 @@ SWIGINTERN PyObject *_wrap_URationalValue___getitem__(PyObject *self, PyObject * SWIGINTERN PyObject *_wrap_URationalValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::URational > *arg1 = (Exiv2::ValueType< Exiv2::URational > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; Exiv2::URational *arg3 = (Exiv2::URational *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -19908,9 +19914,9 @@ SWIGINTERN PyObject *_wrap_URationalValue___setitem__(PyObject *self, PyObject * arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::URational > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "URationalValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "URationalValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { res3 = swig::asptr(obj2, &arg3); if (!SWIG_IsOK(res3)) { @@ -19919,12 +19925,12 @@ SWIGINTERN PyObject *_wrap_URationalValue___setitem__(PyObject *self, PyObject * res3 = SWIG_AddTmpMask(res3); } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_Exiv2_URational_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(std::pair< unsigned int,unsigned int > const *)arg3); + Exiv2_ValueType_Sl_Exiv2_URational_Sg____setitem__(arg1,arg2,(std::pair< unsigned int,unsigned int > const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -20982,7 +20988,7 @@ SWIGINTERN int _wrap_new_ShortValue(PyObject *self, PyObject *args, PyObject *kw SWIGINTERN PyObject *_wrap_ShortValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int16_t > *arg1 = (Exiv2::ValueType< int16_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -20998,16 +21004,16 @@ SWIGINTERN PyObject *_wrap_ShortValue___getitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< int16_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShortValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShortValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (int16_t)Exiv2_ValueType_Sl_int16_t_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (int16_t)Exiv2_ValueType_Sl_int16_t_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: @@ -21018,7 +21024,7 @@ SWIGINTERN PyObject *_wrap_ShortValue___getitem__(PyObject *self, PyObject *args SWIGINTERN PyObject *_wrap_ShortValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int16_t > *arg1 = (Exiv2::ValueType< int16_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; int16_t *arg3 = (int16_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -21040,9 +21046,9 @@ SWIGINTERN PyObject *_wrap_ShortValue___setitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< int16_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShortValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShortValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_short,0))))) { short val; @@ -21056,12 +21062,12 @@ SWIGINTERN PyObject *_wrap_ShortValue___setitem__(PyObject *self, PyObject *args } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_int16_t_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(short const *)arg3); + Exiv2_ValueType_Sl_int16_t_Sg____setitem__(arg1,arg2,(short const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -22117,7 +22123,7 @@ SWIGINTERN int _wrap_new_LongValue(PyObject *self, PyObject *args, PyObject *kwa SWIGINTERN PyObject *_wrap_LongValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int32_t > *arg1 = (Exiv2::ValueType< int32_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -22133,16 +22139,16 @@ SWIGINTERN PyObject *_wrap_LongValue___getitem__(PyObject *self, PyObject *args) arg1 = reinterpret_cast< Exiv2::ValueType< int32_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (int32_t)Exiv2_ValueType_Sl_int32_t_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (int32_t)Exiv2_ValueType_Sl_int32_t_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -22153,7 +22159,7 @@ SWIGINTERN PyObject *_wrap_LongValue___getitem__(PyObject *self, PyObject *args) SWIGINTERN PyObject *_wrap_LongValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int32_t > *arg1 = (Exiv2::ValueType< int32_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; int32_t *arg3 = (int32_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -22175,9 +22181,9 @@ SWIGINTERN PyObject *_wrap_LongValue___setitem__(PyObject *self, PyObject *args) arg1 = reinterpret_cast< Exiv2::ValueType< int32_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_int,0))))) { int val; @@ -22191,12 +22197,12 @@ SWIGINTERN PyObject *_wrap_LongValue___setitem__(PyObject *self, PyObject *args) } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_int32_t_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(int const *)arg3); + Exiv2_ValueType_Sl_int32_t_Sg____setitem__(arg1,arg2,(int const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -23255,7 +23261,7 @@ SWIGINTERN int _wrap_new_RationalValue(PyObject *self, PyObject *args, PyObject SWIGINTERN PyObject *_wrap_RationalValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::Rational > *arg1 = (Exiv2::ValueType< Exiv2::Rational > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -23271,16 +23277,16 @@ SWIGINTERN PyObject *_wrap_RationalValue___getitem__(PyObject *self, PyObject *a arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::Rational > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RationalValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RationalValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = Exiv2_ValueType_Sl_Exiv2_Rational_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = Exiv2_ValueType_Sl_Exiv2_Rational_Sg____getitem__(arg1,arg2); resultobj = swig::from(static_cast< std::pair< int,int > >(result)); return resultobj; fail: @@ -23291,7 +23297,7 @@ SWIGINTERN PyObject *_wrap_RationalValue___getitem__(PyObject *self, PyObject *a SWIGINTERN PyObject *_wrap_RationalValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::Rational > *arg1 = (Exiv2::ValueType< Exiv2::Rational > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; Exiv2::Rational *arg3 = (Exiv2::Rational *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -23312,9 +23318,9 @@ SWIGINTERN PyObject *_wrap_RationalValue___setitem__(PyObject *self, PyObject *a arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::Rational > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RationalValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RationalValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { res3 = swig::asptr(obj2, &arg3); if (!SWIG_IsOK(res3)) { @@ -23323,12 +23329,12 @@ SWIGINTERN PyObject *_wrap_RationalValue___setitem__(PyObject *self, PyObject *a res3 = SWIG_AddTmpMask(res3); } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_Exiv2_Rational_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(std::pair< int,int > const *)arg3); + Exiv2_ValueType_Sl_Exiv2_Rational_Sg____setitem__(arg1,arg2,(std::pair< int,int > const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -24386,7 +24392,7 @@ SWIGINTERN int _wrap_new_FloatValue(PyObject *self, PyObject *args, PyObject *kw SWIGINTERN PyObject *_wrap_FloatValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< float > *arg1 = (Exiv2::ValueType< float > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -24402,16 +24408,16 @@ SWIGINTERN PyObject *_wrap_FloatValue___getitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< float > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (float)Exiv2_ValueType_Sl_float_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (float)Exiv2_ValueType_Sl_float_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_float(static_cast< float >(result)); return resultobj; fail: @@ -24422,7 +24428,7 @@ SWIGINTERN PyObject *_wrap_FloatValue___getitem__(PyObject *self, PyObject *args SWIGINTERN PyObject *_wrap_FloatValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< float > *arg1 = (Exiv2::ValueType< float > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; float *arg3 = (float *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -24444,9 +24450,9 @@ SWIGINTERN PyObject *_wrap_FloatValue___setitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< float > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_float,0))))) { float val; @@ -24460,12 +24466,12 @@ SWIGINTERN PyObject *_wrap_FloatValue___setitem__(PyObject *self, PyObject *args } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_float_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(float const *)arg3); + Exiv2_ValueType_Sl_float_Sg____setitem__(arg1,arg2,(float const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -25521,7 +25527,7 @@ SWIGINTERN int _wrap_new_DoubleValue(PyObject *self, PyObject *args, PyObject *k SWIGINTERN PyObject *_wrap_DoubleValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< double > *arg1 = (Exiv2::ValueType< double > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -25537,16 +25543,16 @@ SWIGINTERN PyObject *_wrap_DoubleValue___getitem__(PyObject *self, PyObject *arg arg1 = reinterpret_cast< Exiv2::ValueType< double > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (double)Exiv2_ValueType_Sl_double_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (double)Exiv2_ValueType_Sl_double_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25557,7 +25563,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue___getitem__(PyObject *self, PyObject *arg SWIGINTERN PyObject *_wrap_DoubleValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< double > *arg1 = (Exiv2::ValueType< double > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; double *arg3 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -25579,9 +25585,9 @@ SWIGINTERN PyObject *_wrap_DoubleValue___setitem__(PyObject *self, PyObject *arg arg1 = reinterpret_cast< Exiv2::ValueType< double > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_double,0))))) { double val; @@ -25595,12 +25601,12 @@ SWIGINTERN PyObject *_wrap_DoubleValue___setitem__(PyObject *self, PyObject *arg } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_double_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(double const *)arg3); + Exiv2_ValueType_Sl_double_Sg____setitem__(arg1,arg2,(double const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; diff --git a/src/swig-0_27_7/value_wrap.cxx b/src/swig-0_27_7/value_wrap.cxx index 6cd47c7..c8629fe 100644 --- a/src/swig-0_27_7/value_wrap.cxx +++ b/src/swig-0_27_7/value_wrap.cxx @@ -6450,8 +6450,8 @@ SWIGINTERN Exiv2::XmpArrayValue *new_Exiv2_XmpArrayValue__SWIG_1(std::vector< st SWIGINTERN Exiv2::XmpArrayValue *new_Exiv2_XmpArrayValue__SWIG_2(Exiv2::TypeId typeId_xmpBag){ return new Exiv2::XmpArrayValue(typeId_xmpBag); } -SWIGINTERN std::string Exiv2_XmpArrayValue___getitem__(Exiv2::XmpArrayValue *self,long i){ - return self->toString(i); +SWIGINTERN std::string Exiv2_XmpArrayValue___getitem__(Exiv2::XmpArrayValue *self,long idx){ + return self->toString(idx); } SWIGINTERN void Exiv2_XmpArrayValue_append(Exiv2::XmpArrayValue *self,std::string value){ self->read(value); @@ -7016,14 +7016,14 @@ SWIGINTERN Exiv2::ValueType< uint16_t > *new_Exiv2_ValueType_Sl_uint16_t_Sg___SW result->value_ = value; return result; } -SWIGINTERN uint16_t Exiv2_ValueType_Sl_uint16_t_Sg____getitem__(Exiv2::ValueType< uint16_t > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN uint16_t Exiv2_ValueType_Sl_uint16_t_Sg____getitem__(Exiv2::ValueType< uint16_t > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_uint16_t_Sg____setitem__(Exiv2::ValueType< uint16_t > *self,Py_ssize_t i,uint16_t const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_uint16_t_Sg____setitem__(Exiv2::ValueType< uint16_t > *self,long idx,uint16_t const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_uint16_t_Sg__append(Exiv2::ValueType< uint16_t > *self,uint16_t value){ self->value_.push_back(value); @@ -7105,14 +7105,14 @@ SWIGINTERN Exiv2::ValueType< uint32_t > *new_Exiv2_ValueType_Sl_uint32_t_Sg___SW result->value_ = value; return result; } -SWIGINTERN uint32_t Exiv2_ValueType_Sl_uint32_t_Sg____getitem__(Exiv2::ValueType< uint32_t > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN uint32_t Exiv2_ValueType_Sl_uint32_t_Sg____getitem__(Exiv2::ValueType< uint32_t > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_uint32_t_Sg____setitem__(Exiv2::ValueType< uint32_t > *self,Py_ssize_t i,uint32_t const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_uint32_t_Sg____setitem__(Exiv2::ValueType< uint32_t > *self,long idx,uint32_t const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_uint32_t_Sg__append(Exiv2::ValueType< uint32_t > *self,uint32_t value){ self->value_.push_back(value); @@ -7161,14 +7161,14 @@ SWIGINTERN Exiv2::ValueType< Exiv2::URational > *new_Exiv2_ValueType_Sl_Exiv2_UR result->value_ = value; return result; } -SWIGINTERN Exiv2::URational Exiv2_ValueType_Sl_Exiv2_URational_Sg____getitem__(Exiv2::ValueType< Exiv2::URational > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN Exiv2::URational Exiv2_ValueType_Sl_Exiv2_URational_Sg____getitem__(Exiv2::ValueType< Exiv2::URational > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_URational_Sg____setitem__(Exiv2::ValueType< Exiv2::URational > *self,Py_ssize_t i,Exiv2::URational const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_URational_Sg____setitem__(Exiv2::ValueType< Exiv2::URational > *self,long idx,Exiv2::URational const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_URational_Sg__append(Exiv2::ValueType< Exiv2::URational > *self,Exiv2::URational value){ self->value_.push_back(value); @@ -7250,14 +7250,14 @@ SWIGINTERN Exiv2::ValueType< int16_t > *new_Exiv2_ValueType_Sl_int16_t_Sg___SWIG result->value_ = value; return result; } -SWIGINTERN int16_t Exiv2_ValueType_Sl_int16_t_Sg____getitem__(Exiv2::ValueType< int16_t > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN int16_t Exiv2_ValueType_Sl_int16_t_Sg____getitem__(Exiv2::ValueType< int16_t > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_int16_t_Sg____setitem__(Exiv2::ValueType< int16_t > *self,Py_ssize_t i,int16_t const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_int16_t_Sg____setitem__(Exiv2::ValueType< int16_t > *self,long idx,int16_t const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_int16_t_Sg__append(Exiv2::ValueType< int16_t > *self,int16_t value){ self->value_.push_back(value); @@ -7296,14 +7296,14 @@ SWIGINTERN Exiv2::ValueType< int32_t > *new_Exiv2_ValueType_Sl_int32_t_Sg___SWIG result->value_ = value; return result; } -SWIGINTERN int32_t Exiv2_ValueType_Sl_int32_t_Sg____getitem__(Exiv2::ValueType< int32_t > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN int32_t Exiv2_ValueType_Sl_int32_t_Sg____getitem__(Exiv2::ValueType< int32_t > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_int32_t_Sg____setitem__(Exiv2::ValueType< int32_t > *self,Py_ssize_t i,int32_t const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_int32_t_Sg____setitem__(Exiv2::ValueType< int32_t > *self,long idx,int32_t const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_int32_t_Sg__append(Exiv2::ValueType< int32_t > *self,int32_t value){ self->value_.push_back(value); @@ -7342,14 +7342,14 @@ SWIGINTERN Exiv2::ValueType< Exiv2::Rational > *new_Exiv2_ValueType_Sl_Exiv2_Rat result->value_ = value; return result; } -SWIGINTERN Exiv2::Rational Exiv2_ValueType_Sl_Exiv2_Rational_Sg____getitem__(Exiv2::ValueType< Exiv2::Rational > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN Exiv2::Rational Exiv2_ValueType_Sl_Exiv2_Rational_Sg____getitem__(Exiv2::ValueType< Exiv2::Rational > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_Rational_Sg____setitem__(Exiv2::ValueType< Exiv2::Rational > *self,Py_ssize_t i,Exiv2::Rational const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_Rational_Sg____setitem__(Exiv2::ValueType< Exiv2::Rational > *self,long idx,Exiv2::Rational const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_Rational_Sg__append(Exiv2::ValueType< Exiv2::Rational > *self,Exiv2::Rational value){ self->value_.push_back(value); @@ -7464,14 +7464,14 @@ SWIGINTERN Exiv2::ValueType< float > *new_Exiv2_ValueType_Sl_float_Sg___SWIG_5(E result->value_ = value; return result; } -SWIGINTERN float Exiv2_ValueType_Sl_float_Sg____getitem__(Exiv2::ValueType< float > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN float Exiv2_ValueType_Sl_float_Sg____getitem__(Exiv2::ValueType< float > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_float_Sg____setitem__(Exiv2::ValueType< float > *self,Py_ssize_t i,float const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_float_Sg____setitem__(Exiv2::ValueType< float > *self,long idx,float const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_float_Sg__append(Exiv2::ValueType< float > *self,float value){ self->value_.push_back(value); @@ -7530,14 +7530,14 @@ SWIGINTERN Exiv2::ValueType< double > *new_Exiv2_ValueType_Sl_double_Sg___SWIG_5 result->value_ = value; return result; } -SWIGINTERN double Exiv2_ValueType_Sl_double_Sg____getitem__(Exiv2::ValueType< double > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN double Exiv2_ValueType_Sl_double_Sg____getitem__(Exiv2::ValueType< double > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_double_Sg____setitem__(Exiv2::ValueType< double > *self,Py_ssize_t i,double const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_double_Sg____setitem__(Exiv2::ValueType< double > *self,long idx,double const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_double_Sg__append(Exiv2::ValueType< double > *self,double value){ self->value_.push_back(value); @@ -12706,6 +12706,12 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue___getitem__(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XmpArrayValue___getitem__" "', argument " "2"" of type '" "long""'"); } arg2 = static_cast< long >(val2); + + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { + PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); + SWIG_fail; + } + result = Exiv2_XmpArrayValue___getitem__(arg1,arg2); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; @@ -17578,7 +17584,7 @@ SWIGINTERN int _wrap_new_UShortValue(PyObject *self, PyObject *args, PyObject *k SWIGINTERN PyObject *_wrap_UShortValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint16_t > *arg1 = (Exiv2::ValueType< uint16_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -17594,16 +17600,16 @@ SWIGINTERN PyObject *_wrap_UShortValue___getitem__(PyObject *self, PyObject *arg arg1 = reinterpret_cast< Exiv2::ValueType< uint16_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UShortValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UShortValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (uint16_t)Exiv2_ValueType_Sl_uint16_t_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (uint16_t)Exiv2_ValueType_Sl_uint16_t_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: @@ -17614,7 +17620,7 @@ SWIGINTERN PyObject *_wrap_UShortValue___getitem__(PyObject *self, PyObject *arg SWIGINTERN PyObject *_wrap_UShortValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint16_t > *arg1 = (Exiv2::ValueType< uint16_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; uint16_t *arg3 = (uint16_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -17636,9 +17642,9 @@ SWIGINTERN PyObject *_wrap_UShortValue___setitem__(PyObject *self, PyObject *arg arg1 = reinterpret_cast< Exiv2::ValueType< uint16_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UShortValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UShortValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_unsigned_short,0))))) { unsigned short val; @@ -17652,12 +17658,12 @@ SWIGINTERN PyObject *_wrap_UShortValue___setitem__(PyObject *self, PyObject *arg } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_uint16_t_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(unsigned short const *)arg3); + Exiv2_ValueType_Sl_uint16_t_Sg____setitem__(arg1,arg2,(unsigned short const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -18713,7 +18719,7 @@ SWIGINTERN int _wrap_new_ULongValue(PyObject *self, PyObject *args, PyObject *kw SWIGINTERN PyObject *_wrap_ULongValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint32_t > *arg1 = (Exiv2::ValueType< uint32_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -18729,16 +18735,16 @@ SWIGINTERN PyObject *_wrap_ULongValue___getitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< uint32_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ULongValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ULongValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (uint32_t)Exiv2_ValueType_Sl_uint32_t_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (uint32_t)Exiv2_ValueType_Sl_uint32_t_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: @@ -18749,7 +18755,7 @@ SWIGINTERN PyObject *_wrap_ULongValue___getitem__(PyObject *self, PyObject *args SWIGINTERN PyObject *_wrap_ULongValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint32_t > *arg1 = (Exiv2::ValueType< uint32_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; uint32_t *arg3 = (uint32_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -18771,9 +18777,9 @@ SWIGINTERN PyObject *_wrap_ULongValue___setitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< uint32_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ULongValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ULongValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_unsigned_int,0))))) { unsigned int val; @@ -18787,12 +18793,12 @@ SWIGINTERN PyObject *_wrap_ULongValue___setitem__(PyObject *self, PyObject *args } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_uint32_t_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(unsigned int const *)arg3); + Exiv2_ValueType_Sl_uint32_t_Sg____setitem__(arg1,arg2,(unsigned int const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -19851,7 +19857,7 @@ SWIGINTERN int _wrap_new_URationalValue(PyObject *self, PyObject *args, PyObject SWIGINTERN PyObject *_wrap_URationalValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::URational > *arg1 = (Exiv2::ValueType< Exiv2::URational > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -19867,16 +19873,16 @@ SWIGINTERN PyObject *_wrap_URationalValue___getitem__(PyObject *self, PyObject * arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::URational > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "URationalValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "URationalValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = Exiv2_ValueType_Sl_Exiv2_URational_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = Exiv2_ValueType_Sl_Exiv2_URational_Sg____getitem__(arg1,arg2); resultobj = swig::from(static_cast< std::pair< unsigned int,unsigned int > >(result)); return resultobj; fail: @@ -19887,7 +19893,7 @@ SWIGINTERN PyObject *_wrap_URationalValue___getitem__(PyObject *self, PyObject * SWIGINTERN PyObject *_wrap_URationalValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::URational > *arg1 = (Exiv2::ValueType< Exiv2::URational > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; Exiv2::URational *arg3 = (Exiv2::URational *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -19908,9 +19914,9 @@ SWIGINTERN PyObject *_wrap_URationalValue___setitem__(PyObject *self, PyObject * arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::URational > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "URationalValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "URationalValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { res3 = swig::asptr(obj2, &arg3); if (!SWIG_IsOK(res3)) { @@ -19919,12 +19925,12 @@ SWIGINTERN PyObject *_wrap_URationalValue___setitem__(PyObject *self, PyObject * res3 = SWIG_AddTmpMask(res3); } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_Exiv2_URational_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(std::pair< unsigned int,unsigned int > const *)arg3); + Exiv2_ValueType_Sl_Exiv2_URational_Sg____setitem__(arg1,arg2,(std::pair< unsigned int,unsigned int > const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -20982,7 +20988,7 @@ SWIGINTERN int _wrap_new_ShortValue(PyObject *self, PyObject *args, PyObject *kw SWIGINTERN PyObject *_wrap_ShortValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int16_t > *arg1 = (Exiv2::ValueType< int16_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -20998,16 +21004,16 @@ SWIGINTERN PyObject *_wrap_ShortValue___getitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< int16_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShortValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShortValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (int16_t)Exiv2_ValueType_Sl_int16_t_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (int16_t)Exiv2_ValueType_Sl_int16_t_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: @@ -21018,7 +21024,7 @@ SWIGINTERN PyObject *_wrap_ShortValue___getitem__(PyObject *self, PyObject *args SWIGINTERN PyObject *_wrap_ShortValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int16_t > *arg1 = (Exiv2::ValueType< int16_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; int16_t *arg3 = (int16_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -21040,9 +21046,9 @@ SWIGINTERN PyObject *_wrap_ShortValue___setitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< int16_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShortValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShortValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_short,0))))) { short val; @@ -21056,12 +21062,12 @@ SWIGINTERN PyObject *_wrap_ShortValue___setitem__(PyObject *self, PyObject *args } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_int16_t_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(short const *)arg3); + Exiv2_ValueType_Sl_int16_t_Sg____setitem__(arg1,arg2,(short const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -22117,7 +22123,7 @@ SWIGINTERN int _wrap_new_LongValue(PyObject *self, PyObject *args, PyObject *kwa SWIGINTERN PyObject *_wrap_LongValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int32_t > *arg1 = (Exiv2::ValueType< int32_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -22133,16 +22139,16 @@ SWIGINTERN PyObject *_wrap_LongValue___getitem__(PyObject *self, PyObject *args) arg1 = reinterpret_cast< Exiv2::ValueType< int32_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (int32_t)Exiv2_ValueType_Sl_int32_t_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (int32_t)Exiv2_ValueType_Sl_int32_t_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -22153,7 +22159,7 @@ SWIGINTERN PyObject *_wrap_LongValue___getitem__(PyObject *self, PyObject *args) SWIGINTERN PyObject *_wrap_LongValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int32_t > *arg1 = (Exiv2::ValueType< int32_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; int32_t *arg3 = (int32_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -22175,9 +22181,9 @@ SWIGINTERN PyObject *_wrap_LongValue___setitem__(PyObject *self, PyObject *args) arg1 = reinterpret_cast< Exiv2::ValueType< int32_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_int,0))))) { int val; @@ -22191,12 +22197,12 @@ SWIGINTERN PyObject *_wrap_LongValue___setitem__(PyObject *self, PyObject *args) } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_int32_t_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(int const *)arg3); + Exiv2_ValueType_Sl_int32_t_Sg____setitem__(arg1,arg2,(int const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -23255,7 +23261,7 @@ SWIGINTERN int _wrap_new_RationalValue(PyObject *self, PyObject *args, PyObject SWIGINTERN PyObject *_wrap_RationalValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::Rational > *arg1 = (Exiv2::ValueType< Exiv2::Rational > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -23271,16 +23277,16 @@ SWIGINTERN PyObject *_wrap_RationalValue___getitem__(PyObject *self, PyObject *a arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::Rational > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RationalValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RationalValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = Exiv2_ValueType_Sl_Exiv2_Rational_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = Exiv2_ValueType_Sl_Exiv2_Rational_Sg____getitem__(arg1,arg2); resultobj = swig::from(static_cast< std::pair< int,int > >(result)); return resultobj; fail: @@ -23291,7 +23297,7 @@ SWIGINTERN PyObject *_wrap_RationalValue___getitem__(PyObject *self, PyObject *a SWIGINTERN PyObject *_wrap_RationalValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::Rational > *arg1 = (Exiv2::ValueType< Exiv2::Rational > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; Exiv2::Rational *arg3 = (Exiv2::Rational *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -23312,9 +23318,9 @@ SWIGINTERN PyObject *_wrap_RationalValue___setitem__(PyObject *self, PyObject *a arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::Rational > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RationalValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RationalValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { res3 = swig::asptr(obj2, &arg3); if (!SWIG_IsOK(res3)) { @@ -23323,12 +23329,12 @@ SWIGINTERN PyObject *_wrap_RationalValue___setitem__(PyObject *self, PyObject *a res3 = SWIG_AddTmpMask(res3); } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_Exiv2_Rational_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(std::pair< int,int > const *)arg3); + Exiv2_ValueType_Sl_Exiv2_Rational_Sg____setitem__(arg1,arg2,(std::pair< int,int > const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -24386,7 +24392,7 @@ SWIGINTERN int _wrap_new_FloatValue(PyObject *self, PyObject *args, PyObject *kw SWIGINTERN PyObject *_wrap_FloatValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< float > *arg1 = (Exiv2::ValueType< float > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -24402,16 +24408,16 @@ SWIGINTERN PyObject *_wrap_FloatValue___getitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< float > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (float)Exiv2_ValueType_Sl_float_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (float)Exiv2_ValueType_Sl_float_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_float(static_cast< float >(result)); return resultobj; fail: @@ -24422,7 +24428,7 @@ SWIGINTERN PyObject *_wrap_FloatValue___getitem__(PyObject *self, PyObject *args SWIGINTERN PyObject *_wrap_FloatValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< float > *arg1 = (Exiv2::ValueType< float > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; float *arg3 = (float *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -24444,9 +24450,9 @@ SWIGINTERN PyObject *_wrap_FloatValue___setitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< float > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_float,0))))) { float val; @@ -24460,12 +24466,12 @@ SWIGINTERN PyObject *_wrap_FloatValue___setitem__(PyObject *self, PyObject *args } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_float_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(float const *)arg3); + Exiv2_ValueType_Sl_float_Sg____setitem__(arg1,arg2,(float const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -25521,7 +25527,7 @@ SWIGINTERN int _wrap_new_DoubleValue(PyObject *self, PyObject *args, PyObject *k SWIGINTERN PyObject *_wrap_DoubleValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< double > *arg1 = (Exiv2::ValueType< double > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -25537,16 +25543,16 @@ SWIGINTERN PyObject *_wrap_DoubleValue___getitem__(PyObject *self, PyObject *arg arg1 = reinterpret_cast< Exiv2::ValueType< double > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (double)Exiv2_ValueType_Sl_double_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (double)Exiv2_ValueType_Sl_double_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -25557,7 +25563,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue___getitem__(PyObject *self, PyObject *arg SWIGINTERN PyObject *_wrap_DoubleValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< double > *arg1 = (Exiv2::ValueType< double > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; double *arg3 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -25579,9 +25585,9 @@ SWIGINTERN PyObject *_wrap_DoubleValue___setitem__(PyObject *self, PyObject *arg arg1 = reinterpret_cast< Exiv2::ValueType< double > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_double,0))))) { double val; @@ -25595,12 +25601,12 @@ SWIGINTERN PyObject *_wrap_DoubleValue___setitem__(PyObject *self, PyObject *arg } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_double_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(double const *)arg3); + Exiv2_ValueType_Sl_double_Sg____setitem__(arg1,arg2,(double const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; diff --git a/src/swig-0_28_2/value_wrap.cxx b/src/swig-0_28_2/value_wrap.cxx index 733d040..ccf8ba0 100644 --- a/src/swig-0_28_2/value_wrap.cxx +++ b/src/swig-0_28_2/value_wrap.cxx @@ -6620,8 +6620,8 @@ SWIGINTERN Exiv2::XmpArrayValue *new_Exiv2_XmpArrayValue__SWIG_1(std::vector< st SWIGINTERN Exiv2::XmpArrayValue *new_Exiv2_XmpArrayValue__SWIG_2(Exiv2::TypeId typeId_xmpBag){ return new Exiv2::XmpArrayValue(typeId_xmpBag); } -SWIGINTERN std::string Exiv2_XmpArrayValue___getitem__(Exiv2::XmpArrayValue *self,long i){ - return self->toString(i); +SWIGINTERN std::string Exiv2_XmpArrayValue___getitem__(Exiv2::XmpArrayValue *self,long idx){ + return self->toString(idx); } SWIGINTERN void Exiv2_XmpArrayValue_append(Exiv2::XmpArrayValue *self,std::string value){ self->read(value); @@ -7126,14 +7126,14 @@ SWIGINTERN Exiv2::ValueType< uint16_t > *new_Exiv2_ValueType_Sl_uint16_t_Sg___SW result->value_ = value; return result; } -SWIGINTERN uint16_t Exiv2_ValueType_Sl_uint16_t_Sg____getitem__(Exiv2::ValueType< uint16_t > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN uint16_t Exiv2_ValueType_Sl_uint16_t_Sg____getitem__(Exiv2::ValueType< uint16_t > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_uint16_t_Sg____setitem__(Exiv2::ValueType< uint16_t > *self,Py_ssize_t i,uint16_t const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_uint16_t_Sg____setitem__(Exiv2::ValueType< uint16_t > *self,long idx,uint16_t const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_uint16_t_Sg__append(Exiv2::ValueType< uint16_t > *self,uint16_t value){ self->value_.push_back(value); @@ -7208,14 +7208,14 @@ SWIGINTERN Exiv2::ValueType< uint32_t > *new_Exiv2_ValueType_Sl_uint32_t_Sg___SW result->value_ = value; return result; } -SWIGINTERN uint32_t Exiv2_ValueType_Sl_uint32_t_Sg____getitem__(Exiv2::ValueType< uint32_t > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN uint32_t Exiv2_ValueType_Sl_uint32_t_Sg____getitem__(Exiv2::ValueType< uint32_t > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_uint32_t_Sg____setitem__(Exiv2::ValueType< uint32_t > *self,Py_ssize_t i,uint32_t const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_uint32_t_Sg____setitem__(Exiv2::ValueType< uint32_t > *self,long idx,uint32_t const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_uint32_t_Sg__append(Exiv2::ValueType< uint32_t > *self,uint32_t value){ self->value_.push_back(value); @@ -7264,14 +7264,14 @@ SWIGINTERN Exiv2::ValueType< Exiv2::URational > *new_Exiv2_ValueType_Sl_Exiv2_UR result->value_ = value; return result; } -SWIGINTERN Exiv2::URational Exiv2_ValueType_Sl_Exiv2_URational_Sg____getitem__(Exiv2::ValueType< Exiv2::URational > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN Exiv2::URational Exiv2_ValueType_Sl_Exiv2_URational_Sg____getitem__(Exiv2::ValueType< Exiv2::URational > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_URational_Sg____setitem__(Exiv2::ValueType< Exiv2::URational > *self,Py_ssize_t i,Exiv2::URational const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_URational_Sg____setitem__(Exiv2::ValueType< Exiv2::URational > *self,long idx,Exiv2::URational const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_URational_Sg__append(Exiv2::ValueType< Exiv2::URational > *self,Exiv2::URational value){ self->value_.push_back(value); @@ -7353,14 +7353,14 @@ SWIGINTERN Exiv2::ValueType< int16_t > *new_Exiv2_ValueType_Sl_int16_t_Sg___SWIG result->value_ = value; return result; } -SWIGINTERN int16_t Exiv2_ValueType_Sl_int16_t_Sg____getitem__(Exiv2::ValueType< int16_t > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN int16_t Exiv2_ValueType_Sl_int16_t_Sg____getitem__(Exiv2::ValueType< int16_t > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_int16_t_Sg____setitem__(Exiv2::ValueType< int16_t > *self,Py_ssize_t i,int16_t const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_int16_t_Sg____setitem__(Exiv2::ValueType< int16_t > *self,long idx,int16_t const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_int16_t_Sg__append(Exiv2::ValueType< int16_t > *self,int16_t value){ self->value_.push_back(value); @@ -7399,14 +7399,14 @@ SWIGINTERN Exiv2::ValueType< int32_t > *new_Exiv2_ValueType_Sl_int32_t_Sg___SWIG result->value_ = value; return result; } -SWIGINTERN int32_t Exiv2_ValueType_Sl_int32_t_Sg____getitem__(Exiv2::ValueType< int32_t > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN int32_t Exiv2_ValueType_Sl_int32_t_Sg____getitem__(Exiv2::ValueType< int32_t > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_int32_t_Sg____setitem__(Exiv2::ValueType< int32_t > *self,Py_ssize_t i,int32_t const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_int32_t_Sg____setitem__(Exiv2::ValueType< int32_t > *self,long idx,int32_t const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_int32_t_Sg__append(Exiv2::ValueType< int32_t > *self,int32_t value){ self->value_.push_back(value); @@ -7445,14 +7445,14 @@ SWIGINTERN Exiv2::ValueType< Exiv2::Rational > *new_Exiv2_ValueType_Sl_Exiv2_Rat result->value_ = value; return result; } -SWIGINTERN Exiv2::Rational Exiv2_ValueType_Sl_Exiv2_Rational_Sg____getitem__(Exiv2::ValueType< Exiv2::Rational > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN Exiv2::Rational Exiv2_ValueType_Sl_Exiv2_Rational_Sg____getitem__(Exiv2::ValueType< Exiv2::Rational > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_Rational_Sg____setitem__(Exiv2::ValueType< Exiv2::Rational > *self,Py_ssize_t i,Exiv2::Rational const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_Rational_Sg____setitem__(Exiv2::ValueType< Exiv2::Rational > *self,long idx,Exiv2::Rational const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_Exiv2_Rational_Sg__append(Exiv2::ValueType< Exiv2::Rational > *self,Exiv2::Rational value){ self->value_.push_back(value); @@ -7567,14 +7567,14 @@ SWIGINTERN Exiv2::ValueType< float > *new_Exiv2_ValueType_Sl_float_Sg___SWIG_5(E result->value_ = value; return result; } -SWIGINTERN float Exiv2_ValueType_Sl_float_Sg____getitem__(Exiv2::ValueType< float > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN float Exiv2_ValueType_Sl_float_Sg____getitem__(Exiv2::ValueType< float > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_float_Sg____setitem__(Exiv2::ValueType< float > *self,Py_ssize_t i,float const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_float_Sg____setitem__(Exiv2::ValueType< float > *self,long idx,float const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_float_Sg__append(Exiv2::ValueType< float > *self,float value){ self->value_.push_back(value); @@ -7633,14 +7633,14 @@ SWIGINTERN Exiv2::ValueType< double > *new_Exiv2_ValueType_Sl_double_Sg___SWIG_5 result->value_ = value; return result; } -SWIGINTERN double Exiv2_ValueType_Sl_double_Sg____getitem__(Exiv2::ValueType< double > *self,Py_ssize_t i){ - return self->value_[i]; +SWIGINTERN double Exiv2_ValueType_Sl_double_Sg____getitem__(Exiv2::ValueType< double > *self,long idx){ + return self->value_[idx]; } -SWIGINTERN void Exiv2_ValueType_Sl_double_Sg____setitem__(Exiv2::ValueType< double > *self,Py_ssize_t i,double const *INPUT){ +SWIGINTERN void Exiv2_ValueType_Sl_double_Sg____setitem__(Exiv2::ValueType< double > *self,long idx,double const *INPUT){ if (INPUT) - self->value_[i] = *INPUT; + self->value_[idx] = *INPUT; else - self->value_.erase(self->value_.begin() + i); + self->value_.erase(self->value_.begin() + idx); } SWIGINTERN void Exiv2_ValueType_Sl_double_Sg__append(Exiv2::ValueType< double > *self,double value){ self->value_.push_back(value); @@ -13024,6 +13024,12 @@ SWIGINTERN PyObject *_wrap_XmpArrayValue___getitem__(PyObject *self, PyObject *a SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "XmpArrayValue___getitem__" "', argument " "2"" of type '" "long""'"); } arg2 = static_cast< long >(val2); + + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { + PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); + SWIG_fail; + } + result = Exiv2_XmpArrayValue___getitem__(arg1,arg2); resultobj = SWIG_From_std_string(static_cast< std::string >(result)); return resultobj; @@ -18039,7 +18045,7 @@ SWIGINTERN int _wrap_new_UShortValue(PyObject *self, PyObject *args, PyObject *k SWIGINTERN PyObject *_wrap_UShortValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint16_t > *arg1 = (Exiv2::ValueType< uint16_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -18055,16 +18061,16 @@ SWIGINTERN PyObject *_wrap_UShortValue___getitem__(PyObject *self, PyObject *arg arg1 = reinterpret_cast< Exiv2::ValueType< uint16_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UShortValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UShortValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (uint16_t)Exiv2_ValueType_Sl_uint16_t_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (uint16_t)Exiv2_ValueType_Sl_uint16_t_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); return resultobj; fail: @@ -18075,7 +18081,7 @@ SWIGINTERN PyObject *_wrap_UShortValue___getitem__(PyObject *self, PyObject *arg SWIGINTERN PyObject *_wrap_UShortValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint16_t > *arg1 = (Exiv2::ValueType< uint16_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; uint16_t *arg3 = (uint16_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -18097,9 +18103,9 @@ SWIGINTERN PyObject *_wrap_UShortValue___setitem__(PyObject *self, PyObject *arg arg1 = reinterpret_cast< Exiv2::ValueType< uint16_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UShortValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UShortValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_unsigned_short,0))))) { unsigned short val; @@ -18113,12 +18119,12 @@ SWIGINTERN PyObject *_wrap_UShortValue___setitem__(PyObject *self, PyObject *arg } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_uint16_t_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(unsigned short const *)arg3); + Exiv2_ValueType_Sl_uint16_t_Sg____setitem__(arg1,arg2,(unsigned short const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -19188,7 +19194,7 @@ SWIGINTERN int _wrap_new_ULongValue(PyObject *self, PyObject *args, PyObject *kw SWIGINTERN PyObject *_wrap_ULongValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint32_t > *arg1 = (Exiv2::ValueType< uint32_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -19204,16 +19210,16 @@ SWIGINTERN PyObject *_wrap_ULongValue___getitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< uint32_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ULongValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ULongValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (uint32_t)Exiv2_ValueType_Sl_uint32_t_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (uint32_t)Exiv2_ValueType_Sl_uint32_t_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); return resultobj; fail: @@ -19224,7 +19230,7 @@ SWIGINTERN PyObject *_wrap_ULongValue___getitem__(PyObject *self, PyObject *args SWIGINTERN PyObject *_wrap_ULongValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< uint32_t > *arg1 = (Exiv2::ValueType< uint32_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; uint32_t *arg3 = (uint32_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -19246,9 +19252,9 @@ SWIGINTERN PyObject *_wrap_ULongValue___setitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< uint32_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ULongValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ULongValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_unsigned_int,0))))) { unsigned int val; @@ -19262,12 +19268,12 @@ SWIGINTERN PyObject *_wrap_ULongValue___setitem__(PyObject *self, PyObject *args } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_uint32_t_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(unsigned int const *)arg3); + Exiv2_ValueType_Sl_uint32_t_Sg____setitem__(arg1,arg2,(unsigned int const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -20340,7 +20346,7 @@ SWIGINTERN int _wrap_new_URationalValue(PyObject *self, PyObject *args, PyObject SWIGINTERN PyObject *_wrap_URationalValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::URational > *arg1 = (Exiv2::ValueType< Exiv2::URational > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -20356,16 +20362,16 @@ SWIGINTERN PyObject *_wrap_URationalValue___getitem__(PyObject *self, PyObject * arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::URational > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "URationalValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "URationalValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = Exiv2_ValueType_Sl_Exiv2_URational_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = Exiv2_ValueType_Sl_Exiv2_URational_Sg____getitem__(arg1,arg2); resultobj = swig::from(static_cast< std::pair< unsigned int,unsigned int > >(result)); return resultobj; fail: @@ -20376,7 +20382,7 @@ SWIGINTERN PyObject *_wrap_URationalValue___getitem__(PyObject *self, PyObject * SWIGINTERN PyObject *_wrap_URationalValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::URational > *arg1 = (Exiv2::ValueType< Exiv2::URational > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; Exiv2::URational *arg3 = (Exiv2::URational *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -20397,9 +20403,9 @@ SWIGINTERN PyObject *_wrap_URationalValue___setitem__(PyObject *self, PyObject * arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::URational > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "URationalValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "URationalValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { res3 = swig::asptr(obj2, &arg3); if (!SWIG_IsOK(res3)) { @@ -20408,12 +20414,12 @@ SWIGINTERN PyObject *_wrap_URationalValue___setitem__(PyObject *self, PyObject * res3 = SWIG_AddTmpMask(res3); } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_Exiv2_URational_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(std::pair< unsigned int,unsigned int > const *)arg3); + Exiv2_ValueType_Sl_Exiv2_URational_Sg____setitem__(arg1,arg2,(std::pair< unsigned int,unsigned int > const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -21485,7 +21491,7 @@ SWIGINTERN int _wrap_new_ShortValue(PyObject *self, PyObject *args, PyObject *kw SWIGINTERN PyObject *_wrap_ShortValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int16_t > *arg1 = (Exiv2::ValueType< int16_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -21501,16 +21507,16 @@ SWIGINTERN PyObject *_wrap_ShortValue___getitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< int16_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShortValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShortValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (int16_t)Exiv2_ValueType_Sl_int16_t_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (int16_t)Exiv2_ValueType_Sl_int16_t_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_short(static_cast< short >(result)); return resultobj; fail: @@ -21521,7 +21527,7 @@ SWIGINTERN PyObject *_wrap_ShortValue___getitem__(PyObject *self, PyObject *args SWIGINTERN PyObject *_wrap_ShortValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int16_t > *arg1 = (Exiv2::ValueType< int16_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; int16_t *arg3 = (int16_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -21543,9 +21549,9 @@ SWIGINTERN PyObject *_wrap_ShortValue___setitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< int16_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShortValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShortValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_short,0))))) { short val; @@ -21559,12 +21565,12 @@ SWIGINTERN PyObject *_wrap_ShortValue___setitem__(PyObject *self, PyObject *args } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_int16_t_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(short const *)arg3); + Exiv2_ValueType_Sl_int16_t_Sg____setitem__(arg1,arg2,(short const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -22634,7 +22640,7 @@ SWIGINTERN int _wrap_new_LongValue(PyObject *self, PyObject *args, PyObject *kwa SWIGINTERN PyObject *_wrap_LongValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int32_t > *arg1 = (Exiv2::ValueType< int32_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -22650,16 +22656,16 @@ SWIGINTERN PyObject *_wrap_LongValue___getitem__(PyObject *self, PyObject *args) arg1 = reinterpret_cast< Exiv2::ValueType< int32_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (int32_t)Exiv2_ValueType_Sl_int32_t_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (int32_t)Exiv2_ValueType_Sl_int32_t_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_int(static_cast< int >(result)); return resultobj; fail: @@ -22670,7 +22676,7 @@ SWIGINTERN PyObject *_wrap_LongValue___getitem__(PyObject *self, PyObject *args) SWIGINTERN PyObject *_wrap_LongValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< int32_t > *arg1 = (Exiv2::ValueType< int32_t > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; int32_t *arg3 = (int32_t *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -22692,9 +22698,9 @@ SWIGINTERN PyObject *_wrap_LongValue___setitem__(PyObject *self, PyObject *args) arg1 = reinterpret_cast< Exiv2::ValueType< int32_t > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_int,0))))) { int val; @@ -22708,12 +22714,12 @@ SWIGINTERN PyObject *_wrap_LongValue___setitem__(PyObject *self, PyObject *args) } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_int32_t_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(int const *)arg3); + Exiv2_ValueType_Sl_int32_t_Sg____setitem__(arg1,arg2,(int const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -23786,7 +23792,7 @@ SWIGINTERN int _wrap_new_RationalValue(PyObject *self, PyObject *args, PyObject SWIGINTERN PyObject *_wrap_RationalValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::Rational > *arg1 = (Exiv2::ValueType< Exiv2::Rational > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -23802,16 +23808,16 @@ SWIGINTERN PyObject *_wrap_RationalValue___getitem__(PyObject *self, PyObject *a arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::Rational > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RationalValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RationalValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = Exiv2_ValueType_Sl_Exiv2_Rational_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = Exiv2_ValueType_Sl_Exiv2_Rational_Sg____getitem__(arg1,arg2); resultobj = swig::from(static_cast< std::pair< int,int > >(result)); return resultobj; fail: @@ -23822,7 +23828,7 @@ SWIGINTERN PyObject *_wrap_RationalValue___getitem__(PyObject *self, PyObject *a SWIGINTERN PyObject *_wrap_RationalValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< Exiv2::Rational > *arg1 = (Exiv2::ValueType< Exiv2::Rational > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; Exiv2::Rational *arg3 = (Exiv2::Rational *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -23843,9 +23849,9 @@ SWIGINTERN PyObject *_wrap_RationalValue___setitem__(PyObject *self, PyObject *a arg1 = reinterpret_cast< Exiv2::ValueType< Exiv2::Rational > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RationalValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RationalValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { res3 = swig::asptr(obj2, &arg3); if (!SWIG_IsOK(res3)) { @@ -23854,12 +23860,12 @@ SWIGINTERN PyObject *_wrap_RationalValue___setitem__(PyObject *self, PyObject *a res3 = SWIG_AddTmpMask(res3); } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_Exiv2_Rational_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(std::pair< int,int > const *)arg3); + Exiv2_ValueType_Sl_Exiv2_Rational_Sg____setitem__(arg1,arg2,(std::pair< int,int > const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -24931,7 +24937,7 @@ SWIGINTERN int _wrap_new_FloatValue(PyObject *self, PyObject *args, PyObject *kw SWIGINTERN PyObject *_wrap_FloatValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< float > *arg1 = (Exiv2::ValueType< float > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -24947,16 +24953,16 @@ SWIGINTERN PyObject *_wrap_FloatValue___getitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< float > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (float)Exiv2_ValueType_Sl_float_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (float)Exiv2_ValueType_Sl_float_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_float(static_cast< float >(result)); return resultobj; fail: @@ -24967,7 +24973,7 @@ SWIGINTERN PyObject *_wrap_FloatValue___getitem__(PyObject *self, PyObject *args SWIGINTERN PyObject *_wrap_FloatValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< float > *arg1 = (Exiv2::ValueType< float > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; float *arg3 = (float *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -24989,9 +24995,9 @@ SWIGINTERN PyObject *_wrap_FloatValue___setitem__(PyObject *self, PyObject *args arg1 = reinterpret_cast< Exiv2::ValueType< float > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_float,0))))) { float val; @@ -25005,12 +25011,12 @@ SWIGINTERN PyObject *_wrap_FloatValue___setitem__(PyObject *self, PyObject *args } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_float_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(float const *)arg3); + Exiv2_ValueType_Sl_float_Sg____setitem__(arg1,arg2,(float const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; @@ -26080,7 +26086,7 @@ SWIGINTERN int _wrap_new_DoubleValue(PyObject *self, PyObject *args, PyObject *k SWIGINTERN PyObject *_wrap_DoubleValue___getitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< double > *arg1 = (Exiv2::ValueType< double > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; void *argp1 = 0 ; int res1 = 0 ; long val2 ; @@ -26096,16 +26102,16 @@ SWIGINTERN PyObject *_wrap_DoubleValue___getitem__(PyObject *self, PyObject *arg arg1 = reinterpret_cast< Exiv2::ValueType< double > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleValue___getitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleValue___getitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - result = (double)Exiv2_ValueType_Sl_double_Sg____getitem__(arg1,SWIG_STD_MOVE(arg2)); + result = (double)Exiv2_ValueType_Sl_double_Sg____getitem__(arg1,arg2); resultobj = SWIG_From_double(static_cast< double >(result)); return resultobj; fail: @@ -26116,7 +26122,7 @@ SWIGINTERN PyObject *_wrap_DoubleValue___getitem__(PyObject *self, PyObject *arg SWIGINTERN PyObject *_wrap_DoubleValue___setitem__(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Exiv2::ValueType< double > *arg1 = (Exiv2::ValueType< double > *) 0 ; - Py_ssize_t arg2 ; + long arg2 ; double *arg3 = (double *) 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -26138,9 +26144,9 @@ SWIGINTERN PyObject *_wrap_DoubleValue___setitem__(PyObject *self, PyObject *arg arg1 = reinterpret_cast< Exiv2::ValueType< double > * >(argp1); ecode2 = SWIG_AsVal_long(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleValue___setitem__" "', argument " "2"" of type '" "Py_ssize_t""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleValue___setitem__" "', argument " "2"" of type '" "long""'"); } - arg2 = static_cast< Py_ssize_t >(val2); + arg2 = static_cast< long >(val2); if (obj2) { if (!(SWIG_IsOK((res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3),SWIGTYPE_p_double,0))))) { double val; @@ -26154,12 +26160,12 @@ SWIGINTERN PyObject *_wrap_DoubleValue___setitem__(PyObject *self, PyObject *arg } } - if (arg2 < 0 || arg2 >= static_cast< Py_ssize_t >(arg1->count())) { + if (arg2 < 0 || arg2 >= static_cast< long >(arg1->count())) { PyErr_Format(PyExc_IndexError, "index %d out of range", arg2); SWIG_fail; } - Exiv2_ValueType_Sl_double_Sg____setitem__(arg1,SWIG_STD_MOVE(arg2),(double const *)arg3); + Exiv2_ValueType_Sl_double_Sg____setitem__(arg1,arg2,(double const *)arg3); resultobj = SWIG_Py_Void(); if (SWIG_IsNewObj(res3)) delete arg3; return resultobj; diff --git a/tests/test_value.py b/tests/test_value.py index 4d8127d..916e417 100644 --- a/tests/test_value.py +++ b/tests/test_value.py @@ -47,6 +47,9 @@ def do_common_tests(self, value, type_id, string, data, sequence=None): self.assertEqual(result, data) if sequence: self.check_result(value.count(), int, len(sequence)) + if not isinstance(sequence, dict): + with self.assertRaises(IndexError): + result = value[value.count()] else: self.check_result(value.count(), int, len(data)) self.check_result(value.ok(), bool, True)