slidge-whatsapp 0.2.2__cp311-cp311-manylinux_2_36_aarch64.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.

Potentially problematic release.


This version of slidge-whatsapp might be problematic. Click here for more details.

@@ -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.11" -Wno-error -Wno-implicit-function-declaration -Wno-int-conversion
12
+ #cgo LDFLAGS: "-L/usr/local/lib" "-lpython3.11" -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.Location ---
1991
+ //
1992
+ //export whatsapp_Location_CTor
1993
+ func whatsapp_Location_CTor() CGoHandle {
1994
+ return CGoHandle(handleFromPtr_whatsapp_Location(&whatsapp.Location{}))
1995
+ }
1996
+
1997
+ //export whatsapp_Location_Latitude_Get
1998
+ func whatsapp_Location_Latitude_Get(handle CGoHandle) C.double {
1999
+ op := ptrFromHandle_whatsapp_Location(handle)
2000
+ return C.double(op.Latitude)
2001
+ }
2002
+
2003
+ //export whatsapp_Location_Latitude_Set
2004
+ func whatsapp_Location_Latitude_Set(handle CGoHandle, val C.double) {
2005
+ op := ptrFromHandle_whatsapp_Location(handle)
2006
+ op.Latitude = float64(val)
2007
+ }
2008
+
2009
+ //export whatsapp_Location_Longitude_Get
2010
+ func whatsapp_Location_Longitude_Get(handle CGoHandle) C.double {
2011
+ op := ptrFromHandle_whatsapp_Location(handle)
2012
+ return C.double(op.Longitude)
2013
+ }
2014
+
2015
+ //export whatsapp_Location_Longitude_Set
2016
+ func whatsapp_Location_Longitude_Set(handle CGoHandle, val C.double) {
2017
+ op := ptrFromHandle_whatsapp_Location(handle)
2018
+ op.Longitude = float64(val)
2019
+ }
2020
+
2021
+ //export whatsapp_Location_Accuracy_Get
2022
+ func whatsapp_Location_Accuracy_Get(handle CGoHandle) C.longlong {
2023
+ op := ptrFromHandle_whatsapp_Location(handle)
2024
+ return C.longlong(op.Accuracy)
2025
+ }
2026
+
2027
+ //export whatsapp_Location_Accuracy_Set
2028
+ func whatsapp_Location_Accuracy_Set(handle CGoHandle, val C.longlong) {
2029
+ op := ptrFromHandle_whatsapp_Location(handle)
2030
+ op.Accuracy = int(val)
2031
+ }
2032
+
2033
+ //export whatsapp_Location_IsLive_Get
2034
+ func whatsapp_Location_IsLive_Get(handle CGoHandle) C.char {
2035
+ op := ptrFromHandle_whatsapp_Location(handle)
2036
+ return boolGoToPy(op.IsLive)
2037
+ }
2038
+
2039
+ //export whatsapp_Location_IsLive_Set
2040
+ func whatsapp_Location_IsLive_Set(handle CGoHandle, val C.char) {
2041
+ op := ptrFromHandle_whatsapp_Location(handle)
2042
+ op.IsLive = boolPyToGo(val)
2043
+ }
2044
+
2045
+ //export whatsapp_Location_Name_Get
2046
+ func whatsapp_Location_Name_Get(handle CGoHandle) *C.char {
2047
+ op := ptrFromHandle_whatsapp_Location(handle)
2048
+ return C.CString(op.Name)
2049
+ }
2050
+
2051
+ //export whatsapp_Location_Name_Set
2052
+ func whatsapp_Location_Name_Set(handle CGoHandle, val *C.char) {
2053
+ op := ptrFromHandle_whatsapp_Location(handle)
2054
+ op.Name = C.GoString(val)
2055
+ }
2056
+
2057
+ //export whatsapp_Location_Address_Get
2058
+ func whatsapp_Location_Address_Get(handle CGoHandle) *C.char {
2059
+ op := ptrFromHandle_whatsapp_Location(handle)
2060
+ return C.CString(op.Address)
2061
+ }
2062
+
2063
+ //export whatsapp_Location_Address_Set
2064
+ func whatsapp_Location_Address_Set(handle CGoHandle, val *C.char) {
2065
+ op := ptrFromHandle_whatsapp_Location(handle)
2066
+ op.Address = C.GoString(val)
2067
+ }
2068
+
2069
+ //export whatsapp_Location_URL_Get
2070
+ func whatsapp_Location_URL_Get(handle CGoHandle) *C.char {
2071
+ op := ptrFromHandle_whatsapp_Location(handle)
2072
+ return C.CString(op.URL)
2073
+ }
2074
+
2075
+ //export whatsapp_Location_URL_Set
2076
+ func whatsapp_Location_URL_Set(handle CGoHandle, val *C.char) {
2077
+ op := ptrFromHandle_whatsapp_Location(handle)
2078
+ op.URL = C.GoString(val)
2079
+ }
2080
+
2081
+ // --- wrapping struct: whatsapp.Presence ---
2082
+ //
2083
+ //export whatsapp_Presence_CTor
2084
+ func whatsapp_Presence_CTor() CGoHandle {
2085
+ return CGoHandle(handleFromPtr_whatsapp_Presence(&whatsapp.Presence{}))
2086
+ }
2087
+
2088
+ //export whatsapp_Presence_JID_Get
2089
+ func whatsapp_Presence_JID_Get(handle CGoHandle) *C.char {
2090
+ op := ptrFromHandle_whatsapp_Presence(handle)
2091
+ return C.CString(op.JID)
2092
+ }
2093
+
2094
+ //export whatsapp_Presence_JID_Set
2095
+ func whatsapp_Presence_JID_Set(handle CGoHandle, val *C.char) {
2096
+ op := ptrFromHandle_whatsapp_Presence(handle)
2097
+ op.JID = C.GoString(val)
2098
+ }
2099
+
2100
+ //export whatsapp_Presence_Kind_Get
2101
+ func whatsapp_Presence_Kind_Get(handle CGoHandle) C.longlong {
2102
+ op := ptrFromHandle_whatsapp_Presence(handle)
2103
+ return C.longlong(int(op.Kind))
2104
+ }
2105
+
2106
+ //export whatsapp_Presence_Kind_Set
2107
+ func whatsapp_Presence_Kind_Set(handle CGoHandle, val C.longlong) {
2108
+ op := ptrFromHandle_whatsapp_Presence(handle)
2109
+ op.Kind = whatsapp.PresenceKind(int(val))
2110
+ }
2111
+
2112
+ //export whatsapp_Presence_LastSeen_Get
2113
+ func whatsapp_Presence_LastSeen_Get(handle CGoHandle) C.longlong {
2114
+ op := ptrFromHandle_whatsapp_Presence(handle)
2115
+ return C.longlong(op.LastSeen)
2116
+ }
2117
+
2118
+ //export whatsapp_Presence_LastSeen_Set
2119
+ func whatsapp_Presence_LastSeen_Set(handle CGoHandle, val C.longlong) {
2120
+ op := ptrFromHandle_whatsapp_Presence(handle)
2121
+ op.LastSeen = int64(val)
2122
+ }
2123
+
2124
+ // --- wrapping struct: whatsapp.Preview ---
2125
+ //
2126
+ //export whatsapp_Preview_CTor
2127
+ func whatsapp_Preview_CTor() CGoHandle {
2128
+ return CGoHandle(handleFromPtr_whatsapp_Preview(&whatsapp.Preview{}))
2129
+ }
2130
+
2131
+ //export whatsapp_Preview_Kind_Get
2132
+ func whatsapp_Preview_Kind_Get(handle CGoHandle) C.longlong {
2133
+ op := ptrFromHandle_whatsapp_Preview(handle)
2134
+ return C.longlong(int(op.Kind))
2135
+ }
2136
+
2137
+ //export whatsapp_Preview_Kind_Set
2138
+ func whatsapp_Preview_Kind_Set(handle CGoHandle, val C.longlong) {
2139
+ op := ptrFromHandle_whatsapp_Preview(handle)
2140
+ op.Kind = whatsapp.PreviewKind(int(val))
2141
+ }
2142
+
2143
+ //export whatsapp_Preview_URL_Get
2144
+ func whatsapp_Preview_URL_Get(handle CGoHandle) *C.char {
2145
+ op := ptrFromHandle_whatsapp_Preview(handle)
2146
+ return C.CString(op.URL)
2147
+ }
2148
+
2149
+ //export whatsapp_Preview_URL_Set
2150
+ func whatsapp_Preview_URL_Set(handle CGoHandle, val *C.char) {
2151
+ op := ptrFromHandle_whatsapp_Preview(handle)
2152
+ op.URL = C.GoString(val)
2153
+ }
2154
+
2155
+ //export whatsapp_Preview_Title_Get
2156
+ func whatsapp_Preview_Title_Get(handle CGoHandle) *C.char {
2157
+ op := ptrFromHandle_whatsapp_Preview(handle)
2158
+ return C.CString(op.Title)
2159
+ }
2160
+
2161
+ //export whatsapp_Preview_Title_Set
2162
+ func whatsapp_Preview_Title_Set(handle CGoHandle, val *C.char) {
2163
+ op := ptrFromHandle_whatsapp_Preview(handle)
2164
+ op.Title = C.GoString(val)
2165
+ }
2166
+
2167
+ //export whatsapp_Preview_Description_Get
2168
+ func whatsapp_Preview_Description_Get(handle CGoHandle) *C.char {
2169
+ op := ptrFromHandle_whatsapp_Preview(handle)
2170
+ return C.CString(op.Description)
2171
+ }
2172
+
2173
+ //export whatsapp_Preview_Description_Set
2174
+ func whatsapp_Preview_Description_Set(handle CGoHandle, val *C.char) {
2175
+ op := ptrFromHandle_whatsapp_Preview(handle)
2176
+ op.Description = C.GoString(val)
2177
+ }
2178
+
2179
+ //export whatsapp_Preview_Thumbnail_Get
2180
+ func whatsapp_Preview_Thumbnail_Get(handle CGoHandle) CGoHandle {
2181
+ op := ptrFromHandle_whatsapp_Preview(handle)
2182
+ return handleFromPtr_Slice_byte(&op.Thumbnail)
2183
+ }
2184
+
2185
+ //export whatsapp_Preview_Thumbnail_Set
2186
+ func whatsapp_Preview_Thumbnail_Set(handle CGoHandle, val CGoHandle) {
2187
+ op := ptrFromHandle_whatsapp_Preview(handle)
2188
+ op.Thumbnail = deptrFromHandle_Slice_byte(val)
2189
+ }
2190
+
2191
+ // --- wrapping struct: whatsapp.ChatState ---
2192
+ //
2193
+ //export whatsapp_ChatState_CTor
2194
+ func whatsapp_ChatState_CTor() CGoHandle {
2195
+ return CGoHandle(handleFromPtr_whatsapp_ChatState(&whatsapp.ChatState{}))
2196
+ }
2197
+
2198
+ //export whatsapp_ChatState_Kind_Get
2199
+ func whatsapp_ChatState_Kind_Get(handle CGoHandle) C.longlong {
2200
+ op := ptrFromHandle_whatsapp_ChatState(handle)
2201
+ return C.longlong(int(op.Kind))
2202
+ }
2203
+
2204
+ //export whatsapp_ChatState_Kind_Set
2205
+ func whatsapp_ChatState_Kind_Set(handle CGoHandle, val C.longlong) {
2206
+ op := ptrFromHandle_whatsapp_ChatState(handle)
2207
+ op.Kind = whatsapp.ChatStateKind(int(val))
2208
+ }
2209
+
2210
+ //export whatsapp_ChatState_JID_Get
2211
+ func whatsapp_ChatState_JID_Get(handle CGoHandle) *C.char {
2212
+ op := ptrFromHandle_whatsapp_ChatState(handle)
2213
+ return C.CString(op.JID)
2214
+ }
2215
+
2216
+ //export whatsapp_ChatState_JID_Set
2217
+ func whatsapp_ChatState_JID_Set(handle CGoHandle, val *C.char) {
2218
+ op := ptrFromHandle_whatsapp_ChatState(handle)
2219
+ op.JID = C.GoString(val)
2220
+ }
2221
+
2222
+ //export whatsapp_ChatState_GroupJID_Get
2223
+ func whatsapp_ChatState_GroupJID_Get(handle CGoHandle) *C.char {
2224
+ op := ptrFromHandle_whatsapp_ChatState(handle)
2225
+ return C.CString(op.GroupJID)
2226
+ }
2227
+
2228
+ //export whatsapp_ChatState_GroupJID_Set
2229
+ func whatsapp_ChatState_GroupJID_Set(handle CGoHandle, val *C.char) {
2230
+ op := ptrFromHandle_whatsapp_ChatState(handle)
2231
+ op.GroupJID = C.GoString(val)
2232
+ }
2233
+
2234
+ // --- wrapping struct: whatsapp.Contact ---
2235
+ //
2236
+ //export whatsapp_Contact_CTor
2237
+ func whatsapp_Contact_CTor() CGoHandle {
2238
+ return CGoHandle(handleFromPtr_whatsapp_Contact(&whatsapp.Contact{}))
2239
+ }
2240
+
2241
+ //export whatsapp_Contact_JID_Get
2242
+ func whatsapp_Contact_JID_Get(handle CGoHandle) *C.char {
2243
+ op := ptrFromHandle_whatsapp_Contact(handle)
2244
+ return C.CString(op.JID)
2245
+ }
2246
+
2247
+ //export whatsapp_Contact_JID_Set
2248
+ func whatsapp_Contact_JID_Set(handle CGoHandle, val *C.char) {
2249
+ op := ptrFromHandle_whatsapp_Contact(handle)
2250
+ op.JID = C.GoString(val)
2251
+ }
2252
+
2253
+ //export whatsapp_Contact_Name_Get
2254
+ func whatsapp_Contact_Name_Get(handle CGoHandle) *C.char {
2255
+ op := ptrFromHandle_whatsapp_Contact(handle)
2256
+ return C.CString(op.Name)
2257
+ }
2258
+
2259
+ //export whatsapp_Contact_Name_Set
2260
+ func whatsapp_Contact_Name_Set(handle CGoHandle, val *C.char) {
2261
+ op := ptrFromHandle_whatsapp_Contact(handle)
2262
+ op.Name = C.GoString(val)
2263
+ }
2264
+
2265
+ // --- wrapping struct: whatsapp.LinkedDevice ---
2266
+ //
2267
+ //export whatsapp_LinkedDevice_CTor
2268
+ func whatsapp_LinkedDevice_CTor() CGoHandle {
2269
+ return CGoHandle(handleFromPtr_whatsapp_LinkedDevice(&whatsapp.LinkedDevice{}))
2270
+ }
2271
+
2272
+ //export whatsapp_LinkedDevice_ID_Get
2273
+ func whatsapp_LinkedDevice_ID_Get(handle CGoHandle) *C.char {
2274
+ op := ptrFromHandle_whatsapp_LinkedDevice(handle)
2275
+ return C.CString(op.ID)
2276
+ }
2277
+
2278
+ //export whatsapp_LinkedDevice_ID_Set
2279
+ func whatsapp_LinkedDevice_ID_Set(handle CGoHandle, val *C.char) {
2280
+ op := ptrFromHandle_whatsapp_LinkedDevice(handle)
2281
+ op.ID = C.GoString(val)
2282
+ }
2283
+
2284
+ //export whatsapp_LinkedDevice_JID
2285
+ func whatsapp_LinkedDevice_JID(_handle CGoHandle) CGoHandle {
2286
+ _saved_thread := C.PyEval_SaveThread()
2287
+ defer C.PyEval_RestoreThread(_saved_thread)
2288
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.LinkedDevice")
2289
+ if __err != nil {
2290
+ return handleFromPtr_types_JID(nil)
2291
+ }
2292
+ cret := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.LinkedDevice{})).(*whatsapp.LinkedDevice).JID()
2293
+
2294
+ return handleFromPtr_types_JID(&cret)
2295
+ }
2296
+
2297
+ // --- wrapping struct: whatsapp.GroupParticipant ---
2298
+ //
2299
+ //export whatsapp_GroupParticipant_CTor
2300
+ func whatsapp_GroupParticipant_CTor() CGoHandle {
2301
+ return CGoHandle(handleFromPtr_whatsapp_GroupParticipant(&whatsapp.GroupParticipant{}))
2302
+ }
2303
+
2304
+ //export whatsapp_GroupParticipant_JID_Get
2305
+ func whatsapp_GroupParticipant_JID_Get(handle CGoHandle) *C.char {
2306
+ op := ptrFromHandle_whatsapp_GroupParticipant(handle)
2307
+ return C.CString(op.JID)
2308
+ }
2309
+
2310
+ //export whatsapp_GroupParticipant_JID_Set
2311
+ func whatsapp_GroupParticipant_JID_Set(handle CGoHandle, val *C.char) {
2312
+ op := ptrFromHandle_whatsapp_GroupParticipant(handle)
2313
+ op.JID = C.GoString(val)
2314
+ }
2315
+
2316
+ //export whatsapp_GroupParticipant_Affiliation_Get
2317
+ func whatsapp_GroupParticipant_Affiliation_Get(handle CGoHandle) C.longlong {
2318
+ op := ptrFromHandle_whatsapp_GroupParticipant(handle)
2319
+ return C.longlong(int(op.Affiliation))
2320
+ }
2321
+
2322
+ //export whatsapp_GroupParticipant_Affiliation_Set
2323
+ func whatsapp_GroupParticipant_Affiliation_Set(handle CGoHandle, val C.longlong) {
2324
+ op := ptrFromHandle_whatsapp_GroupParticipant(handle)
2325
+ op.Affiliation = whatsapp.GroupAffiliation(int(val))
2326
+ }
2327
+
2328
+ //export whatsapp_GroupParticipant_Action_Get
2329
+ func whatsapp_GroupParticipant_Action_Get(handle CGoHandle) C.longlong {
2330
+ op := ptrFromHandle_whatsapp_GroupParticipant(handle)
2331
+ return C.longlong(int(op.Action))
2332
+ }
2333
+
2334
+ //export whatsapp_GroupParticipant_Action_Set
2335
+ func whatsapp_GroupParticipant_Action_Set(handle CGoHandle, val C.longlong) {
2336
+ op := ptrFromHandle_whatsapp_GroupParticipant(handle)
2337
+ op.Action = whatsapp.GroupParticipantAction(int(val))
2338
+ }
2339
+
2340
+ // --- wrapping struct: whatsapp.GroupSubject ---
2341
+ //
2342
+ //export whatsapp_GroupSubject_CTor
2343
+ func whatsapp_GroupSubject_CTor() CGoHandle {
2344
+ return CGoHandle(handleFromPtr_whatsapp_GroupSubject(&whatsapp.GroupSubject{}))
2345
+ }
2346
+
2347
+ //export whatsapp_GroupSubject_Subject_Get
2348
+ func whatsapp_GroupSubject_Subject_Get(handle CGoHandle) *C.char {
2349
+ op := ptrFromHandle_whatsapp_GroupSubject(handle)
2350
+ return C.CString(op.Subject)
2351
+ }
2352
+
2353
+ //export whatsapp_GroupSubject_Subject_Set
2354
+ func whatsapp_GroupSubject_Subject_Set(handle CGoHandle, val *C.char) {
2355
+ op := ptrFromHandle_whatsapp_GroupSubject(handle)
2356
+ op.Subject = C.GoString(val)
2357
+ }
2358
+
2359
+ //export whatsapp_GroupSubject_SetAt_Get
2360
+ func whatsapp_GroupSubject_SetAt_Get(handle CGoHandle) C.longlong {
2361
+ op := ptrFromHandle_whatsapp_GroupSubject(handle)
2362
+ return C.longlong(op.SetAt)
2363
+ }
2364
+
2365
+ //export whatsapp_GroupSubject_SetAt_Set
2366
+ func whatsapp_GroupSubject_SetAt_Set(handle CGoHandle, val C.longlong) {
2367
+ op := ptrFromHandle_whatsapp_GroupSubject(handle)
2368
+ op.SetAt = int64(val)
2369
+ }
2370
+
2371
+ //export whatsapp_GroupSubject_SetByJID_Get
2372
+ func whatsapp_GroupSubject_SetByJID_Get(handle CGoHandle) *C.char {
2373
+ op := ptrFromHandle_whatsapp_GroupSubject(handle)
2374
+ return C.CString(op.SetByJID)
2375
+ }
2376
+
2377
+ //export whatsapp_GroupSubject_SetByJID_Set
2378
+ func whatsapp_GroupSubject_SetByJID_Set(handle CGoHandle, val *C.char) {
2379
+ op := ptrFromHandle_whatsapp_GroupSubject(handle)
2380
+ op.SetByJID = C.GoString(val)
2381
+ }
2382
+
2383
+ // --- wrapping struct: whatsapp.Message ---
2384
+ //
2385
+ //export whatsapp_Message_CTor
2386
+ func whatsapp_Message_CTor() CGoHandle {
2387
+ return CGoHandle(handleFromPtr_whatsapp_Message(&whatsapp.Message{}))
2388
+ }
2389
+
2390
+ //export whatsapp_Message_Kind_Get
2391
+ func whatsapp_Message_Kind_Get(handle CGoHandle) C.longlong {
2392
+ op := ptrFromHandle_whatsapp_Message(handle)
2393
+ return C.longlong(int(op.Kind))
2394
+ }
2395
+
2396
+ //export whatsapp_Message_Kind_Set
2397
+ func whatsapp_Message_Kind_Set(handle CGoHandle, val C.longlong) {
2398
+ op := ptrFromHandle_whatsapp_Message(handle)
2399
+ op.Kind = whatsapp.MessageKind(int(val))
2400
+ }
2401
+
2402
+ //export whatsapp_Message_ID_Get
2403
+ func whatsapp_Message_ID_Get(handle CGoHandle) *C.char {
2404
+ op := ptrFromHandle_whatsapp_Message(handle)
2405
+ return C.CString(op.ID)
2406
+ }
2407
+
2408
+ //export whatsapp_Message_ID_Set
2409
+ func whatsapp_Message_ID_Set(handle CGoHandle, val *C.char) {
2410
+ op := ptrFromHandle_whatsapp_Message(handle)
2411
+ op.ID = C.GoString(val)
2412
+ }
2413
+
2414
+ //export whatsapp_Message_JID_Get
2415
+ func whatsapp_Message_JID_Get(handle CGoHandle) *C.char {
2416
+ op := ptrFromHandle_whatsapp_Message(handle)
2417
+ return C.CString(op.JID)
2418
+ }
2419
+
2420
+ //export whatsapp_Message_JID_Set
2421
+ func whatsapp_Message_JID_Set(handle CGoHandle, val *C.char) {
2422
+ op := ptrFromHandle_whatsapp_Message(handle)
2423
+ op.JID = C.GoString(val)
2424
+ }
2425
+
2426
+ //export whatsapp_Message_GroupJID_Get
2427
+ func whatsapp_Message_GroupJID_Get(handle CGoHandle) *C.char {
2428
+ op := ptrFromHandle_whatsapp_Message(handle)
2429
+ return C.CString(op.GroupJID)
2430
+ }
2431
+
2432
+ //export whatsapp_Message_GroupJID_Set
2433
+ func whatsapp_Message_GroupJID_Set(handle CGoHandle, val *C.char) {
2434
+ op := ptrFromHandle_whatsapp_Message(handle)
2435
+ op.GroupJID = C.GoString(val)
2436
+ }
2437
+
2438
+ //export whatsapp_Message_OriginJID_Get
2439
+ func whatsapp_Message_OriginJID_Get(handle CGoHandle) *C.char {
2440
+ op := ptrFromHandle_whatsapp_Message(handle)
2441
+ return C.CString(op.OriginJID)
2442
+ }
2443
+
2444
+ //export whatsapp_Message_OriginJID_Set
2445
+ func whatsapp_Message_OriginJID_Set(handle CGoHandle, val *C.char) {
2446
+ op := ptrFromHandle_whatsapp_Message(handle)
2447
+ op.OriginJID = C.GoString(val)
2448
+ }
2449
+
2450
+ //export whatsapp_Message_Body_Get
2451
+ func whatsapp_Message_Body_Get(handle CGoHandle) *C.char {
2452
+ op := ptrFromHandle_whatsapp_Message(handle)
2453
+ return C.CString(op.Body)
2454
+ }
2455
+
2456
+ //export whatsapp_Message_Body_Set
2457
+ func whatsapp_Message_Body_Set(handle CGoHandle, val *C.char) {
2458
+ op := ptrFromHandle_whatsapp_Message(handle)
2459
+ op.Body = C.GoString(val)
2460
+ }
2461
+
2462
+ //export whatsapp_Message_Timestamp_Get
2463
+ func whatsapp_Message_Timestamp_Get(handle CGoHandle) C.longlong {
2464
+ op := ptrFromHandle_whatsapp_Message(handle)
2465
+ return C.longlong(op.Timestamp)
2466
+ }
2467
+
2468
+ //export whatsapp_Message_Timestamp_Set
2469
+ func whatsapp_Message_Timestamp_Set(handle CGoHandle, val C.longlong) {
2470
+ op := ptrFromHandle_whatsapp_Message(handle)
2471
+ op.Timestamp = int64(val)
2472
+ }
2473
+
2474
+ //export whatsapp_Message_IsCarbon_Get
2475
+ func whatsapp_Message_IsCarbon_Get(handle CGoHandle) C.char {
2476
+ op := ptrFromHandle_whatsapp_Message(handle)
2477
+ return boolGoToPy(op.IsCarbon)
2478
+ }
2479
+
2480
+ //export whatsapp_Message_IsCarbon_Set
2481
+ func whatsapp_Message_IsCarbon_Set(handle CGoHandle, val C.char) {
2482
+ op := ptrFromHandle_whatsapp_Message(handle)
2483
+ op.IsCarbon = boolPyToGo(val)
2484
+ }
2485
+
2486
+ //export whatsapp_Message_IsForwarded_Get
2487
+ func whatsapp_Message_IsForwarded_Get(handle CGoHandle) C.char {
2488
+ op := ptrFromHandle_whatsapp_Message(handle)
2489
+ return boolGoToPy(op.IsForwarded)
2490
+ }
2491
+
2492
+ //export whatsapp_Message_IsForwarded_Set
2493
+ func whatsapp_Message_IsForwarded_Set(handle CGoHandle, val C.char) {
2494
+ op := ptrFromHandle_whatsapp_Message(handle)
2495
+ op.IsForwarded = boolPyToGo(val)
2496
+ }
2497
+
2498
+ //export whatsapp_Message_ReplyID_Get
2499
+ func whatsapp_Message_ReplyID_Get(handle CGoHandle) *C.char {
2500
+ op := ptrFromHandle_whatsapp_Message(handle)
2501
+ return C.CString(op.ReplyID)
2502
+ }
2503
+
2504
+ //export whatsapp_Message_ReplyID_Set
2505
+ func whatsapp_Message_ReplyID_Set(handle CGoHandle, val *C.char) {
2506
+ op := ptrFromHandle_whatsapp_Message(handle)
2507
+ op.ReplyID = C.GoString(val)
2508
+ }
2509
+
2510
+ //export whatsapp_Message_ReplyBody_Get
2511
+ func whatsapp_Message_ReplyBody_Get(handle CGoHandle) *C.char {
2512
+ op := ptrFromHandle_whatsapp_Message(handle)
2513
+ return C.CString(op.ReplyBody)
2514
+ }
2515
+
2516
+ //export whatsapp_Message_ReplyBody_Set
2517
+ func whatsapp_Message_ReplyBody_Set(handle CGoHandle, val *C.char) {
2518
+ op := ptrFromHandle_whatsapp_Message(handle)
2519
+ op.ReplyBody = C.GoString(val)
2520
+ }
2521
+
2522
+ //export whatsapp_Message_Attachments_Get
2523
+ func whatsapp_Message_Attachments_Get(handle CGoHandle) CGoHandle {
2524
+ op := ptrFromHandle_whatsapp_Message(handle)
2525
+ return handleFromPtr_Slice_whatsapp_Attachment(&op.Attachments)
2526
+ }
2527
+
2528
+ //export whatsapp_Message_Attachments_Set
2529
+ func whatsapp_Message_Attachments_Set(handle CGoHandle, val CGoHandle) {
2530
+ op := ptrFromHandle_whatsapp_Message(handle)
2531
+ op.Attachments = deptrFromHandle_Slice_whatsapp_Attachment(val)
2532
+ }
2533
+
2534
+ //export whatsapp_Message_Preview_Get
2535
+ func whatsapp_Message_Preview_Get(handle CGoHandle) CGoHandle {
2536
+ op := ptrFromHandle_whatsapp_Message(handle)
2537
+ return handleFromPtr_whatsapp_Preview(&op.Preview)
2538
+ }
2539
+
2540
+ //export whatsapp_Message_Preview_Set
2541
+ func whatsapp_Message_Preview_Set(handle CGoHandle, val CGoHandle) {
2542
+ op := ptrFromHandle_whatsapp_Message(handle)
2543
+ op.Preview = *ptrFromHandle_whatsapp_Preview(val)
2544
+ }
2545
+
2546
+ //export whatsapp_Message_Location_Get
2547
+ func whatsapp_Message_Location_Get(handle CGoHandle) CGoHandle {
2548
+ op := ptrFromHandle_whatsapp_Message(handle)
2549
+ return handleFromPtr_whatsapp_Location(&op.Location)
2550
+ }
2551
+
2552
+ //export whatsapp_Message_Location_Set
2553
+ func whatsapp_Message_Location_Set(handle CGoHandle, val CGoHandle) {
2554
+ op := ptrFromHandle_whatsapp_Message(handle)
2555
+ op.Location = *ptrFromHandle_whatsapp_Location(val)
2556
+ }
2557
+
2558
+ //export whatsapp_Message_MentionJIDs_Get
2559
+ func whatsapp_Message_MentionJIDs_Get(handle CGoHandle) CGoHandle {
2560
+ op := ptrFromHandle_whatsapp_Message(handle)
2561
+ return handleFromPtr_Slice_string(&op.MentionJIDs)
2562
+ }
2563
+
2564
+ //export whatsapp_Message_MentionJIDs_Set
2565
+ func whatsapp_Message_MentionJIDs_Set(handle CGoHandle, val CGoHandle) {
2566
+ op := ptrFromHandle_whatsapp_Message(handle)
2567
+ op.MentionJIDs = deptrFromHandle_Slice_string(val)
2568
+ }
2569
+
2570
+ //export whatsapp_Message_Receipts_Get
2571
+ func whatsapp_Message_Receipts_Get(handle CGoHandle) CGoHandle {
2572
+ op := ptrFromHandle_whatsapp_Message(handle)
2573
+ return handleFromPtr_Slice_whatsapp_Receipt(&op.Receipts)
2574
+ }
2575
+
2576
+ //export whatsapp_Message_Receipts_Set
2577
+ func whatsapp_Message_Receipts_Set(handle CGoHandle, val CGoHandle) {
2578
+ op := ptrFromHandle_whatsapp_Message(handle)
2579
+ op.Receipts = deptrFromHandle_Slice_whatsapp_Receipt(val)
2580
+ }
2581
+
2582
+ //export whatsapp_Message_Reactions_Get
2583
+ func whatsapp_Message_Reactions_Get(handle CGoHandle) CGoHandle {
2584
+ op := ptrFromHandle_whatsapp_Message(handle)
2585
+ return handleFromPtr_Slice_whatsapp_Message(&op.Reactions)
2586
+ }
2587
+
2588
+ //export whatsapp_Message_Reactions_Set
2589
+ func whatsapp_Message_Reactions_Set(handle CGoHandle, val CGoHandle) {
2590
+ op := ptrFromHandle_whatsapp_Message(handle)
2591
+ op.Reactions = deptrFromHandle_Slice_whatsapp_Message(val)
2592
+ }
2593
+
2594
+ // --- wrapping struct: whatsapp.Call ---
2595
+ //
2596
+ //export whatsapp_Call_CTor
2597
+ func whatsapp_Call_CTor() CGoHandle {
2598
+ return CGoHandle(handleFromPtr_whatsapp_Call(&whatsapp.Call{}))
2599
+ }
2600
+
2601
+ //export whatsapp_Call_State_Get
2602
+ func whatsapp_Call_State_Get(handle CGoHandle) C.longlong {
2603
+ op := ptrFromHandle_whatsapp_Call(handle)
2604
+ return C.longlong(int(op.State))
2605
+ }
2606
+
2607
+ //export whatsapp_Call_State_Set
2608
+ func whatsapp_Call_State_Set(handle CGoHandle, val C.longlong) {
2609
+ op := ptrFromHandle_whatsapp_Call(handle)
2610
+ op.State = whatsapp.CallState(int(val))
2611
+ }
2612
+
2613
+ //export whatsapp_Call_JID_Get
2614
+ func whatsapp_Call_JID_Get(handle CGoHandle) *C.char {
2615
+ op := ptrFromHandle_whatsapp_Call(handle)
2616
+ return C.CString(op.JID)
2617
+ }
2618
+
2619
+ //export whatsapp_Call_JID_Set
2620
+ func whatsapp_Call_JID_Set(handle CGoHandle, val *C.char) {
2621
+ op := ptrFromHandle_whatsapp_Call(handle)
2622
+ op.JID = C.GoString(val)
2623
+ }
2624
+
2625
+ //export whatsapp_Call_Timestamp_Get
2626
+ func whatsapp_Call_Timestamp_Get(handle CGoHandle) C.longlong {
2627
+ op := ptrFromHandle_whatsapp_Call(handle)
2628
+ return C.longlong(op.Timestamp)
2629
+ }
2630
+
2631
+ //export whatsapp_Call_Timestamp_Set
2632
+ func whatsapp_Call_Timestamp_Set(handle CGoHandle, val C.longlong) {
2633
+ op := ptrFromHandle_whatsapp_Call(handle)
2634
+ op.Timestamp = int64(val)
2635
+ }
2636
+
2637
+ // --- wrapping struct: whatsapp.Connect ---
2638
+ //
2639
+ //export whatsapp_Connect_CTor
2640
+ func whatsapp_Connect_CTor() CGoHandle {
2641
+ return CGoHandle(handleFromPtr_whatsapp_Connect(&whatsapp.Connect{}))
2642
+ }
2643
+
2644
+ //export whatsapp_Connect_JID_Get
2645
+ func whatsapp_Connect_JID_Get(handle CGoHandle) *C.char {
2646
+ op := ptrFromHandle_whatsapp_Connect(handle)
2647
+ return C.CString(op.JID)
2648
+ }
2649
+
2650
+ //export whatsapp_Connect_JID_Set
2651
+ func whatsapp_Connect_JID_Set(handle CGoHandle, val *C.char) {
2652
+ op := ptrFromHandle_whatsapp_Connect(handle)
2653
+ op.JID = C.GoString(val)
2654
+ }
2655
+
2656
+ //export whatsapp_Connect_Error_Get
2657
+ func whatsapp_Connect_Error_Get(handle CGoHandle) *C.char {
2658
+ op := ptrFromHandle_whatsapp_Connect(handle)
2659
+ return C.CString(op.Error)
2660
+ }
2661
+
2662
+ //export whatsapp_Connect_Error_Set
2663
+ func whatsapp_Connect_Error_Set(handle CGoHandle, val *C.char) {
2664
+ op := ptrFromHandle_whatsapp_Connect(handle)
2665
+ op.Error = C.GoString(val)
2666
+ }
2667
+
2668
+ // --- wrapping struct: whatsapp.Group ---
2669
+ //
2670
+ //export whatsapp_Group_CTor
2671
+ func whatsapp_Group_CTor() CGoHandle {
2672
+ return CGoHandle(handleFromPtr_whatsapp_Group(&whatsapp.Group{}))
2673
+ }
2674
+
2675
+ //export whatsapp_Group_JID_Get
2676
+ func whatsapp_Group_JID_Get(handle CGoHandle) *C.char {
2677
+ op := ptrFromHandle_whatsapp_Group(handle)
2678
+ return C.CString(op.JID)
2679
+ }
2680
+
2681
+ //export whatsapp_Group_JID_Set
2682
+ func whatsapp_Group_JID_Set(handle CGoHandle, val *C.char) {
2683
+ op := ptrFromHandle_whatsapp_Group(handle)
2684
+ op.JID = C.GoString(val)
2685
+ }
2686
+
2687
+ //export whatsapp_Group_Name_Get
2688
+ func whatsapp_Group_Name_Get(handle CGoHandle) *C.char {
2689
+ op := ptrFromHandle_whatsapp_Group(handle)
2690
+ return C.CString(op.Name)
2691
+ }
2692
+
2693
+ //export whatsapp_Group_Name_Set
2694
+ func whatsapp_Group_Name_Set(handle CGoHandle, val *C.char) {
2695
+ op := ptrFromHandle_whatsapp_Group(handle)
2696
+ op.Name = C.GoString(val)
2697
+ }
2698
+
2699
+ //export whatsapp_Group_Subject_Get
2700
+ func whatsapp_Group_Subject_Get(handle CGoHandle) CGoHandle {
2701
+ op := ptrFromHandle_whatsapp_Group(handle)
2702
+ return handleFromPtr_whatsapp_GroupSubject(&op.Subject)
2703
+ }
2704
+
2705
+ //export whatsapp_Group_Subject_Set
2706
+ func whatsapp_Group_Subject_Set(handle CGoHandle, val CGoHandle) {
2707
+ op := ptrFromHandle_whatsapp_Group(handle)
2708
+ op.Subject = *ptrFromHandle_whatsapp_GroupSubject(val)
2709
+ }
2710
+
2711
+ //export whatsapp_Group_Nickname_Get
2712
+ func whatsapp_Group_Nickname_Get(handle CGoHandle) *C.char {
2713
+ op := ptrFromHandle_whatsapp_Group(handle)
2714
+ return C.CString(op.Nickname)
2715
+ }
2716
+
2717
+ //export whatsapp_Group_Nickname_Set
2718
+ func whatsapp_Group_Nickname_Set(handle CGoHandle, val *C.char) {
2719
+ op := ptrFromHandle_whatsapp_Group(handle)
2720
+ op.Nickname = C.GoString(val)
2721
+ }
2722
+
2723
+ //export whatsapp_Group_Participants_Get
2724
+ func whatsapp_Group_Participants_Get(handle CGoHandle) CGoHandle {
2725
+ op := ptrFromHandle_whatsapp_Group(handle)
2726
+ return handleFromPtr_Slice_whatsapp_GroupParticipant(&op.Participants)
2727
+ }
2728
+
2729
+ //export whatsapp_Group_Participants_Set
2730
+ func whatsapp_Group_Participants_Set(handle CGoHandle, val CGoHandle) {
2731
+ op := ptrFromHandle_whatsapp_Group(handle)
2732
+ op.Participants = deptrFromHandle_Slice_whatsapp_GroupParticipant(val)
2733
+ }
2734
+
2735
+ // --- wrapping struct: whatsapp.Avatar ---
2736
+ //
2737
+ //export whatsapp_Avatar_CTor
2738
+ func whatsapp_Avatar_CTor() CGoHandle {
2739
+ return CGoHandle(handleFromPtr_whatsapp_Avatar(&whatsapp.Avatar{}))
2740
+ }
2741
+
2742
+ //export whatsapp_Avatar_ID_Get
2743
+ func whatsapp_Avatar_ID_Get(handle CGoHandle) *C.char {
2744
+ op := ptrFromHandle_whatsapp_Avatar(handle)
2745
+ return C.CString(op.ID)
2746
+ }
2747
+
2748
+ //export whatsapp_Avatar_ID_Set
2749
+ func whatsapp_Avatar_ID_Set(handle CGoHandle, val *C.char) {
2750
+ op := ptrFromHandle_whatsapp_Avatar(handle)
2751
+ op.ID = C.GoString(val)
2752
+ }
2753
+
2754
+ //export whatsapp_Avatar_URL_Get
2755
+ func whatsapp_Avatar_URL_Get(handle CGoHandle) *C.char {
2756
+ op := ptrFromHandle_whatsapp_Avatar(handle)
2757
+ return C.CString(op.URL)
2758
+ }
2759
+
2760
+ //export whatsapp_Avatar_URL_Set
2761
+ func whatsapp_Avatar_URL_Set(handle CGoHandle, val *C.char) {
2762
+ op := ptrFromHandle_whatsapp_Avatar(handle)
2763
+ op.URL = C.GoString(val)
2764
+ }
2765
+
2766
+ // --- wrapping struct: whatsapp.EventPayload ---
2767
+ //
2768
+ //export whatsapp_EventPayload_CTor
2769
+ func whatsapp_EventPayload_CTor() CGoHandle {
2770
+ return CGoHandle(handleFromPtr_whatsapp_EventPayload(&whatsapp.EventPayload{}))
2771
+ }
2772
+
2773
+ //export whatsapp_EventPayload_QRCode_Get
2774
+ func whatsapp_EventPayload_QRCode_Get(handle CGoHandle) *C.char {
2775
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2776
+ return C.CString(op.QRCode)
2777
+ }
2778
+
2779
+ //export whatsapp_EventPayload_QRCode_Set
2780
+ func whatsapp_EventPayload_QRCode_Set(handle CGoHandle, val *C.char) {
2781
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2782
+ op.QRCode = C.GoString(val)
2783
+ }
2784
+
2785
+ //export whatsapp_EventPayload_PairDeviceID_Get
2786
+ func whatsapp_EventPayload_PairDeviceID_Get(handle CGoHandle) *C.char {
2787
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2788
+ return C.CString(op.PairDeviceID)
2789
+ }
2790
+
2791
+ //export whatsapp_EventPayload_PairDeviceID_Set
2792
+ func whatsapp_EventPayload_PairDeviceID_Set(handle CGoHandle, val *C.char) {
2793
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2794
+ op.PairDeviceID = C.GoString(val)
2795
+ }
2796
+
2797
+ //export whatsapp_EventPayload_Connect_Get
2798
+ func whatsapp_EventPayload_Connect_Get(handle CGoHandle) CGoHandle {
2799
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2800
+ return handleFromPtr_whatsapp_Connect(&op.Connect)
2801
+ }
2802
+
2803
+ //export whatsapp_EventPayload_Connect_Set
2804
+ func whatsapp_EventPayload_Connect_Set(handle CGoHandle, val CGoHandle) {
2805
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2806
+ op.Connect = *ptrFromHandle_whatsapp_Connect(val)
2807
+ }
2808
+
2809
+ //export whatsapp_EventPayload_Contact_Get
2810
+ func whatsapp_EventPayload_Contact_Get(handle CGoHandle) CGoHandle {
2811
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2812
+ return handleFromPtr_whatsapp_Contact(&op.Contact)
2813
+ }
2814
+
2815
+ //export whatsapp_EventPayload_Contact_Set
2816
+ func whatsapp_EventPayload_Contact_Set(handle CGoHandle, val CGoHandle) {
2817
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2818
+ op.Contact = *ptrFromHandle_whatsapp_Contact(val)
2819
+ }
2820
+
2821
+ //export whatsapp_EventPayload_Presence_Get
2822
+ func whatsapp_EventPayload_Presence_Get(handle CGoHandle) CGoHandle {
2823
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2824
+ return handleFromPtr_whatsapp_Presence(&op.Presence)
2825
+ }
2826
+
2827
+ //export whatsapp_EventPayload_Presence_Set
2828
+ func whatsapp_EventPayload_Presence_Set(handle CGoHandle, val CGoHandle) {
2829
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2830
+ op.Presence = *ptrFromHandle_whatsapp_Presence(val)
2831
+ }
2832
+
2833
+ //export whatsapp_EventPayload_Message_Get
2834
+ func whatsapp_EventPayload_Message_Get(handle CGoHandle) CGoHandle {
2835
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2836
+ return handleFromPtr_whatsapp_Message(&op.Message)
2837
+ }
2838
+
2839
+ //export whatsapp_EventPayload_Message_Set
2840
+ func whatsapp_EventPayload_Message_Set(handle CGoHandle, val CGoHandle) {
2841
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2842
+ op.Message = *ptrFromHandle_whatsapp_Message(val)
2843
+ }
2844
+
2845
+ //export whatsapp_EventPayload_ChatState_Get
2846
+ func whatsapp_EventPayload_ChatState_Get(handle CGoHandle) CGoHandle {
2847
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2848
+ return handleFromPtr_whatsapp_ChatState(&op.ChatState)
2849
+ }
2850
+
2851
+ //export whatsapp_EventPayload_ChatState_Set
2852
+ func whatsapp_EventPayload_ChatState_Set(handle CGoHandle, val CGoHandle) {
2853
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2854
+ op.ChatState = *ptrFromHandle_whatsapp_ChatState(val)
2855
+ }
2856
+
2857
+ //export whatsapp_EventPayload_Receipt_Get
2858
+ func whatsapp_EventPayload_Receipt_Get(handle CGoHandle) CGoHandle {
2859
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2860
+ return handleFromPtr_whatsapp_Receipt(&op.Receipt)
2861
+ }
2862
+
2863
+ //export whatsapp_EventPayload_Receipt_Set
2864
+ func whatsapp_EventPayload_Receipt_Set(handle CGoHandle, val CGoHandle) {
2865
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2866
+ op.Receipt = *ptrFromHandle_whatsapp_Receipt(val)
2867
+ }
2868
+
2869
+ //export whatsapp_EventPayload_Group_Get
2870
+ func whatsapp_EventPayload_Group_Get(handle CGoHandle) CGoHandle {
2871
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2872
+ return handleFromPtr_whatsapp_Group(&op.Group)
2873
+ }
2874
+
2875
+ //export whatsapp_EventPayload_Group_Set
2876
+ func whatsapp_EventPayload_Group_Set(handle CGoHandle, val CGoHandle) {
2877
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2878
+ op.Group = *ptrFromHandle_whatsapp_Group(val)
2879
+ }
2880
+
2881
+ //export whatsapp_EventPayload_Call_Get
2882
+ func whatsapp_EventPayload_Call_Get(handle CGoHandle) CGoHandle {
2883
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2884
+ return handleFromPtr_whatsapp_Call(&op.Call)
2885
+ }
2886
+
2887
+ //export whatsapp_EventPayload_Call_Set
2888
+ func whatsapp_EventPayload_Call_Set(handle CGoHandle, val CGoHandle) {
2889
+ op := ptrFromHandle_whatsapp_EventPayload(handle)
2890
+ op.Call = *ptrFromHandle_whatsapp_Call(val)
2891
+ }
2892
+
2893
+ // --- wrapping struct: whatsapp.Receipt ---
2894
+ //
2895
+ //export whatsapp_Receipt_CTor
2896
+ func whatsapp_Receipt_CTor() CGoHandle {
2897
+ return CGoHandle(handleFromPtr_whatsapp_Receipt(&whatsapp.Receipt{}))
2898
+ }
2899
+
2900
+ //export whatsapp_Receipt_Kind_Get
2901
+ func whatsapp_Receipt_Kind_Get(handle CGoHandle) C.longlong {
2902
+ op := ptrFromHandle_whatsapp_Receipt(handle)
2903
+ return C.longlong(int(op.Kind))
2904
+ }
2905
+
2906
+ //export whatsapp_Receipt_Kind_Set
2907
+ func whatsapp_Receipt_Kind_Set(handle CGoHandle, val C.longlong) {
2908
+ op := ptrFromHandle_whatsapp_Receipt(handle)
2909
+ op.Kind = whatsapp.ReceiptKind(int(val))
2910
+ }
2911
+
2912
+ //export whatsapp_Receipt_MessageIDs_Get
2913
+ func whatsapp_Receipt_MessageIDs_Get(handle CGoHandle) CGoHandle {
2914
+ op := ptrFromHandle_whatsapp_Receipt(handle)
2915
+ return handleFromPtr_Slice_string(&op.MessageIDs)
2916
+ }
2917
+
2918
+ //export whatsapp_Receipt_MessageIDs_Set
2919
+ func whatsapp_Receipt_MessageIDs_Set(handle CGoHandle, val CGoHandle) {
2920
+ op := ptrFromHandle_whatsapp_Receipt(handle)
2921
+ op.MessageIDs = deptrFromHandle_Slice_string(val)
2922
+ }
2923
+
2924
+ //export whatsapp_Receipt_JID_Get
2925
+ func whatsapp_Receipt_JID_Get(handle CGoHandle) *C.char {
2926
+ op := ptrFromHandle_whatsapp_Receipt(handle)
2927
+ return C.CString(op.JID)
2928
+ }
2929
+
2930
+ //export whatsapp_Receipt_JID_Set
2931
+ func whatsapp_Receipt_JID_Set(handle CGoHandle, val *C.char) {
2932
+ op := ptrFromHandle_whatsapp_Receipt(handle)
2933
+ op.JID = C.GoString(val)
2934
+ }
2935
+
2936
+ //export whatsapp_Receipt_GroupJID_Get
2937
+ func whatsapp_Receipt_GroupJID_Get(handle CGoHandle) *C.char {
2938
+ op := ptrFromHandle_whatsapp_Receipt(handle)
2939
+ return C.CString(op.GroupJID)
2940
+ }
2941
+
2942
+ //export whatsapp_Receipt_GroupJID_Set
2943
+ func whatsapp_Receipt_GroupJID_Set(handle CGoHandle, val *C.char) {
2944
+ op := ptrFromHandle_whatsapp_Receipt(handle)
2945
+ op.GroupJID = C.GoString(val)
2946
+ }
2947
+
2948
+ //export whatsapp_Receipt_Timestamp_Get
2949
+ func whatsapp_Receipt_Timestamp_Get(handle CGoHandle) C.longlong {
2950
+ op := ptrFromHandle_whatsapp_Receipt(handle)
2951
+ return C.longlong(op.Timestamp)
2952
+ }
2953
+
2954
+ //export whatsapp_Receipt_Timestamp_Set
2955
+ func whatsapp_Receipt_Timestamp_Set(handle CGoHandle, val C.longlong) {
2956
+ op := ptrFromHandle_whatsapp_Receipt(handle)
2957
+ op.Timestamp = int64(val)
2958
+ }
2959
+
2960
+ //export whatsapp_Receipt_IsCarbon_Get
2961
+ func whatsapp_Receipt_IsCarbon_Get(handle CGoHandle) C.char {
2962
+ op := ptrFromHandle_whatsapp_Receipt(handle)
2963
+ return boolGoToPy(op.IsCarbon)
2964
+ }
2965
+
2966
+ //export whatsapp_Receipt_IsCarbon_Set
2967
+ func whatsapp_Receipt_IsCarbon_Set(handle CGoHandle, val C.char) {
2968
+ op := ptrFromHandle_whatsapp_Receipt(handle)
2969
+ op.IsCarbon = boolPyToGo(val)
2970
+ }
2971
+
2972
+ // --- wrapping struct: whatsapp.Attachment ---
2973
+ //
2974
+ //export whatsapp_Attachment_CTor
2975
+ func whatsapp_Attachment_CTor() CGoHandle {
2976
+ return CGoHandle(handleFromPtr_whatsapp_Attachment(&whatsapp.Attachment{}))
2977
+ }
2978
+
2979
+ //export whatsapp_Attachment_MIME_Get
2980
+ func whatsapp_Attachment_MIME_Get(handle CGoHandle) *C.char {
2981
+ op := ptrFromHandle_whatsapp_Attachment(handle)
2982
+ return C.CString(op.MIME)
2983
+ }
2984
+
2985
+ //export whatsapp_Attachment_MIME_Set
2986
+ func whatsapp_Attachment_MIME_Set(handle CGoHandle, val *C.char) {
2987
+ op := ptrFromHandle_whatsapp_Attachment(handle)
2988
+ op.MIME = C.GoString(val)
2989
+ }
2990
+
2991
+ //export whatsapp_Attachment_Filename_Get
2992
+ func whatsapp_Attachment_Filename_Get(handle CGoHandle) *C.char {
2993
+ op := ptrFromHandle_whatsapp_Attachment(handle)
2994
+ return C.CString(op.Filename)
2995
+ }
2996
+
2997
+ //export whatsapp_Attachment_Filename_Set
2998
+ func whatsapp_Attachment_Filename_Set(handle CGoHandle, val *C.char) {
2999
+ op := ptrFromHandle_whatsapp_Attachment(handle)
3000
+ op.Filename = C.GoString(val)
3001
+ }
3002
+
3003
+ //export whatsapp_Attachment_Caption_Get
3004
+ func whatsapp_Attachment_Caption_Get(handle CGoHandle) *C.char {
3005
+ op := ptrFromHandle_whatsapp_Attachment(handle)
3006
+ return C.CString(op.Caption)
3007
+ }
3008
+
3009
+ //export whatsapp_Attachment_Caption_Set
3010
+ func whatsapp_Attachment_Caption_Set(handle CGoHandle, val *C.char) {
3011
+ op := ptrFromHandle_whatsapp_Attachment(handle)
3012
+ op.Caption = C.GoString(val)
3013
+ }
3014
+
3015
+ //export whatsapp_Attachment_Data_Get
3016
+ func whatsapp_Attachment_Data_Get(handle CGoHandle) CGoHandle {
3017
+ op := ptrFromHandle_whatsapp_Attachment(handle)
3018
+ return handleFromPtr_Slice_byte(&op.Data)
3019
+ }
3020
+
3021
+ //export whatsapp_Attachment_Data_Set
3022
+ func whatsapp_Attachment_Data_Set(handle CGoHandle, val CGoHandle) {
3023
+ op := ptrFromHandle_whatsapp_Attachment(handle)
3024
+ op.Data = deptrFromHandle_Slice_byte(val)
3025
+ }
3026
+
3027
+ //export whatsapp_Attachment_GetSpec
3028
+ func whatsapp_Attachment_GetSpec(_handle CGoHandle, ctx CGoHandle) CGoHandle {
3029
+ _saved_thread := C.PyEval_SaveThread()
3030
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Attachment")
3031
+ if __err != nil {
3032
+ return handleFromPtr_Ptr_media_Spec(nil)
3033
+ }
3034
+ cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Attachment{})).(*whatsapp.Attachment).GetSpec(ptrFromHandle_context_Context(ctx))
3035
+
3036
+ C.PyEval_RestoreThread(_saved_thread)
3037
+ if __err != nil {
3038
+ estr := C.CString(__err.Error())
3039
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3040
+ C.free(unsafe.Pointer(estr))
3041
+ return handleFromPtr_Ptr_media_Spec(nil)
3042
+ }
3043
+ return handleFromPtr_Ptr_media_Spec(cret)
3044
+ }
3045
+
3046
+ // --- wrapping struct: whatsapp.Gateway ---
3047
+ //
3048
+ //export whatsapp_Gateway_CTor
3049
+ func whatsapp_Gateway_CTor() CGoHandle {
3050
+ return CGoHandle(handleFromPtr_whatsapp_Gateway(&whatsapp.Gateway{}))
3051
+ }
3052
+
3053
+ //export whatsapp_Gateway_DBPath_Get
3054
+ func whatsapp_Gateway_DBPath_Get(handle CGoHandle) *C.char {
3055
+ op := ptrFromHandle_whatsapp_Gateway(handle)
3056
+ return C.CString(op.DBPath)
3057
+ }
3058
+
3059
+ //export whatsapp_Gateway_DBPath_Set
3060
+ func whatsapp_Gateway_DBPath_Set(handle CGoHandle, val *C.char) {
3061
+ op := ptrFromHandle_whatsapp_Gateway(handle)
3062
+ op.DBPath = C.GoString(val)
3063
+ }
3064
+
3065
+ //export whatsapp_Gateway_Name_Get
3066
+ func whatsapp_Gateway_Name_Get(handle CGoHandle) *C.char {
3067
+ op := ptrFromHandle_whatsapp_Gateway(handle)
3068
+ return C.CString(op.Name)
3069
+ }
3070
+
3071
+ //export whatsapp_Gateway_Name_Set
3072
+ func whatsapp_Gateway_Name_Set(handle CGoHandle, val *C.char) {
3073
+ op := ptrFromHandle_whatsapp_Gateway(handle)
3074
+ op.Name = C.GoString(val)
3075
+ }
3076
+
3077
+ //export whatsapp_Gateway_LogLevel_Get
3078
+ func whatsapp_Gateway_LogLevel_Get(handle CGoHandle) *C.char {
3079
+ op := ptrFromHandle_whatsapp_Gateway(handle)
3080
+ return C.CString(op.LogLevel)
3081
+ }
3082
+
3083
+ //export whatsapp_Gateway_LogLevel_Set
3084
+ func whatsapp_Gateway_LogLevel_Set(handle CGoHandle, val *C.char) {
3085
+ op := ptrFromHandle_whatsapp_Gateway(handle)
3086
+ op.LogLevel = C.GoString(val)
3087
+ }
3088
+
3089
+ //export whatsapp_Gateway_TempDir_Get
3090
+ func whatsapp_Gateway_TempDir_Get(handle CGoHandle) *C.char {
3091
+ op := ptrFromHandle_whatsapp_Gateway(handle)
3092
+ return C.CString(op.TempDir)
3093
+ }
3094
+
3095
+ //export whatsapp_Gateway_TempDir_Set
3096
+ func whatsapp_Gateway_TempDir_Set(handle CGoHandle, val *C.char) {
3097
+ op := ptrFromHandle_whatsapp_Gateway(handle)
3098
+ op.TempDir = C.GoString(val)
3099
+ }
3100
+
3101
+ //export whatsapp_Gateway_Init
3102
+ func whatsapp_Gateway_Init(_handle CGoHandle) *C.char {
3103
+ _saved_thread := C.PyEval_SaveThread()
3104
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Gateway")
3105
+ if __err != nil {
3106
+ return errorGoToPy(nil)
3107
+ }
3108
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway).Init()
3109
+
3110
+ C.PyEval_RestoreThread(_saved_thread)
3111
+ if __err != nil {
3112
+ estr := C.CString(__err.Error())
3113
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3114
+ return estr
3115
+ }
3116
+ return C.CString("")
3117
+ }
3118
+
3119
+ //export whatsapp_Gateway_NewSession
3120
+ func whatsapp_Gateway_NewSession(_handle CGoHandle, device CGoHandle) CGoHandle {
3121
+ _saved_thread := C.PyEval_SaveThread()
3122
+ defer C.PyEval_RestoreThread(_saved_thread)
3123
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Gateway")
3124
+ if __err != nil {
3125
+ return handleFromPtr_Ptr_whatsapp_Session(nil)
3126
+ }
3127
+ return handleFromPtr_Ptr_whatsapp_Session(gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway).NewSession(*ptrFromHandle_whatsapp_LinkedDevice(device)))
3128
+
3129
+ }
3130
+
3131
+ //export whatsapp_Gateway_CleanupSession
3132
+ func whatsapp_Gateway_CleanupSession(_handle CGoHandle, device CGoHandle) *C.char {
3133
+ _saved_thread := C.PyEval_SaveThread()
3134
+ vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Gateway")
3135
+ if __err != nil {
3136
+ return errorGoToPy(nil)
3137
+ }
3138
+ __err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway).CleanupSession(*ptrFromHandle_whatsapp_LinkedDevice(device))
3139
+
3140
+ C.PyEval_RestoreThread(_saved_thread)
3141
+ if __err != nil {
3142
+ estr := C.CString(__err.Error())
3143
+ C.PyErr_SetString(C.PyExc_RuntimeError, estr)
3144
+ return estr
3145
+ }
3146
+ return C.CString("")
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 ---