slidge-whatsapp 0.2.2__cp313-cp313-manylinux_2_36_x86_64.whl

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.
@@ -0,0 +1,3572 @@
1
+ /*
2
+ cgo stubs for package whatsapp.
3
+ File is generated by gopy. Do not edit.
4
+ gopy build -output=generated -no-make=true .
5
+ */
6
+
7
+ package main
8
+
9
+ /*
10
+
11
+ #cgo CFLAGS: "-I/usr/local/include/python3.13" -Wno-error -Wno-implicit-function-declaration -Wno-int-conversion
12
+ #cgo LDFLAGS: "-L/usr/local/lib" "-lpython3.13" -ldl -lm
13
+
14
+ // #define Py_LIMITED_API // need full API for PyRun*
15
+ #include <Python.h>
16
+ typedef uint8_t bool;
17
+ // static inline is trick for avoiding need for extra .c file
18
+ // the following are used for build value -- switch on reflect.Kind
19
+ // or the types equivalent
20
+ static inline PyObject* gopy_build_bool(uint8_t val) {
21
+ return Py_BuildValue("b", val);
22
+ }
23
+ static inline PyObject* gopy_build_int64(int64_t val) {
24
+ return Py_BuildValue("k", val);
25
+ }
26
+ static inline PyObject* gopy_build_uint64(uint64_t val) {
27
+ return Py_BuildValue("K", val);
28
+ }
29
+ static inline PyObject* gopy_build_float64(double val) {
30
+ return Py_BuildValue("d", val);
31
+ }
32
+ static inline PyObject* gopy_build_string(const char* val) {
33
+ return Py_BuildValue("s", val);
34
+ }
35
+ static inline void gopy_decref(PyObject* obj) { // macro
36
+ Py_XDECREF(obj);
37
+ }
38
+ static inline void gopy_incref(PyObject* obj) { // macro
39
+ Py_XINCREF(obj);
40
+ }
41
+ static inline int gopy_method_check(PyObject* obj) { // macro
42
+ return PyMethod_Check(obj);
43
+ }
44
+ static inline void gopy_err_handle() {
45
+ if(PyErr_Occurred() != NULL) {
46
+ PyErr_Print();
47
+ }
48
+ }
49
+
50
+ */
51
+ import "C"
52
+ import (
53
+ "errors"
54
+ "reflect"
55
+ "unsafe"
56
+
57
+ "github.com/go-python/gopy/gopyh" // handler
58
+
59
+ "context"
60
+ "database/sql/driver"
61
+
62
+ whatsapp "codeberg.org/slidge/slidge-whatsapp/slidge_whatsapp"
63
+ "codeberg.org/slidge/slidge-whatsapp/slidge_whatsapp/media"
64
+ "go.mau.fi/libsignal/protocol"
65
+ "go.mau.fi/whatsmeow/types"
66
+ )
67
+
68
+ // main doesn't do anything in lib / pkg mode, but is essential for exe mode
69
+ func main() {
70
+
71
+ }
72
+
73
+ // initialization functions -- can be called from python after library is loaded
74
+ // GoPyInitRunFile runs a separate python file -- call in GoPyInit if it
75
+ // steals the main thread e.g., for GUI event loop, as in GoGi startup.
76
+
77
+ //export GoPyInit
78
+ func GoPyInit() {
79
+
80
+ }
81
+
82
+ // type for the handle -- int64 for speed (can switch to string)
83
+ type GoHandle int64
84
+ type CGoHandle C.longlong
85
+
86
+ // DecRef decrements the reference count for the specified handle
87
+ // and deletes it it goes to zero.
88
+ //
89
+ //export DecRef
90
+ func DecRef(handle CGoHandle) {
91
+ gopyh.DecRef(gopyh.CGoHandle(handle))
92
+ }
93
+
94
+ // IncRef increments the reference count for the specified handle.
95
+ //
96
+ //export IncRef
97
+ func IncRef(handle CGoHandle) {
98
+ gopyh.IncRef(gopyh.CGoHandle(handle))
99
+ }
100
+
101
+ // NumHandles returns the number of handles currently in use.
102
+ //
103
+ //export NumHandles
104
+ func NumHandles() int {
105
+ return gopyh.NumHandles()
106
+ }
107
+
108
+ // boolGoToPy converts a Go bool to python-compatible C.char
109
+ func boolGoToPy(b bool) C.char {
110
+ if b {
111
+ return 1
112
+ }
113
+ return 0
114
+ }
115
+
116
+ // boolPyToGo converts a python-compatible C.Char to Go bool
117
+ func boolPyToGo(b C.char) bool {
118
+ if b != 0 {
119
+ return true
120
+ }
121
+ return false
122
+ }
123
+
124
+ func complex64GoToPy(c complex64) *C.PyObject {
125
+ return C.PyComplex_FromDoubles(C.double(real(c)), C.double(imag(c)))
126
+ }
127
+
128
+ func complex64PyToGo(o *C.PyObject) complex64 {
129
+ v := C.PyComplex_AsCComplex(o)
130
+ return complex(float32(v.real), float32(v.imag))
131
+ }
132
+
133
+ func complex128GoToPy(c complex128) *C.PyObject {
134
+ return C.PyComplex_FromDoubles(C.double(real(c)), C.double(imag(c)))
135
+ }
136
+
137
+ func complex128PyToGo(o *C.PyObject) complex128 {
138
+ v := C.PyComplex_AsCComplex(o)
139
+ return complex(float64(v.real), float64(v.imag))
140
+ }
141
+
142
+ // errorGoToPy converts a Go error to python-compatible C.CString
143
+ func errorGoToPy(e error) *C.char {
144
+ if e != nil {
145
+ return C.CString(e.Error())
146
+ }
147
+ return C.CString("")
148
+ }
149
+
150
+ // --- generated code for package: whatsapp below: ---
151
+
152
+ // ---- External Types Outside of Targeted Packages ---
153
+
154
+ // Converters for pointer handles for type: *media.Spec
155
+ func ptrFromHandle_Ptr_media_Spec(h CGoHandle) *media.Spec {
156
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*media.Spec")
157
+ if p == nil {
158
+ return nil
159
+ }
160
+ return gopyh.Embed(p, reflect.TypeOf(media.Spec{})).(*media.Spec)
161
+ }
162
+ func handleFromPtr_Ptr_media_Spec(p interface{}) CGoHandle {
163
+ return CGoHandle(gopyh.Register("*media.Spec", p))
164
+ }
165
+
166
+ // Converters for pointer handles for type: *protocol.SignalAddress
167
+ func ptrFromHandle_Ptr_protocol_SignalAddress(h CGoHandle) *protocol.SignalAddress {
168
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*protocol.SignalAddress")
169
+ if p == nil {
170
+ return nil
171
+ }
172
+ return gopyh.Embed(p, reflect.TypeOf(protocol.SignalAddress{})).(*protocol.SignalAddress)
173
+ }
174
+ func handleFromPtr_Ptr_protocol_SignalAddress(p interface{}) CGoHandle {
175
+ return CGoHandle(gopyh.Register("*protocol.SignalAddress", p))
176
+ }
177
+
178
+ // Converters for non-pointer handles for type: media.Spec
179
+ func ptrFromHandle_media_Spec(h CGoHandle) *media.Spec {
180
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "media.Spec")
181
+ if p == nil {
182
+ return nil
183
+ }
184
+ return gopyh.Embed(p, reflect.TypeOf(media.Spec{})).(*media.Spec)
185
+ }
186
+ func handleFromPtr_media_Spec(p interface{}) CGoHandle {
187
+ return CGoHandle(gopyh.Register("media.Spec", p))
188
+ }
189
+
190
+ // Converters for pointer handles for type: context.Context
191
+ func ptrFromHandle_context_Context(h CGoHandle) context.Context {
192
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "context.Context")
193
+ if p == nil {
194
+ return nil
195
+ }
196
+ return p.(context.Context)
197
+ }
198
+ func handleFromPtr_context_Context(p interface{}) CGoHandle {
199
+ return CGoHandle(gopyh.Register("context.Context", p))
200
+ }
201
+
202
+ // Converters for pointer handles for type: driver.Value
203
+ func ptrFromHandle_driver_Value(h CGoHandle) driver.Value {
204
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "driver.Value")
205
+ if p == nil {
206
+ return nil
207
+ }
208
+ return p.(driver.Value)
209
+ }
210
+ func handleFromPtr_driver_Value(p interface{}) CGoHandle {
211
+ return CGoHandle(gopyh.Register("driver.Value", p))
212
+ }
213
+
214
+ // Converters for non-pointer handles for type: protocol.SignalAddress
215
+ func ptrFromHandle_protocol_SignalAddress(h CGoHandle) *protocol.SignalAddress {
216
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "protocol.SignalAddress")
217
+ if p == nil {
218
+ return nil
219
+ }
220
+ return gopyh.Embed(p, reflect.TypeOf(protocol.SignalAddress{})).(*protocol.SignalAddress)
221
+ }
222
+ func handleFromPtr_protocol_SignalAddress(p interface{}) CGoHandle {
223
+ return CGoHandle(gopyh.Register("protocol.SignalAddress", p))
224
+ }
225
+
226
+ // Converters for non-pointer handles for type: types.JID
227
+ func ptrFromHandle_types_JID(h CGoHandle) *types.JID {
228
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "types.JID")
229
+ if p == nil {
230
+ return nil
231
+ }
232
+ return gopyh.Embed(p, reflect.TypeOf(types.JID{})).(*types.JID)
233
+ }
234
+ func handleFromPtr_types_JID(p interface{}) CGoHandle {
235
+ return CGoHandle(gopyh.Register("types.JID", p))
236
+ }
237
+
238
+ // ---- Package: go ---
239
+
240
+ // ---- Types ---
241
+
242
+ // Converters for implicit pointer handles for type: []bool
243
+ func ptrFromHandle_Slice_bool(h CGoHandle) *[]bool {
244
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]bool")
245
+ if p == nil {
246
+ return nil
247
+ }
248
+ return p.(*[]bool)
249
+ }
250
+ func deptrFromHandle_Slice_bool(h CGoHandle) []bool {
251
+ p := ptrFromHandle_Slice_bool(h)
252
+ if p == nil {
253
+ return nil
254
+ }
255
+ return *p
256
+ }
257
+ func handleFromPtr_Slice_bool(p interface{}) CGoHandle {
258
+ return CGoHandle(gopyh.Register("[]bool", p))
259
+ }
260
+
261
+ // --- wrapping slice: []bool ---
262
+ //
263
+ //export Slice_bool_CTor
264
+ func Slice_bool_CTor() CGoHandle {
265
+ return CGoHandle(handleFromPtr_Slice_bool(&[]bool{}))
266
+ }
267
+
268
+ //export Slice_bool_len
269
+ func Slice_bool_len(handle CGoHandle) int {
270
+ return len(deptrFromHandle_Slice_bool(handle))
271
+ }
272
+
273
+ //export Slice_bool_elem
274
+ func Slice_bool_elem(handle CGoHandle, _idx int) C.char {
275
+ s := deptrFromHandle_Slice_bool(handle)
276
+ return boolGoToPy(s[_idx])
277
+ }
278
+
279
+ //export Slice_bool_subslice
280
+ func Slice_bool_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
281
+ s := deptrFromHandle_Slice_bool(handle)
282
+ ss := s[_st:_ed]
283
+ return CGoHandle(handleFromPtr_Slice_bool(&ss))
284
+ }
285
+
286
+ //export Slice_bool_set
287
+ func Slice_bool_set(handle CGoHandle, _idx int, _vl C.char) {
288
+ s := deptrFromHandle_Slice_bool(handle)
289
+ s[_idx] = boolPyToGo(_vl)
290
+ }
291
+
292
+ //export Slice_bool_append
293
+ func Slice_bool_append(handle CGoHandle, _vl C.char) {
294
+ s := ptrFromHandle_Slice_bool(handle)
295
+ *s = append(*s, boolPyToGo(_vl))
296
+ }
297
+
298
+ // Converters for implicit pointer handles for type: []byte
299
+ func ptrFromHandle_Slice_byte(h CGoHandle) *[]byte {
300
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]byte")
301
+ if p == nil {
302
+ return nil
303
+ }
304
+ return p.(*[]byte)
305
+ }
306
+ func deptrFromHandle_Slice_byte(h CGoHandle) []byte {
307
+ p := ptrFromHandle_Slice_byte(h)
308
+ if p == nil {
309
+ return nil
310
+ }
311
+ return *p
312
+ }
313
+ func handleFromPtr_Slice_byte(p interface{}) CGoHandle {
314
+ return CGoHandle(gopyh.Register("[]byte", p))
315
+ }
316
+
317
+ // --- wrapping slice: []byte ---
318
+ //
319
+ //export Slice_byte_CTor
320
+ func Slice_byte_CTor() CGoHandle {
321
+ return CGoHandle(handleFromPtr_Slice_byte(&[]byte{}))
322
+ }
323
+
324
+ //export Slice_byte_len
325
+ func Slice_byte_len(handle CGoHandle) int {
326
+ return len(deptrFromHandle_Slice_byte(handle))
327
+ }
328
+
329
+ //export Slice_byte_elem
330
+ func Slice_byte_elem(handle CGoHandle, _idx int) C.char {
331
+ s := deptrFromHandle_Slice_byte(handle)
332
+ return C.char(s[_idx])
333
+ }
334
+
335
+ //export Slice_byte_subslice
336
+ func Slice_byte_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
337
+ s := deptrFromHandle_Slice_byte(handle)
338
+ ss := s[_st:_ed]
339
+ return CGoHandle(handleFromPtr_Slice_byte(&ss))
340
+ }
341
+
342
+ //export Slice_byte_set
343
+ func Slice_byte_set(handle CGoHandle, _idx int, _vl C.char) {
344
+ s := deptrFromHandle_Slice_byte(handle)
345
+ s[_idx] = byte(_vl)
346
+ }
347
+
348
+ //export Slice_byte_append
349
+ func Slice_byte_append(handle CGoHandle, _vl C.char) {
350
+ s := ptrFromHandle_Slice_byte(handle)
351
+ *s = append(*s, byte(_vl))
352
+ }
353
+
354
+ //export Slice_byte_from_bytes
355
+ func Slice_byte_from_bytes(o *C.PyObject) CGoHandle {
356
+ size := C.PyBytes_Size(o)
357
+ ptr := unsafe.Pointer(C.PyBytes_AsString(o))
358
+ data := make([]byte, size)
359
+ tmp := unsafe.Slice((*byte)(ptr), size)
360
+ copy(data, tmp)
361
+ return handleFromPtr_Slice_byte(&data)
362
+ }
363
+
364
+ //export Slice_byte_to_bytes
365
+ func Slice_byte_to_bytes(handle CGoHandle) *C.PyObject {
366
+ s := deptrFromHandle_Slice_byte(handle)
367
+ ptr := unsafe.Pointer(&s[0])
368
+ size := len(s)
369
+ return C.PyBytes_FromStringAndSize((*C.char)(ptr), C.long(size))
370
+ }
371
+
372
+ // Converters for implicit pointer handles for type: []error
373
+ func ptrFromHandle_Slice_error(h CGoHandle) *[]error {
374
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]error")
375
+ if p == nil {
376
+ return nil
377
+ }
378
+ return p.(*[]error)
379
+ }
380
+ func deptrFromHandle_Slice_error(h CGoHandle) []error {
381
+ p := ptrFromHandle_Slice_error(h)
382
+ if p == nil {
383
+ return nil
384
+ }
385
+ return *p
386
+ }
387
+ func handleFromPtr_Slice_error(p interface{}) CGoHandle {
388
+ return CGoHandle(gopyh.Register("[]error", p))
389
+ }
390
+
391
+ // --- wrapping slice: []error ---
392
+ //
393
+ //export Slice_error_CTor
394
+ func Slice_error_CTor() CGoHandle {
395
+ return CGoHandle(handleFromPtr_Slice_error(&[]error{}))
396
+ }
397
+
398
+ //export Slice_error_len
399
+ func Slice_error_len(handle CGoHandle) int {
400
+ return len(deptrFromHandle_Slice_error(handle))
401
+ }
402
+
403
+ //export Slice_error_elem
404
+ func Slice_error_elem(handle CGoHandle, _idx int) *C.char {
405
+ s := deptrFromHandle_Slice_error(handle)
406
+ return errorGoToPy(s[_idx])
407
+ }
408
+
409
+ //export Slice_error_subslice
410
+ func Slice_error_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
411
+ s := deptrFromHandle_Slice_error(handle)
412
+ ss := s[_st:_ed]
413
+ return CGoHandle(handleFromPtr_Slice_error(&ss))
414
+ }
415
+
416
+ //export Slice_error_set
417
+ func Slice_error_set(handle CGoHandle, _idx int, _vl *C.char) {
418
+ s := deptrFromHandle_Slice_error(handle)
419
+ s[_idx] = errors.New(C.GoString(_vl))
420
+ }
421
+
422
+ //export Slice_error_append
423
+ func Slice_error_append(handle CGoHandle, _vl *C.char) {
424
+ s := ptrFromHandle_Slice_error(handle)
425
+ *s = append(*s, errors.New(C.GoString(_vl)))
426
+ }
427
+
428
+ // Converters for implicit pointer handles for type: []float32
429
+ func ptrFromHandle_Slice_float32(h CGoHandle) *[]float32 {
430
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]float32")
431
+ if p == nil {
432
+ return nil
433
+ }
434
+ return p.(*[]float32)
435
+ }
436
+ func deptrFromHandle_Slice_float32(h CGoHandle) []float32 {
437
+ p := ptrFromHandle_Slice_float32(h)
438
+ if p == nil {
439
+ return nil
440
+ }
441
+ return *p
442
+ }
443
+ func handleFromPtr_Slice_float32(p interface{}) CGoHandle {
444
+ return CGoHandle(gopyh.Register("[]float32", p))
445
+ }
446
+
447
+ // --- wrapping slice: []float32 ---
448
+ //
449
+ //export Slice_float32_CTor
450
+ func Slice_float32_CTor() CGoHandle {
451
+ return CGoHandle(handleFromPtr_Slice_float32(&[]float32{}))
452
+ }
453
+
454
+ //export Slice_float32_len
455
+ func Slice_float32_len(handle CGoHandle) int {
456
+ return len(deptrFromHandle_Slice_float32(handle))
457
+ }
458
+
459
+ //export Slice_float32_elem
460
+ func Slice_float32_elem(handle CGoHandle, _idx int) C.float {
461
+ s := deptrFromHandle_Slice_float32(handle)
462
+ return C.float(s[_idx])
463
+ }
464
+
465
+ //export Slice_float32_subslice
466
+ func Slice_float32_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
467
+ s := deptrFromHandle_Slice_float32(handle)
468
+ ss := s[_st:_ed]
469
+ return CGoHandle(handleFromPtr_Slice_float32(&ss))
470
+ }
471
+
472
+ //export Slice_float32_set
473
+ func Slice_float32_set(handle CGoHandle, _idx int, _vl C.float) {
474
+ s := deptrFromHandle_Slice_float32(handle)
475
+ s[_idx] = float32(_vl)
476
+ }
477
+
478
+ //export Slice_float32_append
479
+ func Slice_float32_append(handle CGoHandle, _vl C.float) {
480
+ s := ptrFromHandle_Slice_float32(handle)
481
+ *s = append(*s, float32(_vl))
482
+ }
483
+
484
+ // Converters for implicit pointer handles for type: []float64
485
+ func ptrFromHandle_Slice_float64(h CGoHandle) *[]float64 {
486
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]float64")
487
+ if p == nil {
488
+ return nil
489
+ }
490
+ return p.(*[]float64)
491
+ }
492
+ func deptrFromHandle_Slice_float64(h CGoHandle) []float64 {
493
+ p := ptrFromHandle_Slice_float64(h)
494
+ if p == nil {
495
+ return nil
496
+ }
497
+ return *p
498
+ }
499
+ func handleFromPtr_Slice_float64(p interface{}) CGoHandle {
500
+ return CGoHandle(gopyh.Register("[]float64", p))
501
+ }
502
+
503
+ // --- wrapping slice: []float64 ---
504
+ //
505
+ //export Slice_float64_CTor
506
+ func Slice_float64_CTor() CGoHandle {
507
+ return CGoHandle(handleFromPtr_Slice_float64(&[]float64{}))
508
+ }
509
+
510
+ //export Slice_float64_len
511
+ func Slice_float64_len(handle CGoHandle) int {
512
+ return len(deptrFromHandle_Slice_float64(handle))
513
+ }
514
+
515
+ //export Slice_float64_elem
516
+ func Slice_float64_elem(handle CGoHandle, _idx int) C.double {
517
+ s := deptrFromHandle_Slice_float64(handle)
518
+ return C.double(s[_idx])
519
+ }
520
+
521
+ //export Slice_float64_subslice
522
+ func Slice_float64_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
523
+ s := deptrFromHandle_Slice_float64(handle)
524
+ ss := s[_st:_ed]
525
+ return CGoHandle(handleFromPtr_Slice_float64(&ss))
526
+ }
527
+
528
+ //export Slice_float64_set
529
+ func Slice_float64_set(handle CGoHandle, _idx int, _vl C.double) {
530
+ s := deptrFromHandle_Slice_float64(handle)
531
+ s[_idx] = float64(_vl)
532
+ }
533
+
534
+ //export Slice_float64_append
535
+ func Slice_float64_append(handle CGoHandle, _vl C.double) {
536
+ s := ptrFromHandle_Slice_float64(handle)
537
+ *s = append(*s, float64(_vl))
538
+ }
539
+
540
+ // Converters for implicit pointer handles for type: []int
541
+ func ptrFromHandle_Slice_int(h CGoHandle) *[]int {
542
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]int")
543
+ if p == nil {
544
+ return nil
545
+ }
546
+ return p.(*[]int)
547
+ }
548
+ func deptrFromHandle_Slice_int(h CGoHandle) []int {
549
+ p := ptrFromHandle_Slice_int(h)
550
+ if p == nil {
551
+ return nil
552
+ }
553
+ return *p
554
+ }
555
+ func handleFromPtr_Slice_int(p interface{}) CGoHandle {
556
+ return CGoHandle(gopyh.Register("[]int", p))
557
+ }
558
+
559
+ // --- wrapping slice: []int ---
560
+ //
561
+ //export Slice_int_CTor
562
+ func Slice_int_CTor() CGoHandle {
563
+ return CGoHandle(handleFromPtr_Slice_int(&[]int{}))
564
+ }
565
+
566
+ //export Slice_int_len
567
+ func Slice_int_len(handle CGoHandle) int {
568
+ return len(deptrFromHandle_Slice_int(handle))
569
+ }
570
+
571
+ //export Slice_int_elem
572
+ func Slice_int_elem(handle CGoHandle, _idx int) C.longlong {
573
+ s := deptrFromHandle_Slice_int(handle)
574
+ return C.longlong(s[_idx])
575
+ }
576
+
577
+ //export Slice_int_subslice
578
+ func Slice_int_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
579
+ s := deptrFromHandle_Slice_int(handle)
580
+ ss := s[_st:_ed]
581
+ return CGoHandle(handleFromPtr_Slice_int(&ss))
582
+ }
583
+
584
+ //export Slice_int_set
585
+ func Slice_int_set(handle CGoHandle, _idx int, _vl C.longlong) {
586
+ s := deptrFromHandle_Slice_int(handle)
587
+ s[_idx] = int(_vl)
588
+ }
589
+
590
+ //export Slice_int_append
591
+ func Slice_int_append(handle CGoHandle, _vl C.longlong) {
592
+ s := ptrFromHandle_Slice_int(handle)
593
+ *s = append(*s, int(_vl))
594
+ }
595
+
596
+ // Converters for implicit pointer handles for type: []int16
597
+ func ptrFromHandle_Slice_int16(h CGoHandle) *[]int16 {
598
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]int16")
599
+ if p == nil {
600
+ return nil
601
+ }
602
+ return p.(*[]int16)
603
+ }
604
+ func deptrFromHandle_Slice_int16(h CGoHandle) []int16 {
605
+ p := ptrFromHandle_Slice_int16(h)
606
+ if p == nil {
607
+ return nil
608
+ }
609
+ return *p
610
+ }
611
+ func handleFromPtr_Slice_int16(p interface{}) CGoHandle {
612
+ return CGoHandle(gopyh.Register("[]int16", p))
613
+ }
614
+
615
+ // --- wrapping slice: []int16 ---
616
+ //
617
+ //export Slice_int16_CTor
618
+ func Slice_int16_CTor() CGoHandle {
619
+ return CGoHandle(handleFromPtr_Slice_int16(&[]int16{}))
620
+ }
621
+
622
+ //export Slice_int16_len
623
+ func Slice_int16_len(handle CGoHandle) int {
624
+ return len(deptrFromHandle_Slice_int16(handle))
625
+ }
626
+
627
+ //export Slice_int16_elem
628
+ func Slice_int16_elem(handle CGoHandle, _idx int) C.short {
629
+ s := deptrFromHandle_Slice_int16(handle)
630
+ return C.short(s[_idx])
631
+ }
632
+
633
+ //export Slice_int16_subslice
634
+ func Slice_int16_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
635
+ s := deptrFromHandle_Slice_int16(handle)
636
+ ss := s[_st:_ed]
637
+ return CGoHandle(handleFromPtr_Slice_int16(&ss))
638
+ }
639
+
640
+ //export Slice_int16_set
641
+ func Slice_int16_set(handle CGoHandle, _idx int, _vl C.short) {
642
+ s := deptrFromHandle_Slice_int16(handle)
643
+ s[_idx] = int16(_vl)
644
+ }
645
+
646
+ //export Slice_int16_append
647
+ func Slice_int16_append(handle CGoHandle, _vl C.short) {
648
+ s := ptrFromHandle_Slice_int16(handle)
649
+ *s = append(*s, int16(_vl))
650
+ }
651
+
652
+ // Converters for implicit pointer handles for type: []int32
653
+ func ptrFromHandle_Slice_int32(h CGoHandle) *[]int32 {
654
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]int32")
655
+ if p == nil {
656
+ return nil
657
+ }
658
+ return p.(*[]int32)
659
+ }
660
+ func deptrFromHandle_Slice_int32(h CGoHandle) []int32 {
661
+ p := ptrFromHandle_Slice_int32(h)
662
+ if p == nil {
663
+ return nil
664
+ }
665
+ return *p
666
+ }
667
+ func handleFromPtr_Slice_int32(p interface{}) CGoHandle {
668
+ return CGoHandle(gopyh.Register("[]int32", p))
669
+ }
670
+
671
+ // --- wrapping slice: []int32 ---
672
+ //
673
+ //export Slice_int32_CTor
674
+ func Slice_int32_CTor() CGoHandle {
675
+ return CGoHandle(handleFromPtr_Slice_int32(&[]int32{}))
676
+ }
677
+
678
+ //export Slice_int32_len
679
+ func Slice_int32_len(handle CGoHandle) int {
680
+ return len(deptrFromHandle_Slice_int32(handle))
681
+ }
682
+
683
+ //export Slice_int32_elem
684
+ func Slice_int32_elem(handle CGoHandle, _idx int) C.long {
685
+ s := deptrFromHandle_Slice_int32(handle)
686
+ return C.long(s[_idx])
687
+ }
688
+
689
+ //export Slice_int32_subslice
690
+ func Slice_int32_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
691
+ s := deptrFromHandle_Slice_int32(handle)
692
+ ss := s[_st:_ed]
693
+ return CGoHandle(handleFromPtr_Slice_int32(&ss))
694
+ }
695
+
696
+ //export Slice_int32_set
697
+ func Slice_int32_set(handle CGoHandle, _idx int, _vl C.long) {
698
+ s := deptrFromHandle_Slice_int32(handle)
699
+ s[_idx] = int32(_vl)
700
+ }
701
+
702
+ //export Slice_int32_append
703
+ func Slice_int32_append(handle CGoHandle, _vl C.long) {
704
+ s := ptrFromHandle_Slice_int32(handle)
705
+ *s = append(*s, int32(_vl))
706
+ }
707
+
708
+ // Converters for implicit pointer handles for type: []int64
709
+ func ptrFromHandle_Slice_int64(h CGoHandle) *[]int64 {
710
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]int64")
711
+ if p == nil {
712
+ return nil
713
+ }
714
+ return p.(*[]int64)
715
+ }
716
+ func deptrFromHandle_Slice_int64(h CGoHandle) []int64 {
717
+ p := ptrFromHandle_Slice_int64(h)
718
+ if p == nil {
719
+ return nil
720
+ }
721
+ return *p
722
+ }
723
+ func handleFromPtr_Slice_int64(p interface{}) CGoHandle {
724
+ return CGoHandle(gopyh.Register("[]int64", p))
725
+ }
726
+
727
+ // --- wrapping slice: []int64 ---
728
+ //
729
+ //export Slice_int64_CTor
730
+ func Slice_int64_CTor() CGoHandle {
731
+ return CGoHandle(handleFromPtr_Slice_int64(&[]int64{}))
732
+ }
733
+
734
+ //export Slice_int64_len
735
+ func Slice_int64_len(handle CGoHandle) int {
736
+ return len(deptrFromHandle_Slice_int64(handle))
737
+ }
738
+
739
+ //export Slice_int64_elem
740
+ func Slice_int64_elem(handle CGoHandle, _idx int) C.longlong {
741
+ s := deptrFromHandle_Slice_int64(handle)
742
+ return C.longlong(s[_idx])
743
+ }
744
+
745
+ //export Slice_int64_subslice
746
+ func Slice_int64_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
747
+ s := deptrFromHandle_Slice_int64(handle)
748
+ ss := s[_st:_ed]
749
+ return CGoHandle(handleFromPtr_Slice_int64(&ss))
750
+ }
751
+
752
+ //export Slice_int64_set
753
+ func Slice_int64_set(handle CGoHandle, _idx int, _vl C.longlong) {
754
+ s := deptrFromHandle_Slice_int64(handle)
755
+ s[_idx] = int64(_vl)
756
+ }
757
+
758
+ //export Slice_int64_append
759
+ func Slice_int64_append(handle CGoHandle, _vl C.longlong) {
760
+ s := ptrFromHandle_Slice_int64(handle)
761
+ *s = append(*s, int64(_vl))
762
+ }
763
+
764
+ // Converters for implicit pointer handles for type: []int8
765
+ func ptrFromHandle_Slice_int8(h CGoHandle) *[]int8 {
766
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]int8")
767
+ if p == nil {
768
+ return nil
769
+ }
770
+ return p.(*[]int8)
771
+ }
772
+ func deptrFromHandle_Slice_int8(h CGoHandle) []int8 {
773
+ p := ptrFromHandle_Slice_int8(h)
774
+ if p == nil {
775
+ return nil
776
+ }
777
+ return *p
778
+ }
779
+ func handleFromPtr_Slice_int8(p interface{}) CGoHandle {
780
+ return CGoHandle(gopyh.Register("[]int8", p))
781
+ }
782
+
783
+ // --- wrapping slice: []int8 ---
784
+ //
785
+ //export Slice_int8_CTor
786
+ func Slice_int8_CTor() CGoHandle {
787
+ return CGoHandle(handleFromPtr_Slice_int8(&[]int8{}))
788
+ }
789
+
790
+ //export Slice_int8_len
791
+ func Slice_int8_len(handle CGoHandle) int {
792
+ return len(deptrFromHandle_Slice_int8(handle))
793
+ }
794
+
795
+ //export Slice_int8_elem
796
+ func Slice_int8_elem(handle CGoHandle, _idx int) C.char {
797
+ s := deptrFromHandle_Slice_int8(handle)
798
+ return C.char(s[_idx])
799
+ }
800
+
801
+ //export Slice_int8_subslice
802
+ func Slice_int8_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
803
+ s := deptrFromHandle_Slice_int8(handle)
804
+ ss := s[_st:_ed]
805
+ return CGoHandle(handleFromPtr_Slice_int8(&ss))
806
+ }
807
+
808
+ //export Slice_int8_set
809
+ func Slice_int8_set(handle CGoHandle, _idx int, _vl C.char) {
810
+ s := deptrFromHandle_Slice_int8(handle)
811
+ s[_idx] = int8(_vl)
812
+ }
813
+
814
+ //export Slice_int8_append
815
+ func Slice_int8_append(handle CGoHandle, _vl C.char) {
816
+ s := ptrFromHandle_Slice_int8(handle)
817
+ *s = append(*s, int8(_vl))
818
+ }
819
+
820
+ // Converters for implicit pointer handles for type: []rune
821
+ func ptrFromHandle_Slice_rune(h CGoHandle) *[]rune {
822
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]rune")
823
+ if p == nil {
824
+ return nil
825
+ }
826
+ return p.(*[]rune)
827
+ }
828
+ func deptrFromHandle_Slice_rune(h CGoHandle) []rune {
829
+ p := ptrFromHandle_Slice_rune(h)
830
+ if p == nil {
831
+ return nil
832
+ }
833
+ return *p
834
+ }
835
+ func handleFromPtr_Slice_rune(p interface{}) CGoHandle {
836
+ return CGoHandle(gopyh.Register("[]rune", p))
837
+ }
838
+
839
+ // --- wrapping slice: []rune ---
840
+ //
841
+ //export Slice_rune_CTor
842
+ func Slice_rune_CTor() CGoHandle {
843
+ return CGoHandle(handleFromPtr_Slice_rune(&[]rune{}))
844
+ }
845
+
846
+ //export Slice_rune_len
847
+ func Slice_rune_len(handle CGoHandle) int {
848
+ return len(deptrFromHandle_Slice_rune(handle))
849
+ }
850
+
851
+ //export Slice_rune_elem
852
+ func Slice_rune_elem(handle CGoHandle, _idx int) C.long {
853
+ s := deptrFromHandle_Slice_rune(handle)
854
+ return C.long(s[_idx])
855
+ }
856
+
857
+ //export Slice_rune_subslice
858
+ func Slice_rune_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
859
+ s := deptrFromHandle_Slice_rune(handle)
860
+ ss := s[_st:_ed]
861
+ return CGoHandle(handleFromPtr_Slice_rune(&ss))
862
+ }
863
+
864
+ //export Slice_rune_set
865
+ func Slice_rune_set(handle CGoHandle, _idx int, _vl C.long) {
866
+ s := deptrFromHandle_Slice_rune(handle)
867
+ s[_idx] = rune(_vl)
868
+ }
869
+
870
+ //export Slice_rune_append
871
+ func Slice_rune_append(handle CGoHandle, _vl C.long) {
872
+ s := ptrFromHandle_Slice_rune(handle)
873
+ *s = append(*s, rune(_vl))
874
+ }
875
+
876
+ // Converters for implicit pointer handles for type: []string
877
+ func ptrFromHandle_Slice_string(h CGoHandle) *[]string {
878
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]string")
879
+ if p == nil {
880
+ return nil
881
+ }
882
+ return p.(*[]string)
883
+ }
884
+ func deptrFromHandle_Slice_string(h CGoHandle) []string {
885
+ p := ptrFromHandle_Slice_string(h)
886
+ if p == nil {
887
+ return nil
888
+ }
889
+ return *p
890
+ }
891
+ func handleFromPtr_Slice_string(p interface{}) CGoHandle {
892
+ return CGoHandle(gopyh.Register("[]string", p))
893
+ }
894
+
895
+ // --- wrapping slice: []string ---
896
+ //
897
+ //export Slice_string_CTor
898
+ func Slice_string_CTor() CGoHandle {
899
+ return CGoHandle(handleFromPtr_Slice_string(&[]string{}))
900
+ }
901
+
902
+ //export Slice_string_len
903
+ func Slice_string_len(handle CGoHandle) int {
904
+ return len(deptrFromHandle_Slice_string(handle))
905
+ }
906
+
907
+ //export Slice_string_elem
908
+ func Slice_string_elem(handle CGoHandle, _idx int) *C.char {
909
+ s := deptrFromHandle_Slice_string(handle)
910
+ return C.CString(s[_idx])
911
+ }
912
+
913
+ //export Slice_string_subslice
914
+ func Slice_string_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
915
+ s := deptrFromHandle_Slice_string(handle)
916
+ ss := s[_st:_ed]
917
+ return CGoHandle(handleFromPtr_Slice_string(&ss))
918
+ }
919
+
920
+ //export Slice_string_set
921
+ func Slice_string_set(handle CGoHandle, _idx int, _vl *C.char) {
922
+ s := deptrFromHandle_Slice_string(handle)
923
+ s[_idx] = C.GoString(_vl)
924
+ }
925
+
926
+ //export Slice_string_append
927
+ func Slice_string_append(handle CGoHandle, _vl *C.char) {
928
+ s := ptrFromHandle_Slice_string(handle)
929
+ *s = append(*s, C.GoString(_vl))
930
+ }
931
+
932
+ // Converters for implicit pointer handles for type: []uint
933
+ func ptrFromHandle_Slice_uint(h CGoHandle) *[]uint {
934
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]uint")
935
+ if p == nil {
936
+ return nil
937
+ }
938
+ return p.(*[]uint)
939
+ }
940
+ func deptrFromHandle_Slice_uint(h CGoHandle) []uint {
941
+ p := ptrFromHandle_Slice_uint(h)
942
+ if p == nil {
943
+ return nil
944
+ }
945
+ return *p
946
+ }
947
+ func handleFromPtr_Slice_uint(p interface{}) CGoHandle {
948
+ return CGoHandle(gopyh.Register("[]uint", p))
949
+ }
950
+
951
+ // --- wrapping slice: []uint ---
952
+ //
953
+ //export Slice_uint_CTor
954
+ func Slice_uint_CTor() CGoHandle {
955
+ return CGoHandle(handleFromPtr_Slice_uint(&[]uint{}))
956
+ }
957
+
958
+ //export Slice_uint_len
959
+ func Slice_uint_len(handle CGoHandle) int {
960
+ return len(deptrFromHandle_Slice_uint(handle))
961
+ }
962
+
963
+ //export Slice_uint_elem
964
+ func Slice_uint_elem(handle CGoHandle, _idx int) C.ulonglong {
965
+ s := deptrFromHandle_Slice_uint(handle)
966
+ return C.ulonglong(s[_idx])
967
+ }
968
+
969
+ //export Slice_uint_subslice
970
+ func Slice_uint_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
971
+ s := deptrFromHandle_Slice_uint(handle)
972
+ ss := s[_st:_ed]
973
+ return CGoHandle(handleFromPtr_Slice_uint(&ss))
974
+ }
975
+
976
+ //export Slice_uint_set
977
+ func Slice_uint_set(handle CGoHandle, _idx int, _vl C.ulonglong) {
978
+ s := deptrFromHandle_Slice_uint(handle)
979
+ s[_idx] = uint(_vl)
980
+ }
981
+
982
+ //export Slice_uint_append
983
+ func Slice_uint_append(handle CGoHandle, _vl C.ulonglong) {
984
+ s := ptrFromHandle_Slice_uint(handle)
985
+ *s = append(*s, uint(_vl))
986
+ }
987
+
988
+ // Converters for implicit pointer handles for type: []uint16
989
+ func ptrFromHandle_Slice_uint16(h CGoHandle) *[]uint16 {
990
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]uint16")
991
+ if p == nil {
992
+ return nil
993
+ }
994
+ return p.(*[]uint16)
995
+ }
996
+ func deptrFromHandle_Slice_uint16(h CGoHandle) []uint16 {
997
+ p := ptrFromHandle_Slice_uint16(h)
998
+ if p == nil {
999
+ return nil
1000
+ }
1001
+ return *p
1002
+ }
1003
+ func handleFromPtr_Slice_uint16(p interface{}) CGoHandle {
1004
+ return CGoHandle(gopyh.Register("[]uint16", p))
1005
+ }
1006
+
1007
+ // --- wrapping slice: []uint16 ---
1008
+ //
1009
+ //export Slice_uint16_CTor
1010
+ func Slice_uint16_CTor() CGoHandle {
1011
+ return CGoHandle(handleFromPtr_Slice_uint16(&[]uint16{}))
1012
+ }
1013
+
1014
+ //export Slice_uint16_len
1015
+ func Slice_uint16_len(handle CGoHandle) int {
1016
+ return len(deptrFromHandle_Slice_uint16(handle))
1017
+ }
1018
+
1019
+ //export Slice_uint16_elem
1020
+ func Slice_uint16_elem(handle CGoHandle, _idx int) C.ushort {
1021
+ s := deptrFromHandle_Slice_uint16(handle)
1022
+ return C.ushort(s[_idx])
1023
+ }
1024
+
1025
+ //export Slice_uint16_subslice
1026
+ func Slice_uint16_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1027
+ s := deptrFromHandle_Slice_uint16(handle)
1028
+ ss := s[_st:_ed]
1029
+ return CGoHandle(handleFromPtr_Slice_uint16(&ss))
1030
+ }
1031
+
1032
+ //export Slice_uint16_set
1033
+ func Slice_uint16_set(handle CGoHandle, _idx int, _vl C.ushort) {
1034
+ s := deptrFromHandle_Slice_uint16(handle)
1035
+ s[_idx] = uint16(_vl)
1036
+ }
1037
+
1038
+ //export Slice_uint16_append
1039
+ func Slice_uint16_append(handle CGoHandle, _vl C.ushort) {
1040
+ s := ptrFromHandle_Slice_uint16(handle)
1041
+ *s = append(*s, uint16(_vl))
1042
+ }
1043
+
1044
+ // Converters for implicit pointer handles for type: []uint32
1045
+ func ptrFromHandle_Slice_uint32(h CGoHandle) *[]uint32 {
1046
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]uint32")
1047
+ if p == nil {
1048
+ return nil
1049
+ }
1050
+ return p.(*[]uint32)
1051
+ }
1052
+ func deptrFromHandle_Slice_uint32(h CGoHandle) []uint32 {
1053
+ p := ptrFromHandle_Slice_uint32(h)
1054
+ if p == nil {
1055
+ return nil
1056
+ }
1057
+ return *p
1058
+ }
1059
+ func handleFromPtr_Slice_uint32(p interface{}) CGoHandle {
1060
+ return CGoHandle(gopyh.Register("[]uint32", p))
1061
+ }
1062
+
1063
+ // --- wrapping slice: []uint32 ---
1064
+ //
1065
+ //export Slice_uint32_CTor
1066
+ func Slice_uint32_CTor() CGoHandle {
1067
+ return CGoHandle(handleFromPtr_Slice_uint32(&[]uint32{}))
1068
+ }
1069
+
1070
+ //export Slice_uint32_len
1071
+ func Slice_uint32_len(handle CGoHandle) int {
1072
+ return len(deptrFromHandle_Slice_uint32(handle))
1073
+ }
1074
+
1075
+ //export Slice_uint32_elem
1076
+ func Slice_uint32_elem(handle CGoHandle, _idx int) C.ulong {
1077
+ s := deptrFromHandle_Slice_uint32(handle)
1078
+ return C.ulong(s[_idx])
1079
+ }
1080
+
1081
+ //export Slice_uint32_subslice
1082
+ func Slice_uint32_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1083
+ s := deptrFromHandle_Slice_uint32(handle)
1084
+ ss := s[_st:_ed]
1085
+ return CGoHandle(handleFromPtr_Slice_uint32(&ss))
1086
+ }
1087
+
1088
+ //export Slice_uint32_set
1089
+ func Slice_uint32_set(handle CGoHandle, _idx int, _vl C.ulong) {
1090
+ s := deptrFromHandle_Slice_uint32(handle)
1091
+ s[_idx] = uint32(_vl)
1092
+ }
1093
+
1094
+ //export Slice_uint32_append
1095
+ func Slice_uint32_append(handle CGoHandle, _vl C.ulong) {
1096
+ s := ptrFromHandle_Slice_uint32(handle)
1097
+ *s = append(*s, uint32(_vl))
1098
+ }
1099
+
1100
+ // Converters for implicit pointer handles for type: []uint64
1101
+ func ptrFromHandle_Slice_uint64(h CGoHandle) *[]uint64 {
1102
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]uint64")
1103
+ if p == nil {
1104
+ return nil
1105
+ }
1106
+ return p.(*[]uint64)
1107
+ }
1108
+ func deptrFromHandle_Slice_uint64(h CGoHandle) []uint64 {
1109
+ p := ptrFromHandle_Slice_uint64(h)
1110
+ if p == nil {
1111
+ return nil
1112
+ }
1113
+ return *p
1114
+ }
1115
+ func handleFromPtr_Slice_uint64(p interface{}) CGoHandle {
1116
+ return CGoHandle(gopyh.Register("[]uint64", p))
1117
+ }
1118
+
1119
+ // --- wrapping slice: []uint64 ---
1120
+ //
1121
+ //export Slice_uint64_CTor
1122
+ func Slice_uint64_CTor() CGoHandle {
1123
+ return CGoHandle(handleFromPtr_Slice_uint64(&[]uint64{}))
1124
+ }
1125
+
1126
+ //export Slice_uint64_len
1127
+ func Slice_uint64_len(handle CGoHandle) int {
1128
+ return len(deptrFromHandle_Slice_uint64(handle))
1129
+ }
1130
+
1131
+ //export Slice_uint64_elem
1132
+ func Slice_uint64_elem(handle CGoHandle, _idx int) C.ulonglong {
1133
+ s := deptrFromHandle_Slice_uint64(handle)
1134
+ return C.ulonglong(s[_idx])
1135
+ }
1136
+
1137
+ //export Slice_uint64_subslice
1138
+ func Slice_uint64_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1139
+ s := deptrFromHandle_Slice_uint64(handle)
1140
+ ss := s[_st:_ed]
1141
+ return CGoHandle(handleFromPtr_Slice_uint64(&ss))
1142
+ }
1143
+
1144
+ //export Slice_uint64_set
1145
+ func Slice_uint64_set(handle CGoHandle, _idx int, _vl C.ulonglong) {
1146
+ s := deptrFromHandle_Slice_uint64(handle)
1147
+ s[_idx] = uint64(_vl)
1148
+ }
1149
+
1150
+ //export Slice_uint64_append
1151
+ func Slice_uint64_append(handle CGoHandle, _vl C.ulonglong) {
1152
+ s := ptrFromHandle_Slice_uint64(handle)
1153
+ *s = append(*s, uint64(_vl))
1154
+ }
1155
+
1156
+ // Converters for implicit pointer handles for type: []uint8
1157
+ func ptrFromHandle_Slice_uint8(h CGoHandle) *[]uint8 {
1158
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]uint8")
1159
+ if p == nil {
1160
+ return nil
1161
+ }
1162
+ return p.(*[]uint8)
1163
+ }
1164
+ func deptrFromHandle_Slice_uint8(h CGoHandle) []uint8 {
1165
+ p := ptrFromHandle_Slice_uint8(h)
1166
+ if p == nil {
1167
+ return nil
1168
+ }
1169
+ return *p
1170
+ }
1171
+ func handleFromPtr_Slice_uint8(p interface{}) CGoHandle {
1172
+ return CGoHandle(gopyh.Register("[]uint8", p))
1173
+ }
1174
+
1175
+ // --- wrapping slice: []uint8 ---
1176
+ //
1177
+ //export Slice_uint8_CTor
1178
+ func Slice_uint8_CTor() CGoHandle {
1179
+ return CGoHandle(handleFromPtr_Slice_uint8(&[]uint8{}))
1180
+ }
1181
+
1182
+ //export Slice_uint8_len
1183
+ func Slice_uint8_len(handle CGoHandle) int {
1184
+ return len(deptrFromHandle_Slice_uint8(handle))
1185
+ }
1186
+
1187
+ //export Slice_uint8_elem
1188
+ func Slice_uint8_elem(handle CGoHandle, _idx int) C.uchar {
1189
+ s := deptrFromHandle_Slice_uint8(handle)
1190
+ return C.uchar(s[_idx])
1191
+ }
1192
+
1193
+ //export Slice_uint8_subslice
1194
+ func Slice_uint8_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1195
+ s := deptrFromHandle_Slice_uint8(handle)
1196
+ ss := s[_st:_ed]
1197
+ return CGoHandle(handleFromPtr_Slice_uint8(&ss))
1198
+ }
1199
+
1200
+ //export Slice_uint8_set
1201
+ func Slice_uint8_set(handle CGoHandle, _idx int, _vl C.uchar) {
1202
+ s := deptrFromHandle_Slice_uint8(handle)
1203
+ s[_idx] = uint8(_vl)
1204
+ }
1205
+
1206
+ //export Slice_uint8_append
1207
+ func Slice_uint8_append(handle CGoHandle, _vl C.uchar) {
1208
+ s := ptrFromHandle_Slice_uint8(handle)
1209
+ *s = append(*s, uint8(_vl))
1210
+ }
1211
+
1212
+ // ---- Package: whatsapp ---
1213
+
1214
+ // ---- Types ---
1215
+
1216
+ // Converters for pointer handles for type: *whatsapp.Attachment
1217
+ func ptrFromHandle_Ptr_whatsapp_Attachment(h CGoHandle) *whatsapp.Attachment {
1218
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Attachment")
1219
+ if p == nil {
1220
+ return nil
1221
+ }
1222
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Attachment{})).(*whatsapp.Attachment)
1223
+ }
1224
+ func handleFromPtr_Ptr_whatsapp_Attachment(p interface{}) CGoHandle {
1225
+ return CGoHandle(gopyh.Register("*whatsapp.Attachment", p))
1226
+ }
1227
+
1228
+ // Converters for pointer handles for type: *whatsapp.Avatar
1229
+ func ptrFromHandle_Ptr_whatsapp_Avatar(h CGoHandle) *whatsapp.Avatar {
1230
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Avatar")
1231
+ if p == nil {
1232
+ return nil
1233
+ }
1234
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Avatar{})).(*whatsapp.Avatar)
1235
+ }
1236
+ func handleFromPtr_Ptr_whatsapp_Avatar(p interface{}) CGoHandle {
1237
+ return CGoHandle(gopyh.Register("*whatsapp.Avatar", p))
1238
+ }
1239
+
1240
+ // Converters for pointer handles for type: *whatsapp.Call
1241
+ func ptrFromHandle_Ptr_whatsapp_Call(h CGoHandle) *whatsapp.Call {
1242
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Call")
1243
+ if p == nil {
1244
+ return nil
1245
+ }
1246
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Call{})).(*whatsapp.Call)
1247
+ }
1248
+ func handleFromPtr_Ptr_whatsapp_Call(p interface{}) CGoHandle {
1249
+ return CGoHandle(gopyh.Register("*whatsapp.Call", p))
1250
+ }
1251
+
1252
+ // Converters for pointer handles for type: *whatsapp.ChatState
1253
+ func ptrFromHandle_Ptr_whatsapp_ChatState(h CGoHandle) *whatsapp.ChatState {
1254
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.ChatState")
1255
+ if p == nil {
1256
+ return nil
1257
+ }
1258
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.ChatState{})).(*whatsapp.ChatState)
1259
+ }
1260
+ func handleFromPtr_Ptr_whatsapp_ChatState(p interface{}) CGoHandle {
1261
+ return CGoHandle(gopyh.Register("*whatsapp.ChatState", p))
1262
+ }
1263
+
1264
+ // Converters for pointer handles for type: *whatsapp.Connect
1265
+ func ptrFromHandle_Ptr_whatsapp_Connect(h CGoHandle) *whatsapp.Connect {
1266
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Connect")
1267
+ if p == nil {
1268
+ return nil
1269
+ }
1270
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Connect{})).(*whatsapp.Connect)
1271
+ }
1272
+ func handleFromPtr_Ptr_whatsapp_Connect(p interface{}) CGoHandle {
1273
+ return CGoHandle(gopyh.Register("*whatsapp.Connect", p))
1274
+ }
1275
+
1276
+ // Converters for pointer handles for type: *whatsapp.Contact
1277
+ func ptrFromHandle_Ptr_whatsapp_Contact(h CGoHandle) *whatsapp.Contact {
1278
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Contact")
1279
+ if p == nil {
1280
+ return nil
1281
+ }
1282
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Contact{})).(*whatsapp.Contact)
1283
+ }
1284
+ func handleFromPtr_Ptr_whatsapp_Contact(p interface{}) CGoHandle {
1285
+ return CGoHandle(gopyh.Register("*whatsapp.Contact", p))
1286
+ }
1287
+
1288
+ // Converters for pointer handles for type: *whatsapp.EventPayload
1289
+ func ptrFromHandle_Ptr_whatsapp_EventPayload(h CGoHandle) *whatsapp.EventPayload {
1290
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.EventPayload")
1291
+ if p == nil {
1292
+ return nil
1293
+ }
1294
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.EventPayload{})).(*whatsapp.EventPayload)
1295
+ }
1296
+ func handleFromPtr_Ptr_whatsapp_EventPayload(p interface{}) CGoHandle {
1297
+ return CGoHandle(gopyh.Register("*whatsapp.EventPayload", p))
1298
+ }
1299
+
1300
+ // Converters for pointer handles for type: *whatsapp.Gateway
1301
+ func ptrFromHandle_Ptr_whatsapp_Gateway(h CGoHandle) *whatsapp.Gateway {
1302
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Gateway")
1303
+ if p == nil {
1304
+ return nil
1305
+ }
1306
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway)
1307
+ }
1308
+ func handleFromPtr_Ptr_whatsapp_Gateway(p interface{}) CGoHandle {
1309
+ return CGoHandle(gopyh.Register("*whatsapp.Gateway", p))
1310
+ }
1311
+
1312
+ // Converters for pointer handles for type: *whatsapp.Group
1313
+ func ptrFromHandle_Ptr_whatsapp_Group(h CGoHandle) *whatsapp.Group {
1314
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Group")
1315
+ if p == nil {
1316
+ return nil
1317
+ }
1318
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Group{})).(*whatsapp.Group)
1319
+ }
1320
+ func handleFromPtr_Ptr_whatsapp_Group(p interface{}) CGoHandle {
1321
+ return CGoHandle(gopyh.Register("*whatsapp.Group", p))
1322
+ }
1323
+
1324
+ // Converters for pointer handles for type: *whatsapp.GroupParticipant
1325
+ func ptrFromHandle_Ptr_whatsapp_GroupParticipant(h CGoHandle) *whatsapp.GroupParticipant {
1326
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.GroupParticipant")
1327
+ if p == nil {
1328
+ return nil
1329
+ }
1330
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.GroupParticipant{})).(*whatsapp.GroupParticipant)
1331
+ }
1332
+ func handleFromPtr_Ptr_whatsapp_GroupParticipant(p interface{}) CGoHandle {
1333
+ return CGoHandle(gopyh.Register("*whatsapp.GroupParticipant", p))
1334
+ }
1335
+
1336
+ // Converters for pointer handles for type: *whatsapp.GroupSubject
1337
+ func ptrFromHandle_Ptr_whatsapp_GroupSubject(h CGoHandle) *whatsapp.GroupSubject {
1338
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.GroupSubject")
1339
+ if p == nil {
1340
+ return nil
1341
+ }
1342
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.GroupSubject{})).(*whatsapp.GroupSubject)
1343
+ }
1344
+ func handleFromPtr_Ptr_whatsapp_GroupSubject(p interface{}) CGoHandle {
1345
+ return CGoHandle(gopyh.Register("*whatsapp.GroupSubject", p))
1346
+ }
1347
+
1348
+ // Converters for pointer handles for type: *whatsapp.LinkedDevice
1349
+ func ptrFromHandle_Ptr_whatsapp_LinkedDevice(h CGoHandle) *whatsapp.LinkedDevice {
1350
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.LinkedDevice")
1351
+ if p == nil {
1352
+ return nil
1353
+ }
1354
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.LinkedDevice{})).(*whatsapp.LinkedDevice)
1355
+ }
1356
+ func handleFromPtr_Ptr_whatsapp_LinkedDevice(p interface{}) CGoHandle {
1357
+ return CGoHandle(gopyh.Register("*whatsapp.LinkedDevice", p))
1358
+ }
1359
+
1360
+ // Converters for pointer handles for type: *whatsapp.Location
1361
+ func ptrFromHandle_Ptr_whatsapp_Location(h CGoHandle) *whatsapp.Location {
1362
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Location")
1363
+ if p == nil {
1364
+ return nil
1365
+ }
1366
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Location{})).(*whatsapp.Location)
1367
+ }
1368
+ func handleFromPtr_Ptr_whatsapp_Location(p interface{}) CGoHandle {
1369
+ return CGoHandle(gopyh.Register("*whatsapp.Location", p))
1370
+ }
1371
+
1372
+ // Converters for pointer handles for type: *whatsapp.Message
1373
+ func ptrFromHandle_Ptr_whatsapp_Message(h CGoHandle) *whatsapp.Message {
1374
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Message")
1375
+ if p == nil {
1376
+ return nil
1377
+ }
1378
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Message{})).(*whatsapp.Message)
1379
+ }
1380
+ func handleFromPtr_Ptr_whatsapp_Message(p interface{}) CGoHandle {
1381
+ return CGoHandle(gopyh.Register("*whatsapp.Message", p))
1382
+ }
1383
+
1384
+ // Converters for pointer handles for type: *whatsapp.Presence
1385
+ func ptrFromHandle_Ptr_whatsapp_Presence(h CGoHandle) *whatsapp.Presence {
1386
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Presence")
1387
+ if p == nil {
1388
+ return nil
1389
+ }
1390
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Presence{})).(*whatsapp.Presence)
1391
+ }
1392
+ func handleFromPtr_Ptr_whatsapp_Presence(p interface{}) CGoHandle {
1393
+ return CGoHandle(gopyh.Register("*whatsapp.Presence", p))
1394
+ }
1395
+
1396
+ // Converters for pointer handles for type: *whatsapp.Preview
1397
+ func ptrFromHandle_Ptr_whatsapp_Preview(h CGoHandle) *whatsapp.Preview {
1398
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Preview")
1399
+ if p == nil {
1400
+ return nil
1401
+ }
1402
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Preview{})).(*whatsapp.Preview)
1403
+ }
1404
+ func handleFromPtr_Ptr_whatsapp_Preview(p interface{}) CGoHandle {
1405
+ return CGoHandle(gopyh.Register("*whatsapp.Preview", p))
1406
+ }
1407
+
1408
+ // Converters for pointer handles for type: *whatsapp.Receipt
1409
+ func ptrFromHandle_Ptr_whatsapp_Receipt(h CGoHandle) *whatsapp.Receipt {
1410
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Receipt")
1411
+ if p == nil {
1412
+ return nil
1413
+ }
1414
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Receipt{})).(*whatsapp.Receipt)
1415
+ }
1416
+ func handleFromPtr_Ptr_whatsapp_Receipt(p interface{}) CGoHandle {
1417
+ return CGoHandle(gopyh.Register("*whatsapp.Receipt", p))
1418
+ }
1419
+
1420
+ // Converters for pointer handles for type: *whatsapp.Session
1421
+ func ptrFromHandle_Ptr_whatsapp_Session(h CGoHandle) *whatsapp.Session {
1422
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "*whatsapp.Session")
1423
+ if p == nil {
1424
+ return nil
1425
+ }
1426
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session)
1427
+ }
1428
+ func handleFromPtr_Ptr_whatsapp_Session(p interface{}) CGoHandle {
1429
+ return CGoHandle(gopyh.Register("*whatsapp.Session", p))
1430
+ }
1431
+
1432
+ // Converters for implicit pointer handles for type: []whatsapp.Attachment
1433
+ func ptrFromHandle_Slice_whatsapp_Attachment(h CGoHandle) *[]whatsapp.Attachment {
1434
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]whatsapp.Attachment")
1435
+ if p == nil {
1436
+ return nil
1437
+ }
1438
+ return p.(*[]whatsapp.Attachment)
1439
+ }
1440
+ func deptrFromHandle_Slice_whatsapp_Attachment(h CGoHandle) []whatsapp.Attachment {
1441
+ p := ptrFromHandle_Slice_whatsapp_Attachment(h)
1442
+ if p == nil {
1443
+ return nil
1444
+ }
1445
+ return *p
1446
+ }
1447
+ func handleFromPtr_Slice_whatsapp_Attachment(p interface{}) CGoHandle {
1448
+ return CGoHandle(gopyh.Register("[]whatsapp.Attachment", p))
1449
+ }
1450
+
1451
+ // --- wrapping slice: []whatsapp.Attachment ---
1452
+ //
1453
+ //export Slice_whatsapp_Attachment_CTor
1454
+ func Slice_whatsapp_Attachment_CTor() CGoHandle {
1455
+ return CGoHandle(handleFromPtr_Slice_whatsapp_Attachment(&[]whatsapp.Attachment{}))
1456
+ }
1457
+
1458
+ //export Slice_whatsapp_Attachment_len
1459
+ func Slice_whatsapp_Attachment_len(handle CGoHandle) int {
1460
+ return len(deptrFromHandle_Slice_whatsapp_Attachment(handle))
1461
+ }
1462
+
1463
+ //export Slice_whatsapp_Attachment_elem
1464
+ func Slice_whatsapp_Attachment_elem(handle CGoHandle, _idx int) CGoHandle {
1465
+ s := deptrFromHandle_Slice_whatsapp_Attachment(handle)
1466
+ return handleFromPtr_whatsapp_Attachment(&(s[_idx]))
1467
+ }
1468
+
1469
+ //export Slice_whatsapp_Attachment_subslice
1470
+ func Slice_whatsapp_Attachment_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1471
+ s := deptrFromHandle_Slice_whatsapp_Attachment(handle)
1472
+ ss := s[_st:_ed]
1473
+ return CGoHandle(handleFromPtr_Slice_whatsapp_Attachment(&ss))
1474
+ }
1475
+
1476
+ //export Slice_whatsapp_Attachment_set
1477
+ func Slice_whatsapp_Attachment_set(handle CGoHandle, _idx int, _vl CGoHandle) {
1478
+ s := deptrFromHandle_Slice_whatsapp_Attachment(handle)
1479
+ s[_idx] = *ptrFromHandle_whatsapp_Attachment(_vl)
1480
+ }
1481
+
1482
+ //export Slice_whatsapp_Attachment_append
1483
+ func Slice_whatsapp_Attachment_append(handle CGoHandle, _vl CGoHandle) {
1484
+ s := ptrFromHandle_Slice_whatsapp_Attachment(handle)
1485
+ *s = append(*s, *ptrFromHandle_whatsapp_Attachment(_vl))
1486
+ }
1487
+
1488
+ // Converters for implicit pointer handles for type: []whatsapp.Contact
1489
+ func ptrFromHandle_Slice_whatsapp_Contact(h CGoHandle) *[]whatsapp.Contact {
1490
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]whatsapp.Contact")
1491
+ if p == nil {
1492
+ return nil
1493
+ }
1494
+ return p.(*[]whatsapp.Contact)
1495
+ }
1496
+ func deptrFromHandle_Slice_whatsapp_Contact(h CGoHandle) []whatsapp.Contact {
1497
+ p := ptrFromHandle_Slice_whatsapp_Contact(h)
1498
+ if p == nil {
1499
+ return nil
1500
+ }
1501
+ return *p
1502
+ }
1503
+ func handleFromPtr_Slice_whatsapp_Contact(p interface{}) CGoHandle {
1504
+ return CGoHandle(gopyh.Register("[]whatsapp.Contact", p))
1505
+ }
1506
+
1507
+ // --- wrapping slice: []whatsapp.Contact ---
1508
+ //
1509
+ //export Slice_whatsapp_Contact_CTor
1510
+ func Slice_whatsapp_Contact_CTor() CGoHandle {
1511
+ return CGoHandle(handleFromPtr_Slice_whatsapp_Contact(&[]whatsapp.Contact{}))
1512
+ }
1513
+
1514
+ //export Slice_whatsapp_Contact_len
1515
+ func Slice_whatsapp_Contact_len(handle CGoHandle) int {
1516
+ return len(deptrFromHandle_Slice_whatsapp_Contact(handle))
1517
+ }
1518
+
1519
+ //export Slice_whatsapp_Contact_elem
1520
+ func Slice_whatsapp_Contact_elem(handle CGoHandle, _idx int) CGoHandle {
1521
+ s := deptrFromHandle_Slice_whatsapp_Contact(handle)
1522
+ return handleFromPtr_whatsapp_Contact(&(s[_idx]))
1523
+ }
1524
+
1525
+ //export Slice_whatsapp_Contact_subslice
1526
+ func Slice_whatsapp_Contact_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1527
+ s := deptrFromHandle_Slice_whatsapp_Contact(handle)
1528
+ ss := s[_st:_ed]
1529
+ return CGoHandle(handleFromPtr_Slice_whatsapp_Contact(&ss))
1530
+ }
1531
+
1532
+ //export Slice_whatsapp_Contact_set
1533
+ func Slice_whatsapp_Contact_set(handle CGoHandle, _idx int, _vl CGoHandle) {
1534
+ s := deptrFromHandle_Slice_whatsapp_Contact(handle)
1535
+ s[_idx] = *ptrFromHandle_whatsapp_Contact(_vl)
1536
+ }
1537
+
1538
+ //export Slice_whatsapp_Contact_append
1539
+ func Slice_whatsapp_Contact_append(handle CGoHandle, _vl CGoHandle) {
1540
+ s := ptrFromHandle_Slice_whatsapp_Contact(handle)
1541
+ *s = append(*s, *ptrFromHandle_whatsapp_Contact(_vl))
1542
+ }
1543
+
1544
+ // Converters for implicit pointer handles for type: []whatsapp.Group
1545
+ func ptrFromHandle_Slice_whatsapp_Group(h CGoHandle) *[]whatsapp.Group {
1546
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]whatsapp.Group")
1547
+ if p == nil {
1548
+ return nil
1549
+ }
1550
+ return p.(*[]whatsapp.Group)
1551
+ }
1552
+ func deptrFromHandle_Slice_whatsapp_Group(h CGoHandle) []whatsapp.Group {
1553
+ p := ptrFromHandle_Slice_whatsapp_Group(h)
1554
+ if p == nil {
1555
+ return nil
1556
+ }
1557
+ return *p
1558
+ }
1559
+ func handleFromPtr_Slice_whatsapp_Group(p interface{}) CGoHandle {
1560
+ return CGoHandle(gopyh.Register("[]whatsapp.Group", p))
1561
+ }
1562
+
1563
+ // --- wrapping slice: []whatsapp.Group ---
1564
+ //
1565
+ //export Slice_whatsapp_Group_CTor
1566
+ func Slice_whatsapp_Group_CTor() CGoHandle {
1567
+ return CGoHandle(handleFromPtr_Slice_whatsapp_Group(&[]whatsapp.Group{}))
1568
+ }
1569
+
1570
+ //export Slice_whatsapp_Group_len
1571
+ func Slice_whatsapp_Group_len(handle CGoHandle) int {
1572
+ return len(deptrFromHandle_Slice_whatsapp_Group(handle))
1573
+ }
1574
+
1575
+ //export Slice_whatsapp_Group_elem
1576
+ func Slice_whatsapp_Group_elem(handle CGoHandle, _idx int) CGoHandle {
1577
+ s := deptrFromHandle_Slice_whatsapp_Group(handle)
1578
+ return handleFromPtr_whatsapp_Group(&(s[_idx]))
1579
+ }
1580
+
1581
+ //export Slice_whatsapp_Group_subslice
1582
+ func Slice_whatsapp_Group_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1583
+ s := deptrFromHandle_Slice_whatsapp_Group(handle)
1584
+ ss := s[_st:_ed]
1585
+ return CGoHandle(handleFromPtr_Slice_whatsapp_Group(&ss))
1586
+ }
1587
+
1588
+ //export Slice_whatsapp_Group_set
1589
+ func Slice_whatsapp_Group_set(handle CGoHandle, _idx int, _vl CGoHandle) {
1590
+ s := deptrFromHandle_Slice_whatsapp_Group(handle)
1591
+ s[_idx] = *ptrFromHandle_whatsapp_Group(_vl)
1592
+ }
1593
+
1594
+ //export Slice_whatsapp_Group_append
1595
+ func Slice_whatsapp_Group_append(handle CGoHandle, _vl CGoHandle) {
1596
+ s := ptrFromHandle_Slice_whatsapp_Group(handle)
1597
+ *s = append(*s, *ptrFromHandle_whatsapp_Group(_vl))
1598
+ }
1599
+
1600
+ // Converters for implicit pointer handles for type: []whatsapp.GroupParticipant
1601
+ func ptrFromHandle_Slice_whatsapp_GroupParticipant(h CGoHandle) *[]whatsapp.GroupParticipant {
1602
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]whatsapp.GroupParticipant")
1603
+ if p == nil {
1604
+ return nil
1605
+ }
1606
+ return p.(*[]whatsapp.GroupParticipant)
1607
+ }
1608
+ func deptrFromHandle_Slice_whatsapp_GroupParticipant(h CGoHandle) []whatsapp.GroupParticipant {
1609
+ p := ptrFromHandle_Slice_whatsapp_GroupParticipant(h)
1610
+ if p == nil {
1611
+ return nil
1612
+ }
1613
+ return *p
1614
+ }
1615
+ func handleFromPtr_Slice_whatsapp_GroupParticipant(p interface{}) CGoHandle {
1616
+ return CGoHandle(gopyh.Register("[]whatsapp.GroupParticipant", p))
1617
+ }
1618
+
1619
+ // --- wrapping slice: []whatsapp.GroupParticipant ---
1620
+ //
1621
+ //export Slice_whatsapp_GroupParticipant_CTor
1622
+ func Slice_whatsapp_GroupParticipant_CTor() CGoHandle {
1623
+ return CGoHandle(handleFromPtr_Slice_whatsapp_GroupParticipant(&[]whatsapp.GroupParticipant{}))
1624
+ }
1625
+
1626
+ //export Slice_whatsapp_GroupParticipant_len
1627
+ func Slice_whatsapp_GroupParticipant_len(handle CGoHandle) int {
1628
+ return len(deptrFromHandle_Slice_whatsapp_GroupParticipant(handle))
1629
+ }
1630
+
1631
+ //export Slice_whatsapp_GroupParticipant_elem
1632
+ func Slice_whatsapp_GroupParticipant_elem(handle CGoHandle, _idx int) CGoHandle {
1633
+ s := deptrFromHandle_Slice_whatsapp_GroupParticipant(handle)
1634
+ return handleFromPtr_whatsapp_GroupParticipant(&(s[_idx]))
1635
+ }
1636
+
1637
+ //export Slice_whatsapp_GroupParticipant_subslice
1638
+ func Slice_whatsapp_GroupParticipant_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1639
+ s := deptrFromHandle_Slice_whatsapp_GroupParticipant(handle)
1640
+ ss := s[_st:_ed]
1641
+ return CGoHandle(handleFromPtr_Slice_whatsapp_GroupParticipant(&ss))
1642
+ }
1643
+
1644
+ //export Slice_whatsapp_GroupParticipant_set
1645
+ func Slice_whatsapp_GroupParticipant_set(handle CGoHandle, _idx int, _vl CGoHandle) {
1646
+ s := deptrFromHandle_Slice_whatsapp_GroupParticipant(handle)
1647
+ s[_idx] = *ptrFromHandle_whatsapp_GroupParticipant(_vl)
1648
+ }
1649
+
1650
+ //export Slice_whatsapp_GroupParticipant_append
1651
+ func Slice_whatsapp_GroupParticipant_append(handle CGoHandle, _vl CGoHandle) {
1652
+ s := ptrFromHandle_Slice_whatsapp_GroupParticipant(handle)
1653
+ *s = append(*s, *ptrFromHandle_whatsapp_GroupParticipant(_vl))
1654
+ }
1655
+
1656
+ // Converters for implicit pointer handles for type: []whatsapp.Message
1657
+ func ptrFromHandle_Slice_whatsapp_Message(h CGoHandle) *[]whatsapp.Message {
1658
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]whatsapp.Message")
1659
+ if p == nil {
1660
+ return nil
1661
+ }
1662
+ return p.(*[]whatsapp.Message)
1663
+ }
1664
+ func deptrFromHandle_Slice_whatsapp_Message(h CGoHandle) []whatsapp.Message {
1665
+ p := ptrFromHandle_Slice_whatsapp_Message(h)
1666
+ if p == nil {
1667
+ return nil
1668
+ }
1669
+ return *p
1670
+ }
1671
+ func handleFromPtr_Slice_whatsapp_Message(p interface{}) CGoHandle {
1672
+ return CGoHandle(gopyh.Register("[]whatsapp.Message", p))
1673
+ }
1674
+
1675
+ // --- wrapping slice: []whatsapp.Message ---
1676
+ //
1677
+ //export Slice_whatsapp_Message_CTor
1678
+ func Slice_whatsapp_Message_CTor() CGoHandle {
1679
+ return CGoHandle(handleFromPtr_Slice_whatsapp_Message(&[]whatsapp.Message{}))
1680
+ }
1681
+
1682
+ //export Slice_whatsapp_Message_len
1683
+ func Slice_whatsapp_Message_len(handle CGoHandle) int {
1684
+ return len(deptrFromHandle_Slice_whatsapp_Message(handle))
1685
+ }
1686
+
1687
+ //export Slice_whatsapp_Message_elem
1688
+ func Slice_whatsapp_Message_elem(handle CGoHandle, _idx int) CGoHandle {
1689
+ s := deptrFromHandle_Slice_whatsapp_Message(handle)
1690
+ return handleFromPtr_whatsapp_Message(&(s[_idx]))
1691
+ }
1692
+
1693
+ //export Slice_whatsapp_Message_subslice
1694
+ func Slice_whatsapp_Message_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1695
+ s := deptrFromHandle_Slice_whatsapp_Message(handle)
1696
+ ss := s[_st:_ed]
1697
+ return CGoHandle(handleFromPtr_Slice_whatsapp_Message(&ss))
1698
+ }
1699
+
1700
+ //export Slice_whatsapp_Message_set
1701
+ func Slice_whatsapp_Message_set(handle CGoHandle, _idx int, _vl CGoHandle) {
1702
+ s := deptrFromHandle_Slice_whatsapp_Message(handle)
1703
+ s[_idx] = *ptrFromHandle_whatsapp_Message(_vl)
1704
+ }
1705
+
1706
+ //export Slice_whatsapp_Message_append
1707
+ func Slice_whatsapp_Message_append(handle CGoHandle, _vl CGoHandle) {
1708
+ s := ptrFromHandle_Slice_whatsapp_Message(handle)
1709
+ *s = append(*s, *ptrFromHandle_whatsapp_Message(_vl))
1710
+ }
1711
+
1712
+ // Converters for implicit pointer handles for type: []whatsapp.Receipt
1713
+ func ptrFromHandle_Slice_whatsapp_Receipt(h CGoHandle) *[]whatsapp.Receipt {
1714
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "[]whatsapp.Receipt")
1715
+ if p == nil {
1716
+ return nil
1717
+ }
1718
+ return p.(*[]whatsapp.Receipt)
1719
+ }
1720
+ func deptrFromHandle_Slice_whatsapp_Receipt(h CGoHandle) []whatsapp.Receipt {
1721
+ p := ptrFromHandle_Slice_whatsapp_Receipt(h)
1722
+ if p == nil {
1723
+ return nil
1724
+ }
1725
+ return *p
1726
+ }
1727
+ func handleFromPtr_Slice_whatsapp_Receipt(p interface{}) CGoHandle {
1728
+ return CGoHandle(gopyh.Register("[]whatsapp.Receipt", p))
1729
+ }
1730
+
1731
+ // --- wrapping slice: []whatsapp.Receipt ---
1732
+ //
1733
+ //export Slice_whatsapp_Receipt_CTor
1734
+ func Slice_whatsapp_Receipt_CTor() CGoHandle {
1735
+ return CGoHandle(handleFromPtr_Slice_whatsapp_Receipt(&[]whatsapp.Receipt{}))
1736
+ }
1737
+
1738
+ //export Slice_whatsapp_Receipt_len
1739
+ func Slice_whatsapp_Receipt_len(handle CGoHandle) int {
1740
+ return len(deptrFromHandle_Slice_whatsapp_Receipt(handle))
1741
+ }
1742
+
1743
+ //export Slice_whatsapp_Receipt_elem
1744
+ func Slice_whatsapp_Receipt_elem(handle CGoHandle, _idx int) CGoHandle {
1745
+ s := deptrFromHandle_Slice_whatsapp_Receipt(handle)
1746
+ return handleFromPtr_whatsapp_Receipt(&(s[_idx]))
1747
+ }
1748
+
1749
+ //export Slice_whatsapp_Receipt_subslice
1750
+ func Slice_whatsapp_Receipt_subslice(handle CGoHandle, _st, _ed int) CGoHandle {
1751
+ s := deptrFromHandle_Slice_whatsapp_Receipt(handle)
1752
+ ss := s[_st:_ed]
1753
+ return CGoHandle(handleFromPtr_Slice_whatsapp_Receipt(&ss))
1754
+ }
1755
+
1756
+ //export Slice_whatsapp_Receipt_set
1757
+ func Slice_whatsapp_Receipt_set(handle CGoHandle, _idx int, _vl CGoHandle) {
1758
+ s := deptrFromHandle_Slice_whatsapp_Receipt(handle)
1759
+ s[_idx] = *ptrFromHandle_whatsapp_Receipt(_vl)
1760
+ }
1761
+
1762
+ //export Slice_whatsapp_Receipt_append
1763
+ func Slice_whatsapp_Receipt_append(handle CGoHandle, _vl CGoHandle) {
1764
+ s := ptrFromHandle_Slice_whatsapp_Receipt(handle)
1765
+ *s = append(*s, *ptrFromHandle_whatsapp_Receipt(_vl))
1766
+ }
1767
+
1768
+ // Converters for non-pointer handles for type: whatsapp.Attachment
1769
+ func ptrFromHandle_whatsapp_Attachment(h CGoHandle) *whatsapp.Attachment {
1770
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Attachment")
1771
+ if p == nil {
1772
+ return nil
1773
+ }
1774
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Attachment{})).(*whatsapp.Attachment)
1775
+ }
1776
+ func handleFromPtr_whatsapp_Attachment(p interface{}) CGoHandle {
1777
+ return CGoHandle(gopyh.Register("whatsapp.Attachment", p))
1778
+ }
1779
+
1780
+ // Converters for non-pointer handles for type: whatsapp.Avatar
1781
+ func ptrFromHandle_whatsapp_Avatar(h CGoHandle) *whatsapp.Avatar {
1782
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Avatar")
1783
+ if p == nil {
1784
+ return nil
1785
+ }
1786
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Avatar{})).(*whatsapp.Avatar)
1787
+ }
1788
+ func handleFromPtr_whatsapp_Avatar(p interface{}) CGoHandle {
1789
+ return CGoHandle(gopyh.Register("whatsapp.Avatar", p))
1790
+ }
1791
+
1792
+ // Converters for non-pointer handles for type: whatsapp.Call
1793
+ func ptrFromHandle_whatsapp_Call(h CGoHandle) *whatsapp.Call {
1794
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Call")
1795
+ if p == nil {
1796
+ return nil
1797
+ }
1798
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Call{})).(*whatsapp.Call)
1799
+ }
1800
+ func handleFromPtr_whatsapp_Call(p interface{}) CGoHandle {
1801
+ return CGoHandle(gopyh.Register("whatsapp.Call", p))
1802
+ }
1803
+
1804
+ // Converters for non-pointer handles for type: whatsapp.ChatState
1805
+ func ptrFromHandle_whatsapp_ChatState(h CGoHandle) *whatsapp.ChatState {
1806
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.ChatState")
1807
+ if p == nil {
1808
+ return nil
1809
+ }
1810
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.ChatState{})).(*whatsapp.ChatState)
1811
+ }
1812
+ func handleFromPtr_whatsapp_ChatState(p interface{}) CGoHandle {
1813
+ return CGoHandle(gopyh.Register("whatsapp.ChatState", p))
1814
+ }
1815
+
1816
+ // Converters for non-pointer handles for type: whatsapp.Connect
1817
+ func ptrFromHandle_whatsapp_Connect(h CGoHandle) *whatsapp.Connect {
1818
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Connect")
1819
+ if p == nil {
1820
+ return nil
1821
+ }
1822
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Connect{})).(*whatsapp.Connect)
1823
+ }
1824
+ func handleFromPtr_whatsapp_Connect(p interface{}) CGoHandle {
1825
+ return CGoHandle(gopyh.Register("whatsapp.Connect", p))
1826
+ }
1827
+
1828
+ // Converters for non-pointer handles for type: whatsapp.Contact
1829
+ func ptrFromHandle_whatsapp_Contact(h CGoHandle) *whatsapp.Contact {
1830
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Contact")
1831
+ if p == nil {
1832
+ return nil
1833
+ }
1834
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Contact{})).(*whatsapp.Contact)
1835
+ }
1836
+ func handleFromPtr_whatsapp_Contact(p interface{}) CGoHandle {
1837
+ return CGoHandle(gopyh.Register("whatsapp.Contact", p))
1838
+ }
1839
+
1840
+ // Converters for non-pointer handles for type: whatsapp.EventPayload
1841
+ func ptrFromHandle_whatsapp_EventPayload(h CGoHandle) *whatsapp.EventPayload {
1842
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.EventPayload")
1843
+ if p == nil {
1844
+ return nil
1845
+ }
1846
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.EventPayload{})).(*whatsapp.EventPayload)
1847
+ }
1848
+ func handleFromPtr_whatsapp_EventPayload(p interface{}) CGoHandle {
1849
+ return CGoHandle(gopyh.Register("whatsapp.EventPayload", p))
1850
+ }
1851
+
1852
+ // Converters for non-pointer handles for type: whatsapp.Gateway
1853
+ func ptrFromHandle_whatsapp_Gateway(h CGoHandle) *whatsapp.Gateway {
1854
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Gateway")
1855
+ if p == nil {
1856
+ return nil
1857
+ }
1858
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway)
1859
+ }
1860
+ func handleFromPtr_whatsapp_Gateway(p interface{}) CGoHandle {
1861
+ return CGoHandle(gopyh.Register("whatsapp.Gateway", p))
1862
+ }
1863
+
1864
+ // Converters for non-pointer handles for type: whatsapp.Group
1865
+ func ptrFromHandle_whatsapp_Group(h CGoHandle) *whatsapp.Group {
1866
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Group")
1867
+ if p == nil {
1868
+ return nil
1869
+ }
1870
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Group{})).(*whatsapp.Group)
1871
+ }
1872
+ func handleFromPtr_whatsapp_Group(p interface{}) CGoHandle {
1873
+ return CGoHandle(gopyh.Register("whatsapp.Group", p))
1874
+ }
1875
+
1876
+ // Converters for non-pointer handles for type: whatsapp.GroupParticipant
1877
+ func ptrFromHandle_whatsapp_GroupParticipant(h CGoHandle) *whatsapp.GroupParticipant {
1878
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.GroupParticipant")
1879
+ if p == nil {
1880
+ return nil
1881
+ }
1882
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.GroupParticipant{})).(*whatsapp.GroupParticipant)
1883
+ }
1884
+ func handleFromPtr_whatsapp_GroupParticipant(p interface{}) CGoHandle {
1885
+ return CGoHandle(gopyh.Register("whatsapp.GroupParticipant", p))
1886
+ }
1887
+
1888
+ // Converters for non-pointer handles for type: whatsapp.GroupSubject
1889
+ func ptrFromHandle_whatsapp_GroupSubject(h CGoHandle) *whatsapp.GroupSubject {
1890
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.GroupSubject")
1891
+ if p == nil {
1892
+ return nil
1893
+ }
1894
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.GroupSubject{})).(*whatsapp.GroupSubject)
1895
+ }
1896
+ func handleFromPtr_whatsapp_GroupSubject(p interface{}) CGoHandle {
1897
+ return CGoHandle(gopyh.Register("whatsapp.GroupSubject", p))
1898
+ }
1899
+
1900
+ // Converters for non-pointer handles for type: whatsapp.LinkedDevice
1901
+ func ptrFromHandle_whatsapp_LinkedDevice(h CGoHandle) *whatsapp.LinkedDevice {
1902
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.LinkedDevice")
1903
+ if p == nil {
1904
+ return nil
1905
+ }
1906
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.LinkedDevice{})).(*whatsapp.LinkedDevice)
1907
+ }
1908
+ func handleFromPtr_whatsapp_LinkedDevice(p interface{}) CGoHandle {
1909
+ return CGoHandle(gopyh.Register("whatsapp.LinkedDevice", p))
1910
+ }
1911
+
1912
+ // Converters for non-pointer handles for type: whatsapp.Location
1913
+ func ptrFromHandle_whatsapp_Location(h CGoHandle) *whatsapp.Location {
1914
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Location")
1915
+ if p == nil {
1916
+ return nil
1917
+ }
1918
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Location{})).(*whatsapp.Location)
1919
+ }
1920
+ func handleFromPtr_whatsapp_Location(p interface{}) CGoHandle {
1921
+ return CGoHandle(gopyh.Register("whatsapp.Location", p))
1922
+ }
1923
+
1924
+ // Converters for non-pointer handles for type: whatsapp.Message
1925
+ func ptrFromHandle_whatsapp_Message(h CGoHandle) *whatsapp.Message {
1926
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Message")
1927
+ if p == nil {
1928
+ return nil
1929
+ }
1930
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Message{})).(*whatsapp.Message)
1931
+ }
1932
+ func handleFromPtr_whatsapp_Message(p interface{}) CGoHandle {
1933
+ return CGoHandle(gopyh.Register("whatsapp.Message", p))
1934
+ }
1935
+
1936
+ // Converters for non-pointer handles for type: whatsapp.Presence
1937
+ func ptrFromHandle_whatsapp_Presence(h CGoHandle) *whatsapp.Presence {
1938
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Presence")
1939
+ if p == nil {
1940
+ return nil
1941
+ }
1942
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Presence{})).(*whatsapp.Presence)
1943
+ }
1944
+ func handleFromPtr_whatsapp_Presence(p interface{}) CGoHandle {
1945
+ return CGoHandle(gopyh.Register("whatsapp.Presence", p))
1946
+ }
1947
+
1948
+ // Converters for non-pointer handles for type: whatsapp.Preview
1949
+ func ptrFromHandle_whatsapp_Preview(h CGoHandle) *whatsapp.Preview {
1950
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Preview")
1951
+ if p == nil {
1952
+ return nil
1953
+ }
1954
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Preview{})).(*whatsapp.Preview)
1955
+ }
1956
+ func handleFromPtr_whatsapp_Preview(p interface{}) CGoHandle {
1957
+ return CGoHandle(gopyh.Register("whatsapp.Preview", p))
1958
+ }
1959
+
1960
+ // Converters for non-pointer handles for type: whatsapp.Receipt
1961
+ func ptrFromHandle_whatsapp_Receipt(h CGoHandle) *whatsapp.Receipt {
1962
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Receipt")
1963
+ if p == nil {
1964
+ return nil
1965
+ }
1966
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Receipt{})).(*whatsapp.Receipt)
1967
+ }
1968
+ func handleFromPtr_whatsapp_Receipt(p interface{}) CGoHandle {
1969
+ return CGoHandle(gopyh.Register("whatsapp.Receipt", p))
1970
+ }
1971
+
1972
+ // Converters for non-pointer handles for type: whatsapp.Session
1973
+ func ptrFromHandle_whatsapp_Session(h CGoHandle) *whatsapp.Session {
1974
+ p := gopyh.VarFromHandle((gopyh.CGoHandle)(h), "whatsapp.Session")
1975
+ if p == nil {
1976
+ return nil
1977
+ }
1978
+ return gopyh.Embed(p, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session)
1979
+ }
1980
+ func handleFromPtr_whatsapp_Session(p interface{}) CGoHandle {
1981
+ return CGoHandle(gopyh.Register("whatsapp.Session", p))
1982
+ }
1983
+
1984
+ // ---- Global Variables: can only use functions to access ---
1985
+
1986
+ // ---- Interfaces ---
1987
+
1988
+ // ---- Structs ---
1989
+
1990
+ // --- wrapping struct: whatsapp.Attachment ---
1991
+ //
1992
+ //export whatsapp_Attachment_CTor
1993
+ func whatsapp_Attachment_CTor() CGoHandle {
1994
+ return CGoHandle(handleFromPtr_whatsapp_Attachment(&whatsapp.Attachment{}))
1995
+ }
1996
+
1997
+ //export whatsapp_Attachment_MIME_Get
1998
+ func whatsapp_Attachment_MIME_Get(handle CGoHandle) *C.char {
1999
+ op := ptrFromHandle_whatsapp_Attachment(handle)
2000
+ return C.CString(op.MIME)
2001
+ }
2002
+
2003
+ //export whatsapp_Attachment_MIME_Set
2004
+ func whatsapp_Attachment_MIME_Set(handle CGoHandle, val *C.char) {
2005
+ op := ptrFromHandle_whatsapp_Attachment(handle)
2006
+ op.MIME = C.GoString(val)
2007
+ }
2008
+
2009
+ //export whatsapp_Attachment_Filename_Get
2010
+ func whatsapp_Attachment_Filename_Get(handle CGoHandle) *C.char {
2011
+ op := ptrFromHandle_whatsapp_Attachment(handle)
2012
+ return C.CString(op.Filename)
2013
+ }
2014
+
2015
+ //export whatsapp_Attachment_Filename_Set
2016
+ func whatsapp_Attachment_Filename_Set(handle CGoHandle, val *C.char) {
2017
+ op := ptrFromHandle_whatsapp_Attachment(handle)
2018
+ op.Filename = C.GoString(val)
2019
+ }
2020
+
2021
+ //export whatsapp_Attachment_Caption_Get
2022
+ func whatsapp_Attachment_Caption_Get(handle CGoHandle) *C.char {
2023
+ op := ptrFromHandle_whatsapp_Attachment(handle)
2024
+ return C.CString(op.Caption)
2025
+ }
2026
+
2027
+ //export whatsapp_Attachment_Caption_Set
2028
+ func whatsapp_Attachment_Caption_Set(handle CGoHandle, val *C.char) {
2029
+ op := ptrFromHandle_whatsapp_Attachment(handle)
2030
+ op.Caption = C.GoString(val)
2031
+ }
2032
+
2033
+ //export whatsapp_Attachment_Data_Get
2034
+ func whatsapp_Attachment_Data_Get(handle CGoHandle) CGoHandle {
2035
+ op := ptrFromHandle_whatsapp_Attachment(handle)
2036
+ return handleFromPtr_Slice_byte(&op.Data)
2037
+ }
2038
+
2039
+ //export whatsapp_Attachment_Data_Set
2040
+ func whatsapp_Attachment_Data_Set(handle CGoHandle, val CGoHandle) {
2041
+ op := ptrFromHandle_whatsapp_Attachment(handle)
2042
+ op.Data = deptrFromHandle_Slice_byte(val)
2043
+ }
2044
+
2045
+ //export whatsapp_Attachment_GetSpec
2046
+ func whatsapp_Attachment_GetSpec(_handle CGoHandle, ctx CGoHandle) CGoHandle {
2047
+ _saved_thread := C.PyEval_SaveThread()
2048
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Attachment")
2049
+ if __err != nil {
2050
+ return handleFromPtr_Ptr_media_Spec(nil)
2051
+ }
2052
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Attachment{})).(*whatsapp.Attachment).GetSpec(ptrFromHandle_context_Context(ctx))
2053
+
2054
+ C.PyEval_RestoreThread(_saved_thread)
2055
+ if __err != nil {
2056
+ estr := C.CString(__err.Error())
2057
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2058
+ C.free(unsafe.Pointer(estr))
2059
+ return handleFromPtr_Ptr_media_Spec(nil)
2060
+ }
2061
+ return handleFromPtr_Ptr_media_Spec(cret)
2062
+ }
2063
+
2064
+ // --- wrapping struct: whatsapp.Avatar ---
2065
+ //
2066
+ //export whatsapp_Avatar_CTor
2067
+ func whatsapp_Avatar_CTor() CGoHandle {
2068
+ return CGoHandle(handleFromPtr_whatsapp_Avatar(&whatsapp.Avatar{}))
2069
+ }
2070
+
2071
+ //export whatsapp_Avatar_ID_Get
2072
+ func whatsapp_Avatar_ID_Get(handle CGoHandle) *C.char {
2073
+ op := ptrFromHandle_whatsapp_Avatar(handle)
2074
+ return C.CString(op.ID)
2075
+ }
2076
+
2077
+ //export whatsapp_Avatar_ID_Set
2078
+ func whatsapp_Avatar_ID_Set(handle CGoHandle, val *C.char) {
2079
+ op := ptrFromHandle_whatsapp_Avatar(handle)
2080
+ op.ID = C.GoString(val)
2081
+ }
2082
+
2083
+ //export whatsapp_Avatar_URL_Get
2084
+ func whatsapp_Avatar_URL_Get(handle CGoHandle) *C.char {
2085
+ op := ptrFromHandle_whatsapp_Avatar(handle)
2086
+ return C.CString(op.URL)
2087
+ }
2088
+
2089
+ //export whatsapp_Avatar_URL_Set
2090
+ func whatsapp_Avatar_URL_Set(handle CGoHandle, val *C.char) {
2091
+ op := ptrFromHandle_whatsapp_Avatar(handle)
2092
+ op.URL = C.GoString(val)
2093
+ }
2094
+
2095
+ // --- wrapping struct: whatsapp.Call ---
2096
+ //
2097
+ //export whatsapp_Call_CTor
2098
+ func whatsapp_Call_CTor() CGoHandle {
2099
+ return CGoHandle(handleFromPtr_whatsapp_Call(&whatsapp.Call{}))
2100
+ }
2101
+
2102
+ //export whatsapp_Call_State_Get
2103
+ func whatsapp_Call_State_Get(handle CGoHandle) C.longlong {
2104
+ op := ptrFromHandle_whatsapp_Call(handle)
2105
+ return C.longlong(int(op.State))
2106
+ }
2107
+
2108
+ //export whatsapp_Call_State_Set
2109
+ func whatsapp_Call_State_Set(handle CGoHandle, val C.longlong) {
2110
+ op := ptrFromHandle_whatsapp_Call(handle)
2111
+ op.State = whatsapp.CallState(int(val))
2112
+ }
2113
+
2114
+ //export whatsapp_Call_JID_Get
2115
+ func whatsapp_Call_JID_Get(handle CGoHandle) *C.char {
2116
+ op := ptrFromHandle_whatsapp_Call(handle)
2117
+ return C.CString(op.JID)
2118
+ }
2119
+
2120
+ //export whatsapp_Call_JID_Set
2121
+ func whatsapp_Call_JID_Set(handle CGoHandle, val *C.char) {
2122
+ op := ptrFromHandle_whatsapp_Call(handle)
2123
+ op.JID = C.GoString(val)
2124
+ }
2125
+
2126
+ //export whatsapp_Call_Timestamp_Get
2127
+ func whatsapp_Call_Timestamp_Get(handle CGoHandle) C.longlong {
2128
+ op := ptrFromHandle_whatsapp_Call(handle)
2129
+ return C.longlong(op.Timestamp)
2130
+ }
2131
+
2132
+ //export whatsapp_Call_Timestamp_Set
2133
+ func whatsapp_Call_Timestamp_Set(handle CGoHandle, val C.longlong) {
2134
+ op := ptrFromHandle_whatsapp_Call(handle)
2135
+ op.Timestamp = int64(val)
2136
+ }
2137
+
2138
+ // --- wrapping struct: whatsapp.Connect ---
2139
+ //
2140
+ //export whatsapp_Connect_CTor
2141
+ func whatsapp_Connect_CTor() CGoHandle {
2142
+ return CGoHandle(handleFromPtr_whatsapp_Connect(&whatsapp.Connect{}))
2143
+ }
2144
+
2145
+ //export whatsapp_Connect_JID_Get
2146
+ func whatsapp_Connect_JID_Get(handle CGoHandle) *C.char {
2147
+ op := ptrFromHandle_whatsapp_Connect(handle)
2148
+ return C.CString(op.JID)
2149
+ }
2150
+
2151
+ //export whatsapp_Connect_JID_Set
2152
+ func whatsapp_Connect_JID_Set(handle CGoHandle, val *C.char) {
2153
+ op := ptrFromHandle_whatsapp_Connect(handle)
2154
+ op.JID = C.GoString(val)
2155
+ }
2156
+
2157
+ //export whatsapp_Connect_Error_Get
2158
+ func whatsapp_Connect_Error_Get(handle CGoHandle) *C.char {
2159
+ op := ptrFromHandle_whatsapp_Connect(handle)
2160
+ return C.CString(op.Error)
2161
+ }
2162
+
2163
+ //export whatsapp_Connect_Error_Set
2164
+ func whatsapp_Connect_Error_Set(handle CGoHandle, val *C.char) {
2165
+ op := ptrFromHandle_whatsapp_Connect(handle)
2166
+ op.Error = C.GoString(val)
2167
+ }
2168
+
2169
+ // --- wrapping struct: whatsapp.Group ---
2170
+ //
2171
+ //export whatsapp_Group_CTor
2172
+ func whatsapp_Group_CTor() CGoHandle {
2173
+ return CGoHandle(handleFromPtr_whatsapp_Group(&whatsapp.Group{}))
2174
+ }
2175
+
2176
+ //export whatsapp_Group_JID_Get
2177
+ func whatsapp_Group_JID_Get(handle CGoHandle) *C.char {
2178
+ op := ptrFromHandle_whatsapp_Group(handle)
2179
+ return C.CString(op.JID)
2180
+ }
2181
+
2182
+ //export whatsapp_Group_JID_Set
2183
+ func whatsapp_Group_JID_Set(handle CGoHandle, val *C.char) {
2184
+ op := ptrFromHandle_whatsapp_Group(handle)
2185
+ op.JID = C.GoString(val)
2186
+ }
2187
+
2188
+ //export whatsapp_Group_Name_Get
2189
+ func whatsapp_Group_Name_Get(handle CGoHandle) *C.char {
2190
+ op := ptrFromHandle_whatsapp_Group(handle)
2191
+ return C.CString(op.Name)
2192
+ }
2193
+
2194
+ //export whatsapp_Group_Name_Set
2195
+ func whatsapp_Group_Name_Set(handle CGoHandle, val *C.char) {
2196
+ op := ptrFromHandle_whatsapp_Group(handle)
2197
+ op.Name = C.GoString(val)
2198
+ }
2199
+
2200
+ //export whatsapp_Group_Subject_Get
2201
+ func whatsapp_Group_Subject_Get(handle CGoHandle) CGoHandle {
2202
+ op := ptrFromHandle_whatsapp_Group(handle)
2203
+ return handleFromPtr_whatsapp_GroupSubject(&op.Subject)
2204
+ }
2205
+
2206
+ //export whatsapp_Group_Subject_Set
2207
+ func whatsapp_Group_Subject_Set(handle CGoHandle, val CGoHandle) {
2208
+ op := ptrFromHandle_whatsapp_Group(handle)
2209
+ op.Subject = *ptrFromHandle_whatsapp_GroupSubject(val)
2210
+ }
2211
+
2212
+ //export whatsapp_Group_Nickname_Get
2213
+ func whatsapp_Group_Nickname_Get(handle CGoHandle) *C.char {
2214
+ op := ptrFromHandle_whatsapp_Group(handle)
2215
+ return C.CString(op.Nickname)
2216
+ }
2217
+
2218
+ //export whatsapp_Group_Nickname_Set
2219
+ func whatsapp_Group_Nickname_Set(handle CGoHandle, val *C.char) {
2220
+ op := ptrFromHandle_whatsapp_Group(handle)
2221
+ op.Nickname = C.GoString(val)
2222
+ }
2223
+
2224
+ //export whatsapp_Group_Participants_Get
2225
+ func whatsapp_Group_Participants_Get(handle CGoHandle) CGoHandle {
2226
+ op := ptrFromHandle_whatsapp_Group(handle)
2227
+ return handleFromPtr_Slice_whatsapp_GroupParticipant(&op.Participants)
2228
+ }
2229
+
2230
+ //export whatsapp_Group_Participants_Set
2231
+ func whatsapp_Group_Participants_Set(handle CGoHandle, val CGoHandle) {
2232
+ op := ptrFromHandle_whatsapp_Group(handle)
2233
+ op.Participants = deptrFromHandle_Slice_whatsapp_GroupParticipant(val)
2234
+ }
2235
+
2236
+ // --- wrapping struct: whatsapp.GroupParticipant ---
2237
+ //
2238
+ //export whatsapp_GroupParticipant_CTor
2239
+ func whatsapp_GroupParticipant_CTor() CGoHandle {
2240
+ return CGoHandle(handleFromPtr_whatsapp_GroupParticipant(&whatsapp.GroupParticipant{}))
2241
+ }
2242
+
2243
+ //export whatsapp_GroupParticipant_JID_Get
2244
+ func whatsapp_GroupParticipant_JID_Get(handle CGoHandle) *C.char {
2245
+ op := ptrFromHandle_whatsapp_GroupParticipant(handle)
2246
+ return C.CString(op.JID)
2247
+ }
2248
+
2249
+ //export whatsapp_GroupParticipant_JID_Set
2250
+ func whatsapp_GroupParticipant_JID_Set(handle CGoHandle, val *C.char) {
2251
+ op := ptrFromHandle_whatsapp_GroupParticipant(handle)
2252
+ op.JID = C.GoString(val)
2253
+ }
2254
+
2255
+ //export whatsapp_GroupParticipant_Affiliation_Get
2256
+ func whatsapp_GroupParticipant_Affiliation_Get(handle CGoHandle) C.longlong {
2257
+ op := ptrFromHandle_whatsapp_GroupParticipant(handle)
2258
+ return C.longlong(int(op.Affiliation))
2259
+ }
2260
+
2261
+ //export whatsapp_GroupParticipant_Affiliation_Set
2262
+ func whatsapp_GroupParticipant_Affiliation_Set(handle CGoHandle, val C.longlong) {
2263
+ op := ptrFromHandle_whatsapp_GroupParticipant(handle)
2264
+ op.Affiliation = whatsapp.GroupAffiliation(int(val))
2265
+ }
2266
+
2267
+ //export whatsapp_GroupParticipant_Action_Get
2268
+ func whatsapp_GroupParticipant_Action_Get(handle CGoHandle) C.longlong {
2269
+ op := ptrFromHandle_whatsapp_GroupParticipant(handle)
2270
+ return C.longlong(int(op.Action))
2271
+ }
2272
+
2273
+ //export whatsapp_GroupParticipant_Action_Set
2274
+ func whatsapp_GroupParticipant_Action_Set(handle CGoHandle, val C.longlong) {
2275
+ op := ptrFromHandle_whatsapp_GroupParticipant(handle)
2276
+ op.Action = whatsapp.GroupParticipantAction(int(val))
2277
+ }
2278
+
2279
+ // --- wrapping struct: whatsapp.Message ---
2280
+ //
2281
+ //export whatsapp_Message_CTor
2282
+ func whatsapp_Message_CTor() CGoHandle {
2283
+ return CGoHandle(handleFromPtr_whatsapp_Message(&whatsapp.Message{}))
2284
+ }
2285
+
2286
+ //export whatsapp_Message_Kind_Get
2287
+ func whatsapp_Message_Kind_Get(handle CGoHandle) C.longlong {
2288
+ op := ptrFromHandle_whatsapp_Message(handle)
2289
+ return C.longlong(int(op.Kind))
2290
+ }
2291
+
2292
+ //export whatsapp_Message_Kind_Set
2293
+ func whatsapp_Message_Kind_Set(handle CGoHandle, val C.longlong) {
2294
+ op := ptrFromHandle_whatsapp_Message(handle)
2295
+ op.Kind = whatsapp.MessageKind(int(val))
2296
+ }
2297
+
2298
+ //export whatsapp_Message_ID_Get
2299
+ func whatsapp_Message_ID_Get(handle CGoHandle) *C.char {
2300
+ op := ptrFromHandle_whatsapp_Message(handle)
2301
+ return C.CString(op.ID)
2302
+ }
2303
+
2304
+ //export whatsapp_Message_ID_Set
2305
+ func whatsapp_Message_ID_Set(handle CGoHandle, val *C.char) {
2306
+ op := ptrFromHandle_whatsapp_Message(handle)
2307
+ op.ID = C.GoString(val)
2308
+ }
2309
+
2310
+ //export whatsapp_Message_JID_Get
2311
+ func whatsapp_Message_JID_Get(handle CGoHandle) *C.char {
2312
+ op := ptrFromHandle_whatsapp_Message(handle)
2313
+ return C.CString(op.JID)
2314
+ }
2315
+
2316
+ //export whatsapp_Message_JID_Set
2317
+ func whatsapp_Message_JID_Set(handle CGoHandle, val *C.char) {
2318
+ op := ptrFromHandle_whatsapp_Message(handle)
2319
+ op.JID = C.GoString(val)
2320
+ }
2321
+
2322
+ //export whatsapp_Message_GroupJID_Get
2323
+ func whatsapp_Message_GroupJID_Get(handle CGoHandle) *C.char {
2324
+ op := ptrFromHandle_whatsapp_Message(handle)
2325
+ return C.CString(op.GroupJID)
2326
+ }
2327
+
2328
+ //export whatsapp_Message_GroupJID_Set
2329
+ func whatsapp_Message_GroupJID_Set(handle CGoHandle, val *C.char) {
2330
+ op := ptrFromHandle_whatsapp_Message(handle)
2331
+ op.GroupJID = C.GoString(val)
2332
+ }
2333
+
2334
+ //export whatsapp_Message_OriginJID_Get
2335
+ func whatsapp_Message_OriginJID_Get(handle CGoHandle) *C.char {
2336
+ op := ptrFromHandle_whatsapp_Message(handle)
2337
+ return C.CString(op.OriginJID)
2338
+ }
2339
+
2340
+ //export whatsapp_Message_OriginJID_Set
2341
+ func whatsapp_Message_OriginJID_Set(handle CGoHandle, val *C.char) {
2342
+ op := ptrFromHandle_whatsapp_Message(handle)
2343
+ op.OriginJID = C.GoString(val)
2344
+ }
2345
+
2346
+ //export whatsapp_Message_Body_Get
2347
+ func whatsapp_Message_Body_Get(handle CGoHandle) *C.char {
2348
+ op := ptrFromHandle_whatsapp_Message(handle)
2349
+ return C.CString(op.Body)
2350
+ }
2351
+
2352
+ //export whatsapp_Message_Body_Set
2353
+ func whatsapp_Message_Body_Set(handle CGoHandle, val *C.char) {
2354
+ op := ptrFromHandle_whatsapp_Message(handle)
2355
+ op.Body = C.GoString(val)
2356
+ }
2357
+
2358
+ //export whatsapp_Message_Timestamp_Get
2359
+ func whatsapp_Message_Timestamp_Get(handle CGoHandle) C.longlong {
2360
+ op := ptrFromHandle_whatsapp_Message(handle)
2361
+ return C.longlong(op.Timestamp)
2362
+ }
2363
+
2364
+ //export whatsapp_Message_Timestamp_Set
2365
+ func whatsapp_Message_Timestamp_Set(handle CGoHandle, val C.longlong) {
2366
+ op := ptrFromHandle_whatsapp_Message(handle)
2367
+ op.Timestamp = int64(val)
2368
+ }
2369
+
2370
+ //export whatsapp_Message_IsCarbon_Get
2371
+ func whatsapp_Message_IsCarbon_Get(handle CGoHandle) C.char {
2372
+ op := ptrFromHandle_whatsapp_Message(handle)
2373
+ return boolGoToPy(op.IsCarbon)
2374
+ }
2375
+
2376
+ //export whatsapp_Message_IsCarbon_Set
2377
+ func whatsapp_Message_IsCarbon_Set(handle CGoHandle, val C.char) {
2378
+ op := ptrFromHandle_whatsapp_Message(handle)
2379
+ op.IsCarbon = boolPyToGo(val)
2380
+ }
2381
+
2382
+ //export whatsapp_Message_IsForwarded_Get
2383
+ func whatsapp_Message_IsForwarded_Get(handle CGoHandle) C.char {
2384
+ op := ptrFromHandle_whatsapp_Message(handle)
2385
+ return boolGoToPy(op.IsForwarded)
2386
+ }
2387
+
2388
+ //export whatsapp_Message_IsForwarded_Set
2389
+ func whatsapp_Message_IsForwarded_Set(handle CGoHandle, val C.char) {
2390
+ op := ptrFromHandle_whatsapp_Message(handle)
2391
+ op.IsForwarded = boolPyToGo(val)
2392
+ }
2393
+
2394
+ //export whatsapp_Message_ReplyID_Get
2395
+ func whatsapp_Message_ReplyID_Get(handle CGoHandle) *C.char {
2396
+ op := ptrFromHandle_whatsapp_Message(handle)
2397
+ return C.CString(op.ReplyID)
2398
+ }
2399
+
2400
+ //export whatsapp_Message_ReplyID_Set
2401
+ func whatsapp_Message_ReplyID_Set(handle CGoHandle, val *C.char) {
2402
+ op := ptrFromHandle_whatsapp_Message(handle)
2403
+ op.ReplyID = C.GoString(val)
2404
+ }
2405
+
2406
+ //export whatsapp_Message_ReplyBody_Get
2407
+ func whatsapp_Message_ReplyBody_Get(handle CGoHandle) *C.char {
2408
+ op := ptrFromHandle_whatsapp_Message(handle)
2409
+ return C.CString(op.ReplyBody)
2410
+ }
2411
+
2412
+ //export whatsapp_Message_ReplyBody_Set
2413
+ func whatsapp_Message_ReplyBody_Set(handle CGoHandle, val *C.char) {
2414
+ op := ptrFromHandle_whatsapp_Message(handle)
2415
+ op.ReplyBody = C.GoString(val)
2416
+ }
2417
+
2418
+ //export whatsapp_Message_Attachments_Get
2419
+ func whatsapp_Message_Attachments_Get(handle CGoHandle) CGoHandle {
2420
+ op := ptrFromHandle_whatsapp_Message(handle)
2421
+ return handleFromPtr_Slice_whatsapp_Attachment(&op.Attachments)
2422
+ }
2423
+
2424
+ //export whatsapp_Message_Attachments_Set
2425
+ func whatsapp_Message_Attachments_Set(handle CGoHandle, val CGoHandle) {
2426
+ op := ptrFromHandle_whatsapp_Message(handle)
2427
+ op.Attachments = deptrFromHandle_Slice_whatsapp_Attachment(val)
2428
+ }
2429
+
2430
+ //export whatsapp_Message_Preview_Get
2431
+ func whatsapp_Message_Preview_Get(handle CGoHandle) CGoHandle {
2432
+ op := ptrFromHandle_whatsapp_Message(handle)
2433
+ return handleFromPtr_whatsapp_Preview(&op.Preview)
2434
+ }
2435
+
2436
+ //export whatsapp_Message_Preview_Set
2437
+ func whatsapp_Message_Preview_Set(handle CGoHandle, val CGoHandle) {
2438
+ op := ptrFromHandle_whatsapp_Message(handle)
2439
+ op.Preview = *ptrFromHandle_whatsapp_Preview(val)
2440
+ }
2441
+
2442
+ //export whatsapp_Message_Location_Get
2443
+ func whatsapp_Message_Location_Get(handle CGoHandle) CGoHandle {
2444
+ op := ptrFromHandle_whatsapp_Message(handle)
2445
+ return handleFromPtr_whatsapp_Location(&op.Location)
2446
+ }
2447
+
2448
+ //export whatsapp_Message_Location_Set
2449
+ func whatsapp_Message_Location_Set(handle CGoHandle, val CGoHandle) {
2450
+ op := ptrFromHandle_whatsapp_Message(handle)
2451
+ op.Location = *ptrFromHandle_whatsapp_Location(val)
2452
+ }
2453
+
2454
+ //export whatsapp_Message_MentionJIDs_Get
2455
+ func whatsapp_Message_MentionJIDs_Get(handle CGoHandle) CGoHandle {
2456
+ op := ptrFromHandle_whatsapp_Message(handle)
2457
+ return handleFromPtr_Slice_string(&op.MentionJIDs)
2458
+ }
2459
+
2460
+ //export whatsapp_Message_MentionJIDs_Set
2461
+ func whatsapp_Message_MentionJIDs_Set(handle CGoHandle, val CGoHandle) {
2462
+ op := ptrFromHandle_whatsapp_Message(handle)
2463
+ op.MentionJIDs = deptrFromHandle_Slice_string(val)
2464
+ }
2465
+
2466
+ //export whatsapp_Message_Receipts_Get
2467
+ func whatsapp_Message_Receipts_Get(handle CGoHandle) CGoHandle {
2468
+ op := ptrFromHandle_whatsapp_Message(handle)
2469
+ return handleFromPtr_Slice_whatsapp_Receipt(&op.Receipts)
2470
+ }
2471
+
2472
+ //export whatsapp_Message_Receipts_Set
2473
+ func whatsapp_Message_Receipts_Set(handle CGoHandle, val CGoHandle) {
2474
+ op := ptrFromHandle_whatsapp_Message(handle)
2475
+ op.Receipts = deptrFromHandle_Slice_whatsapp_Receipt(val)
2476
+ }
2477
+
2478
+ //export whatsapp_Message_Reactions_Get
2479
+ func whatsapp_Message_Reactions_Get(handle CGoHandle) CGoHandle {
2480
+ op := ptrFromHandle_whatsapp_Message(handle)
2481
+ return handleFromPtr_Slice_whatsapp_Message(&op.Reactions)
2482
+ }
2483
+
2484
+ //export whatsapp_Message_Reactions_Set
2485
+ func whatsapp_Message_Reactions_Set(handle CGoHandle, val CGoHandle) {
2486
+ op := ptrFromHandle_whatsapp_Message(handle)
2487
+ op.Reactions = deptrFromHandle_Slice_whatsapp_Message(val)
2488
+ }
2489
+
2490
+ // --- wrapping struct: whatsapp.ChatState ---
2491
+ //
2492
+ //export whatsapp_ChatState_CTor
2493
+ func whatsapp_ChatState_CTor() CGoHandle {
2494
+ return CGoHandle(handleFromPtr_whatsapp_ChatState(&whatsapp.ChatState{}))
2495
+ }
2496
+
2497
+ //export whatsapp_ChatState_Kind_Get
2498
+ func whatsapp_ChatState_Kind_Get(handle CGoHandle) C.longlong {
2499
+ op := ptrFromHandle_whatsapp_ChatState(handle)
2500
+ return C.longlong(int(op.Kind))
2501
+ }
2502
+
2503
+ //export whatsapp_ChatState_Kind_Set
2504
+ func whatsapp_ChatState_Kind_Set(handle CGoHandle, val C.longlong) {
2505
+ op := ptrFromHandle_whatsapp_ChatState(handle)
2506
+ op.Kind = whatsapp.ChatStateKind(int(val))
2507
+ }
2508
+
2509
+ //export whatsapp_ChatState_JID_Get
2510
+ func whatsapp_ChatState_JID_Get(handle CGoHandle) *C.char {
2511
+ op := ptrFromHandle_whatsapp_ChatState(handle)
2512
+ return C.CString(op.JID)
2513
+ }
2514
+
2515
+ //export whatsapp_ChatState_JID_Set
2516
+ func whatsapp_ChatState_JID_Set(handle CGoHandle, val *C.char) {
2517
+ op := ptrFromHandle_whatsapp_ChatState(handle)
2518
+ op.JID = C.GoString(val)
2519
+ }
2520
+
2521
+ //export whatsapp_ChatState_GroupJID_Get
2522
+ func whatsapp_ChatState_GroupJID_Get(handle CGoHandle) *C.char {
2523
+ op := ptrFromHandle_whatsapp_ChatState(handle)
2524
+ return C.CString(op.GroupJID)
2525
+ }
2526
+
2527
+ //export whatsapp_ChatState_GroupJID_Set
2528
+ func whatsapp_ChatState_GroupJID_Set(handle CGoHandle, val *C.char) {
2529
+ op := ptrFromHandle_whatsapp_ChatState(handle)
2530
+ op.GroupJID = C.GoString(val)
2531
+ }
2532
+
2533
+ // --- wrapping struct: whatsapp.Contact ---
2534
+ //
2535
+ //export whatsapp_Contact_CTor
2536
+ func whatsapp_Contact_CTor() CGoHandle {
2537
+ return CGoHandle(handleFromPtr_whatsapp_Contact(&whatsapp.Contact{}))
2538
+ }
2539
+
2540
+ //export whatsapp_Contact_JID_Get
2541
+ func whatsapp_Contact_JID_Get(handle CGoHandle) *C.char {
2542
+ op := ptrFromHandle_whatsapp_Contact(handle)
2543
+ return C.CString(op.JID)
2544
+ }
2545
+
2546
+ //export whatsapp_Contact_JID_Set
2547
+ func whatsapp_Contact_JID_Set(handle CGoHandle, val *C.char) {
2548
+ op := ptrFromHandle_whatsapp_Contact(handle)
2549
+ op.JID = C.GoString(val)
2550
+ }
2551
+
2552
+ //export whatsapp_Contact_Name_Get
2553
+ func whatsapp_Contact_Name_Get(handle CGoHandle) *C.char {
2554
+ op := ptrFromHandle_whatsapp_Contact(handle)
2555
+ return C.CString(op.Name)
2556
+ }
2557
+
2558
+ //export whatsapp_Contact_Name_Set
2559
+ func whatsapp_Contact_Name_Set(handle CGoHandle, val *C.char) {
2560
+ op := ptrFromHandle_whatsapp_Contact(handle)
2561
+ op.Name = C.GoString(val)
2562
+ }
2563
+
2564
+ // --- wrapping struct: whatsapp.EventPayload ---
2565
+ //
2566
+ //export whatsapp_EventPayload_CTor
2567
+ func whatsapp_EventPayload_CTor() CGoHandle {
2568
+ return CGoHandle(handleFromPtr_whatsapp_EventPayload(&whatsapp.EventPayload{}))
2569
+ }
2570
+
2571
+ //export whatsapp_EventPayload_QRCode_Get
2572
+ func whatsapp_EventPayload_QRCode_Get(handle CGoHandle) *C.char {
2573
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2574
+ return C.CString(op.QRCode)
2575
+ }
2576
+
2577
+ //export whatsapp_EventPayload_QRCode_Set
2578
+ func whatsapp_EventPayload_QRCode_Set(handle CGoHandle, val *C.char) {
2579
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2580
+ op.QRCode = C.GoString(val)
2581
+ }
2582
+
2583
+ //export whatsapp_EventPayload_PairDeviceID_Get
2584
+ func whatsapp_EventPayload_PairDeviceID_Get(handle CGoHandle) *C.char {
2585
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2586
+ return C.CString(op.PairDeviceID)
2587
+ }
2588
+
2589
+ //export whatsapp_EventPayload_PairDeviceID_Set
2590
+ func whatsapp_EventPayload_PairDeviceID_Set(handle CGoHandle, val *C.char) {
2591
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2592
+ op.PairDeviceID = C.GoString(val)
2593
+ }
2594
+
2595
+ //export whatsapp_EventPayload_Connect_Get
2596
+ func whatsapp_EventPayload_Connect_Get(handle CGoHandle) CGoHandle {
2597
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2598
+ return handleFromPtr_whatsapp_Connect(&op.Connect)
2599
+ }
2600
+
2601
+ //export whatsapp_EventPayload_Connect_Set
2602
+ func whatsapp_EventPayload_Connect_Set(handle CGoHandle, val CGoHandle) {
2603
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2604
+ op.Connect = *ptrFromHandle_whatsapp_Connect(val)
2605
+ }
2606
+
2607
+ //export whatsapp_EventPayload_Contact_Get
2608
+ func whatsapp_EventPayload_Contact_Get(handle CGoHandle) CGoHandle {
2609
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2610
+ return handleFromPtr_whatsapp_Contact(&op.Contact)
2611
+ }
2612
+
2613
+ //export whatsapp_EventPayload_Contact_Set
2614
+ func whatsapp_EventPayload_Contact_Set(handle CGoHandle, val CGoHandle) {
2615
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2616
+ op.Contact = *ptrFromHandle_whatsapp_Contact(val)
2617
+ }
2618
+
2619
+ //export whatsapp_EventPayload_Presence_Get
2620
+ func whatsapp_EventPayload_Presence_Get(handle CGoHandle) CGoHandle {
2621
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2622
+ return handleFromPtr_whatsapp_Presence(&op.Presence)
2623
+ }
2624
+
2625
+ //export whatsapp_EventPayload_Presence_Set
2626
+ func whatsapp_EventPayload_Presence_Set(handle CGoHandle, val CGoHandle) {
2627
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2628
+ op.Presence = *ptrFromHandle_whatsapp_Presence(val)
2629
+ }
2630
+
2631
+ //export whatsapp_EventPayload_Message_Get
2632
+ func whatsapp_EventPayload_Message_Get(handle CGoHandle) CGoHandle {
2633
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2634
+ return handleFromPtr_whatsapp_Message(&op.Message)
2635
+ }
2636
+
2637
+ //export whatsapp_EventPayload_Message_Set
2638
+ func whatsapp_EventPayload_Message_Set(handle CGoHandle, val CGoHandle) {
2639
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2640
+ op.Message = *ptrFromHandle_whatsapp_Message(val)
2641
+ }
2642
+
2643
+ //export whatsapp_EventPayload_ChatState_Get
2644
+ func whatsapp_EventPayload_ChatState_Get(handle CGoHandle) CGoHandle {
2645
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2646
+ return handleFromPtr_whatsapp_ChatState(&op.ChatState)
2647
+ }
2648
+
2649
+ //export whatsapp_EventPayload_ChatState_Set
2650
+ func whatsapp_EventPayload_ChatState_Set(handle CGoHandle, val CGoHandle) {
2651
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2652
+ op.ChatState = *ptrFromHandle_whatsapp_ChatState(val)
2653
+ }
2654
+
2655
+ //export whatsapp_EventPayload_Receipt_Get
2656
+ func whatsapp_EventPayload_Receipt_Get(handle CGoHandle) CGoHandle {
2657
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2658
+ return handleFromPtr_whatsapp_Receipt(&op.Receipt)
2659
+ }
2660
+
2661
+ //export whatsapp_EventPayload_Receipt_Set
2662
+ func whatsapp_EventPayload_Receipt_Set(handle CGoHandle, val CGoHandle) {
2663
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2664
+ op.Receipt = *ptrFromHandle_whatsapp_Receipt(val)
2665
+ }
2666
+
2667
+ //export whatsapp_EventPayload_Group_Get
2668
+ func whatsapp_EventPayload_Group_Get(handle CGoHandle) CGoHandle {
2669
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2670
+ return handleFromPtr_whatsapp_Group(&op.Group)
2671
+ }
2672
+
2673
+ //export whatsapp_EventPayload_Group_Set
2674
+ func whatsapp_EventPayload_Group_Set(handle CGoHandle, val CGoHandle) {
2675
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2676
+ op.Group = *ptrFromHandle_whatsapp_Group(val)
2677
+ }
2678
+
2679
+ //export whatsapp_EventPayload_Call_Get
2680
+ func whatsapp_EventPayload_Call_Get(handle CGoHandle) CGoHandle {
2681
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2682
+ return handleFromPtr_whatsapp_Call(&op.Call)
2683
+ }
2684
+
2685
+ //export whatsapp_EventPayload_Call_Set
2686
+ func whatsapp_EventPayload_Call_Set(handle CGoHandle, val CGoHandle) {
2687
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2688
+ op.Call = *ptrFromHandle_whatsapp_Call(val)
2689
+ }
2690
+
2691
+ // --- wrapping struct: whatsapp.LinkedDevice ---
2692
+ //
2693
+ //export whatsapp_LinkedDevice_CTor
2694
+ func whatsapp_LinkedDevice_CTor() CGoHandle {
2695
+ return CGoHandle(handleFromPtr_whatsapp_LinkedDevice(&whatsapp.LinkedDevice{}))
2696
+ }
2697
+
2698
+ //export whatsapp_LinkedDevice_ID_Get
2699
+ func whatsapp_LinkedDevice_ID_Get(handle CGoHandle) *C.char {
2700
+ op := ptrFromHandle_whatsapp_LinkedDevice(handle)
2701
+ return C.CString(op.ID)
2702
+ }
2703
+
2704
+ //export whatsapp_LinkedDevice_ID_Set
2705
+ func whatsapp_LinkedDevice_ID_Set(handle CGoHandle, val *C.char) {
2706
+ op := ptrFromHandle_whatsapp_LinkedDevice(handle)
2707
+ op.ID = C.GoString(val)
2708
+ }
2709
+
2710
+ //export whatsapp_LinkedDevice_JID
2711
+ func whatsapp_LinkedDevice_JID(_handle CGoHandle) CGoHandle {
2712
+ _saved_thread := C.PyEval_SaveThread()
2713
+ defer C.PyEval_RestoreThread(_saved_thread)
2714
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.LinkedDevice")
2715
+ if __err != nil {
2716
+ return handleFromPtr_types_JID(nil)
2717
+ }
2718
+ cret := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.LinkedDevice{})).(*whatsapp.LinkedDevice).JID()
2719
+
2720
+ return handleFromPtr_types_JID(&cret)
2721
+ }
2722
+
2723
+ // --- wrapping struct: whatsapp.Location ---
2724
+ //
2725
+ //export whatsapp_Location_CTor
2726
+ func whatsapp_Location_CTor() CGoHandle {
2727
+ return CGoHandle(handleFromPtr_whatsapp_Location(&whatsapp.Location{}))
2728
+ }
2729
+
2730
+ //export whatsapp_Location_Latitude_Get
2731
+ func whatsapp_Location_Latitude_Get(handle CGoHandle) C.double {
2732
+ op := ptrFromHandle_whatsapp_Location(handle)
2733
+ return C.double(op.Latitude)
2734
+ }
2735
+
2736
+ //export whatsapp_Location_Latitude_Set
2737
+ func whatsapp_Location_Latitude_Set(handle CGoHandle, val C.double) {
2738
+ op := ptrFromHandle_whatsapp_Location(handle)
2739
+ op.Latitude = float64(val)
2740
+ }
2741
+
2742
+ //export whatsapp_Location_Longitude_Get
2743
+ func whatsapp_Location_Longitude_Get(handle CGoHandle) C.double {
2744
+ op := ptrFromHandle_whatsapp_Location(handle)
2745
+ return C.double(op.Longitude)
2746
+ }
2747
+
2748
+ //export whatsapp_Location_Longitude_Set
2749
+ func whatsapp_Location_Longitude_Set(handle CGoHandle, val C.double) {
2750
+ op := ptrFromHandle_whatsapp_Location(handle)
2751
+ op.Longitude = float64(val)
2752
+ }
2753
+
2754
+ //export whatsapp_Location_Accuracy_Get
2755
+ func whatsapp_Location_Accuracy_Get(handle CGoHandle) C.longlong {
2756
+ op := ptrFromHandle_whatsapp_Location(handle)
2757
+ return C.longlong(op.Accuracy)
2758
+ }
2759
+
2760
+ //export whatsapp_Location_Accuracy_Set
2761
+ func whatsapp_Location_Accuracy_Set(handle CGoHandle, val C.longlong) {
2762
+ op := ptrFromHandle_whatsapp_Location(handle)
2763
+ op.Accuracy = int(val)
2764
+ }
2765
+
2766
+ //export whatsapp_Location_IsLive_Get
2767
+ func whatsapp_Location_IsLive_Get(handle CGoHandle) C.char {
2768
+ op := ptrFromHandle_whatsapp_Location(handle)
2769
+ return boolGoToPy(op.IsLive)
2770
+ }
2771
+
2772
+ //export whatsapp_Location_IsLive_Set
2773
+ func whatsapp_Location_IsLive_Set(handle CGoHandle, val C.char) {
2774
+ op := ptrFromHandle_whatsapp_Location(handle)
2775
+ op.IsLive = boolPyToGo(val)
2776
+ }
2777
+
2778
+ //export whatsapp_Location_Name_Get
2779
+ func whatsapp_Location_Name_Get(handle CGoHandle) *C.char {
2780
+ op := ptrFromHandle_whatsapp_Location(handle)
2781
+ return C.CString(op.Name)
2782
+ }
2783
+
2784
+ //export whatsapp_Location_Name_Set
2785
+ func whatsapp_Location_Name_Set(handle CGoHandle, val *C.char) {
2786
+ op := ptrFromHandle_whatsapp_Location(handle)
2787
+ op.Name = C.GoString(val)
2788
+ }
2789
+
2790
+ //export whatsapp_Location_Address_Get
2791
+ func whatsapp_Location_Address_Get(handle CGoHandle) *C.char {
2792
+ op := ptrFromHandle_whatsapp_Location(handle)
2793
+ return C.CString(op.Address)
2794
+ }
2795
+
2796
+ //export whatsapp_Location_Address_Set
2797
+ func whatsapp_Location_Address_Set(handle CGoHandle, val *C.char) {
2798
+ op := ptrFromHandle_whatsapp_Location(handle)
2799
+ op.Address = C.GoString(val)
2800
+ }
2801
+
2802
+ //export whatsapp_Location_URL_Get
2803
+ func whatsapp_Location_URL_Get(handle CGoHandle) *C.char {
2804
+ op := ptrFromHandle_whatsapp_Location(handle)
2805
+ return C.CString(op.URL)
2806
+ }
2807
+
2808
+ //export whatsapp_Location_URL_Set
2809
+ func whatsapp_Location_URL_Set(handle CGoHandle, val *C.char) {
2810
+ op := ptrFromHandle_whatsapp_Location(handle)
2811
+ op.URL = C.GoString(val)
2812
+ }
2813
+
2814
+ // --- wrapping struct: whatsapp.Presence ---
2815
+ //
2816
+ //export whatsapp_Presence_CTor
2817
+ func whatsapp_Presence_CTor() CGoHandle {
2818
+ return CGoHandle(handleFromPtr_whatsapp_Presence(&whatsapp.Presence{}))
2819
+ }
2820
+
2821
+ //export whatsapp_Presence_JID_Get
2822
+ func whatsapp_Presence_JID_Get(handle CGoHandle) *C.char {
2823
+ op := ptrFromHandle_whatsapp_Presence(handle)
2824
+ return C.CString(op.JID)
2825
+ }
2826
+
2827
+ //export whatsapp_Presence_JID_Set
2828
+ func whatsapp_Presence_JID_Set(handle CGoHandle, val *C.char) {
2829
+ op := ptrFromHandle_whatsapp_Presence(handle)
2830
+ op.JID = C.GoString(val)
2831
+ }
2832
+
2833
+ //export whatsapp_Presence_Kind_Get
2834
+ func whatsapp_Presence_Kind_Get(handle CGoHandle) C.longlong {
2835
+ op := ptrFromHandle_whatsapp_Presence(handle)
2836
+ return C.longlong(int(op.Kind))
2837
+ }
2838
+
2839
+ //export whatsapp_Presence_Kind_Set
2840
+ func whatsapp_Presence_Kind_Set(handle CGoHandle, val C.longlong) {
2841
+ op := ptrFromHandle_whatsapp_Presence(handle)
2842
+ op.Kind = whatsapp.PresenceKind(int(val))
2843
+ }
2844
+
2845
+ //export whatsapp_Presence_LastSeen_Get
2846
+ func whatsapp_Presence_LastSeen_Get(handle CGoHandle) C.longlong {
2847
+ op := ptrFromHandle_whatsapp_Presence(handle)
2848
+ return C.longlong(op.LastSeen)
2849
+ }
2850
+
2851
+ //export whatsapp_Presence_LastSeen_Set
2852
+ func whatsapp_Presence_LastSeen_Set(handle CGoHandle, val C.longlong) {
2853
+ op := ptrFromHandle_whatsapp_Presence(handle)
2854
+ op.LastSeen = int64(val)
2855
+ }
2856
+
2857
+ // --- wrapping struct: whatsapp.Preview ---
2858
+ //
2859
+ //export whatsapp_Preview_CTor
2860
+ func whatsapp_Preview_CTor() CGoHandle {
2861
+ return CGoHandle(handleFromPtr_whatsapp_Preview(&whatsapp.Preview{}))
2862
+ }
2863
+
2864
+ //export whatsapp_Preview_Kind_Get
2865
+ func whatsapp_Preview_Kind_Get(handle CGoHandle) C.longlong {
2866
+ op := ptrFromHandle_whatsapp_Preview(handle)
2867
+ return C.longlong(int(op.Kind))
2868
+ }
2869
+
2870
+ //export whatsapp_Preview_Kind_Set
2871
+ func whatsapp_Preview_Kind_Set(handle CGoHandle, val C.longlong) {
2872
+ op := ptrFromHandle_whatsapp_Preview(handle)
2873
+ op.Kind = whatsapp.PreviewKind(int(val))
2874
+ }
2875
+
2876
+ //export whatsapp_Preview_URL_Get
2877
+ func whatsapp_Preview_URL_Get(handle CGoHandle) *C.char {
2878
+ op := ptrFromHandle_whatsapp_Preview(handle)
2879
+ return C.CString(op.URL)
2880
+ }
2881
+
2882
+ //export whatsapp_Preview_URL_Set
2883
+ func whatsapp_Preview_URL_Set(handle CGoHandle, val *C.char) {
2884
+ op := ptrFromHandle_whatsapp_Preview(handle)
2885
+ op.URL = C.GoString(val)
2886
+ }
2887
+
2888
+ //export whatsapp_Preview_Title_Get
2889
+ func whatsapp_Preview_Title_Get(handle CGoHandle) *C.char {
2890
+ op := ptrFromHandle_whatsapp_Preview(handle)
2891
+ return C.CString(op.Title)
2892
+ }
2893
+
2894
+ //export whatsapp_Preview_Title_Set
2895
+ func whatsapp_Preview_Title_Set(handle CGoHandle, val *C.char) {
2896
+ op := ptrFromHandle_whatsapp_Preview(handle)
2897
+ op.Title = C.GoString(val)
2898
+ }
2899
+
2900
+ //export whatsapp_Preview_Description_Get
2901
+ func whatsapp_Preview_Description_Get(handle CGoHandle) *C.char {
2902
+ op := ptrFromHandle_whatsapp_Preview(handle)
2903
+ return C.CString(op.Description)
2904
+ }
2905
+
2906
+ //export whatsapp_Preview_Description_Set
2907
+ func whatsapp_Preview_Description_Set(handle CGoHandle, val *C.char) {
2908
+ op := ptrFromHandle_whatsapp_Preview(handle)
2909
+ op.Description = C.GoString(val)
2910
+ }
2911
+
2912
+ //export whatsapp_Preview_Thumbnail_Get
2913
+ func whatsapp_Preview_Thumbnail_Get(handle CGoHandle) CGoHandle {
2914
+ op := ptrFromHandle_whatsapp_Preview(handle)
2915
+ return handleFromPtr_Slice_byte(&op.Thumbnail)
2916
+ }
2917
+
2918
+ //export whatsapp_Preview_Thumbnail_Set
2919
+ func whatsapp_Preview_Thumbnail_Set(handle CGoHandle, val CGoHandle) {
2920
+ op := ptrFromHandle_whatsapp_Preview(handle)
2921
+ op.Thumbnail = deptrFromHandle_Slice_byte(val)
2922
+ }
2923
+
2924
+ // --- wrapping struct: whatsapp.Gateway ---
2925
+ //
2926
+ //export whatsapp_Gateway_CTor
2927
+ func whatsapp_Gateway_CTor() CGoHandle {
2928
+ return CGoHandle(handleFromPtr_whatsapp_Gateway(&whatsapp.Gateway{}))
2929
+ }
2930
+
2931
+ //export whatsapp_Gateway_DBPath_Get
2932
+ func whatsapp_Gateway_DBPath_Get(handle CGoHandle) *C.char {
2933
+ op := ptrFromHandle_whatsapp_Gateway(handle)
2934
+ return C.CString(op.DBPath)
2935
+ }
2936
+
2937
+ //export whatsapp_Gateway_DBPath_Set
2938
+ func whatsapp_Gateway_DBPath_Set(handle CGoHandle, val *C.char) {
2939
+ op := ptrFromHandle_whatsapp_Gateway(handle)
2940
+ op.DBPath = C.GoString(val)
2941
+ }
2942
+
2943
+ //export whatsapp_Gateway_Name_Get
2944
+ func whatsapp_Gateway_Name_Get(handle CGoHandle) *C.char {
2945
+ op := ptrFromHandle_whatsapp_Gateway(handle)
2946
+ return C.CString(op.Name)
2947
+ }
2948
+
2949
+ //export whatsapp_Gateway_Name_Set
2950
+ func whatsapp_Gateway_Name_Set(handle CGoHandle, val *C.char) {
2951
+ op := ptrFromHandle_whatsapp_Gateway(handle)
2952
+ op.Name = C.GoString(val)
2953
+ }
2954
+
2955
+ //export whatsapp_Gateway_LogLevel_Get
2956
+ func whatsapp_Gateway_LogLevel_Get(handle CGoHandle) *C.char {
2957
+ op := ptrFromHandle_whatsapp_Gateway(handle)
2958
+ return C.CString(op.LogLevel)
2959
+ }
2960
+
2961
+ //export whatsapp_Gateway_LogLevel_Set
2962
+ func whatsapp_Gateway_LogLevel_Set(handle CGoHandle, val *C.char) {
2963
+ op := ptrFromHandle_whatsapp_Gateway(handle)
2964
+ op.LogLevel = C.GoString(val)
2965
+ }
2966
+
2967
+ //export whatsapp_Gateway_TempDir_Get
2968
+ func whatsapp_Gateway_TempDir_Get(handle CGoHandle) *C.char {
2969
+ op := ptrFromHandle_whatsapp_Gateway(handle)
2970
+ return C.CString(op.TempDir)
2971
+ }
2972
+
2973
+ //export whatsapp_Gateway_TempDir_Set
2974
+ func whatsapp_Gateway_TempDir_Set(handle CGoHandle, val *C.char) {
2975
+ op := ptrFromHandle_whatsapp_Gateway(handle)
2976
+ op.TempDir = C.GoString(val)
2977
+ }
2978
+
2979
+ //export whatsapp_Gateway_Init
2980
+ func whatsapp_Gateway_Init(_handle CGoHandle) *C.char {
2981
+ _saved_thread := C.PyEval_SaveThread()
2982
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Gateway")
2983
+ if __err != nil {
2984
+ return errorGoToPy(nil)
2985
+ }
2986
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway).Init()
2987
+
2988
+ C.PyEval_RestoreThread(_saved_thread)
2989
+ if __err != nil {
2990
+ estr := C.CString(__err.Error())
2991
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
2992
+ return estr
2993
+ }
2994
+ return C.CString("")
2995
+ }
2996
+
2997
+ //export whatsapp_Gateway_NewSession
2998
+ func whatsapp_Gateway_NewSession(_handle CGoHandle, device CGoHandle) CGoHandle {
2999
+ _saved_thread := C.PyEval_SaveThread()
3000
+ defer C.PyEval_RestoreThread(_saved_thread)
3001
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Gateway")
3002
+ if __err != nil {
3003
+ return handleFromPtr_Ptr_whatsapp_Session(nil)
3004
+ }
3005
+ return handleFromPtr_Ptr_whatsapp_Session(gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway).NewSession(*ptrFromHandle_whatsapp_LinkedDevice(device)))
3006
+
3007
+ }
3008
+
3009
+ //export whatsapp_Gateway_CleanupSession
3010
+ func whatsapp_Gateway_CleanupSession(_handle CGoHandle, device CGoHandle) *C.char {
3011
+ _saved_thread := C.PyEval_SaveThread()
3012
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Gateway")
3013
+ if __err != nil {
3014
+ return errorGoToPy(nil)
3015
+ }
3016
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway).CleanupSession(*ptrFromHandle_whatsapp_LinkedDevice(device))
3017
+
3018
+ C.PyEval_RestoreThread(_saved_thread)
3019
+ if __err != nil {
3020
+ estr := C.CString(__err.Error())
3021
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3022
+ return estr
3023
+ }
3024
+ return C.CString("")
3025
+ }
3026
+
3027
+ // --- wrapping struct: whatsapp.Receipt ---
3028
+ //
3029
+ //export whatsapp_Receipt_CTor
3030
+ func whatsapp_Receipt_CTor() CGoHandle {
3031
+ return CGoHandle(handleFromPtr_whatsapp_Receipt(&whatsapp.Receipt{}))
3032
+ }
3033
+
3034
+ //export whatsapp_Receipt_Kind_Get
3035
+ func whatsapp_Receipt_Kind_Get(handle CGoHandle) C.longlong {
3036
+ op := ptrFromHandle_whatsapp_Receipt(handle)
3037
+ return C.longlong(int(op.Kind))
3038
+ }
3039
+
3040
+ //export whatsapp_Receipt_Kind_Set
3041
+ func whatsapp_Receipt_Kind_Set(handle CGoHandle, val C.longlong) {
3042
+ op := ptrFromHandle_whatsapp_Receipt(handle)
3043
+ op.Kind = whatsapp.ReceiptKind(int(val))
3044
+ }
3045
+
3046
+ //export whatsapp_Receipt_MessageIDs_Get
3047
+ func whatsapp_Receipt_MessageIDs_Get(handle CGoHandle) CGoHandle {
3048
+ op := ptrFromHandle_whatsapp_Receipt(handle)
3049
+ return handleFromPtr_Slice_string(&op.MessageIDs)
3050
+ }
3051
+
3052
+ //export whatsapp_Receipt_MessageIDs_Set
3053
+ func whatsapp_Receipt_MessageIDs_Set(handle CGoHandle, val CGoHandle) {
3054
+ op := ptrFromHandle_whatsapp_Receipt(handle)
3055
+ op.MessageIDs = deptrFromHandle_Slice_string(val)
3056
+ }
3057
+
3058
+ //export whatsapp_Receipt_JID_Get
3059
+ func whatsapp_Receipt_JID_Get(handle CGoHandle) *C.char {
3060
+ op := ptrFromHandle_whatsapp_Receipt(handle)
3061
+ return C.CString(op.JID)
3062
+ }
3063
+
3064
+ //export whatsapp_Receipt_JID_Set
3065
+ func whatsapp_Receipt_JID_Set(handle CGoHandle, val *C.char) {
3066
+ op := ptrFromHandle_whatsapp_Receipt(handle)
3067
+ op.JID = C.GoString(val)
3068
+ }
3069
+
3070
+ //export whatsapp_Receipt_GroupJID_Get
3071
+ func whatsapp_Receipt_GroupJID_Get(handle CGoHandle) *C.char {
3072
+ op := ptrFromHandle_whatsapp_Receipt(handle)
3073
+ return C.CString(op.GroupJID)
3074
+ }
3075
+
3076
+ //export whatsapp_Receipt_GroupJID_Set
3077
+ func whatsapp_Receipt_GroupJID_Set(handle CGoHandle, val *C.char) {
3078
+ op := ptrFromHandle_whatsapp_Receipt(handle)
3079
+ op.GroupJID = C.GoString(val)
3080
+ }
3081
+
3082
+ //export whatsapp_Receipt_Timestamp_Get
3083
+ func whatsapp_Receipt_Timestamp_Get(handle CGoHandle) C.longlong {
3084
+ op := ptrFromHandle_whatsapp_Receipt(handle)
3085
+ return C.longlong(op.Timestamp)
3086
+ }
3087
+
3088
+ //export whatsapp_Receipt_Timestamp_Set
3089
+ func whatsapp_Receipt_Timestamp_Set(handle CGoHandle, val C.longlong) {
3090
+ op := ptrFromHandle_whatsapp_Receipt(handle)
3091
+ op.Timestamp = int64(val)
3092
+ }
3093
+
3094
+ //export whatsapp_Receipt_IsCarbon_Get
3095
+ func whatsapp_Receipt_IsCarbon_Get(handle CGoHandle) C.char {
3096
+ op := ptrFromHandle_whatsapp_Receipt(handle)
3097
+ return boolGoToPy(op.IsCarbon)
3098
+ }
3099
+
3100
+ //export whatsapp_Receipt_IsCarbon_Set
3101
+ func whatsapp_Receipt_IsCarbon_Set(handle CGoHandle, val C.char) {
3102
+ op := ptrFromHandle_whatsapp_Receipt(handle)
3103
+ op.IsCarbon = boolPyToGo(val)
3104
+ }
3105
+
3106
+ // --- wrapping struct: whatsapp.GroupSubject ---
3107
+ //
3108
+ //export whatsapp_GroupSubject_CTor
3109
+ func whatsapp_GroupSubject_CTor() CGoHandle {
3110
+ return CGoHandle(handleFromPtr_whatsapp_GroupSubject(&whatsapp.GroupSubject{}))
3111
+ }
3112
+
3113
+ //export whatsapp_GroupSubject_Subject_Get
3114
+ func whatsapp_GroupSubject_Subject_Get(handle CGoHandle) *C.char {
3115
+ op := ptrFromHandle_whatsapp_GroupSubject(handle)
3116
+ return C.CString(op.Subject)
3117
+ }
3118
+
3119
+ //export whatsapp_GroupSubject_Subject_Set
3120
+ func whatsapp_GroupSubject_Subject_Set(handle CGoHandle, val *C.char) {
3121
+ op := ptrFromHandle_whatsapp_GroupSubject(handle)
3122
+ op.Subject = C.GoString(val)
3123
+ }
3124
+
3125
+ //export whatsapp_GroupSubject_SetAt_Get
3126
+ func whatsapp_GroupSubject_SetAt_Get(handle CGoHandle) C.longlong {
3127
+ op := ptrFromHandle_whatsapp_GroupSubject(handle)
3128
+ return C.longlong(op.SetAt)
3129
+ }
3130
+
3131
+ //export whatsapp_GroupSubject_SetAt_Set
3132
+ func whatsapp_GroupSubject_SetAt_Set(handle CGoHandle, val C.longlong) {
3133
+ op := ptrFromHandle_whatsapp_GroupSubject(handle)
3134
+ op.SetAt = int64(val)
3135
+ }
3136
+
3137
+ //export whatsapp_GroupSubject_SetByJID_Get
3138
+ func whatsapp_GroupSubject_SetByJID_Get(handle CGoHandle) *C.char {
3139
+ op := ptrFromHandle_whatsapp_GroupSubject(handle)
3140
+ return C.CString(op.SetByJID)
3141
+ }
3142
+
3143
+ //export whatsapp_GroupSubject_SetByJID_Set
3144
+ func whatsapp_GroupSubject_SetByJID_Set(handle CGoHandle, val *C.char) {
3145
+ op := ptrFromHandle_whatsapp_GroupSubject(handle)
3146
+ op.SetByJID = C.GoString(val)
3147
+ }
3148
+
3149
+ // --- wrapping struct: whatsapp.Session ---
3150
+ //
3151
+ //export whatsapp_Session_CTor
3152
+ func whatsapp_Session_CTor() CGoHandle {
3153
+ return CGoHandle(handleFromPtr_whatsapp_Session(&whatsapp.Session{}))
3154
+ }
3155
+
3156
+ //export whatsapp_Session_Login
3157
+ func whatsapp_Session_Login(_handle CGoHandle) *C.char {
3158
+ _saved_thread := C.PyEval_SaveThread()
3159
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3160
+ if __err != nil {
3161
+ return errorGoToPy(nil)
3162
+ }
3163
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).Login()
3164
+
3165
+ C.PyEval_RestoreThread(_saved_thread)
3166
+ if __err != nil {
3167
+ estr := C.CString(__err.Error())
3168
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3169
+ return estr
3170
+ }
3171
+ return C.CString("")
3172
+ }
3173
+
3174
+ //export whatsapp_Session_Logout
3175
+ func whatsapp_Session_Logout(_handle CGoHandle) *C.char {
3176
+ _saved_thread := C.PyEval_SaveThread()
3177
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3178
+ if __err != nil {
3179
+ return errorGoToPy(nil)
3180
+ }
3181
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).Logout()
3182
+
3183
+ C.PyEval_RestoreThread(_saved_thread)
3184
+ if __err != nil {
3185
+ estr := C.CString(__err.Error())
3186
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3187
+ return estr
3188
+ }
3189
+ return C.CString("")
3190
+ }
3191
+
3192
+ //export whatsapp_Session_Disconnect
3193
+ func whatsapp_Session_Disconnect(_handle CGoHandle) *C.char {
3194
+ _saved_thread := C.PyEval_SaveThread()
3195
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3196
+ if __err != nil {
3197
+ return errorGoToPy(nil)
3198
+ }
3199
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).Disconnect()
3200
+
3201
+ C.PyEval_RestoreThread(_saved_thread)
3202
+ if __err != nil {
3203
+ estr := C.CString(__err.Error())
3204
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3205
+ return estr
3206
+ }
3207
+ return C.CString("")
3208
+ }
3209
+
3210
+ //export whatsapp_Session_PairPhone
3211
+ func whatsapp_Session_PairPhone(_handle CGoHandle, phone *C.char) *C.char {
3212
+ _saved_thread := C.PyEval_SaveThread()
3213
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3214
+ if __err != nil {
3215
+ return C.CString("")
3216
+ }
3217
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).PairPhone(C.GoString(phone))
3218
+
3219
+ C.PyEval_RestoreThread(_saved_thread)
3220
+ if __err != nil {
3221
+ estr := C.CString(__err.Error())
3222
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3223
+ C.free(unsafe.Pointer(estr))
3224
+ return C.CString("")
3225
+ }
3226
+ return C.CString(cret)
3227
+ }
3228
+
3229
+ //export whatsapp_Session_SendMessage
3230
+ func whatsapp_Session_SendMessage(_handle CGoHandle, message CGoHandle) *C.char {
3231
+ _saved_thread := C.PyEval_SaveThread()
3232
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3233
+ if __err != nil {
3234
+ return errorGoToPy(nil)
3235
+ }
3236
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SendMessage(*ptrFromHandle_whatsapp_Message(message))
3237
+
3238
+ C.PyEval_RestoreThread(_saved_thread)
3239
+ if __err != nil {
3240
+ estr := C.CString(__err.Error())
3241
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3242
+ return estr
3243
+ }
3244
+ return C.CString("")
3245
+ }
3246
+
3247
+ //export whatsapp_Session_GenerateMessageID
3248
+ func whatsapp_Session_GenerateMessageID(_handle CGoHandle) *C.char {
3249
+ _saved_thread := C.PyEval_SaveThread()
3250
+ defer C.PyEval_RestoreThread(_saved_thread)
3251
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3252
+ if __err != nil {
3253
+ return C.CString("")
3254
+ }
3255
+ return C.CString(gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).GenerateMessageID())
3256
+
3257
+ }
3258
+
3259
+ //export whatsapp_Session_SendChatState
3260
+ func whatsapp_Session_SendChatState(_handle CGoHandle, state CGoHandle) *C.char {
3261
+ _saved_thread := C.PyEval_SaveThread()
3262
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3263
+ if __err != nil {
3264
+ return errorGoToPy(nil)
3265
+ }
3266
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SendChatState(*ptrFromHandle_whatsapp_ChatState(state))
3267
+
3268
+ C.PyEval_RestoreThread(_saved_thread)
3269
+ if __err != nil {
3270
+ estr := C.CString(__err.Error())
3271
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3272
+ return estr
3273
+ }
3274
+ return C.CString("")
3275
+ }
3276
+
3277
+ //export whatsapp_Session_SendReceipt
3278
+ func whatsapp_Session_SendReceipt(_handle CGoHandle, receipt CGoHandle) *C.char {
3279
+ _saved_thread := C.PyEval_SaveThread()
3280
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3281
+ if __err != nil {
3282
+ return errorGoToPy(nil)
3283
+ }
3284
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SendReceipt(*ptrFromHandle_whatsapp_Receipt(receipt))
3285
+
3286
+ C.PyEval_RestoreThread(_saved_thread)
3287
+ if __err != nil {
3288
+ estr := C.CString(__err.Error())
3289
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3290
+ return estr
3291
+ }
3292
+ return C.CString("")
3293
+ }
3294
+
3295
+ //export whatsapp_Session_SendPresence
3296
+ func whatsapp_Session_SendPresence(_handle CGoHandle, presence C.longlong, statusMessage *C.char) *C.char {
3297
+ _saved_thread := C.PyEval_SaveThread()
3298
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3299
+ if __err != nil {
3300
+ return errorGoToPy(nil)
3301
+ }
3302
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SendPresence(whatsapp.PresenceKind(int(presence)), C.GoString(statusMessage))
3303
+
3304
+ C.PyEval_RestoreThread(_saved_thread)
3305
+ if __err != nil {
3306
+ estr := C.CString(__err.Error())
3307
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3308
+ return estr
3309
+ }
3310
+ return C.CString("")
3311
+ }
3312
+
3313
+ //export whatsapp_Session_GetContacts
3314
+ func whatsapp_Session_GetContacts(_handle CGoHandle, refresh C.char) CGoHandle {
3315
+ _saved_thread := C.PyEval_SaveThread()
3316
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3317
+ if __err != nil {
3318
+ return handleFromPtr_Slice_whatsapp_Contact(nil)
3319
+ }
3320
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).GetContacts(boolPyToGo(refresh))
3321
+
3322
+ C.PyEval_RestoreThread(_saved_thread)
3323
+ if __err != nil {
3324
+ estr := C.CString(__err.Error())
3325
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3326
+ C.free(unsafe.Pointer(estr))
3327
+ return handleFromPtr_Slice_whatsapp_Contact(nil)
3328
+ }
3329
+ return handleFromPtr_Slice_whatsapp_Contact(&cret)
3330
+ }
3331
+
3332
+ //export whatsapp_Session_GetGroups
3333
+ func whatsapp_Session_GetGroups(_handle CGoHandle) CGoHandle {
3334
+ _saved_thread := C.PyEval_SaveThread()
3335
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3336
+ if __err != nil {
3337
+ return handleFromPtr_Slice_whatsapp_Group(nil)
3338
+ }
3339
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).GetGroups()
3340
+
3341
+ C.PyEval_RestoreThread(_saved_thread)
3342
+ if __err != nil {
3343
+ estr := C.CString(__err.Error())
3344
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3345
+ C.free(unsafe.Pointer(estr))
3346
+ return handleFromPtr_Slice_whatsapp_Group(nil)
3347
+ }
3348
+ return handleFromPtr_Slice_whatsapp_Group(&cret)
3349
+ }
3350
+
3351
+ //export whatsapp_Session_CreateGroup
3352
+ func whatsapp_Session_CreateGroup(_handle CGoHandle, name *C.char, participants CGoHandle) CGoHandle {
3353
+ _saved_thread := C.PyEval_SaveThread()
3354
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3355
+ if __err != nil {
3356
+ return handleFromPtr_whatsapp_Group(nil)
3357
+ }
3358
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).CreateGroup(C.GoString(name), deptrFromHandle_Slice_string(participants))
3359
+
3360
+ C.PyEval_RestoreThread(_saved_thread)
3361
+ if __err != nil {
3362
+ estr := C.CString(__err.Error())
3363
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3364
+ C.free(unsafe.Pointer(estr))
3365
+ return handleFromPtr_whatsapp_Group(nil)
3366
+ }
3367
+ return handleFromPtr_whatsapp_Group(&cret)
3368
+ }
3369
+
3370
+ //export whatsapp_Session_LeaveGroup
3371
+ func whatsapp_Session_LeaveGroup(_handle CGoHandle, resourceID *C.char) *C.char {
3372
+ _saved_thread := C.PyEval_SaveThread()
3373
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3374
+ if __err != nil {
3375
+ return errorGoToPy(nil)
3376
+ }
3377
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).LeaveGroup(C.GoString(resourceID))
3378
+
3379
+ C.PyEval_RestoreThread(_saved_thread)
3380
+ if __err != nil {
3381
+ estr := C.CString(__err.Error())
3382
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3383
+ return estr
3384
+ }
3385
+ return C.CString("")
3386
+ }
3387
+
3388
+ //export whatsapp_Session_GetAvatar
3389
+ func whatsapp_Session_GetAvatar(_handle CGoHandle, resourceID *C.char, avatarID *C.char) CGoHandle {
3390
+ _saved_thread := C.PyEval_SaveThread()
3391
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3392
+ if __err != nil {
3393
+ return handleFromPtr_whatsapp_Avatar(nil)
3394
+ }
3395
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).GetAvatar(C.GoString(resourceID), C.GoString(avatarID))
3396
+
3397
+ C.PyEval_RestoreThread(_saved_thread)
3398
+ if __err != nil {
3399
+ estr := C.CString(__err.Error())
3400
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3401
+ C.free(unsafe.Pointer(estr))
3402
+ return handleFromPtr_whatsapp_Avatar(nil)
3403
+ }
3404
+ return handleFromPtr_whatsapp_Avatar(&cret)
3405
+ }
3406
+
3407
+ //export whatsapp_Session_SetAvatar
3408
+ func whatsapp_Session_SetAvatar(_handle CGoHandle, resourceID *C.char, avatar CGoHandle) *C.char {
3409
+ _saved_thread := C.PyEval_SaveThread()
3410
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3411
+ if __err != nil {
3412
+ return C.CString("")
3413
+ }
3414
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetAvatar(C.GoString(resourceID), deptrFromHandle_Slice_byte(avatar))
3415
+
3416
+ C.PyEval_RestoreThread(_saved_thread)
3417
+ if __err != nil {
3418
+ estr := C.CString(__err.Error())
3419
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3420
+ C.free(unsafe.Pointer(estr))
3421
+ return C.CString("")
3422
+ }
3423
+ return C.CString(cret)
3424
+ }
3425
+
3426
+ //export whatsapp_Session_SetGroupName
3427
+ func whatsapp_Session_SetGroupName(_handle CGoHandle, resourceID *C.char, name *C.char) *C.char {
3428
+ _saved_thread := C.PyEval_SaveThread()
3429
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3430
+ if __err != nil {
3431
+ return errorGoToPy(nil)
3432
+ }
3433
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetGroupName(C.GoString(resourceID), C.GoString(name))
3434
+
3435
+ C.PyEval_RestoreThread(_saved_thread)
3436
+ if __err != nil {
3437
+ estr := C.CString(__err.Error())
3438
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3439
+ return estr
3440
+ }
3441
+ return C.CString("")
3442
+ }
3443
+
3444
+ //export whatsapp_Session_SetGroupTopic
3445
+ func whatsapp_Session_SetGroupTopic(_handle CGoHandle, resourceID *C.char, topic *C.char) *C.char {
3446
+ _saved_thread := C.PyEval_SaveThread()
3447
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3448
+ if __err != nil {
3449
+ return errorGoToPy(nil)
3450
+ }
3451
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetGroupTopic(C.GoString(resourceID), C.GoString(topic))
3452
+
3453
+ C.PyEval_RestoreThread(_saved_thread)
3454
+ if __err != nil {
3455
+ estr := C.CString(__err.Error())
3456
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3457
+ return estr
3458
+ }
3459
+ return C.CString("")
3460
+ }
3461
+
3462
+ //export whatsapp_Session_UpdateGroupParticipants
3463
+ func whatsapp_Session_UpdateGroupParticipants(_handle CGoHandle, resourceID *C.char, participants CGoHandle) CGoHandle {
3464
+ _saved_thread := C.PyEval_SaveThread()
3465
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3466
+ if __err != nil {
3467
+ return handleFromPtr_Slice_whatsapp_GroupParticipant(nil)
3468
+ }
3469
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).UpdateGroupParticipants(C.GoString(resourceID), deptrFromHandle_Slice_whatsapp_GroupParticipant(participants))
3470
+
3471
+ C.PyEval_RestoreThread(_saved_thread)
3472
+ if __err != nil {
3473
+ estr := C.CString(__err.Error())
3474
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3475
+ C.free(unsafe.Pointer(estr))
3476
+ return handleFromPtr_Slice_whatsapp_GroupParticipant(nil)
3477
+ }
3478
+ return handleFromPtr_Slice_whatsapp_GroupParticipant(&cret)
3479
+ }
3480
+
3481
+ //export whatsapp_Session_FindContact
3482
+ func whatsapp_Session_FindContact(_handle CGoHandle, phone *C.char) CGoHandle {
3483
+ _saved_thread := C.PyEval_SaveThread()
3484
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3485
+ if __err != nil {
3486
+ return handleFromPtr_whatsapp_Contact(nil)
3487
+ }
3488
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).FindContact(C.GoString(phone))
3489
+
3490
+ C.PyEval_RestoreThread(_saved_thread)
3491
+ if __err != nil {
3492
+ estr := C.CString(__err.Error())
3493
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3494
+ C.free(unsafe.Pointer(estr))
3495
+ return handleFromPtr_whatsapp_Contact(nil)
3496
+ }
3497
+ return handleFromPtr_whatsapp_Contact(&cret)
3498
+ }
3499
+
3500
+ //export whatsapp_Session_RequestMessageHistory
3501
+ func whatsapp_Session_RequestMessageHistory(_handle CGoHandle, resourceID *C.char, oldestMessage CGoHandle) *C.char {
3502
+ _saved_thread := C.PyEval_SaveThread()
3503
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3504
+ if __err != nil {
3505
+ return errorGoToPy(nil)
3506
+ }
3507
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).RequestMessageHistory(C.GoString(resourceID), *ptrFromHandle_whatsapp_Message(oldestMessage))
3508
+
3509
+ C.PyEval_RestoreThread(_saved_thread)
3510
+ if __err != nil {
3511
+ estr := C.CString(__err.Error())
3512
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3513
+ return estr
3514
+ }
3515
+ return C.CString("")
3516
+ }
3517
+
3518
+ //export whatsapp_Session_SetEventHandler
3519
+ func whatsapp_Session_SetEventHandler(_handle CGoHandle, h *C.PyObject, goRun C.char) {
3520
+ _fun_arg := h
3521
+ _saved_thread := C.PyEval_SaveThread()
3522
+ defer C.PyEval_RestoreThread(_saved_thread)
3523
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
3524
+ if __err != nil {
3525
+ return
3526
+ }
3527
+ if boolPyToGo(goRun) {
3528
+ go gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetEventHandler(func(arg_0 whatsapp.EventKind, arg_1 *whatsapp.EventPayload) {
3529
+ if C.PyCallable_Check(_fun_arg) == 0 {
3530
+ return
3531
+ }
3532
+ _gstate := C.PyGILState_Ensure()
3533
+ _fcargs := C.PyTuple_New(2)
3534
+ C.PyTuple_SetItem(_fcargs, 0, C.gopy_build_int64(C.int64_t(arg_0)))
3535
+ C.PyTuple_SetItem(_fcargs, 1, C.gopy_build_int64(C.int64_t(handleFromPtr_Ptr_whatsapp_EventPayload(arg_1))))
3536
+ C.PyObject_CallObject(_fun_arg, _fcargs)
3537
+ C.gopy_decref(_fcargs)
3538
+ C.gopy_err_handle()
3539
+ C.PyGILState_Release(_gstate)
3540
+ })
3541
+ } else {
3542
+ gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetEventHandler(func(arg_0 whatsapp.EventKind, arg_1 *whatsapp.EventPayload) {
3543
+ if C.PyCallable_Check(_fun_arg) == 0 {
3544
+ return
3545
+ }
3546
+ _gstate := C.PyGILState_Ensure()
3547
+ _fcargs := C.PyTuple_New(2)
3548
+ C.PyTuple_SetItem(_fcargs, 0, C.gopy_build_int64(C.int64_t(arg_0)))
3549
+ C.PyTuple_SetItem(_fcargs, 1, C.gopy_build_int64(C.int64_t(handleFromPtr_Ptr_whatsapp_EventPayload(arg_1))))
3550
+ C.PyObject_CallObject(_fun_arg, _fcargs)
3551
+ C.gopy_decref(_fcargs)
3552
+ C.gopy_err_handle()
3553
+ C.PyGILState_Release(_gstate)
3554
+ })
3555
+ }
3556
+ }
3557
+
3558
+ // ---- Slices ---
3559
+
3560
+ // ---- Maps ---
3561
+
3562
+ // ---- Constructors ---
3563
+
3564
+ //export whatsapp_NewGateway
3565
+ func whatsapp_NewGateway() CGoHandle {
3566
+ _saved_thread := C.PyEval_SaveThread()
3567
+ defer C.PyEval_RestoreThread(_saved_thread)
3568
+ return handleFromPtr_Ptr_whatsapp_Gateway(whatsapp.NewGateway())
3569
+
3570
+ }
3571
+
3572
+ // ---- Functions ---