rqrencoder 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -1
- data/Gemfile +0 -1
- data/Rakefile +8 -0
- data/ext/rqrencoder/RQREncoder.i +20 -19
- data/ext/rqrencoder/{RQREncoder_wrap.cxx → RQREncoder_wrap.c} +700 -900
- data/ext/rqrencoder/extconf.rb +7 -1
- data/ext/rqrencoder/qrencode.h +426 -0
- data/lib/rqrencoder/qr_encoder.rb +11 -16
- data/lib/rqrencoder/qrcode.rb +6 -6
- data/lib/rqrencoder/version.rb +1 -1
- data/test/test_rqrencoder.rb +9 -1
- metadata +5 -7
- data/ext/rqrencoder/QR_Encode.cpp +0 -1949
- data/ext/rqrencoder/QR_Encode.h +0 -152
- data/ext/rqrencoder/win2ansi.h +0 -20
@@ -10,30 +10,6 @@
|
|
10
10
|
|
11
11
|
#define SWIGRUBY
|
12
12
|
|
13
|
-
|
14
|
-
#ifdef __cplusplus
|
15
|
-
/* SwigValueWrapper is described in swig.swg */
|
16
|
-
template<typename T> class SwigValueWrapper {
|
17
|
-
struct SwigMovePointer {
|
18
|
-
T *ptr;
|
19
|
-
SwigMovePointer(T *p) : ptr(p) { }
|
20
|
-
~SwigMovePointer() { delete ptr; }
|
21
|
-
SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
|
22
|
-
} pointer;
|
23
|
-
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
|
24
|
-
SwigValueWrapper(const SwigValueWrapper<T>& rhs);
|
25
|
-
public:
|
26
|
-
SwigValueWrapper() : pointer(0) { }
|
27
|
-
SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
|
28
|
-
operator T&() const { return *pointer.ptr; }
|
29
|
-
T *operator&() { return pointer.ptr; }
|
30
|
-
};
|
31
|
-
|
32
|
-
template <typename T> T SwigValueInit() {
|
33
|
-
return T();
|
34
|
-
}
|
35
|
-
#endif
|
36
|
-
|
37
13
|
/* -----------------------------------------------------------------------------
|
38
14
|
* This section contains generic SWIG labels for method/variable
|
39
15
|
* declarations/attributes, and other compiler dependent labels.
|
@@ -1813,17 +1789,16 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
|
|
1813
1789
|
|
1814
1790
|
/* -------- TYPES TABLE (BEGIN) -------- */
|
1815
1791
|
|
1816
|
-
#define
|
1817
|
-
#define
|
1818
|
-
#define
|
1819
|
-
#define
|
1820
|
-
#define
|
1821
|
-
#define
|
1822
|
-
#define
|
1792
|
+
#define SWIGTYPE_p_QRcode swig_types[0]
|
1793
|
+
#define SWIGTYPE_p_QRecLevel swig_types[1]
|
1794
|
+
#define SWIGTYPE_p_QRencodeMode swig_types[2]
|
1795
|
+
#define SWIGTYPE_p__QRcode_List swig_types[3]
|
1796
|
+
#define SWIGTYPE_p__QRinput swig_types[4]
|
1797
|
+
#define SWIGTYPE_p__QRinput_Struct swig_types[5]
|
1798
|
+
#define SWIGTYPE_p_char swig_types[6]
|
1823
1799
|
#define SWIGTYPE_p_unsigned_char swig_types[7]
|
1824
|
-
|
1825
|
-
static
|
1826
|
-
static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0};
|
1800
|
+
static swig_type_info *swig_types[9];
|
1801
|
+
static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0};
|
1827
1802
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
1828
1803
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
1829
1804
|
|
@@ -1842,22 +1817,11 @@ static VALUE mRQREncoder;
|
|
1842
1817
|
#define SWIG_VERSION SWIGVERSION
|
1843
1818
|
|
1844
1819
|
|
1845
|
-
#define SWIG_as_voidptr(a)
|
1846
|
-
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),
|
1820
|
+
#define SWIG_as_voidptr(a) (void *)((const void *)(a))
|
1821
|
+
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
|
1847
1822
|
|
1848
1823
|
|
1849
|
-
#include <
|
1850
|
-
|
1851
|
-
|
1852
|
-
#include "win2ansi.h"
|
1853
|
-
#include "QR_Encode.h"
|
1854
|
-
|
1855
|
-
|
1856
|
-
SWIGINTERNINLINE VALUE
|
1857
|
-
SWIG_From_bool (bool value)
|
1858
|
-
{
|
1859
|
-
return value ? Qtrue : Qfalse;
|
1860
|
-
}
|
1824
|
+
#include <qrencode.h>
|
1861
1825
|
|
1862
1826
|
|
1863
1827
|
#include <limits.h>
|
@@ -1925,33 +1889,75 @@ SWIG_AsVal_int (VALUE obj, int *val)
|
|
1925
1889
|
if ((v < INT_MIN || v > INT_MAX)) {
|
1926
1890
|
return SWIG_OverflowError;
|
1927
1891
|
} else {
|
1928
|
-
if (val) *val =
|
1892
|
+
if (val) *val = (int)(v);
|
1929
1893
|
}
|
1930
1894
|
}
|
1931
1895
|
return res;
|
1932
1896
|
}
|
1933
1897
|
|
1934
1898
|
|
1899
|
+
/*@SWIG:/usr/local/share/swig/2.0.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
1900
|
+
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
|
1901
|
+
{
|
1902
|
+
VALUE obj = args[0];
|
1903
|
+
VALUE type = TYPE(obj);
|
1904
|
+
unsigned long *res = (unsigned long *)(args[1]);
|
1905
|
+
*res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj);
|
1906
|
+
return obj;
|
1907
|
+
}
|
1908
|
+
/*@SWIG@*/
|
1909
|
+
|
1935
1910
|
SWIGINTERN int
|
1936
|
-
|
1911
|
+
SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
|
1937
1912
|
{
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {
|
1947
|
-
if (val) *val = res ? true : false;
|
1913
|
+
VALUE type = TYPE(obj);
|
1914
|
+
if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
|
1915
|
+
unsigned long v;
|
1916
|
+
VALUE a[2];
|
1917
|
+
a[0] = obj;
|
1918
|
+
a[1] = (VALUE)(&v);
|
1919
|
+
if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
|
1920
|
+
if (val) *val = v;
|
1948
1921
|
return SWIG_OK;
|
1949
1922
|
}
|
1950
|
-
}
|
1923
|
+
}
|
1951
1924
|
return SWIG_TypeError;
|
1952
1925
|
}
|
1953
1926
|
|
1954
1927
|
|
1928
|
+
SWIGINTERN int
|
1929
|
+
SWIG_AsVal_unsigned_SS_char (VALUE obj, unsigned char *val)
|
1930
|
+
{
|
1931
|
+
unsigned long v;
|
1932
|
+
int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
|
1933
|
+
if (SWIG_IsOK(res)) {
|
1934
|
+
if ((v > UCHAR_MAX)) {
|
1935
|
+
return SWIG_OverflowError;
|
1936
|
+
} else {
|
1937
|
+
if (val) *val = (unsigned char)(v);
|
1938
|
+
}
|
1939
|
+
}
|
1940
|
+
return res;
|
1941
|
+
}
|
1942
|
+
|
1943
|
+
SWIGINTERN VALUE QRcode_modules(QRcode *self){
|
1944
|
+
VALUE result, row;
|
1945
|
+
unsigned char *p;
|
1946
|
+
int x, y, bit;
|
1947
|
+
result = rb_ary_new2(self->width);
|
1948
|
+
p = self->data;
|
1949
|
+
for(y=0; y < self->width; y++) {
|
1950
|
+
row = rb_ary_new2(self->width);
|
1951
|
+
for(x=0; x < self->width; x++) {
|
1952
|
+
bit = *p & 1;
|
1953
|
+
rb_ary_push(row, bit == 0 ? Qfalse : Qtrue);
|
1954
|
+
p++;
|
1955
|
+
}
|
1956
|
+
rb_ary_push(result, row);
|
1957
|
+
}
|
1958
|
+
return result;
|
1959
|
+
}
|
1960
|
+
|
1955
1961
|
SWIGINTERN swig_type_info*
|
1956
1962
|
SWIG_pchar_descriptor(void)
|
1957
1963
|
{
|
@@ -1978,7 +1984,7 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
|
|
1978
1984
|
if (cptr) {
|
1979
1985
|
if (alloc) {
|
1980
1986
|
if (*alloc == SWIG_NEWOBJ) {
|
1981
|
-
*cptr =
|
1987
|
+
*cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
|
1982
1988
|
} else {
|
1983
1989
|
*cptr = cstr;
|
1984
1990
|
*alloc = SWIG_OLDOBJ;
|
@@ -2005,68 +2011,96 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
|
|
2005
2011
|
|
2006
2012
|
|
2007
2013
|
|
2008
|
-
SWIGINTERN VALUE
|
2009
|
-
|
2010
|
-
|
2011
|
-
|
2012
|
-
|
2013
|
-
|
2014
|
-
|
2015
|
-
for (; jj < (size_t)self->m_nSymbleSize; ++jj) {
|
2016
|
-
rb_ary_push(innerAry, self->m_byModuleData[ii][jj] ? Qtrue : Qfalse);
|
2017
|
-
}
|
2014
|
+
SWIGINTERN VALUE
|
2015
|
+
_wrap_QRinput_new(int argc, VALUE *argv, VALUE self) {
|
2016
|
+
QRinput *result = 0 ;
|
2017
|
+
VALUE vresult = Qnil;
|
2018
|
+
|
2019
|
+
if ((argc < 0) || (argc > 0)) {
|
2020
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2018
2021
|
}
|
2019
|
-
|
2022
|
+
result = (QRinput *)QRinput_new();
|
2023
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__QRinput, 0 | 0 );
|
2024
|
+
return vresult;
|
2025
|
+
fail:
|
2026
|
+
return Qnil;
|
2020
2027
|
}
|
2021
|
-
|
2028
|
+
|
2022
2029
|
|
2023
2030
|
SWIGINTERN VALUE
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
int
|
2031
|
+
_wrap_QRinput_new2(int argc, VALUE *argv, VALUE self) {
|
2032
|
+
int arg1 ;
|
2033
|
+
QRecLevel arg2 ;
|
2034
|
+
int val1 ;
|
2035
|
+
int ecode1 = 0 ;
|
2029
2036
|
int val2 ;
|
2030
2037
|
int ecode2 = 0 ;
|
2038
|
+
QRinput *result = 0 ;
|
2039
|
+
VALUE vresult = Qnil;
|
2031
2040
|
|
2032
|
-
if ((argc <
|
2033
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2041
|
+
if ((argc < 2) || (argc > 2)) {
|
2042
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
2034
2043
|
}
|
2035
|
-
|
2036
|
-
if (!SWIG_IsOK(
|
2037
|
-
SWIG_exception_fail(SWIG_ArgError(
|
2038
|
-
}
|
2039
|
-
arg1 =
|
2040
|
-
ecode2 = SWIG_AsVal_int(argv[
|
2044
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
2045
|
+
if (!SWIG_IsOK(ecode1)) {
|
2046
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","QRinput_new2", 1, argv[0] ));
|
2047
|
+
}
|
2048
|
+
arg1 = (int)(val1);
|
2049
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2041
2050
|
if (!SWIG_IsOK(ecode2)) {
|
2042
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "
|
2051
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "QRecLevel","QRinput_new2", 2, argv[1] ));
|
2043
2052
|
}
|
2044
|
-
arg2 =
|
2045
|
-
|
2046
|
-
|
2053
|
+
arg2 = (QRecLevel)(val2);
|
2054
|
+
result = (QRinput *)QRinput_new2(arg1,arg2);
|
2055
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__QRinput, 0 | 0 );
|
2056
|
+
return vresult;
|
2047
2057
|
fail:
|
2048
2058
|
return Qnil;
|
2049
2059
|
}
|
2050
2060
|
|
2051
2061
|
|
2052
2062
|
SWIGINTERN VALUE
|
2053
|
-
|
2054
|
-
|
2063
|
+
_wrap_QRinput_append(int argc, VALUE *argv, VALUE self) {
|
2064
|
+
QRinput *arg1 = (QRinput *) 0 ;
|
2065
|
+
QRencodeMode arg2 ;
|
2066
|
+
int arg3 ;
|
2067
|
+
unsigned char *arg4 = (unsigned char *) 0 ;
|
2055
2068
|
void *argp1 = 0 ;
|
2056
2069
|
int res1 = 0 ;
|
2070
|
+
int val2 ;
|
2071
|
+
int ecode2 = 0 ;
|
2072
|
+
int val3 ;
|
2073
|
+
int ecode3 = 0 ;
|
2074
|
+
void *argp4 = 0 ;
|
2075
|
+
int res4 = 0 ;
|
2057
2076
|
int result;
|
2058
2077
|
VALUE vresult = Qnil;
|
2059
2078
|
|
2060
|
-
if ((argc <
|
2061
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2079
|
+
if ((argc < 4) || (argc > 4)) {
|
2080
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail;
|
2062
2081
|
}
|
2063
|
-
res1 = SWIG_ConvertPtr(
|
2082
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput, 0 | 0 );
|
2064
2083
|
if (!SWIG_IsOK(res1)) {
|
2065
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2084
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput *","QRinput_append", 1, argv[0] ));
|
2066
2085
|
}
|
2067
|
-
arg1 =
|
2068
|
-
|
2069
|
-
|
2086
|
+
arg1 = (QRinput *)(argp1);
|
2087
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2088
|
+
if (!SWIG_IsOK(ecode2)) {
|
2089
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "QRencodeMode","QRinput_append", 2, argv[1] ));
|
2090
|
+
}
|
2091
|
+
arg2 = (QRencodeMode)(val2);
|
2092
|
+
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
2093
|
+
if (!SWIG_IsOK(ecode3)) {
|
2094
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","QRinput_append", 3, argv[2] ));
|
2095
|
+
}
|
2096
|
+
arg3 = (int)(val3);
|
2097
|
+
res4 = SWIG_ConvertPtr(argv[3], &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
|
2098
|
+
if (!SWIG_IsOK(res4)) {
|
2099
|
+
SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "unsigned char const *","QRinput_append", 4, argv[3] ));
|
2100
|
+
}
|
2101
|
+
arg4 = (unsigned char *)(argp4);
|
2102
|
+
result = (int)QRinput_append(arg1,arg2,arg3,(unsigned char const *)arg4);
|
2103
|
+
vresult = SWIG_From_int((int)(result));
|
2070
2104
|
return vresult;
|
2071
2105
|
fail:
|
2072
2106
|
return Qnil;
|
@@ -2074,52 +2108,55 @@ fail:
|
|
2074
2108
|
|
2075
2109
|
|
2076
2110
|
SWIGINTERN VALUE
|
2077
|
-
|
2078
|
-
|
2079
|
-
int arg2 ;
|
2111
|
+
_wrap_QRinput_getVersion(int argc, VALUE *argv, VALUE self) {
|
2112
|
+
QRinput *arg1 = (QRinput *) 0 ;
|
2080
2113
|
void *argp1 = 0 ;
|
2081
2114
|
int res1 = 0 ;
|
2082
|
-
int
|
2083
|
-
|
2115
|
+
int result;
|
2116
|
+
VALUE vresult = Qnil;
|
2084
2117
|
|
2085
2118
|
if ((argc < 1) || (argc > 1)) {
|
2086
2119
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2087
2120
|
}
|
2088
|
-
res1 = SWIG_ConvertPtr(
|
2121
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput, 0 | 0 );
|
2089
2122
|
if (!SWIG_IsOK(res1)) {
|
2090
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2123
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput *","QRinput_getVersion", 1, argv[0] ));
|
2091
2124
|
}
|
2092
|
-
arg1 =
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2096
|
-
}
|
2097
|
-
arg2 = static_cast< int >(val2);
|
2098
|
-
if (arg1) (arg1)->ncAllCodeWord = arg2;
|
2099
|
-
return Qnil;
|
2125
|
+
arg1 = (QRinput *)(argp1);
|
2126
|
+
result = (int)QRinput_getVersion(arg1);
|
2127
|
+
vresult = SWIG_From_int((int)(result));
|
2128
|
+
return vresult;
|
2100
2129
|
fail:
|
2101
2130
|
return Qnil;
|
2102
2131
|
}
|
2103
2132
|
|
2104
2133
|
|
2105
2134
|
SWIGINTERN VALUE
|
2106
|
-
|
2107
|
-
|
2135
|
+
_wrap_QRinput_setVersion(int argc, VALUE *argv, VALUE self) {
|
2136
|
+
QRinput *arg1 = (QRinput *) 0 ;
|
2137
|
+
int arg2 ;
|
2108
2138
|
void *argp1 = 0 ;
|
2109
2139
|
int res1 = 0 ;
|
2140
|
+
int val2 ;
|
2141
|
+
int ecode2 = 0 ;
|
2110
2142
|
int result;
|
2111
2143
|
VALUE vresult = Qnil;
|
2112
2144
|
|
2113
|
-
if ((argc <
|
2114
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2145
|
+
if ((argc < 2) || (argc > 2)) {
|
2146
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
2115
2147
|
}
|
2116
|
-
res1 = SWIG_ConvertPtr(
|
2148
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput, 0 | 0 );
|
2117
2149
|
if (!SWIG_IsOK(res1)) {
|
2118
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2150
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput *","QRinput_setVersion", 1, argv[0] ));
|
2119
2151
|
}
|
2120
|
-
arg1 =
|
2121
|
-
|
2122
|
-
|
2152
|
+
arg1 = (QRinput *)(argp1);
|
2153
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2154
|
+
if (!SWIG_IsOK(ecode2)) {
|
2155
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","QRinput_setVersion", 2, argv[1] ));
|
2156
|
+
}
|
2157
|
+
arg2 = (int)(val2);
|
2158
|
+
result = (int)QRinput_setVersion(arg1,arg2);
|
2159
|
+
vresult = SWIG_From_int((int)(result));
|
2123
2160
|
return vresult;
|
2124
2161
|
fail:
|
2125
2162
|
return Qnil;
|
@@ -2127,144 +2164,132 @@ fail:
|
|
2127
2164
|
|
2128
2165
|
|
2129
2166
|
SWIGINTERN VALUE
|
2130
|
-
|
2131
|
-
|
2132
|
-
int arg2 ;
|
2167
|
+
_wrap_QRinput_getErrorCorrectionLevel(int argc, VALUE *argv, VALUE self) {
|
2168
|
+
QRinput *arg1 = (QRinput *) 0 ;
|
2133
2169
|
void *argp1 = 0 ;
|
2134
2170
|
int res1 = 0 ;
|
2135
|
-
|
2136
|
-
|
2171
|
+
QRecLevel result;
|
2172
|
+
VALUE vresult = Qnil;
|
2137
2173
|
|
2138
2174
|
if ((argc < 1) || (argc > 1)) {
|
2139
2175
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2140
2176
|
}
|
2141
|
-
res1 = SWIG_ConvertPtr(
|
2177
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput, 0 | 0 );
|
2142
2178
|
if (!SWIG_IsOK(res1)) {
|
2143
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2179
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput *","QRinput_getErrorCorrectionLevel", 1, argv[0] ));
|
2144
2180
|
}
|
2145
|
-
arg1 =
|
2146
|
-
|
2147
|
-
|
2148
|
-
|
2149
|
-
}
|
2150
|
-
arg2 = static_cast< int >(val2);
|
2151
|
-
if (arg1) (arg1)->ncDataCodeWord = arg2;
|
2152
|
-
return Qnil;
|
2181
|
+
arg1 = (QRinput *)(argp1);
|
2182
|
+
result = (QRecLevel)QRinput_getErrorCorrectionLevel(arg1);
|
2183
|
+
vresult = SWIG_From_int((int)(result));
|
2184
|
+
return vresult;
|
2153
2185
|
fail:
|
2154
2186
|
return Qnil;
|
2155
2187
|
}
|
2156
2188
|
|
2157
2189
|
|
2158
2190
|
SWIGINTERN VALUE
|
2159
|
-
|
2160
|
-
|
2191
|
+
_wrap_QRinput_setErrorCorrectionLevel(int argc, VALUE *argv, VALUE self) {
|
2192
|
+
QRinput *arg1 = (QRinput *) 0 ;
|
2193
|
+
QRecLevel arg2 ;
|
2161
2194
|
void *argp1 = 0 ;
|
2162
2195
|
int res1 = 0 ;
|
2196
|
+
int val2 ;
|
2197
|
+
int ecode2 = 0 ;
|
2163
2198
|
int result;
|
2164
2199
|
VALUE vresult = Qnil;
|
2165
2200
|
|
2166
|
-
if ((argc <
|
2167
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2201
|
+
if ((argc < 2) || (argc > 2)) {
|
2202
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
2168
2203
|
}
|
2169
|
-
res1 = SWIG_ConvertPtr(
|
2204
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput, 0 | 0 );
|
2170
2205
|
if (!SWIG_IsOK(res1)) {
|
2171
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2206
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput *","QRinput_setErrorCorrectionLevel", 1, argv[0] ));
|
2172
2207
|
}
|
2173
|
-
arg1 =
|
2174
|
-
|
2175
|
-
|
2208
|
+
arg1 = (QRinput *)(argp1);
|
2209
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2210
|
+
if (!SWIG_IsOK(ecode2)) {
|
2211
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "QRecLevel","QRinput_setErrorCorrectionLevel", 2, argv[1] ));
|
2212
|
+
}
|
2213
|
+
arg2 = (QRecLevel)(val2);
|
2214
|
+
result = (int)QRinput_setErrorCorrectionLevel(arg1,arg2);
|
2215
|
+
vresult = SWIG_From_int((int)(result));
|
2176
2216
|
return vresult;
|
2177
2217
|
fail:
|
2178
2218
|
return Qnil;
|
2179
2219
|
}
|
2180
2220
|
|
2181
2221
|
|
2182
|
-
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
2183
|
-
SWIGINTERN VALUE
|
2184
|
-
_wrap_RS_BLOCKINFO_allocate(VALUE self) {
|
2185
|
-
#else
|
2186
|
-
SWIGINTERN VALUE
|
2187
|
-
_wrap_RS_BLOCKINFO_allocate(int argc, VALUE *argv, VALUE self) {
|
2188
|
-
#endif
|
2189
|
-
|
2190
|
-
|
2191
|
-
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_tagRS_BLOCKINFO);
|
2192
|
-
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
2193
|
-
rb_obj_call_init(vresult, argc, argv);
|
2194
|
-
#endif
|
2195
|
-
return vresult;
|
2196
|
-
}
|
2197
|
-
|
2198
|
-
|
2199
2222
|
SWIGINTERN VALUE
|
2200
|
-
|
2201
|
-
|
2223
|
+
_wrap_QRinput_free(int argc, VALUE *argv, VALUE self) {
|
2224
|
+
QRinput *arg1 = (QRinput *) 0 ;
|
2225
|
+
void *argp1 = 0 ;
|
2226
|
+
int res1 = 0 ;
|
2202
2227
|
|
2203
|
-
if ((argc <
|
2204
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2228
|
+
if ((argc < 1) || (argc > 1)) {
|
2229
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2205
2230
|
}
|
2206
|
-
|
2207
|
-
|
2208
|
-
|
2231
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput, 0 | 0 );
|
2232
|
+
if (!SWIG_IsOK(res1)) {
|
2233
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput *","QRinput_free", 1, argv[0] ));
|
2234
|
+
}
|
2235
|
+
arg1 = (QRinput *)(argp1);
|
2236
|
+
QRinput_free(arg1);
|
2237
|
+
return Qnil;
|
2209
2238
|
fail:
|
2210
2239
|
return Qnil;
|
2211
2240
|
}
|
2212
2241
|
|
2213
2242
|
|
2214
|
-
SWIGINTERN void
|
2215
|
-
free_RS_BLOCKINFO(RS_BLOCKINFO *arg1) {
|
2216
|
-
delete arg1;
|
2217
|
-
}
|
2218
|
-
|
2219
|
-
swig_class SwigClassQR_VERSIONINFO;
|
2220
|
-
|
2221
2243
|
SWIGINTERN VALUE
|
2222
|
-
|
2223
|
-
|
2244
|
+
_wrap_QRinput_check(int argc, VALUE *argv, VALUE self) {
|
2245
|
+
QRencodeMode arg1 ;
|
2224
2246
|
int arg2 ;
|
2225
|
-
|
2226
|
-
int
|
2247
|
+
unsigned char *arg3 = (unsigned char *) 0 ;
|
2248
|
+
int val1 ;
|
2249
|
+
int ecode1 = 0 ;
|
2227
2250
|
int val2 ;
|
2228
2251
|
int ecode2 = 0 ;
|
2252
|
+
void *argp3 = 0 ;
|
2253
|
+
int res3 = 0 ;
|
2254
|
+
int result;
|
2255
|
+
VALUE vresult = Qnil;
|
2229
2256
|
|
2230
|
-
if ((argc <
|
2231
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2232
|
-
}
|
2233
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
|
2234
|
-
if (!SWIG_IsOK(res1)) {
|
2235
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QR_VERSIONINFO *","nVersionNo", 1, self ));
|
2257
|
+
if ((argc < 3) || (argc > 3)) {
|
2258
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
2236
2259
|
}
|
2237
|
-
|
2238
|
-
|
2260
|
+
ecode1 = SWIG_AsVal_int(argv[0], &val1);
|
2261
|
+
if (!SWIG_IsOK(ecode1)) {
|
2262
|
+
SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "QRencodeMode","QRinput_check", 1, argv[0] ));
|
2263
|
+
}
|
2264
|
+
arg1 = (QRencodeMode)(val1);
|
2265
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2239
2266
|
if (!SWIG_IsOK(ecode2)) {
|
2240
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","
|
2267
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","QRinput_check", 2, argv[1] ));
|
2241
2268
|
}
|
2242
|
-
arg2 =
|
2243
|
-
|
2244
|
-
|
2269
|
+
arg2 = (int)(val2);
|
2270
|
+
res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
|
2271
|
+
if (!SWIG_IsOK(res3)) {
|
2272
|
+
SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "unsigned char const *","QRinput_check", 3, argv[2] ));
|
2273
|
+
}
|
2274
|
+
arg3 = (unsigned char *)(argp3);
|
2275
|
+
result = (int)QRinput_check(arg1,arg2,(unsigned char const *)arg3);
|
2276
|
+
vresult = SWIG_From_int((int)(result));
|
2277
|
+
return vresult;
|
2245
2278
|
fail:
|
2246
2279
|
return Qnil;
|
2247
2280
|
}
|
2248
2281
|
|
2249
2282
|
|
2250
2283
|
SWIGINTERN VALUE
|
2251
|
-
|
2252
|
-
|
2253
|
-
void *argp1 = 0 ;
|
2254
|
-
int res1 = 0 ;
|
2255
|
-
int result;
|
2284
|
+
_wrap_QRinput_Struct_new(int argc, VALUE *argv, VALUE self) {
|
2285
|
+
QRinput_Struct *result = 0 ;
|
2256
2286
|
VALUE vresult = Qnil;
|
2257
2287
|
|
2258
2288
|
if ((argc < 0) || (argc > 0)) {
|
2259
2289
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2260
2290
|
}
|
2261
|
-
|
2262
|
-
|
2263
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QR_VERSIONINFO *","nVersionNo", 1, self ));
|
2264
|
-
}
|
2265
|
-
arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
|
2266
|
-
result = (int) ((arg1)->nVersionNo);
|
2267
|
-
vresult = SWIG_From_int(static_cast< int >(result));
|
2291
|
+
result = (QRinput_Struct *)QRinput_Struct_new();
|
2292
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__QRinput_Struct, 0 | 0 );
|
2268
2293
|
return vresult;
|
2269
2294
|
fail:
|
2270
2295
|
return Qnil;
|
@@ -2272,28 +2297,28 @@ fail:
|
|
2272
2297
|
|
2273
2298
|
|
2274
2299
|
SWIGINTERN VALUE
|
2275
|
-
|
2276
|
-
|
2277
|
-
|
2300
|
+
_wrap_QRinput_Struct_setParity(int argc, VALUE *argv, VALUE self) {
|
2301
|
+
QRinput_Struct *arg1 = (QRinput_Struct *) 0 ;
|
2302
|
+
unsigned char arg2 ;
|
2278
2303
|
void *argp1 = 0 ;
|
2279
2304
|
int res1 = 0 ;
|
2280
|
-
|
2305
|
+
unsigned char val2 ;
|
2281
2306
|
int ecode2 = 0 ;
|
2282
2307
|
|
2283
|
-
if ((argc <
|
2284
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2308
|
+
if ((argc < 2) || (argc > 2)) {
|
2309
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
2285
2310
|
}
|
2286
|
-
res1 = SWIG_ConvertPtr(
|
2311
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput_Struct, 0 | 0 );
|
2287
2312
|
if (!SWIG_IsOK(res1)) {
|
2288
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2313
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput_Struct *","QRinput_Struct_setParity", 1, argv[0] ));
|
2289
2314
|
}
|
2290
|
-
arg1 =
|
2291
|
-
ecode2 =
|
2315
|
+
arg1 = (QRinput_Struct *)(argp1);
|
2316
|
+
ecode2 = SWIG_AsVal_unsigned_SS_char(argv[1], &val2);
|
2292
2317
|
if (!SWIG_IsOK(ecode2)) {
|
2293
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "
|
2318
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned char","QRinput_Struct_setParity", 2, argv[1] ));
|
2294
2319
|
}
|
2295
|
-
arg2 =
|
2296
|
-
|
2320
|
+
arg2 = (unsigned char)(val2);
|
2321
|
+
QRinput_Struct_setParity(arg1,arg2);
|
2297
2322
|
return Qnil;
|
2298
2323
|
fail:
|
2299
2324
|
return Qnil;
|
@@ -2301,23 +2326,31 @@ fail:
|
|
2301
2326
|
|
2302
2327
|
|
2303
2328
|
SWIGINTERN VALUE
|
2304
|
-
|
2305
|
-
|
2329
|
+
_wrap_QRinput_Struct_appendInput(int argc, VALUE *argv, VALUE self) {
|
2330
|
+
QRinput_Struct *arg1 = (QRinput_Struct *) 0 ;
|
2331
|
+
QRinput *arg2 = (QRinput *) 0 ;
|
2306
2332
|
void *argp1 = 0 ;
|
2307
2333
|
int res1 = 0 ;
|
2334
|
+
void *argp2 = 0 ;
|
2335
|
+
int res2 = 0 ;
|
2308
2336
|
int result;
|
2309
2337
|
VALUE vresult = Qnil;
|
2310
2338
|
|
2311
|
-
if ((argc <
|
2312
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2339
|
+
if ((argc < 2) || (argc > 2)) {
|
2340
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
|
2313
2341
|
}
|
2314
|
-
res1 = SWIG_ConvertPtr(
|
2342
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput_Struct, 0 | 0 );
|
2315
2343
|
if (!SWIG_IsOK(res1)) {
|
2316
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2344
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput_Struct *","QRinput_Struct_appendInput", 1, argv[0] ));
|
2345
|
+
}
|
2346
|
+
arg1 = (QRinput_Struct *)(argp1);
|
2347
|
+
res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p__QRinput, 0 | 0 );
|
2348
|
+
if (!SWIG_IsOK(res2)) {
|
2349
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "QRinput *","QRinput_Struct_appendInput", 2, argv[1] ));
|
2317
2350
|
}
|
2318
|
-
|
2319
|
-
result = (int)
|
2320
|
-
vresult = SWIG_From_int(
|
2351
|
+
arg2 = (QRinput *)(argp2);
|
2352
|
+
result = (int)QRinput_Struct_appendInput(arg1,arg2);
|
2353
|
+
vresult = SWIG_From_int((int)(result));
|
2321
2354
|
return vresult;
|
2322
2355
|
fail:
|
2323
2356
|
return Qnil;
|
@@ -2325,35 +2358,20 @@ fail:
|
|
2325
2358
|
|
2326
2359
|
|
2327
2360
|
SWIGINTERN VALUE
|
2328
|
-
|
2329
|
-
|
2330
|
-
int *arg2 ;
|
2361
|
+
_wrap_QRinput_Struct_free(int argc, VALUE *argv, VALUE self) {
|
2362
|
+
QRinput_Struct *arg1 = (QRinput_Struct *) 0 ;
|
2331
2363
|
void *argp1 = 0 ;
|
2332
2364
|
int res1 = 0 ;
|
2333
|
-
void *argp2 = 0 ;
|
2334
|
-
int res2 = 0 ;
|
2335
2365
|
|
2336
2366
|
if ((argc < 1) || (argc > 1)) {
|
2337
2367
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2338
2368
|
}
|
2339
|
-
res1 = SWIG_ConvertPtr(
|
2369
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput_Struct, 0 | 0 );
|
2340
2370
|
if (!SWIG_IsOK(res1)) {
|
2341
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2342
|
-
}
|
2343
|
-
arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
|
2344
|
-
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_int, 0 | 0 );
|
2345
|
-
if (!SWIG_IsOK(res2)) {
|
2346
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "int [4]","ncDataCodeWord", 2, argv[0] ));
|
2347
|
-
}
|
2348
|
-
arg2 = reinterpret_cast< int * >(argp2);
|
2349
|
-
{
|
2350
|
-
if (arg2) {
|
2351
|
-
size_t ii = 0;
|
2352
|
-
for (; ii < (size_t)4; ++ii) arg1->ncDataCodeWord[ii] = arg2[ii];
|
2353
|
-
} else {
|
2354
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""ncDataCodeWord""' of type '""int [4]""'");
|
2355
|
-
}
|
2371
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput_Struct *","QRinput_Struct_free", 1, argv[0] ));
|
2356
2372
|
}
|
2373
|
+
arg1 = (QRinput_Struct *)(argp1);
|
2374
|
+
QRinput_Struct_free(arg1);
|
2357
2375
|
return Qnil;
|
2358
2376
|
fail:
|
2359
2377
|
return Qnil;
|
@@ -2361,112 +2379,78 @@ fail:
|
|
2361
2379
|
|
2362
2380
|
|
2363
2381
|
SWIGINTERN VALUE
|
2364
|
-
|
2365
|
-
|
2382
|
+
_wrap_QRinput_splitQRinputToStruct(int argc, VALUE *argv, VALUE self) {
|
2383
|
+
QRinput *arg1 = (QRinput *) 0 ;
|
2366
2384
|
void *argp1 = 0 ;
|
2367
2385
|
int res1 = 0 ;
|
2368
|
-
|
2386
|
+
QRinput_Struct *result = 0 ;
|
2369
2387
|
VALUE vresult = Qnil;
|
2370
2388
|
|
2371
|
-
if ((argc < 0) || (argc > 0)) {
|
2372
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2373
|
-
}
|
2374
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_tagQR_VERSIONINFO, 0 | 0 );
|
2375
|
-
if (!SWIG_IsOK(res1)) {
|
2376
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QR_VERSIONINFO *","ncDataCodeWord", 1, self ));
|
2377
|
-
}
|
2378
|
-
arg1 = reinterpret_cast< QR_VERSIONINFO * >(argp1);
|
2379
|
-
result = (int *)(int *) ((arg1)->ncDataCodeWord);
|
2380
|
-
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
|
2381
|
-
return vresult;
|
2382
|
-
fail:
|
2383
|
-
return Qnil;
|
2384
|
-
}
|
2385
|
-
|
2386
|
-
|
2387
|
-
SWIGINTERN VALUE
|
2388
|
-
_wrap_QR_VERSIONINFO_ncAlignPoint_set(int argc, VALUE *argv, VALUE self) {
|
2389
|
-
QR_VERSIONINFO *arg1 = (QR_VERSIONINFO *) 0 ;
|
2390
|
-
int arg2 ;
|
2391
|
-
void *argp1 = 0 ;
|
2392
|
-
int res1 = 0 ;
|
2393
|
-
int val2 ;
|
2394
|
-
int ecode2 = 0 ;
|
2395
|
-
|
2396
2389
|
if ((argc < 1) || (argc > 1)) {
|
2397
2390
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2398
2391
|
}
|
2399
|
-
res1 = SWIG_ConvertPtr(
|
2392
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput, 0 | 0 );
|
2400
2393
|
if (!SWIG_IsOK(res1)) {
|
2401
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2394
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput *","QRinput_splitQRinputToStruct", 1, argv[0] ));
|
2402
2395
|
}
|
2403
|
-
arg1 =
|
2404
|
-
|
2405
|
-
|
2406
|
-
|
2407
|
-
}
|
2408
|
-
arg2 = static_cast< int >(val2);
|
2409
|
-
if (arg1) (arg1)->ncAlignPoint = arg2;
|
2410
|
-
return Qnil;
|
2396
|
+
arg1 = (QRinput *)(argp1);
|
2397
|
+
result = (QRinput_Struct *)QRinput_splitQRinputToStruct(arg1);
|
2398
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__QRinput_Struct, 0 | 0 );
|
2399
|
+
return vresult;
|
2411
2400
|
fail:
|
2412
2401
|
return Qnil;
|
2413
2402
|
}
|
2414
2403
|
|
2415
2404
|
|
2416
2405
|
SWIGINTERN VALUE
|
2417
|
-
|
2418
|
-
|
2406
|
+
_wrap_QRinput_Struct_insertStructuredAppendHeaders(int argc, VALUE *argv, VALUE self) {
|
2407
|
+
QRinput_Struct *arg1 = (QRinput_Struct *) 0 ;
|
2419
2408
|
void *argp1 = 0 ;
|
2420
2409
|
int res1 = 0 ;
|
2421
2410
|
int result;
|
2422
2411
|
VALUE vresult = Qnil;
|
2423
2412
|
|
2424
|
-
if ((argc <
|
2425
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2413
|
+
if ((argc < 1) || (argc > 1)) {
|
2414
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2426
2415
|
}
|
2427
|
-
res1 = SWIG_ConvertPtr(
|
2416
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput_Struct, 0 | 0 );
|
2428
2417
|
if (!SWIG_IsOK(res1)) {
|
2429
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2418
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput_Struct *","QRinput_Struct_insertStructuredAppendHeaders", 1, argv[0] ));
|
2430
2419
|
}
|
2431
|
-
arg1 =
|
2432
|
-
result = (int)
|
2433
|
-
vresult = SWIG_From_int(
|
2420
|
+
arg1 = (QRinput_Struct *)(argp1);
|
2421
|
+
result = (int)QRinput_Struct_insertStructuredAppendHeaders(arg1);
|
2422
|
+
vresult = SWIG_From_int((int)(result));
|
2434
2423
|
return vresult;
|
2435
2424
|
fail:
|
2436
2425
|
return Qnil;
|
2437
2426
|
}
|
2438
2427
|
|
2439
2428
|
|
2429
|
+
swig_class SwigClassQRcode;
|
2430
|
+
|
2440
2431
|
SWIGINTERN VALUE
|
2441
|
-
|
2442
|
-
|
2443
|
-
int
|
2432
|
+
_wrap_QRcode_version_set(int argc, VALUE *argv, VALUE self) {
|
2433
|
+
QRcode *arg1 = (QRcode *) 0 ;
|
2434
|
+
int arg2 ;
|
2444
2435
|
void *argp1 = 0 ;
|
2445
2436
|
int res1 = 0 ;
|
2446
|
-
|
2447
|
-
int
|
2437
|
+
int val2 ;
|
2438
|
+
int ecode2 = 0 ;
|
2448
2439
|
|
2449
2440
|
if ((argc < 1) || (argc > 1)) {
|
2450
2441
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2451
2442
|
}
|
2452
|
-
res1 = SWIG_ConvertPtr(self, &argp1,
|
2443
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRcode, 0 | 0 );
|
2453
2444
|
if (!SWIG_IsOK(res1)) {
|
2454
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2445
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRcode *","version", 1, self ));
|
2455
2446
|
}
|
2456
|
-
arg1 =
|
2457
|
-
|
2458
|
-
if (!SWIG_IsOK(
|
2459
|
-
SWIG_exception_fail(SWIG_ArgError(
|
2447
|
+
arg1 = (QRcode *)(argp1);
|
2448
|
+
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
2449
|
+
if (!SWIG_IsOK(ecode2)) {
|
2450
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","version", 2, argv[0] ));
|
2460
2451
|
}
|
2461
|
-
arg2 =
|
2462
|
-
|
2463
|
-
if (arg2) {
|
2464
|
-
size_t ii = 0;
|
2465
|
-
for (; ii < (size_t)6; ++ii) arg1->nAlignPoint[ii] = arg2[ii];
|
2466
|
-
} else {
|
2467
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""nAlignPoint""' of type '""int [6]""'");
|
2468
|
-
}
|
2469
|
-
}
|
2452
|
+
arg2 = (int)(val2);
|
2453
|
+
if (arg1) (arg1)->version = arg2;
|
2470
2454
|
return Qnil;
|
2471
2455
|
fail:
|
2472
2456
|
return Qnil;
|
@@ -2474,23 +2458,23 @@ fail:
|
|
2474
2458
|
|
2475
2459
|
|
2476
2460
|
SWIGINTERN VALUE
|
2477
|
-
|
2478
|
-
|
2461
|
+
_wrap_QRcode_version_get(int argc, VALUE *argv, VALUE self) {
|
2462
|
+
QRcode *arg1 = (QRcode *) 0 ;
|
2479
2463
|
void *argp1 = 0 ;
|
2480
2464
|
int res1 = 0 ;
|
2481
|
-
int
|
2465
|
+
int result;
|
2482
2466
|
VALUE vresult = Qnil;
|
2483
2467
|
|
2484
2468
|
if ((argc < 0) || (argc > 0)) {
|
2485
2469
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2486
2470
|
}
|
2487
|
-
res1 = SWIG_ConvertPtr(self, &argp1,
|
2471
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRcode, 0 | 0 );
|
2488
2472
|
if (!SWIG_IsOK(res1)) {
|
2489
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2473
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRcode *","version", 1, self ));
|
2490
2474
|
}
|
2491
|
-
arg1 =
|
2492
|
-
result = (int
|
2493
|
-
vresult =
|
2475
|
+
arg1 = (QRcode *)(argp1);
|
2476
|
+
result = (int) ((arg1)->version);
|
2477
|
+
vresult = SWIG_From_int((int)(result));
|
2494
2478
|
return vresult;
|
2495
2479
|
fail:
|
2496
2480
|
return Qnil;
|
@@ -2498,35 +2482,28 @@ fail:
|
|
2498
2482
|
|
2499
2483
|
|
2500
2484
|
SWIGINTERN VALUE
|
2501
|
-
|
2502
|
-
|
2503
|
-
|
2485
|
+
_wrap_QRcode_width_set(int argc, VALUE *argv, VALUE self) {
|
2486
|
+
QRcode *arg1 = (QRcode *) 0 ;
|
2487
|
+
int arg2 ;
|
2504
2488
|
void *argp1 = 0 ;
|
2505
2489
|
int res1 = 0 ;
|
2506
|
-
|
2507
|
-
int
|
2490
|
+
int val2 ;
|
2491
|
+
int ecode2 = 0 ;
|
2508
2492
|
|
2509
2493
|
if ((argc < 1) || (argc > 1)) {
|
2510
2494
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2511
2495
|
}
|
2512
|
-
res1 = SWIG_ConvertPtr(self, &argp1,
|
2496
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRcode, 0 | 0 );
|
2513
2497
|
if (!SWIG_IsOK(res1)) {
|
2514
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2498
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRcode *","width", 1, self ));
|
2515
2499
|
}
|
2516
|
-
arg1 =
|
2517
|
-
|
2518
|
-
if (!SWIG_IsOK(
|
2519
|
-
SWIG_exception_fail(SWIG_ArgError(
|
2500
|
+
arg1 = (QRcode *)(argp1);
|
2501
|
+
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
2502
|
+
if (!SWIG_IsOK(ecode2)) {
|
2503
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","width", 2, argv[0] ));
|
2520
2504
|
}
|
2521
|
-
arg2 =
|
2522
|
-
|
2523
|
-
if (arg2) {
|
2524
|
-
size_t ii = 0;
|
2525
|
-
for (; ii < (size_t)4; ++ii) arg1->RS_BlockInfo1[ii] = arg2[ii];
|
2526
|
-
} else {
|
2527
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""RS_BlockInfo1""' of type '""RS_BLOCKINFO [4]""'");
|
2528
|
-
}
|
2529
|
-
}
|
2505
|
+
arg2 = (int)(val2);
|
2506
|
+
if (arg1) (arg1)->width = arg2;
|
2530
2507
|
return Qnil;
|
2531
2508
|
fail:
|
2532
2509
|
return Qnil;
|
@@ -2534,23 +2511,23 @@ fail:
|
|
2534
2511
|
|
2535
2512
|
|
2536
2513
|
SWIGINTERN VALUE
|
2537
|
-
|
2538
|
-
|
2514
|
+
_wrap_QRcode_width_get(int argc, VALUE *argv, VALUE self) {
|
2515
|
+
QRcode *arg1 = (QRcode *) 0 ;
|
2539
2516
|
void *argp1 = 0 ;
|
2540
2517
|
int res1 = 0 ;
|
2541
|
-
|
2518
|
+
int result;
|
2542
2519
|
VALUE vresult = Qnil;
|
2543
2520
|
|
2544
2521
|
if ((argc < 0) || (argc > 0)) {
|
2545
2522
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2546
2523
|
}
|
2547
|
-
res1 = SWIG_ConvertPtr(self, &argp1,
|
2524
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRcode, 0 | 0 );
|
2548
2525
|
if (!SWIG_IsOK(res1)) {
|
2549
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2526
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRcode *","width", 1, self ));
|
2550
2527
|
}
|
2551
|
-
arg1 =
|
2552
|
-
result = (
|
2553
|
-
vresult =
|
2528
|
+
arg1 = (QRcode *)(argp1);
|
2529
|
+
result = (int) ((arg1)->width);
|
2530
|
+
vresult = SWIG_From_int((int)(result));
|
2554
2531
|
return vresult;
|
2555
2532
|
fail:
|
2556
2533
|
return Qnil;
|
@@ -2558,9 +2535,9 @@ fail:
|
|
2558
2535
|
|
2559
2536
|
|
2560
2537
|
SWIGINTERN VALUE
|
2561
|
-
|
2562
|
-
|
2563
|
-
|
2538
|
+
_wrap_QRcode_data_set(int argc, VALUE *argv, VALUE self) {
|
2539
|
+
QRcode *arg1 = (QRcode *) 0 ;
|
2540
|
+
unsigned char *arg2 = (unsigned char *) 0 ;
|
2564
2541
|
void *argp1 = 0 ;
|
2565
2542
|
int res1 = 0 ;
|
2566
2543
|
void *argp2 = 0 ;
|
@@ -2569,24 +2546,17 @@ _wrap_QR_VERSIONINFO_RS_BlockInfo2_set(int argc, VALUE *argv, VALUE self) {
|
|
2569
2546
|
if ((argc < 1) || (argc > 1)) {
|
2570
2547
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2571
2548
|
}
|
2572
|
-
res1 = SWIG_ConvertPtr(self, &argp1,
|
2549
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRcode, 0 | 0 );
|
2573
2550
|
if (!SWIG_IsOK(res1)) {
|
2574
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2551
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRcode *","data", 1, self ));
|
2575
2552
|
}
|
2576
|
-
arg1 =
|
2577
|
-
res2 = SWIG_ConvertPtr(argv[0], &argp2,
|
2553
|
+
arg1 = (QRcode *)(argp1);
|
2554
|
+
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_unsigned_char, SWIG_POINTER_DISOWN | 0 );
|
2578
2555
|
if (!SWIG_IsOK(res2)) {
|
2579
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "
|
2580
|
-
}
|
2581
|
-
arg2 = reinterpret_cast< RS_BLOCKINFO * >(argp2);
|
2582
|
-
{
|
2583
|
-
if (arg2) {
|
2584
|
-
size_t ii = 0;
|
2585
|
-
for (; ii < (size_t)4; ++ii) arg1->RS_BlockInfo2[ii] = arg2[ii];
|
2586
|
-
} else {
|
2587
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""RS_BlockInfo2""' of type '""RS_BLOCKINFO [4]""'");
|
2588
|
-
}
|
2556
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "unsigned char *","data", 2, argv[0] ));
|
2589
2557
|
}
|
2558
|
+
arg2 = (unsigned char *)(argp2);
|
2559
|
+
if (arg1) (arg1)->data = arg2;
|
2590
2560
|
return Qnil;
|
2591
2561
|
fail:
|
2592
2562
|
return Qnil;
|
@@ -2594,78 +2564,63 @@ fail:
|
|
2594
2564
|
|
2595
2565
|
|
2596
2566
|
SWIGINTERN VALUE
|
2597
|
-
|
2598
|
-
|
2567
|
+
_wrap_QRcode_data_get(int argc, VALUE *argv, VALUE self) {
|
2568
|
+
QRcode *arg1 = (QRcode *) 0 ;
|
2599
2569
|
void *argp1 = 0 ;
|
2600
2570
|
int res1 = 0 ;
|
2601
|
-
|
2571
|
+
unsigned char *result = 0 ;
|
2602
2572
|
VALUE vresult = Qnil;
|
2603
2573
|
|
2604
2574
|
if ((argc < 0) || (argc > 0)) {
|
2605
2575
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2606
2576
|
}
|
2607
|
-
res1 = SWIG_ConvertPtr(self, &argp1,
|
2577
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRcode, 0 | 0 );
|
2608
2578
|
if (!SWIG_IsOK(res1)) {
|
2609
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2579
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRcode *","data", 1, self ));
|
2610
2580
|
}
|
2611
|
-
arg1 =
|
2612
|
-
result = (
|
2613
|
-
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result),
|
2581
|
+
arg1 = (QRcode *)(argp1);
|
2582
|
+
result = (unsigned char *) ((arg1)->data);
|
2583
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
|
2614
2584
|
return vresult;
|
2615
2585
|
fail:
|
2616
2586
|
return Qnil;
|
2617
2587
|
}
|
2618
2588
|
|
2619
2589
|
|
2620
|
-
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
2621
|
-
SWIGINTERN VALUE
|
2622
|
-
_wrap_QR_VERSIONINFO_allocate(VALUE self) {
|
2623
|
-
#else
|
2624
|
-
SWIGINTERN VALUE
|
2625
|
-
_wrap_QR_VERSIONINFO_allocate(int argc, VALUE *argv, VALUE self) {
|
2626
|
-
#endif
|
2627
|
-
|
2628
|
-
|
2629
|
-
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_tagQR_VERSIONINFO);
|
2630
|
-
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
2631
|
-
rb_obj_call_init(vresult, argc, argv);
|
2632
|
-
#endif
|
2633
|
-
return vresult;
|
2634
|
-
}
|
2635
|
-
|
2636
|
-
|
2637
2590
|
SWIGINTERN VALUE
|
2638
|
-
|
2639
|
-
|
2591
|
+
_wrap_QRcode_modules(int argc, VALUE *argv, VALUE self) {
|
2592
|
+
QRcode *arg1 = (QRcode *) 0 ;
|
2593
|
+
void *argp1 = 0 ;
|
2594
|
+
int res1 = 0 ;
|
2595
|
+
VALUE result;
|
2596
|
+
VALUE vresult = Qnil;
|
2640
2597
|
|
2641
2598
|
if ((argc < 0) || (argc > 0)) {
|
2642
2599
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2643
2600
|
}
|
2644
|
-
|
2645
|
-
|
2646
|
-
|
2601
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_QRcode, 0 | 0 );
|
2602
|
+
if (!SWIG_IsOK(res1)) {
|
2603
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRcode *","modules", 1, self ));
|
2604
|
+
}
|
2605
|
+
arg1 = (QRcode *)(argp1);
|
2606
|
+
result = (VALUE)QRcode_modules(arg1);
|
2607
|
+
vresult = result;
|
2608
|
+
return vresult;
|
2647
2609
|
fail:
|
2648
2610
|
return Qnil;
|
2649
2611
|
}
|
2650
2612
|
|
2651
2613
|
|
2652
|
-
SWIGINTERN void
|
2653
|
-
free_QR_VERSIONINFO(QR_VERSIONINFO *arg1) {
|
2654
|
-
delete arg1;
|
2655
|
-
}
|
2656
|
-
|
2657
|
-
swig_class SwigClassCQR_Encode;
|
2658
|
-
|
2659
2614
|
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
2660
2615
|
SWIGINTERN VALUE
|
2661
|
-
|
2616
|
+
_wrap_QRcode_allocate(VALUE self) {
|
2662
2617
|
#else
|
2663
2618
|
SWIGINTERN VALUE
|
2664
|
-
|
2619
|
+
_wrap_QRcode_allocate(int argc, VALUE *argv, VALUE self) {
|
2665
2620
|
#endif
|
2666
2621
|
|
2667
2622
|
|
2668
|
-
VALUE vresult = SWIG_NewClassInstance(self,
|
2623
|
+
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_QRcode);
|
2669
2624
|
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
2670
2625
|
rb_obj_call_init(vresult, argc, argv);
|
2671
2626
|
#endif
|
@@ -2674,13 +2629,13 @@ _wrap_CQR_Encode_allocate(VALUE self) {
|
|
2674
2629
|
|
2675
2630
|
|
2676
2631
|
SWIGINTERN VALUE
|
2677
|
-
|
2678
|
-
|
2632
|
+
_wrap_new_QRcode(int argc, VALUE *argv, VALUE self) {
|
2633
|
+
QRcode *result = 0 ;
|
2679
2634
|
|
2680
2635
|
if ((argc < 0) || (argc > 0)) {
|
2681
2636
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2682
2637
|
}
|
2683
|
-
result = (
|
2638
|
+
result = (QRcode *)calloc(1, sizeof(QRcode));
|
2684
2639
|
DATA_PTR(self) = result;
|
2685
2640
|
return self;
|
2686
2641
|
fail:
|
@@ -2689,33 +2644,35 @@ fail:
|
|
2689
2644
|
|
2690
2645
|
|
2691
2646
|
SWIGINTERN void
|
2692
|
-
|
2693
|
-
|
2647
|
+
free_QRcode(QRcode *arg1) {
|
2648
|
+
free((char *) arg1);
|
2694
2649
|
}
|
2695
2650
|
|
2651
|
+
swig_class SwigClass_QRcode_List;
|
2652
|
+
|
2696
2653
|
SWIGINTERN VALUE
|
2697
|
-
|
2698
|
-
|
2699
|
-
|
2654
|
+
_wrap__QRcode_List_code_set(int argc, VALUE *argv, VALUE self) {
|
2655
|
+
struct _QRcode_List *arg1 = (struct _QRcode_List *) 0 ;
|
2656
|
+
QRcode *arg2 = (QRcode *) 0 ;
|
2700
2657
|
void *argp1 = 0 ;
|
2701
2658
|
int res1 = 0 ;
|
2702
|
-
|
2703
|
-
int
|
2659
|
+
void *argp2 = 0 ;
|
2660
|
+
int res2 = 0 ;
|
2704
2661
|
|
2705
2662
|
if ((argc < 1) || (argc > 1)) {
|
2706
2663
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2707
2664
|
}
|
2708
|
-
res1 = SWIG_ConvertPtr(self, &argp1,
|
2665
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__QRcode_List, 0 | 0 );
|
2709
2666
|
if (!SWIG_IsOK(res1)) {
|
2710
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2667
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _QRcode_List *","code", 1, self ));
|
2711
2668
|
}
|
2712
|
-
arg1 =
|
2713
|
-
|
2714
|
-
if (!SWIG_IsOK(
|
2715
|
-
SWIG_exception_fail(SWIG_ArgError(
|
2716
|
-
}
|
2717
|
-
arg2 =
|
2718
|
-
if (arg1) (arg1)->
|
2669
|
+
arg1 = (struct _QRcode_List *)(argp1);
|
2670
|
+
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_QRcode, SWIG_POINTER_DISOWN | 0 );
|
2671
|
+
if (!SWIG_IsOK(res2)) {
|
2672
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "QRcode *","code", 2, argv[0] ));
|
2673
|
+
}
|
2674
|
+
arg2 = (QRcode *)(argp2);
|
2675
|
+
if (arg1) (arg1)->code = arg2;
|
2719
2676
|
return Qnil;
|
2720
2677
|
fail:
|
2721
2678
|
return Qnil;
|
@@ -2723,23 +2680,23 @@ fail:
|
|
2723
2680
|
|
2724
2681
|
|
2725
2682
|
SWIGINTERN VALUE
|
2726
|
-
|
2727
|
-
|
2683
|
+
_wrap__QRcode_List_code_get(int argc, VALUE *argv, VALUE self) {
|
2684
|
+
struct _QRcode_List *arg1 = (struct _QRcode_List *) 0 ;
|
2728
2685
|
void *argp1 = 0 ;
|
2729
2686
|
int res1 = 0 ;
|
2730
|
-
|
2687
|
+
QRcode *result = 0 ;
|
2731
2688
|
VALUE vresult = Qnil;
|
2732
2689
|
|
2733
2690
|
if ((argc < 0) || (argc > 0)) {
|
2734
2691
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2735
2692
|
}
|
2736
|
-
res1 = SWIG_ConvertPtr(self, &argp1,
|
2693
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__QRcode_List, 0 | 0 );
|
2737
2694
|
if (!SWIG_IsOK(res1)) {
|
2738
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2695
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _QRcode_List *","code", 1, self ));
|
2739
2696
|
}
|
2740
|
-
arg1 =
|
2741
|
-
result = (
|
2742
|
-
vresult =
|
2697
|
+
arg1 = (struct _QRcode_List *)(argp1);
|
2698
|
+
result = (QRcode *) ((arg1)->code);
|
2699
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QRcode, 0 | 0 );
|
2743
2700
|
return vresult;
|
2744
2701
|
fail:
|
2745
2702
|
return Qnil;
|
@@ -2747,28 +2704,28 @@ fail:
|
|
2747
2704
|
|
2748
2705
|
|
2749
2706
|
SWIGINTERN VALUE
|
2750
|
-
|
2751
|
-
|
2752
|
-
|
2707
|
+
_wrap__QRcode_List_next_set(int argc, VALUE *argv, VALUE self) {
|
2708
|
+
struct _QRcode_List *arg1 = (struct _QRcode_List *) 0 ;
|
2709
|
+
QRcode_List *arg2 = (QRcode_List *) 0 ;
|
2753
2710
|
void *argp1 = 0 ;
|
2754
2711
|
int res1 = 0 ;
|
2755
|
-
|
2756
|
-
int
|
2712
|
+
void *argp2 = 0 ;
|
2713
|
+
int res2 = 0 ;
|
2757
2714
|
|
2758
2715
|
if ((argc < 1) || (argc > 1)) {
|
2759
2716
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2760
2717
|
}
|
2761
|
-
res1 = SWIG_ConvertPtr(self, &argp1,
|
2718
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__QRcode_List, 0 | 0 );
|
2762
2719
|
if (!SWIG_IsOK(res1)) {
|
2763
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2720
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _QRcode_List *","next", 1, self ));
|
2764
2721
|
}
|
2765
|
-
arg1 =
|
2766
|
-
|
2767
|
-
if (!SWIG_IsOK(
|
2768
|
-
SWIG_exception_fail(SWIG_ArgError(
|
2769
|
-
}
|
2770
|
-
arg2 =
|
2771
|
-
if (arg1) (arg1)->
|
2722
|
+
arg1 = (struct _QRcode_List *)(argp1);
|
2723
|
+
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p__QRcode_List, SWIG_POINTER_DISOWN | 0 );
|
2724
|
+
if (!SWIG_IsOK(res2)) {
|
2725
|
+
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "QRcode_List *","next", 2, argv[0] ));
|
2726
|
+
}
|
2727
|
+
arg2 = (QRcode_List *)(argp2);
|
2728
|
+
if (arg1) (arg1)->next = arg2;
|
2772
2729
|
return Qnil;
|
2773
2730
|
fail:
|
2774
2731
|
return Qnil;
|
@@ -2776,129 +2733,84 @@ fail:
|
|
2776
2733
|
|
2777
2734
|
|
2778
2735
|
SWIGINTERN VALUE
|
2779
|
-
|
2780
|
-
|
2736
|
+
_wrap__QRcode_List_next_get(int argc, VALUE *argv, VALUE self) {
|
2737
|
+
struct _QRcode_List *arg1 = (struct _QRcode_List *) 0 ;
|
2781
2738
|
void *argp1 = 0 ;
|
2782
2739
|
int res1 = 0 ;
|
2783
|
-
|
2740
|
+
QRcode_List *result = 0 ;
|
2784
2741
|
VALUE vresult = Qnil;
|
2785
2742
|
|
2786
2743
|
if ((argc < 0) || (argc > 0)) {
|
2787
2744
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2788
2745
|
}
|
2789
|
-
res1 = SWIG_ConvertPtr(self, &argp1,
|
2746
|
+
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__QRcode_List, 0 | 0 );
|
2790
2747
|
if (!SWIG_IsOK(res1)) {
|
2791
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2748
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "struct _QRcode_List *","next", 1, self ));
|
2792
2749
|
}
|
2793
|
-
arg1 =
|
2794
|
-
result = (
|
2795
|
-
vresult =
|
2750
|
+
arg1 = (struct _QRcode_List *)(argp1);
|
2751
|
+
result = (QRcode_List *) ((arg1)->next);
|
2752
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__QRcode_List, 0 | 0 );
|
2796
2753
|
return vresult;
|
2797
2754
|
fail:
|
2798
2755
|
return Qnil;
|
2799
2756
|
}
|
2800
2757
|
|
2801
2758
|
|
2759
|
+
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
2802
2760
|
SWIGINTERN VALUE
|
2803
|
-
|
2804
|
-
|
2805
|
-
|
2806
|
-
|
2807
|
-
|
2808
|
-
|
2809
|
-
|
2810
|
-
|
2811
|
-
|
2812
|
-
|
2813
|
-
|
2814
|
-
|
2815
|
-
if (!SWIG_IsOK(res1)) {
|
2816
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CQR_Encode *","m_bAutoExtent", 1, self ));
|
2761
|
+
_wrap__QRcode_List_allocate(VALUE self) {
|
2762
|
+
#else
|
2763
|
+
SWIGINTERN VALUE
|
2764
|
+
_wrap__QRcode_List_allocate(int argc, VALUE *argv, VALUE self) {
|
2765
|
+
#endif
|
2766
|
+
|
2767
|
+
|
2768
|
+
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p__QRcode_List);
|
2769
|
+
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
2770
|
+
rb_obj_call_init(vresult, argc, argv);
|
2771
|
+
#endif
|
2772
|
+
return vresult;
|
2817
2773
|
}
|
2818
|
-
|
2819
|
-
ecode2 = SWIG_AsVal_bool(argv[0], &val2);
|
2820
|
-
if (!SWIG_IsOK(ecode2)) {
|
2821
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "BOOL","m_bAutoExtent", 2, argv[0] ));
|
2822
|
-
}
|
2823
|
-
arg2 = static_cast< BOOL >(val2);
|
2824
|
-
if (arg1) (arg1)->m_bAutoExtent = arg2;
|
2825
|
-
return Qnil;
|
2826
|
-
fail:
|
2827
|
-
return Qnil;
|
2828
|
-
}
|
2829
|
-
|
2774
|
+
|
2830
2775
|
|
2831
2776
|
SWIGINTERN VALUE
|
2832
|
-
|
2833
|
-
|
2834
|
-
void *argp1 = 0 ;
|
2835
|
-
int res1 = 0 ;
|
2836
|
-
BOOL result;
|
2837
|
-
VALUE vresult = Qnil;
|
2777
|
+
_wrap_new__QRcode_List(int argc, VALUE *argv, VALUE self) {
|
2778
|
+
struct _QRcode_List *result = 0 ;
|
2838
2779
|
|
2839
2780
|
if ((argc < 0) || (argc > 0)) {
|
2840
2781
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
|
2841
2782
|
}
|
2842
|
-
|
2843
|
-
|
2844
|
-
|
2845
|
-
}
|
2846
|
-
arg1 = reinterpret_cast< CQR_Encode * >(argp1);
|
2847
|
-
result = (BOOL) ((arg1)->m_bAutoExtent);
|
2848
|
-
vresult = SWIG_From_bool(static_cast< bool >(result));
|
2849
|
-
return vresult;
|
2783
|
+
result = (struct _QRcode_List *)calloc(1, sizeof(struct _QRcode_List));
|
2784
|
+
DATA_PTR(self) = result;
|
2785
|
+
return self;
|
2850
2786
|
fail:
|
2851
2787
|
return Qnil;
|
2852
2788
|
}
|
2853
2789
|
|
2854
2790
|
|
2855
|
-
SWIGINTERN
|
2856
|
-
|
2857
|
-
|
2858
|
-
int arg2 ;
|
2859
|
-
void *argp1 = 0 ;
|
2860
|
-
int res1 = 0 ;
|
2861
|
-
int val2 ;
|
2862
|
-
int ecode2 = 0 ;
|
2863
|
-
|
2864
|
-
if ((argc < 1) || (argc > 1)) {
|
2865
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2866
|
-
}
|
2867
|
-
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CQR_Encode, 0 | 0 );
|
2868
|
-
if (!SWIG_IsOK(res1)) {
|
2869
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CQR_Encode *","m_nMaskingNo", 1, self ));
|
2870
|
-
}
|
2871
|
-
arg1 = reinterpret_cast< CQR_Encode * >(argp1);
|
2872
|
-
ecode2 = SWIG_AsVal_int(argv[0], &val2);
|
2873
|
-
if (!SWIG_IsOK(ecode2)) {
|
2874
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","m_nMaskingNo", 2, argv[0] ));
|
2875
|
-
}
|
2876
|
-
arg2 = static_cast< int >(val2);
|
2877
|
-
if (arg1) (arg1)->m_nMaskingNo = arg2;
|
2878
|
-
return Qnil;
|
2879
|
-
fail:
|
2880
|
-
return Qnil;
|
2791
|
+
SWIGINTERN void
|
2792
|
+
free__QRcode_List(struct _QRcode_List *arg1) {
|
2793
|
+
free((char *) arg1);
|
2881
2794
|
}
|
2882
2795
|
|
2883
|
-
|
2884
2796
|
SWIGINTERN VALUE
|
2885
|
-
|
2886
|
-
|
2797
|
+
_wrap_QRcode_encodeInput(int argc, VALUE *argv, VALUE self) {
|
2798
|
+
QRinput *arg1 = (QRinput *) 0 ;
|
2887
2799
|
void *argp1 = 0 ;
|
2888
2800
|
int res1 = 0 ;
|
2889
|
-
|
2801
|
+
QRcode *result = 0 ;
|
2890
2802
|
VALUE vresult = Qnil;
|
2891
2803
|
|
2892
|
-
if ((argc <
|
2893
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2804
|
+
if ((argc < 1) || (argc > 1)) {
|
2805
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2894
2806
|
}
|
2895
|
-
res1 = SWIG_ConvertPtr(
|
2807
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput, 0 | 0 );
|
2896
2808
|
if (!SWIG_IsOK(res1)) {
|
2897
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2809
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput *","QRcode_encodeInput", 1, argv[0] ));
|
2898
2810
|
}
|
2899
|
-
arg1 =
|
2900
|
-
result = (
|
2901
|
-
vresult =
|
2811
|
+
arg1 = (QRinput *)(argp1);
|
2812
|
+
result = (QRcode *)QRcode_encodeInput(arg1);
|
2813
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QRcode, 0 | 0 );
|
2902
2814
|
return vresult;
|
2903
2815
|
fail:
|
2904
2816
|
return Qnil;
|
@@ -2906,95 +2818,122 @@ fail:
|
|
2906
2818
|
|
2907
2819
|
|
2908
2820
|
SWIGINTERN VALUE
|
2909
|
-
|
2910
|
-
|
2821
|
+
_wrap_QRcode_encodeString(int argc, VALUE *argv, VALUE self) {
|
2822
|
+
char *arg1 = (char *) 0 ;
|
2911
2823
|
int arg2 ;
|
2912
|
-
|
2913
|
-
|
2824
|
+
QRecLevel arg3 ;
|
2825
|
+
QRencodeMode arg4 ;
|
2826
|
+
int arg5 ;
|
2827
|
+
int res1 ;
|
2828
|
+
char *buf1 = 0 ;
|
2829
|
+
int alloc1 = 0 ;
|
2914
2830
|
int val2 ;
|
2915
2831
|
int ecode2 = 0 ;
|
2832
|
+
int val3 ;
|
2833
|
+
int ecode3 = 0 ;
|
2834
|
+
int val4 ;
|
2835
|
+
int ecode4 = 0 ;
|
2836
|
+
int val5 ;
|
2837
|
+
int ecode5 = 0 ;
|
2838
|
+
QRcode *result = 0 ;
|
2839
|
+
VALUE vresult = Qnil;
|
2916
2840
|
|
2917
|
-
if ((argc <
|
2918
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2841
|
+
if ((argc < 5) || (argc > 5)) {
|
2842
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
|
2919
2843
|
}
|
2920
|
-
res1 =
|
2844
|
+
res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
|
2921
2845
|
if (!SWIG_IsOK(res1)) {
|
2922
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2846
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","QRcode_encodeString", 1, argv[0] ));
|
2923
2847
|
}
|
2924
|
-
arg1 =
|
2925
|
-
ecode2 = SWIG_AsVal_int(argv[
|
2848
|
+
arg1 = (char *)(buf1);
|
2849
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2926
2850
|
if (!SWIG_IsOK(ecode2)) {
|
2927
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","
|
2851
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","QRcode_encodeString", 2, argv[1] ));
|
2928
2852
|
}
|
2929
|
-
arg2 =
|
2930
|
-
|
2931
|
-
|
2853
|
+
arg2 = (int)(val2);
|
2854
|
+
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
2855
|
+
if (!SWIG_IsOK(ecode3)) {
|
2856
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "QRecLevel","QRcode_encodeString", 3, argv[2] ));
|
2857
|
+
}
|
2858
|
+
arg3 = (QRecLevel)(val3);
|
2859
|
+
ecode4 = SWIG_AsVal_int(argv[3], &val4);
|
2860
|
+
if (!SWIG_IsOK(ecode4)) {
|
2861
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "QRencodeMode","QRcode_encodeString", 4, argv[3] ));
|
2862
|
+
}
|
2863
|
+
arg4 = (QRencodeMode)(val4);
|
2864
|
+
ecode5 = SWIG_AsVal_int(argv[4], &val5);
|
2865
|
+
if (!SWIG_IsOK(ecode5)) {
|
2866
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","QRcode_encodeString", 5, argv[4] ));
|
2867
|
+
}
|
2868
|
+
arg5 = (int)(val5);
|
2869
|
+
result = (QRcode *)QRcode_encodeString((char const *)arg1,arg2,arg3,arg4,arg5);
|
2870
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QRcode, 0 | 0 );
|
2871
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
2872
|
+
return vresult;
|
2932
2873
|
fail:
|
2874
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
2933
2875
|
return Qnil;
|
2934
2876
|
}
|
2935
2877
|
|
2936
2878
|
|
2937
2879
|
SWIGINTERN VALUE
|
2938
|
-
|
2939
|
-
|
2940
|
-
|
2941
|
-
|
2942
|
-
int
|
2880
|
+
_wrap_QRcode_encodeString8bit(int argc, VALUE *argv, VALUE self) {
|
2881
|
+
char *arg1 = (char *) 0 ;
|
2882
|
+
int arg2 ;
|
2883
|
+
QRecLevel arg3 ;
|
2884
|
+
int res1 ;
|
2885
|
+
char *buf1 = 0 ;
|
2886
|
+
int alloc1 = 0 ;
|
2887
|
+
int val2 ;
|
2888
|
+
int ecode2 = 0 ;
|
2889
|
+
int val3 ;
|
2890
|
+
int ecode3 = 0 ;
|
2891
|
+
QRcode *result = 0 ;
|
2943
2892
|
VALUE vresult = Qnil;
|
2944
2893
|
|
2945
|
-
if ((argc <
|
2946
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2894
|
+
if ((argc < 3) || (argc > 3)) {
|
2895
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
2947
2896
|
}
|
2948
|
-
res1 =
|
2897
|
+
res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
|
2949
2898
|
if (!SWIG_IsOK(res1)) {
|
2950
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2899
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","QRcode_encodeString8bit", 1, argv[0] ));
|
2951
2900
|
}
|
2952
|
-
arg1 =
|
2953
|
-
|
2954
|
-
|
2901
|
+
arg1 = (char *)(buf1);
|
2902
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
2903
|
+
if (!SWIG_IsOK(ecode2)) {
|
2904
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","QRcode_encodeString8bit", 2, argv[1] ));
|
2905
|
+
}
|
2906
|
+
arg2 = (int)(val2);
|
2907
|
+
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
2908
|
+
if (!SWIG_IsOK(ecode3)) {
|
2909
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "QRecLevel","QRcode_encodeString8bit", 3, argv[2] ));
|
2910
|
+
}
|
2911
|
+
arg3 = (QRecLevel)(val3);
|
2912
|
+
result = (QRcode *)QRcode_encodeString8bit((char const *)arg1,arg2,arg3);
|
2913
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QRcode, 0 | 0 );
|
2914
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
2955
2915
|
return vresult;
|
2956
2916
|
fail:
|
2917
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
2957
2918
|
return Qnil;
|
2958
2919
|
}
|
2959
2920
|
|
2960
2921
|
|
2961
2922
|
SWIGINTERN VALUE
|
2962
|
-
|
2963
|
-
|
2964
|
-
BYTE (*arg2)[177] ;
|
2923
|
+
_wrap_QRcode_free(int argc, VALUE *argv, VALUE self) {
|
2924
|
+
QRcode *arg1 = (QRcode *) 0 ;
|
2965
2925
|
void *argp1 = 0 ;
|
2966
2926
|
int res1 = 0 ;
|
2967
|
-
void *argp2 = 0 ;
|
2968
|
-
int res2 = 0 ;
|
2969
2927
|
|
2970
2928
|
if ((argc < 1) || (argc > 1)) {
|
2971
2929
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
2972
2930
|
}
|
2973
|
-
res1 = SWIG_ConvertPtr(
|
2931
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_QRcode, 0 | 0 );
|
2974
2932
|
if (!SWIG_IsOK(res1)) {
|
2975
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2976
|
-
}
|
2977
|
-
arg1 = reinterpret_cast< CQR_Encode * >(argp1);
|
2978
|
-
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_a_177__unsigned_char, 0 | 0 );
|
2979
|
-
if (!SWIG_IsOK(res2)) {
|
2980
|
-
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "BYTE [177][177]","m_byModuleData", 2, argv[0] ));
|
2981
|
-
}
|
2982
|
-
arg2 = reinterpret_cast< BYTE (*)[177] >(argp2);
|
2983
|
-
{
|
2984
|
-
if (arg2) {
|
2985
|
-
size_t ii = 0;
|
2986
|
-
for (; ii < (size_t)177; ++ii) {
|
2987
|
-
if (arg2[ii]) {
|
2988
|
-
size_t jj = 0;
|
2989
|
-
for (; jj < (size_t)177; ++jj) arg1->m_byModuleData[ii][jj] = arg2[ii][jj];
|
2990
|
-
} else {
|
2991
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""m_byModuleData""' of type '""BYTE [177][177]""'");
|
2992
|
-
}
|
2993
|
-
}
|
2994
|
-
} else {
|
2995
|
-
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""m_byModuleData""' of type '""BYTE [177][177]""'");
|
2996
|
-
}
|
2933
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRcode *","QRcode_free", 1, argv[0] ));
|
2997
2934
|
}
|
2935
|
+
arg1 = (QRcode *)(argp1);
|
2936
|
+
QRcode_free(arg1);
|
2998
2937
|
return Qnil;
|
2999
2938
|
fail:
|
3000
2939
|
return Qnil;
|
@@ -3002,23 +2941,23 @@ fail:
|
|
3002
2941
|
|
3003
2942
|
|
3004
2943
|
SWIGINTERN VALUE
|
3005
|
-
|
3006
|
-
|
2944
|
+
_wrap_QRcode_encodeInputStructured(int argc, VALUE *argv, VALUE self) {
|
2945
|
+
QRinput_Struct *arg1 = (QRinput_Struct *) 0 ;
|
3007
2946
|
void *argp1 = 0 ;
|
3008
2947
|
int res1 = 0 ;
|
3009
|
-
|
2948
|
+
QRcode_List *result = 0 ;
|
3010
2949
|
VALUE vresult = Qnil;
|
3011
2950
|
|
3012
|
-
if ((argc <
|
3013
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2951
|
+
if ((argc < 1) || (argc > 1)) {
|
2952
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3014
2953
|
}
|
3015
|
-
res1 = SWIG_ConvertPtr(
|
2954
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRinput_Struct, 0 | 0 );
|
3016
2955
|
if (!SWIG_IsOK(res1)) {
|
3017
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2956
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRinput_Struct *","QRcode_encodeInputStructured", 1, argv[0] ));
|
3018
2957
|
}
|
3019
|
-
arg1 =
|
3020
|
-
result = (
|
3021
|
-
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result),
|
2958
|
+
arg1 = (QRinput_Struct *)(argp1);
|
2959
|
+
result = (QRcode_List *)QRcode_encodeInputStructured(arg1);
|
2960
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__QRcode_List, 0 | 0 );
|
3022
2961
|
return vresult;
|
3023
2962
|
fail:
|
3024
2963
|
return Qnil;
|
@@ -3026,267 +2965,147 @@ fail:
|
|
3026
2965
|
|
3027
2966
|
|
3028
2967
|
SWIGINTERN VALUE
|
3029
|
-
|
3030
|
-
|
2968
|
+
_wrap_QRcode_encodeStringStructured(int argc, VALUE *argv, VALUE self) {
|
2969
|
+
char *arg1 = (char *) 0 ;
|
3031
2970
|
int arg2 ;
|
3032
|
-
|
3033
|
-
|
2971
|
+
QRecLevel arg3 ;
|
2972
|
+
QRencodeMode arg4 ;
|
3034
2973
|
int arg5 ;
|
3035
|
-
|
3036
|
-
|
3037
|
-
|
3038
|
-
int res1 = 0 ;
|
2974
|
+
int res1 ;
|
2975
|
+
char *buf1 = 0 ;
|
2976
|
+
int alloc1 = 0 ;
|
3039
2977
|
int val2 ;
|
3040
2978
|
int ecode2 = 0 ;
|
3041
2979
|
int val3 ;
|
3042
2980
|
int ecode3 = 0 ;
|
3043
|
-
|
2981
|
+
int val4 ;
|
3044
2982
|
int ecode4 = 0 ;
|
3045
2983
|
int val5 ;
|
3046
2984
|
int ecode5 = 0 ;
|
3047
|
-
|
3048
|
-
char *buf6 = 0 ;
|
3049
|
-
int alloc6 = 0 ;
|
3050
|
-
int val7 ;
|
3051
|
-
int ecode7 = 0 ;
|
3052
|
-
BOOL result;
|
2985
|
+
QRcode_List *result = 0 ;
|
3053
2986
|
VALUE vresult = Qnil;
|
3054
2987
|
|
3055
|
-
if ((argc <
|
3056
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
2988
|
+
if ((argc < 5) || (argc > 5)) {
|
2989
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc); SWIG_fail;
|
3057
2990
|
}
|
3058
|
-
res1 =
|
2991
|
+
res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
|
3059
2992
|
if (!SWIG_IsOK(res1)) {
|
3060
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
2993
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","QRcode_encodeStringStructured", 1, argv[0] ));
|
3061
2994
|
}
|
3062
|
-
arg1 =
|
3063
|
-
ecode2 = SWIG_AsVal_int(argv[
|
2995
|
+
arg1 = (char *)(buf1);
|
2996
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
3064
2997
|
if (!SWIG_IsOK(ecode2)) {
|
3065
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","
|
2998
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","QRcode_encodeStringStructured", 2, argv[1] ));
|
3066
2999
|
}
|
3067
|
-
arg2 =
|
3068
|
-
ecode3 = SWIG_AsVal_int(argv[
|
3000
|
+
arg2 = (int)(val2);
|
3001
|
+
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
3069
3002
|
if (!SWIG_IsOK(ecode3)) {
|
3070
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "
|
3003
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "QRecLevel","QRcode_encodeStringStructured", 3, argv[2] ));
|
3071
3004
|
}
|
3072
|
-
arg3 =
|
3073
|
-
ecode4 =
|
3005
|
+
arg3 = (QRecLevel)(val3);
|
3006
|
+
ecode4 = SWIG_AsVal_int(argv[3], &val4);
|
3074
3007
|
if (!SWIG_IsOK(ecode4)) {
|
3075
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "
|
3008
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "QRencodeMode","QRcode_encodeStringStructured", 4, argv[3] ));
|
3076
3009
|
}
|
3077
|
-
arg4 =
|
3078
|
-
ecode5 = SWIG_AsVal_int(argv[
|
3010
|
+
arg4 = (QRencodeMode)(val4);
|
3011
|
+
ecode5 = SWIG_AsVal_int(argv[4], &val5);
|
3079
3012
|
if (!SWIG_IsOK(ecode5)) {
|
3080
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","
|
3013
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","QRcode_encodeStringStructured", 5, argv[4] ));
|
3081
3014
|
}
|
3082
|
-
arg5 =
|
3083
|
-
|
3084
|
-
|
3085
|
-
|
3086
|
-
}
|
3087
|
-
arg6 = reinterpret_cast< LPCSTR >(buf6);
|
3088
|
-
ecode7 = SWIG_AsVal_int(argv[5], &val7);
|
3089
|
-
if (!SWIG_IsOK(ecode7)) {
|
3090
|
-
SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "int","EncodeData", 7, argv[5] ));
|
3091
|
-
}
|
3092
|
-
arg7 = static_cast< int >(val7);
|
3093
|
-
result = (BOOL)(arg1)->EncodeData(arg2,arg3,arg4,arg5,arg6,arg7);
|
3094
|
-
vresult = SWIG_From_bool(static_cast< bool >(result));
|
3095
|
-
if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
|
3015
|
+
arg5 = (int)(val5);
|
3016
|
+
result = (QRcode_List *)QRcode_encodeStringStructured((char const *)arg1,arg2,arg3,arg4,arg5);
|
3017
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__QRcode_List, 0 | 0 );
|
3018
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
3096
3019
|
return vresult;
|
3097
3020
|
fail:
|
3098
|
-
if (
|
3021
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
3099
3022
|
return Qnil;
|
3100
3023
|
}
|
3101
3024
|
|
3102
3025
|
|
3103
3026
|
SWIGINTERN VALUE
|
3104
|
-
|
3105
|
-
|
3027
|
+
_wrap_QRcode_encodeString8bitStructured(int argc, VALUE *argv, VALUE self) {
|
3028
|
+
char *arg1 = (char *) 0 ;
|
3106
3029
|
int arg2 ;
|
3107
|
-
|
3108
|
-
|
3109
|
-
|
3110
|
-
|
3111
|
-
void *argp1 = 0 ;
|
3112
|
-
int res1 = 0 ;
|
3030
|
+
QRecLevel arg3 ;
|
3031
|
+
int res1 ;
|
3032
|
+
char *buf1 = 0 ;
|
3033
|
+
int alloc1 = 0 ;
|
3113
3034
|
int val2 ;
|
3114
3035
|
int ecode2 = 0 ;
|
3115
3036
|
int val3 ;
|
3116
3037
|
int ecode3 = 0 ;
|
3117
|
-
|
3118
|
-
int ecode4 = 0 ;
|
3119
|
-
int val5 ;
|
3120
|
-
int ecode5 = 0 ;
|
3121
|
-
int res6 ;
|
3122
|
-
char *buf6 = 0 ;
|
3123
|
-
int alloc6 = 0 ;
|
3124
|
-
BOOL result;
|
3038
|
+
QRcode_List *result = 0 ;
|
3125
3039
|
VALUE vresult = Qnil;
|
3126
3040
|
|
3127
|
-
if ((argc <
|
3128
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
3041
|
+
if ((argc < 3) || (argc > 3)) {
|
3042
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
|
3129
3043
|
}
|
3130
|
-
res1 =
|
3044
|
+
res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1);
|
3131
3045
|
if (!SWIG_IsOK(res1)) {
|
3132
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
3046
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","QRcode_encodeString8bitStructured", 1, argv[0] ));
|
3133
3047
|
}
|
3134
|
-
arg1 =
|
3135
|
-
ecode2 = SWIG_AsVal_int(argv[
|
3048
|
+
arg1 = (char *)(buf1);
|
3049
|
+
ecode2 = SWIG_AsVal_int(argv[1], &val2);
|
3136
3050
|
if (!SWIG_IsOK(ecode2)) {
|
3137
|
-
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","
|
3051
|
+
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","QRcode_encodeString8bitStructured", 2, argv[1] ));
|
3138
3052
|
}
|
3139
|
-
arg2 =
|
3140
|
-
ecode3 = SWIG_AsVal_int(argv[
|
3053
|
+
arg2 = (int)(val2);
|
3054
|
+
ecode3 = SWIG_AsVal_int(argv[2], &val3);
|
3141
3055
|
if (!SWIG_IsOK(ecode3)) {
|
3142
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "
|
3143
|
-
}
|
3144
|
-
arg3 = static_cast< int >(val3);
|
3145
|
-
ecode4 = SWIG_AsVal_bool(argv[2], &val4);
|
3146
|
-
if (!SWIG_IsOK(ecode4)) {
|
3147
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "BOOL","EncodeData", 4, argv[2] ));
|
3148
|
-
}
|
3149
|
-
arg4 = static_cast< BOOL >(val4);
|
3150
|
-
ecode5 = SWIG_AsVal_int(argv[3], &val5);
|
3151
|
-
if (!SWIG_IsOK(ecode5)) {
|
3152
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","EncodeData", 5, argv[3] ));
|
3056
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "QRecLevel","QRcode_encodeString8bitStructured", 3, argv[2] ));
|
3153
3057
|
}
|
3154
|
-
|
3155
|
-
|
3156
|
-
|
3157
|
-
|
3158
|
-
}
|
3159
|
-
arg6 = reinterpret_cast< LPCSTR >(buf6);
|
3160
|
-
result = (BOOL)(arg1)->EncodeData(arg2,arg3,arg4,arg5,arg6);
|
3161
|
-
vresult = SWIG_From_bool(static_cast< bool >(result));
|
3162
|
-
if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
|
3058
|
+
arg3 = (QRecLevel)(val3);
|
3059
|
+
result = (QRcode_List *)QRcode_encodeString8bitStructured((char const *)arg1,arg2,arg3);
|
3060
|
+
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__QRcode_List, 0 | 0 );
|
3061
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
3163
3062
|
return vresult;
|
3164
3063
|
fail:
|
3165
|
-
if (
|
3064
|
+
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
|
3166
3065
|
return Qnil;
|
3167
3066
|
}
|
3168
3067
|
|
3169
3068
|
|
3170
|
-
SWIGINTERN VALUE
|
3171
|
-
|
3172
|
-
|
3173
|
-
|
3069
|
+
SWIGINTERN VALUE
|
3070
|
+
_wrap_QRcode_List_size(int argc, VALUE *argv, VALUE self) {
|
3071
|
+
QRcode_List *arg1 = (QRcode_List *) 0 ;
|
3072
|
+
void *argp1 = 0 ;
|
3073
|
+
int res1 = 0 ;
|
3074
|
+
int result;
|
3075
|
+
VALUE vresult = Qnil;
|
3174
3076
|
|
3175
|
-
argc
|
3176
|
-
|
3177
|
-
if (argc > 8) SWIG_fail;
|
3178
|
-
for (ii = 1; (ii < argc); ++ii) {
|
3179
|
-
argv[ii] = args[ii-1];
|
3180
|
-
}
|
3181
|
-
if (argc == 6) {
|
3182
|
-
int _v;
|
3183
|
-
void *vptr = 0;
|
3184
|
-
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CQR_Encode, 0);
|
3185
|
-
_v = SWIG_CheckState(res);
|
3186
|
-
if (_v) {
|
3187
|
-
{
|
3188
|
-
int res = SWIG_AsVal_int(argv[1], NULL);
|
3189
|
-
_v = SWIG_CheckState(res);
|
3190
|
-
}
|
3191
|
-
if (_v) {
|
3192
|
-
{
|
3193
|
-
int res = SWIG_AsVal_int(argv[2], NULL);
|
3194
|
-
_v = SWIG_CheckState(res);
|
3195
|
-
}
|
3196
|
-
if (_v) {
|
3197
|
-
{
|
3198
|
-
int res = SWIG_AsVal_bool(argv[3], NULL);
|
3199
|
-
_v = SWIG_CheckState(res);
|
3200
|
-
}
|
3201
|
-
if (_v) {
|
3202
|
-
{
|
3203
|
-
int res = SWIG_AsVal_int(argv[4], NULL);
|
3204
|
-
_v = SWIG_CheckState(res);
|
3205
|
-
}
|
3206
|
-
if (_v) {
|
3207
|
-
int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
|
3208
|
-
_v = SWIG_CheckState(res);
|
3209
|
-
if (_v) {
|
3210
|
-
return _wrap_CQR_Encode_EncodeData__SWIG_1(nargs, args, self);
|
3211
|
-
}
|
3212
|
-
}
|
3213
|
-
}
|
3214
|
-
}
|
3215
|
-
}
|
3216
|
-
}
|
3077
|
+
if ((argc < 1) || (argc > 1)) {
|
3078
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3217
3079
|
}
|
3218
|
-
|
3219
|
-
|
3220
|
-
|
3221
|
-
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CQR_Encode, 0);
|
3222
|
-
_v = SWIG_CheckState(res);
|
3223
|
-
if (_v) {
|
3224
|
-
{
|
3225
|
-
int res = SWIG_AsVal_int(argv[1], NULL);
|
3226
|
-
_v = SWIG_CheckState(res);
|
3227
|
-
}
|
3228
|
-
if (_v) {
|
3229
|
-
{
|
3230
|
-
int res = SWIG_AsVal_int(argv[2], NULL);
|
3231
|
-
_v = SWIG_CheckState(res);
|
3232
|
-
}
|
3233
|
-
if (_v) {
|
3234
|
-
{
|
3235
|
-
int res = SWIG_AsVal_bool(argv[3], NULL);
|
3236
|
-
_v = SWIG_CheckState(res);
|
3237
|
-
}
|
3238
|
-
if (_v) {
|
3239
|
-
{
|
3240
|
-
int res = SWIG_AsVal_int(argv[4], NULL);
|
3241
|
-
_v = SWIG_CheckState(res);
|
3242
|
-
}
|
3243
|
-
if (_v) {
|
3244
|
-
int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
|
3245
|
-
_v = SWIG_CheckState(res);
|
3246
|
-
if (_v) {
|
3247
|
-
{
|
3248
|
-
int res = SWIG_AsVal_int(argv[6], NULL);
|
3249
|
-
_v = SWIG_CheckState(res);
|
3250
|
-
}
|
3251
|
-
if (_v) {
|
3252
|
-
return _wrap_CQR_Encode_EncodeData__SWIG_0(nargs, args, self);
|
3253
|
-
}
|
3254
|
-
}
|
3255
|
-
}
|
3256
|
-
}
|
3257
|
-
}
|
3258
|
-
}
|
3259
|
-
}
|
3080
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRcode_List, 0 | 0 );
|
3081
|
+
if (!SWIG_IsOK(res1)) {
|
3082
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRcode_List *","QRcode_List_size", 1, argv[0] ));
|
3260
3083
|
}
|
3261
|
-
|
3084
|
+
arg1 = (QRcode_List *)(argp1);
|
3085
|
+
result = (int)QRcode_List_size(arg1);
|
3086
|
+
vresult = SWIG_From_int((int)(result));
|
3087
|
+
return vresult;
|
3262
3088
|
fail:
|
3263
|
-
Ruby_Format_OverloadedError( argc, 8, "CQR_Encode.EncodeData",
|
3264
|
-
" BOOL CQR_Encode.EncodeData(int nLevel, int nVersion, BOOL bAutoExtent, int nMaskingNo, LPCSTR lpsSource, int ncSource)\n"
|
3265
|
-
" BOOL CQR_Encode.EncodeData(int nLevel, int nVersion, BOOL bAutoExtent, int nMaskingNo, LPCSTR lpsSource)\n");
|
3266
|
-
|
3267
3089
|
return Qnil;
|
3268
3090
|
}
|
3269
3091
|
|
3270
3092
|
|
3271
3093
|
SWIGINTERN VALUE
|
3272
|
-
|
3273
|
-
|
3094
|
+
_wrap_QRcode_List_free(int argc, VALUE *argv, VALUE self) {
|
3095
|
+
QRcode_List *arg1 = (QRcode_List *) 0 ;
|
3274
3096
|
void *argp1 = 0 ;
|
3275
3097
|
int res1 = 0 ;
|
3276
|
-
VALUE result;
|
3277
|
-
VALUE vresult = Qnil;
|
3278
3098
|
|
3279
|
-
if ((argc <
|
3280
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
3099
|
+
if ((argc < 1) || (argc > 1)) {
|
3100
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
3281
3101
|
}
|
3282
|
-
res1 = SWIG_ConvertPtr(
|
3102
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p__QRcode_List, 0 | 0 );
|
3283
3103
|
if (!SWIG_IsOK(res1)) {
|
3284
|
-
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "
|
3104
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "QRcode_List *","QRcode_List_free", 1, argv[0] ));
|
3285
3105
|
}
|
3286
|
-
arg1 =
|
3287
|
-
|
3288
|
-
|
3289
|
-
return vresult;
|
3106
|
+
arg1 = (QRcode_List *)(argp1);
|
3107
|
+
QRcode_List_free(arg1);
|
3108
|
+
return Qnil;
|
3290
3109
|
fail:
|
3291
3110
|
return Qnil;
|
3292
3111
|
}
|
@@ -3295,48 +3114,44 @@ fail:
|
|
3295
3114
|
|
3296
3115
|
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
3297
3116
|
|
3298
|
-
static swig_type_info
|
3299
|
-
static swig_type_info
|
3300
|
-
static swig_type_info
|
3117
|
+
static swig_type_info _swigt__p_QRcode = {"_p_QRcode", "QRcode *", 0, 0, (void*)0, 0};
|
3118
|
+
static swig_type_info _swigt__p_QRecLevel = {"_p_QRecLevel", "enum QRecLevel *|QRecLevel *", 0, 0, (void*)0, 0};
|
3119
|
+
static swig_type_info _swigt__p_QRencodeMode = {"_p_QRencodeMode", "enum QRencodeMode *|QRencodeMode *", 0, 0, (void*)0, 0};
|
3120
|
+
static swig_type_info _swigt__p__QRcode_List = {"_p__QRcode_List", "struct _QRcode_List *|QRcode_List *|_QRcode_List *", 0, 0, (void*)0, 0};
|
3121
|
+
static swig_type_info _swigt__p__QRinput = {"_p__QRinput", "struct _QRinput *|QRinput *", 0, 0, (void*)0, 0};
|
3122
|
+
static swig_type_info _swigt__p__QRinput_Struct = {"_p__QRinput_Struct", "struct _QRinput_Struct *|QRinput_Struct *", 0, 0, (void*)0, 0};
|
3301
3123
|
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
|
3302
|
-
static swig_type_info
|
3303
|
-
static swig_type_info _swigt__p_tagQR_VERSIONINFO = {"_p_tagQR_VERSIONINFO", "tagQR_VERSIONINFO *|QR_VERSIONINFO *", 0, 0, (void*)0, 0};
|
3304
|
-
static swig_type_info _swigt__p_tagRS_BLOCKINFO = {"_p_tagRS_BLOCKINFO", "tagRS_BLOCKINFO *|RS_BLOCKINFO *", 0, 0, (void*)0, 0};
|
3305
|
-
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|BYTE *", 0, 0, (void*)0, 0};
|
3306
|
-
static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "WORD *|unsigned short *", 0, 0, (void*)0, 0};
|
3124
|
+
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *", 0, 0, (void*)0, 0};
|
3307
3125
|
|
3308
3126
|
static swig_type_info *swig_type_initial[] = {
|
3309
|
-
&
|
3310
|
-
&
|
3311
|
-
&
|
3127
|
+
&_swigt__p_QRcode,
|
3128
|
+
&_swigt__p_QRecLevel,
|
3129
|
+
&_swigt__p_QRencodeMode,
|
3130
|
+
&_swigt__p__QRcode_List,
|
3131
|
+
&_swigt__p__QRinput,
|
3132
|
+
&_swigt__p__QRinput_Struct,
|
3312
3133
|
&_swigt__p_char,
|
3313
|
-
&_swigt__p_int,
|
3314
|
-
&_swigt__p_tagQR_VERSIONINFO,
|
3315
|
-
&_swigt__p_tagRS_BLOCKINFO,
|
3316
3134
|
&_swigt__p_unsigned_char,
|
3317
|
-
&_swigt__p_unsigned_short,
|
3318
3135
|
};
|
3319
3136
|
|
3320
|
-
static swig_cast_info
|
3321
|
-
static swig_cast_info
|
3322
|
-
static swig_cast_info
|
3137
|
+
static swig_cast_info _swigc__p_QRcode[] = { {&_swigt__p_QRcode, 0, 0, 0},{0, 0, 0, 0}};
|
3138
|
+
static swig_cast_info _swigc__p_QRecLevel[] = { {&_swigt__p_QRecLevel, 0, 0, 0},{0, 0, 0, 0}};
|
3139
|
+
static swig_cast_info _swigc__p_QRencodeMode[] = { {&_swigt__p_QRencodeMode, 0, 0, 0},{0, 0, 0, 0}};
|
3140
|
+
static swig_cast_info _swigc__p__QRcode_List[] = { {&_swigt__p__QRcode_List, 0, 0, 0},{0, 0, 0, 0}};
|
3141
|
+
static swig_cast_info _swigc__p__QRinput[] = { {&_swigt__p__QRinput, 0, 0, 0},{0, 0, 0, 0}};
|
3142
|
+
static swig_cast_info _swigc__p__QRinput_Struct[] = { {&_swigt__p__QRinput_Struct, 0, 0, 0},{0, 0, 0, 0}};
|
3323
3143
|
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
|
3324
|
-
static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
|
3325
|
-
static swig_cast_info _swigc__p_tagQR_VERSIONINFO[] = { {&_swigt__p_tagQR_VERSIONINFO, 0, 0, 0},{0, 0, 0, 0}};
|
3326
|
-
static swig_cast_info _swigc__p_tagRS_BLOCKINFO[] = { {&_swigt__p_tagRS_BLOCKINFO, 0, 0, 0},{0, 0, 0, 0}};
|
3327
3144
|
static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
|
3328
|
-
static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
|
3329
3145
|
|
3330
3146
|
static swig_cast_info *swig_cast_initial[] = {
|
3331
|
-
|
3332
|
-
|
3333
|
-
|
3147
|
+
_swigc__p_QRcode,
|
3148
|
+
_swigc__p_QRecLevel,
|
3149
|
+
_swigc__p_QRencodeMode,
|
3150
|
+
_swigc__p__QRcode_List,
|
3151
|
+
_swigc__p__QRinput,
|
3152
|
+
_swigc__p__QRinput_Struct,
|
3334
3153
|
_swigc__p_char,
|
3335
|
-
_swigc__p_int,
|
3336
|
-
_swigc__p_tagQR_VERSIONINFO,
|
3337
|
-
_swigc__p_tagRS_BLOCKINFO,
|
3338
3154
|
_swigc__p_unsigned_char,
|
3339
|
-
_swigc__p_unsigned_short,
|
3340
3155
|
};
|
3341
3156
|
|
3342
3157
|
|
@@ -3597,81 +3412,66 @@ SWIGEXPORT void Init_RQREncoder(void) {
|
|
3597
3412
|
}
|
3598
3413
|
|
3599
3414
|
SWIG_RubyInitializeTrackings();
|
3600
|
-
rb_define_const(mRQREncoder, "
|
3601
|
-
rb_define_const(mRQREncoder, "
|
3602
|
-
rb_define_const(mRQREncoder, "
|
3603
|
-
rb_define_const(mRQREncoder, "
|
3604
|
-
rb_define_const(mRQREncoder, "
|
3605
|
-
rb_define_const(mRQREncoder, "
|
3606
|
-
rb_define_const(mRQREncoder, "
|
3607
|
-
rb_define_const(mRQREncoder, "
|
3608
|
-
rb_define_const(mRQREncoder, "
|
3609
|
-
rb_define_const(mRQREncoder, "
|
3610
|
-
|
3611
|
-
|
3612
|
-
|
3613
|
-
|
3614
|
-
|
3615
|
-
|
3616
|
-
|
3617
|
-
|
3618
|
-
|
3619
|
-
|
3620
|
-
|
3621
|
-
|
3622
|
-
|
3623
|
-
|
3624
|
-
|
3625
|
-
rb_define_method(SwigClassRS_BLOCKINFO.klass, "ncAllCodeWord=", VALUEFUNC(_wrap_RS_BLOCKINFO_ncAllCodeWord_set), -1);
|
3626
|
-
rb_define_method(SwigClassRS_BLOCKINFO.klass, "ncAllCodeWord", VALUEFUNC(_wrap_RS_BLOCKINFO_ncAllCodeWord_get), -1);
|
3627
|
-
rb_define_method(SwigClassRS_BLOCKINFO.klass, "ncDataCodeWord=", VALUEFUNC(_wrap_RS_BLOCKINFO_ncDataCodeWord_set), -1);
|
3628
|
-
rb_define_method(SwigClassRS_BLOCKINFO.klass, "ncDataCodeWord", VALUEFUNC(_wrap_RS_BLOCKINFO_ncDataCodeWord_get), -1);
|
3629
|
-
SwigClassRS_BLOCKINFO.mark = 0;
|
3630
|
-
SwigClassRS_BLOCKINFO.destroy = (void (*)(void *)) free_RS_BLOCKINFO;
|
3631
|
-
SwigClassRS_BLOCKINFO.trackObjects = 0;
|
3415
|
+
rb_define_const(mRQREncoder, "QR_MODE_NUL", SWIG_From_int((int)(QR_MODE_NUL)));
|
3416
|
+
rb_define_const(mRQREncoder, "QR_MODE_NUM", SWIG_From_int((int)(QR_MODE_NUM)));
|
3417
|
+
rb_define_const(mRQREncoder, "QR_MODE_AN", SWIG_From_int((int)(QR_MODE_AN)));
|
3418
|
+
rb_define_const(mRQREncoder, "QR_MODE_8", SWIG_From_int((int)(QR_MODE_8)));
|
3419
|
+
rb_define_const(mRQREncoder, "QR_MODE_KANJI", SWIG_From_int((int)(QR_MODE_KANJI)));
|
3420
|
+
rb_define_const(mRQREncoder, "QR_MODE_STRUCTURE", SWIG_From_int((int)(QR_MODE_STRUCTURE)));
|
3421
|
+
rb_define_const(mRQREncoder, "QR_ECLEVEL_L", SWIG_From_int((int)(QR_ECLEVEL_L)));
|
3422
|
+
rb_define_const(mRQREncoder, "QR_ECLEVEL_M", SWIG_From_int((int)(QR_ECLEVEL_M)));
|
3423
|
+
rb_define_const(mRQREncoder, "QR_ECLEVEL_Q", SWIG_From_int((int)(QR_ECLEVEL_Q)));
|
3424
|
+
rb_define_const(mRQREncoder, "QR_ECLEVEL_H", SWIG_From_int((int)(QR_ECLEVEL_H)));
|
3425
|
+
rb_define_module_function(mRQREncoder, "QRinput_new", _wrap_QRinput_new, -1);
|
3426
|
+
rb_define_module_function(mRQREncoder, "QRinput_new2", _wrap_QRinput_new2, -1);
|
3427
|
+
rb_define_module_function(mRQREncoder, "QRinput_append", _wrap_QRinput_append, -1);
|
3428
|
+
rb_define_module_function(mRQREncoder, "QRinput_getVersion", _wrap_QRinput_getVersion, -1);
|
3429
|
+
rb_define_module_function(mRQREncoder, "QRinput_setVersion", _wrap_QRinput_setVersion, -1);
|
3430
|
+
rb_define_module_function(mRQREncoder, "QRinput_getErrorCorrectionLevel", _wrap_QRinput_getErrorCorrectionLevel, -1);
|
3431
|
+
rb_define_module_function(mRQREncoder, "QRinput_setErrorCorrectionLevel", _wrap_QRinput_setErrorCorrectionLevel, -1);
|
3432
|
+
rb_define_module_function(mRQREncoder, "QRinput_free", _wrap_QRinput_free, -1);
|
3433
|
+
rb_define_module_function(mRQREncoder, "QRinput_check", _wrap_QRinput_check, -1);
|
3434
|
+
rb_define_module_function(mRQREncoder, "QRinput_Struct_new", _wrap_QRinput_Struct_new, -1);
|
3435
|
+
rb_define_module_function(mRQREncoder, "QRinput_Struct_setParity", _wrap_QRinput_Struct_setParity, -1);
|
3436
|
+
rb_define_module_function(mRQREncoder, "QRinput_Struct_appendInput", _wrap_QRinput_Struct_appendInput, -1);
|
3437
|
+
rb_define_module_function(mRQREncoder, "QRinput_Struct_free", _wrap_QRinput_Struct_free, -1);
|
3438
|
+
rb_define_module_function(mRQREncoder, "QRinput_splitQRinputToStruct", _wrap_QRinput_splitQRinputToStruct, -1);
|
3439
|
+
rb_define_module_function(mRQREncoder, "QRinput_Struct_insertStructuredAppendHeaders", _wrap_QRinput_Struct_insertStructuredAppendHeaders, -1);
|
3632
3440
|
|
3633
|
-
|
3634
|
-
SWIG_TypeClientData(
|
3635
|
-
rb_define_alloc_func(
|
3636
|
-
rb_define_method(
|
3637
|
-
rb_define_method(
|
3638
|
-
rb_define_method(
|
3639
|
-
rb_define_method(
|
3640
|
-
rb_define_method(
|
3641
|
-
rb_define_method(
|
3642
|
-
rb_define_method(
|
3643
|
-
rb_define_method(
|
3644
|
-
|
3645
|
-
|
3646
|
-
|
3647
|
-
rb_define_method(SwigClassQR_VERSIONINFO.klass, "RS_BlockInfo1=", VALUEFUNC(_wrap_QR_VERSIONINFO_RS_BlockInfo1_set), -1);
|
3648
|
-
rb_define_method(SwigClassQR_VERSIONINFO.klass, "RS_BlockInfo1", VALUEFUNC(_wrap_QR_VERSIONINFO_RS_BlockInfo1_get), -1);
|
3649
|
-
rb_define_method(SwigClassQR_VERSIONINFO.klass, "RS_BlockInfo2=", VALUEFUNC(_wrap_QR_VERSIONINFO_RS_BlockInfo2_set), -1);
|
3650
|
-
rb_define_method(SwigClassQR_VERSIONINFO.klass, "RS_BlockInfo2", VALUEFUNC(_wrap_QR_VERSIONINFO_RS_BlockInfo2_get), -1);
|
3651
|
-
SwigClassQR_VERSIONINFO.mark = 0;
|
3652
|
-
SwigClassQR_VERSIONINFO.destroy = (void (*)(void *)) free_QR_VERSIONINFO;
|
3653
|
-
SwigClassQR_VERSIONINFO.trackObjects = 0;
|
3441
|
+
SwigClassQRcode.klass = rb_define_class_under(mRQREncoder, "QRcode", rb_cObject);
|
3442
|
+
SWIG_TypeClientData(SWIGTYPE_p_QRcode, (void *) &SwigClassQRcode);
|
3443
|
+
rb_define_alloc_func(SwigClassQRcode.klass, _wrap_QRcode_allocate);
|
3444
|
+
rb_define_method(SwigClassQRcode.klass, "initialize", _wrap_new_QRcode, -1);
|
3445
|
+
rb_define_method(SwigClassQRcode.klass, "version=", _wrap_QRcode_version_set, -1);
|
3446
|
+
rb_define_method(SwigClassQRcode.klass, "version", _wrap_QRcode_version_get, -1);
|
3447
|
+
rb_define_method(SwigClassQRcode.klass, "width=", _wrap_QRcode_width_set, -1);
|
3448
|
+
rb_define_method(SwigClassQRcode.klass, "width", _wrap_QRcode_width_get, -1);
|
3449
|
+
rb_define_method(SwigClassQRcode.klass, "data=", _wrap_QRcode_data_set, -1);
|
3450
|
+
rb_define_method(SwigClassQRcode.klass, "data", _wrap_QRcode_data_get, -1);
|
3451
|
+
rb_define_method(SwigClassQRcode.klass, "modules", _wrap_QRcode_modules, -1);
|
3452
|
+
SwigClassQRcode.mark = 0;
|
3453
|
+
SwigClassQRcode.destroy = (void (*)(void *)) free_QRcode;
|
3454
|
+
SwigClassQRcode.trackObjects = 0;
|
3654
3455
|
|
3655
|
-
|
3656
|
-
SWIG_TypeClientData(
|
3657
|
-
rb_define_alloc_func(
|
3658
|
-
rb_define_method(
|
3659
|
-
rb_define_method(
|
3660
|
-
rb_define_method(
|
3661
|
-
rb_define_method(
|
3662
|
-
rb_define_method(
|
3663
|
-
|
3664
|
-
|
3665
|
-
|
3666
|
-
|
3667
|
-
|
3668
|
-
|
3669
|
-
|
3670
|
-
|
3671
|
-
|
3672
|
-
|
3673
|
-
|
3674
|
-
|
3675
|
-
SwigClassCQR_Encode.trackObjects = 0;
|
3456
|
+
SwigClass_QRcode_List.klass = rb_define_class_under(mRQREncoder, "_QRcode_List", rb_cObject);
|
3457
|
+
SWIG_TypeClientData(SWIGTYPE_p__QRcode_List, (void *) &SwigClass_QRcode_List);
|
3458
|
+
rb_define_alloc_func(SwigClass_QRcode_List.klass, _wrap__QRcode_List_allocate);
|
3459
|
+
rb_define_method(SwigClass_QRcode_List.klass, "initialize", _wrap_new__QRcode_List, -1);
|
3460
|
+
rb_define_method(SwigClass_QRcode_List.klass, "code=", _wrap__QRcode_List_code_set, -1);
|
3461
|
+
rb_define_method(SwigClass_QRcode_List.klass, "code", _wrap__QRcode_List_code_get, -1);
|
3462
|
+
rb_define_method(SwigClass_QRcode_List.klass, "next=", _wrap__QRcode_List_next_set, -1);
|
3463
|
+
rb_define_method(SwigClass_QRcode_List.klass, "next", _wrap__QRcode_List_next_get, -1);
|
3464
|
+
SwigClass_QRcode_List.mark = 0;
|
3465
|
+
SwigClass_QRcode_List.destroy = (void (*)(void *)) free__QRcode_List;
|
3466
|
+
SwigClass_QRcode_List.trackObjects = 0;
|
3467
|
+
rb_define_module_function(mRQREncoder, "QRcode_encodeInput", _wrap_QRcode_encodeInput, -1);
|
3468
|
+
rb_define_module_function(mRQREncoder, "QRcode_encodeString", _wrap_QRcode_encodeString, -1);
|
3469
|
+
rb_define_module_function(mRQREncoder, "QRcode_encodeString8bit", _wrap_QRcode_encodeString8bit, -1);
|
3470
|
+
rb_define_module_function(mRQREncoder, "QRcode_free", _wrap_QRcode_free, -1);
|
3471
|
+
rb_define_module_function(mRQREncoder, "QRcode_encodeInputStructured", _wrap_QRcode_encodeInputStructured, -1);
|
3472
|
+
rb_define_module_function(mRQREncoder, "QRcode_encodeStringStructured", _wrap_QRcode_encodeStringStructured, -1);
|
3473
|
+
rb_define_module_function(mRQREncoder, "QRcode_encodeString8bitStructured", _wrap_QRcode_encodeString8bitStructured, -1);
|
3474
|
+
rb_define_module_function(mRQREncoder, "QRcode_List_size", _wrap_QRcode_List_size, -1);
|
3475
|
+
rb_define_module_function(mRQREncoder, "QRcode_List_free", _wrap_QRcode_List_free, -1);
|
3676
3476
|
}
|
3677
3477
|
|