slidge-whatsapp 0.3.6__cp313-cp313-manylinux_2_41_aarch64.whl → 0.3.7__cp313-cp313-manylinux_2_41_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.
- slidge_whatsapp/contact.py +6 -2
- slidge_whatsapp/event.go +12 -7
- slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.h +177 -177
- slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.so +0 -0
- slidge_whatsapp/generated/build.py +153 -153
- slidge_whatsapp/generated/whatsapp.c +1365 -1365
- slidge_whatsapp/generated/whatsapp.go +992 -992
- slidge_whatsapp/generated/whatsapp.py +1311 -1311
- slidge_whatsapp/generated/whatsapp_go.h +177 -177
- slidge_whatsapp/session.go +2 -2
- slidge_whatsapp/session.py +2 -6
- {slidge_whatsapp-0.3.6.dist-info → slidge_whatsapp-0.3.7.dist-info}/METADATA +2 -3
- {slidge_whatsapp-0.3.6.dist-info → slidge_whatsapp-0.3.7.dist-info}/RECORD +16 -16
- {slidge_whatsapp-0.3.6.dist-info → slidge_whatsapp-0.3.7.dist-info}/WHEEL +0 -0
- {slidge_whatsapp-0.3.6.dist-info → slidge_whatsapp-0.3.7.dist-info}/entry_points.txt +0 -0
- {slidge_whatsapp-0.3.6.dist-info → slidge_whatsapp-0.3.7.dist-info}/licenses/LICENSE +0 -0
|
@@ -2139,229 +2139,102 @@ func handleFromPtr_whatsapp_Session(p interface{}) CGoHandle {
|
|
|
2139
2139
|
|
|
2140
2140
|
// ---- Structs ---
|
|
2141
2141
|
|
|
2142
|
-
// --- wrapping struct: whatsapp.
|
|
2143
|
-
//
|
|
2144
|
-
//export whatsapp_Connect_CTor
|
|
2145
|
-
func whatsapp_Connect_CTor() CGoHandle {
|
|
2146
|
-
return CGoHandle(handleFromPtr_whatsapp_Connect(&whatsapp.Connect{}))
|
|
2147
|
-
}
|
|
2148
|
-
|
|
2149
|
-
//export whatsapp_Connect_JID_Get
|
|
2150
|
-
func whatsapp_Connect_JID_Get(handle CGoHandle) *C.char {
|
|
2151
|
-
op := ptrFromHandle_whatsapp_Connect(handle)
|
|
2152
|
-
return C.CString(op.JID)
|
|
2153
|
-
}
|
|
2154
|
-
|
|
2155
|
-
//export whatsapp_Connect_JID_Set
|
|
2156
|
-
func whatsapp_Connect_JID_Set(handle CGoHandle, val *C.char) {
|
|
2157
|
-
op := ptrFromHandle_whatsapp_Connect(handle)
|
|
2158
|
-
op.JID = C.GoString(val)
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
//export whatsapp_Connect_Error_Get
|
|
2162
|
-
func whatsapp_Connect_Error_Get(handle CGoHandle) *C.char {
|
|
2163
|
-
op := ptrFromHandle_whatsapp_Connect(handle)
|
|
2164
|
-
return C.CString(op.Error)
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
//export whatsapp_Connect_Error_Set
|
|
2168
|
-
func whatsapp_Connect_Error_Set(handle CGoHandle, val *C.char) {
|
|
2169
|
-
op := ptrFromHandle_whatsapp_Connect(handle)
|
|
2170
|
-
op.Error = C.GoString(val)
|
|
2171
|
-
}
|
|
2172
|
-
|
|
2173
|
-
// --- wrapping struct: whatsapp.Gateway ---
|
|
2142
|
+
// --- wrapping struct: whatsapp.ChatState ---
|
|
2174
2143
|
//
|
|
2175
|
-
//export
|
|
2176
|
-
func
|
|
2177
|
-
return CGoHandle(
|
|
2178
|
-
}
|
|
2179
|
-
|
|
2180
|
-
//export whatsapp_Gateway_DBPath_Get
|
|
2181
|
-
func whatsapp_Gateway_DBPath_Get(handle CGoHandle) *C.char {
|
|
2182
|
-
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2183
|
-
return C.CString(op.DBPath)
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
|
-
//export whatsapp_Gateway_DBPath_Set
|
|
2187
|
-
func whatsapp_Gateway_DBPath_Set(handle CGoHandle, val *C.char) {
|
|
2188
|
-
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2189
|
-
op.DBPath = C.GoString(val)
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
|
-
//export whatsapp_Gateway_Name_Get
|
|
2193
|
-
func whatsapp_Gateway_Name_Get(handle CGoHandle) *C.char {
|
|
2194
|
-
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2195
|
-
return C.CString(op.Name)
|
|
2196
|
-
}
|
|
2197
|
-
|
|
2198
|
-
//export whatsapp_Gateway_Name_Set
|
|
2199
|
-
func whatsapp_Gateway_Name_Set(handle CGoHandle, val *C.char) {
|
|
2200
|
-
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2201
|
-
op.Name = C.GoString(val)
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
//export whatsapp_Gateway_LogLevel_Get
|
|
2205
|
-
func whatsapp_Gateway_LogLevel_Get(handle CGoHandle) *C.char {
|
|
2206
|
-
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2207
|
-
return C.CString(op.LogLevel)
|
|
2144
|
+
//export whatsapp_ChatState_CTor
|
|
2145
|
+
func whatsapp_ChatState_CTor() CGoHandle {
|
|
2146
|
+
return CGoHandle(handleFromPtr_whatsapp_ChatState(&whatsapp.ChatState{}))
|
|
2208
2147
|
}
|
|
2209
2148
|
|
|
2210
|
-
//export
|
|
2211
|
-
func
|
|
2212
|
-
op :=
|
|
2213
|
-
|
|
2149
|
+
//export whatsapp_ChatState_Kind_Get
|
|
2150
|
+
func whatsapp_ChatState_Kind_Get(handle CGoHandle) C.longlong {
|
|
2151
|
+
op := ptrFromHandle_whatsapp_ChatState(handle)
|
|
2152
|
+
return C.longlong(int(op.Kind))
|
|
2214
2153
|
}
|
|
2215
2154
|
|
|
2216
|
-
//export
|
|
2217
|
-
func
|
|
2218
|
-
op :=
|
|
2219
|
-
|
|
2155
|
+
//export whatsapp_ChatState_Kind_Set
|
|
2156
|
+
func whatsapp_ChatState_Kind_Set(handle CGoHandle, val C.longlong) {
|
|
2157
|
+
op := ptrFromHandle_whatsapp_ChatState(handle)
|
|
2158
|
+
op.Kind = whatsapp.ChatStateKind(int(val))
|
|
2220
2159
|
}
|
|
2221
2160
|
|
|
2222
|
-
//export
|
|
2223
|
-
func
|
|
2224
|
-
op :=
|
|
2225
|
-
|
|
2161
|
+
//export whatsapp_ChatState_JID_Get
|
|
2162
|
+
func whatsapp_ChatState_JID_Get(handle CGoHandle) *C.char {
|
|
2163
|
+
op := ptrFromHandle_whatsapp_ChatState(handle)
|
|
2164
|
+
return C.CString(op.JID)
|
|
2226
2165
|
}
|
|
2227
2166
|
|
|
2228
|
-
//export
|
|
2229
|
-
func
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
if __err != nil {
|
|
2233
|
-
return errorGoToPy(nil)
|
|
2234
|
-
}
|
|
2235
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway).Init()
|
|
2236
|
-
|
|
2237
|
-
C.PyEval_RestoreThread(_saved_thread)
|
|
2238
|
-
if __err != nil {
|
|
2239
|
-
estr := C.CString(__err.Error())
|
|
2240
|
-
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
2241
|
-
return estr
|
|
2242
|
-
}
|
|
2243
|
-
return C.CString("")
|
|
2167
|
+
//export whatsapp_ChatState_JID_Set
|
|
2168
|
+
func whatsapp_ChatState_JID_Set(handle CGoHandle, val *C.char) {
|
|
2169
|
+
op := ptrFromHandle_whatsapp_ChatState(handle)
|
|
2170
|
+
op.JID = C.GoString(val)
|
|
2244
2171
|
}
|
|
2245
2172
|
|
|
2246
|
-
//export
|
|
2247
|
-
func
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Gateway")
|
|
2251
|
-
if __err != nil {
|
|
2252
|
-
return handleFromPtr_Ptr_whatsapp_Session(nil)
|
|
2253
|
-
}
|
|
2254
|
-
return handleFromPtr_Ptr_whatsapp_Session(gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway).NewSession(*ptrFromHandle_whatsapp_LinkedDevice(device)))
|
|
2255
|
-
|
|
2173
|
+
//export whatsapp_ChatState_GroupJID_Get
|
|
2174
|
+
func whatsapp_ChatState_GroupJID_Get(handle CGoHandle) *C.char {
|
|
2175
|
+
op := ptrFromHandle_whatsapp_ChatState(handle)
|
|
2176
|
+
return C.CString(op.GroupJID)
|
|
2256
2177
|
}
|
|
2257
2178
|
|
|
2258
|
-
//export
|
|
2259
|
-
func
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
if __err != nil {
|
|
2263
|
-
return errorGoToPy(nil)
|
|
2264
|
-
}
|
|
2265
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway).CleanupSession(*ptrFromHandle_whatsapp_LinkedDevice(device))
|
|
2266
|
-
|
|
2267
|
-
C.PyEval_RestoreThread(_saved_thread)
|
|
2268
|
-
if __err != nil {
|
|
2269
|
-
estr := C.CString(__err.Error())
|
|
2270
|
-
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
2271
|
-
return estr
|
|
2272
|
-
}
|
|
2273
|
-
return C.CString("")
|
|
2179
|
+
//export whatsapp_ChatState_GroupJID_Set
|
|
2180
|
+
func whatsapp_ChatState_GroupJID_Set(handle CGoHandle, val *C.char) {
|
|
2181
|
+
op := ptrFromHandle_whatsapp_ChatState(handle)
|
|
2182
|
+
op.GroupJID = C.GoString(val)
|
|
2274
2183
|
}
|
|
2275
2184
|
|
|
2276
|
-
// --- wrapping struct: whatsapp.
|
|
2185
|
+
// --- wrapping struct: whatsapp.GroupParticipant ---
|
|
2277
2186
|
//
|
|
2278
|
-
//export
|
|
2279
|
-
func
|
|
2280
|
-
return CGoHandle(
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
//export whatsapp_Location_Latitude_Get
|
|
2284
|
-
func whatsapp_Location_Latitude_Get(handle CGoHandle) C.double {
|
|
2285
|
-
op := ptrFromHandle_whatsapp_Location(handle)
|
|
2286
|
-
return C.double(op.Latitude)
|
|
2287
|
-
}
|
|
2288
|
-
|
|
2289
|
-
//export whatsapp_Location_Latitude_Set
|
|
2290
|
-
func whatsapp_Location_Latitude_Set(handle CGoHandle, val C.double) {
|
|
2291
|
-
op := ptrFromHandle_whatsapp_Location(handle)
|
|
2292
|
-
op.Latitude = float64(val)
|
|
2293
|
-
}
|
|
2294
|
-
|
|
2295
|
-
//export whatsapp_Location_Longitude_Get
|
|
2296
|
-
func whatsapp_Location_Longitude_Get(handle CGoHandle) C.double {
|
|
2297
|
-
op := ptrFromHandle_whatsapp_Location(handle)
|
|
2298
|
-
return C.double(op.Longitude)
|
|
2299
|
-
}
|
|
2300
|
-
|
|
2301
|
-
//export whatsapp_Location_Longitude_Set
|
|
2302
|
-
func whatsapp_Location_Longitude_Set(handle CGoHandle, val C.double) {
|
|
2303
|
-
op := ptrFromHandle_whatsapp_Location(handle)
|
|
2304
|
-
op.Longitude = float64(val)
|
|
2305
|
-
}
|
|
2306
|
-
|
|
2307
|
-
//export whatsapp_Location_Accuracy_Get
|
|
2308
|
-
func whatsapp_Location_Accuracy_Get(handle CGoHandle) C.longlong {
|
|
2309
|
-
op := ptrFromHandle_whatsapp_Location(handle)
|
|
2310
|
-
return C.longlong(op.Accuracy)
|
|
2311
|
-
}
|
|
2312
|
-
|
|
2313
|
-
//export whatsapp_Location_Accuracy_Set
|
|
2314
|
-
func whatsapp_Location_Accuracy_Set(handle CGoHandle, val C.longlong) {
|
|
2315
|
-
op := ptrFromHandle_whatsapp_Location(handle)
|
|
2316
|
-
op.Accuracy = int(val)
|
|
2187
|
+
//export whatsapp_GroupParticipant_CTor
|
|
2188
|
+
func whatsapp_GroupParticipant_CTor() CGoHandle {
|
|
2189
|
+
return CGoHandle(handleFromPtr_whatsapp_GroupParticipant(&whatsapp.GroupParticipant{}))
|
|
2317
2190
|
}
|
|
2318
2191
|
|
|
2319
|
-
//export
|
|
2320
|
-
func
|
|
2321
|
-
op :=
|
|
2322
|
-
return
|
|
2192
|
+
//export whatsapp_GroupParticipant_JID_Get
|
|
2193
|
+
func whatsapp_GroupParticipant_JID_Get(handle CGoHandle) *C.char {
|
|
2194
|
+
op := ptrFromHandle_whatsapp_GroupParticipant(handle)
|
|
2195
|
+
return C.CString(op.JID)
|
|
2323
2196
|
}
|
|
2324
2197
|
|
|
2325
|
-
//export
|
|
2326
|
-
func
|
|
2327
|
-
op :=
|
|
2328
|
-
op.
|
|
2198
|
+
//export whatsapp_GroupParticipant_JID_Set
|
|
2199
|
+
func whatsapp_GroupParticipant_JID_Set(handle CGoHandle, val *C.char) {
|
|
2200
|
+
op := ptrFromHandle_whatsapp_GroupParticipant(handle)
|
|
2201
|
+
op.JID = C.GoString(val)
|
|
2329
2202
|
}
|
|
2330
2203
|
|
|
2331
|
-
//export
|
|
2332
|
-
func
|
|
2333
|
-
op :=
|
|
2334
|
-
return C.CString(op.
|
|
2204
|
+
//export whatsapp_GroupParticipant_Nickname_Get
|
|
2205
|
+
func whatsapp_GroupParticipant_Nickname_Get(handle CGoHandle) *C.char {
|
|
2206
|
+
op := ptrFromHandle_whatsapp_GroupParticipant(handle)
|
|
2207
|
+
return C.CString(op.Nickname)
|
|
2335
2208
|
}
|
|
2336
2209
|
|
|
2337
|
-
//export
|
|
2338
|
-
func
|
|
2339
|
-
op :=
|
|
2340
|
-
op.
|
|
2210
|
+
//export whatsapp_GroupParticipant_Nickname_Set
|
|
2211
|
+
func whatsapp_GroupParticipant_Nickname_Set(handle CGoHandle, val *C.char) {
|
|
2212
|
+
op := ptrFromHandle_whatsapp_GroupParticipant(handle)
|
|
2213
|
+
op.Nickname = C.GoString(val)
|
|
2341
2214
|
}
|
|
2342
2215
|
|
|
2343
|
-
//export
|
|
2344
|
-
func
|
|
2345
|
-
op :=
|
|
2346
|
-
return C.
|
|
2216
|
+
//export whatsapp_GroupParticipant_Affiliation_Get
|
|
2217
|
+
func whatsapp_GroupParticipant_Affiliation_Get(handle CGoHandle) C.longlong {
|
|
2218
|
+
op := ptrFromHandle_whatsapp_GroupParticipant(handle)
|
|
2219
|
+
return C.longlong(int(op.Affiliation))
|
|
2347
2220
|
}
|
|
2348
2221
|
|
|
2349
|
-
//export
|
|
2350
|
-
func
|
|
2351
|
-
op :=
|
|
2352
|
-
op.
|
|
2222
|
+
//export whatsapp_GroupParticipant_Affiliation_Set
|
|
2223
|
+
func whatsapp_GroupParticipant_Affiliation_Set(handle CGoHandle, val C.longlong) {
|
|
2224
|
+
op := ptrFromHandle_whatsapp_GroupParticipant(handle)
|
|
2225
|
+
op.Affiliation = whatsapp.GroupAffiliation(int(val))
|
|
2353
2226
|
}
|
|
2354
2227
|
|
|
2355
|
-
//export
|
|
2356
|
-
func
|
|
2357
|
-
op :=
|
|
2358
|
-
return C.
|
|
2228
|
+
//export whatsapp_GroupParticipant_Action_Get
|
|
2229
|
+
func whatsapp_GroupParticipant_Action_Get(handle CGoHandle) C.longlong {
|
|
2230
|
+
op := ptrFromHandle_whatsapp_GroupParticipant(handle)
|
|
2231
|
+
return C.longlong(int(op.Action))
|
|
2359
2232
|
}
|
|
2360
2233
|
|
|
2361
|
-
//export
|
|
2362
|
-
func
|
|
2363
|
-
op :=
|
|
2364
|
-
op.
|
|
2234
|
+
//export whatsapp_GroupParticipant_Action_Set
|
|
2235
|
+
func whatsapp_GroupParticipant_Action_Set(handle CGoHandle, val C.longlong) {
|
|
2236
|
+
op := ptrFromHandle_whatsapp_GroupParticipant(handle)
|
|
2237
|
+
op.Action = whatsapp.GroupParticipantAction(int(val))
|
|
2365
2238
|
}
|
|
2366
2239
|
|
|
2367
2240
|
// --- wrapping struct: whatsapp.LoggedOut ---
|
|
@@ -2433,71 +2306,152 @@ func whatsapp_PollOption_Title_Set(handle CGoHandle, val *C.char) {
|
|
|
2433
2306
|
op.Title = C.GoString(val)
|
|
2434
2307
|
}
|
|
2435
2308
|
|
|
2436
|
-
// --- wrapping struct: whatsapp.
|
|
2309
|
+
// --- wrapping struct: whatsapp.Attachment ---
|
|
2437
2310
|
//
|
|
2438
|
-
//export
|
|
2439
|
-
func
|
|
2440
|
-
return CGoHandle(
|
|
2311
|
+
//export whatsapp_Attachment_CTor
|
|
2312
|
+
func whatsapp_Attachment_CTor() CGoHandle {
|
|
2313
|
+
return CGoHandle(handleFromPtr_whatsapp_Attachment(&whatsapp.Attachment{}))
|
|
2441
2314
|
}
|
|
2442
2315
|
|
|
2443
|
-
//export
|
|
2444
|
-
func
|
|
2445
|
-
op :=
|
|
2446
|
-
return C.
|
|
2316
|
+
//export whatsapp_Attachment_MIME_Get
|
|
2317
|
+
func whatsapp_Attachment_MIME_Get(handle CGoHandle) *C.char {
|
|
2318
|
+
op := ptrFromHandle_whatsapp_Attachment(handle)
|
|
2319
|
+
return C.CString(op.MIME)
|
|
2447
2320
|
}
|
|
2448
2321
|
|
|
2449
|
-
//export
|
|
2450
|
-
func
|
|
2451
|
-
op :=
|
|
2452
|
-
op.
|
|
2322
|
+
//export whatsapp_Attachment_MIME_Set
|
|
2323
|
+
func whatsapp_Attachment_MIME_Set(handle CGoHandle, val *C.char) {
|
|
2324
|
+
op := ptrFromHandle_whatsapp_Attachment(handle)
|
|
2325
|
+
op.MIME = C.GoString(val)
|
|
2453
2326
|
}
|
|
2454
2327
|
|
|
2455
|
-
//export
|
|
2456
|
-
func
|
|
2457
|
-
op :=
|
|
2458
|
-
return C.CString(op.
|
|
2328
|
+
//export whatsapp_Attachment_Filename_Get
|
|
2329
|
+
func whatsapp_Attachment_Filename_Get(handle CGoHandle) *C.char {
|
|
2330
|
+
op := ptrFromHandle_whatsapp_Attachment(handle)
|
|
2331
|
+
return C.CString(op.Filename)
|
|
2459
2332
|
}
|
|
2460
2333
|
|
|
2461
|
-
//export
|
|
2462
|
-
func
|
|
2463
|
-
op :=
|
|
2464
|
-
op.
|
|
2334
|
+
//export whatsapp_Attachment_Filename_Set
|
|
2335
|
+
func whatsapp_Attachment_Filename_Set(handle CGoHandle, val *C.char) {
|
|
2336
|
+
op := ptrFromHandle_whatsapp_Attachment(handle)
|
|
2337
|
+
op.Filename = C.GoString(val)
|
|
2465
2338
|
}
|
|
2466
2339
|
|
|
2467
|
-
//export
|
|
2468
|
-
func
|
|
2469
|
-
op :=
|
|
2470
|
-
return C.CString(op.
|
|
2340
|
+
//export whatsapp_Attachment_Caption_Get
|
|
2341
|
+
func whatsapp_Attachment_Caption_Get(handle CGoHandle) *C.char {
|
|
2342
|
+
op := ptrFromHandle_whatsapp_Attachment(handle)
|
|
2343
|
+
return C.CString(op.Caption)
|
|
2471
2344
|
}
|
|
2472
2345
|
|
|
2473
|
-
//export
|
|
2474
|
-
func
|
|
2475
|
-
op :=
|
|
2476
|
-
op.
|
|
2346
|
+
//export whatsapp_Attachment_Caption_Set
|
|
2347
|
+
func whatsapp_Attachment_Caption_Set(handle CGoHandle, val *C.char) {
|
|
2348
|
+
op := ptrFromHandle_whatsapp_Attachment(handle)
|
|
2349
|
+
op.Caption = C.GoString(val)
|
|
2477
2350
|
}
|
|
2478
2351
|
|
|
2479
|
-
//export
|
|
2480
|
-
func
|
|
2481
|
-
op :=
|
|
2482
|
-
return
|
|
2352
|
+
//export whatsapp_Attachment_Data_Get
|
|
2353
|
+
func whatsapp_Attachment_Data_Get(handle CGoHandle) CGoHandle {
|
|
2354
|
+
op := ptrFromHandle_whatsapp_Attachment(handle)
|
|
2355
|
+
return handleFromPtr_Slice_byte(&op.Data)
|
|
2483
2356
|
}
|
|
2484
2357
|
|
|
2485
|
-
//export
|
|
2486
|
-
func
|
|
2487
|
-
op :=
|
|
2488
|
-
op.
|
|
2358
|
+
//export whatsapp_Attachment_Data_Set
|
|
2359
|
+
func whatsapp_Attachment_Data_Set(handle CGoHandle, val CGoHandle) {
|
|
2360
|
+
op := ptrFromHandle_whatsapp_Attachment(handle)
|
|
2361
|
+
op.Data = deptrFromHandle_Slice_byte(val)
|
|
2489
2362
|
}
|
|
2490
2363
|
|
|
2491
|
-
//export
|
|
2492
|
-
func
|
|
2493
|
-
|
|
2494
|
-
|
|
2364
|
+
//export whatsapp_Attachment_GetSpec
|
|
2365
|
+
func whatsapp_Attachment_GetSpec(_handle CGoHandle, ctx CGoHandle) CGoHandle {
|
|
2366
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
2367
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Attachment")
|
|
2368
|
+
if __err != nil {
|
|
2369
|
+
return handleFromPtr_Ptr_media_Spec(nil)
|
|
2370
|
+
}
|
|
2371
|
+
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Attachment{})).(*whatsapp.Attachment).GetSpec(ptrFromHandle_context_Context(ctx))
|
|
2372
|
+
|
|
2373
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
2374
|
+
if __err != nil {
|
|
2375
|
+
estr := C.CString(__err.Error())
|
|
2376
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
2377
|
+
C.free(unsafe.Pointer(estr))
|
|
2378
|
+
return handleFromPtr_Ptr_media_Spec(nil)
|
|
2379
|
+
}
|
|
2380
|
+
return handleFromPtr_Ptr_media_Spec(cret)
|
|
2495
2381
|
}
|
|
2496
2382
|
|
|
2497
|
-
//
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2383
|
+
// --- wrapping struct: whatsapp.Contact ---
|
|
2384
|
+
//
|
|
2385
|
+
//export whatsapp_Contact_CTor
|
|
2386
|
+
func whatsapp_Contact_CTor() CGoHandle {
|
|
2387
|
+
return CGoHandle(handleFromPtr_whatsapp_Contact(&whatsapp.Contact{}))
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
//export whatsapp_Contact_JID_Get
|
|
2391
|
+
func whatsapp_Contact_JID_Get(handle CGoHandle) *C.char {
|
|
2392
|
+
op := ptrFromHandle_whatsapp_Contact(handle)
|
|
2393
|
+
return C.CString(op.JID)
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
//export whatsapp_Contact_JID_Set
|
|
2397
|
+
func whatsapp_Contact_JID_Set(handle CGoHandle, val *C.char) {
|
|
2398
|
+
op := ptrFromHandle_whatsapp_Contact(handle)
|
|
2399
|
+
op.JID = C.GoString(val)
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
//export whatsapp_Contact_Name_Get
|
|
2403
|
+
func whatsapp_Contact_Name_Get(handle CGoHandle) *C.char {
|
|
2404
|
+
op := ptrFromHandle_whatsapp_Contact(handle)
|
|
2405
|
+
return C.CString(op.Name)
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2408
|
+
//export whatsapp_Contact_Name_Set
|
|
2409
|
+
func whatsapp_Contact_Name_Set(handle CGoHandle, val *C.char) {
|
|
2410
|
+
op := ptrFromHandle_whatsapp_Contact(handle)
|
|
2411
|
+
op.Name = C.GoString(val)
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
// --- wrapping struct: whatsapp.Presence ---
|
|
2415
|
+
//
|
|
2416
|
+
//export whatsapp_Presence_CTor
|
|
2417
|
+
func whatsapp_Presence_CTor() CGoHandle {
|
|
2418
|
+
return CGoHandle(handleFromPtr_whatsapp_Presence(&whatsapp.Presence{}))
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2421
|
+
//export whatsapp_Presence_JID_Get
|
|
2422
|
+
func whatsapp_Presence_JID_Get(handle CGoHandle) *C.char {
|
|
2423
|
+
op := ptrFromHandle_whatsapp_Presence(handle)
|
|
2424
|
+
return C.CString(op.JID)
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
//export whatsapp_Presence_JID_Set
|
|
2428
|
+
func whatsapp_Presence_JID_Set(handle CGoHandle, val *C.char) {
|
|
2429
|
+
op := ptrFromHandle_whatsapp_Presence(handle)
|
|
2430
|
+
op.JID = C.GoString(val)
|
|
2431
|
+
}
|
|
2432
|
+
|
|
2433
|
+
//export whatsapp_Presence_Kind_Get
|
|
2434
|
+
func whatsapp_Presence_Kind_Get(handle CGoHandle) C.longlong {
|
|
2435
|
+
op := ptrFromHandle_whatsapp_Presence(handle)
|
|
2436
|
+
return C.longlong(int(op.Kind))
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
//export whatsapp_Presence_Kind_Set
|
|
2440
|
+
func whatsapp_Presence_Kind_Set(handle CGoHandle, val C.longlong) {
|
|
2441
|
+
op := ptrFromHandle_whatsapp_Presence(handle)
|
|
2442
|
+
op.Kind = whatsapp.PresenceKind(int(val))
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
//export whatsapp_Presence_LastSeen_Get
|
|
2446
|
+
func whatsapp_Presence_LastSeen_Get(handle CGoHandle) C.longlong {
|
|
2447
|
+
op := ptrFromHandle_whatsapp_Presence(handle)
|
|
2448
|
+
return C.longlong(op.LastSeen)
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
//export whatsapp_Presence_LastSeen_Set
|
|
2452
|
+
func whatsapp_Presence_LastSeen_Set(handle CGoHandle, val C.longlong) {
|
|
2453
|
+
op := ptrFromHandle_whatsapp_Presence(handle)
|
|
2454
|
+
op.LastSeen = int64(val)
|
|
2501
2455
|
}
|
|
2502
2456
|
|
|
2503
2457
|
// --- wrapping struct: whatsapp.Receipt ---
|
|
@@ -2579,463 +2533,355 @@ func whatsapp_Receipt_IsCarbon_Set(handle CGoHandle, val C.char) {
|
|
|
2579
2533
|
op.IsCarbon = boolPyToGo(val)
|
|
2580
2534
|
}
|
|
2581
2535
|
|
|
2582
|
-
// --- wrapping struct: whatsapp.
|
|
2536
|
+
// --- wrapping struct: whatsapp.Album ---
|
|
2583
2537
|
//
|
|
2584
|
-
//export
|
|
2585
|
-
func
|
|
2586
|
-
return CGoHandle(
|
|
2587
|
-
}
|
|
2588
|
-
|
|
2589
|
-
//export whatsapp_GroupParticipant_JID_Get
|
|
2590
|
-
func whatsapp_GroupParticipant_JID_Get(handle CGoHandle) *C.char {
|
|
2591
|
-
op := ptrFromHandle_whatsapp_GroupParticipant(handle)
|
|
2592
|
-
return C.CString(op.JID)
|
|
2538
|
+
//export whatsapp_Album_CTor
|
|
2539
|
+
func whatsapp_Album_CTor() CGoHandle {
|
|
2540
|
+
return CGoHandle(handleFromPtr_whatsapp_Album(&whatsapp.Album{}))
|
|
2593
2541
|
}
|
|
2594
2542
|
|
|
2595
|
-
//export
|
|
2596
|
-
func
|
|
2597
|
-
op :=
|
|
2598
|
-
op.
|
|
2543
|
+
//export whatsapp_Album_IsAlbum_Get
|
|
2544
|
+
func whatsapp_Album_IsAlbum_Get(handle CGoHandle) C.char {
|
|
2545
|
+
op := ptrFromHandle_whatsapp_Album(handle)
|
|
2546
|
+
return boolGoToPy(op.IsAlbum)
|
|
2599
2547
|
}
|
|
2600
2548
|
|
|
2601
|
-
//export
|
|
2602
|
-
func
|
|
2603
|
-
op :=
|
|
2604
|
-
|
|
2549
|
+
//export whatsapp_Album_IsAlbum_Set
|
|
2550
|
+
func whatsapp_Album_IsAlbum_Set(handle CGoHandle, val C.char) {
|
|
2551
|
+
op := ptrFromHandle_whatsapp_Album(handle)
|
|
2552
|
+
op.IsAlbum = boolPyToGo(val)
|
|
2605
2553
|
}
|
|
2606
2554
|
|
|
2607
|
-
//export
|
|
2608
|
-
func
|
|
2609
|
-
op :=
|
|
2610
|
-
|
|
2555
|
+
//export whatsapp_Album_ImageCount_Get
|
|
2556
|
+
func whatsapp_Album_ImageCount_Get(handle CGoHandle) C.longlong {
|
|
2557
|
+
op := ptrFromHandle_whatsapp_Album(handle)
|
|
2558
|
+
return C.longlong(op.ImageCount)
|
|
2611
2559
|
}
|
|
2612
2560
|
|
|
2613
|
-
//export
|
|
2614
|
-
func
|
|
2615
|
-
op :=
|
|
2616
|
-
|
|
2561
|
+
//export whatsapp_Album_ImageCount_Set
|
|
2562
|
+
func whatsapp_Album_ImageCount_Set(handle CGoHandle, val C.longlong) {
|
|
2563
|
+
op := ptrFromHandle_whatsapp_Album(handle)
|
|
2564
|
+
op.ImageCount = int(val)
|
|
2617
2565
|
}
|
|
2618
2566
|
|
|
2619
|
-
//export
|
|
2620
|
-
func
|
|
2621
|
-
op :=
|
|
2622
|
-
|
|
2567
|
+
//export whatsapp_Album_VideoCount_Get
|
|
2568
|
+
func whatsapp_Album_VideoCount_Get(handle CGoHandle) C.longlong {
|
|
2569
|
+
op := ptrFromHandle_whatsapp_Album(handle)
|
|
2570
|
+
return C.longlong(op.VideoCount)
|
|
2623
2571
|
}
|
|
2624
2572
|
|
|
2625
|
-
//export
|
|
2626
|
-
func
|
|
2627
|
-
op :=
|
|
2628
|
-
|
|
2573
|
+
//export whatsapp_Album_VideoCount_Set
|
|
2574
|
+
func whatsapp_Album_VideoCount_Set(handle CGoHandle, val C.longlong) {
|
|
2575
|
+
op := ptrFromHandle_whatsapp_Album(handle)
|
|
2576
|
+
op.VideoCount = int(val)
|
|
2629
2577
|
}
|
|
2630
2578
|
|
|
2631
|
-
//
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2579
|
+
// --- wrapping struct: whatsapp.Avatar ---
|
|
2580
|
+
//
|
|
2581
|
+
//export whatsapp_Avatar_CTor
|
|
2582
|
+
func whatsapp_Avatar_CTor() CGoHandle {
|
|
2583
|
+
return CGoHandle(handleFromPtr_whatsapp_Avatar(&whatsapp.Avatar{}))
|
|
2635
2584
|
}
|
|
2636
2585
|
|
|
2637
|
-
//
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
return CGoHandle(handleFromPtr_whatsapp_Presence(&whatsapp.Presence{}))
|
|
2586
|
+
//export whatsapp_Avatar_ID_Get
|
|
2587
|
+
func whatsapp_Avatar_ID_Get(handle CGoHandle) *C.char {
|
|
2588
|
+
op := ptrFromHandle_whatsapp_Avatar(handle)
|
|
2589
|
+
return C.CString(op.ID)
|
|
2642
2590
|
}
|
|
2643
2591
|
|
|
2644
|
-
//export
|
|
2645
|
-
func
|
|
2646
|
-
op :=
|
|
2647
|
-
|
|
2592
|
+
//export whatsapp_Avatar_ID_Set
|
|
2593
|
+
func whatsapp_Avatar_ID_Set(handle CGoHandle, val *C.char) {
|
|
2594
|
+
op := ptrFromHandle_whatsapp_Avatar(handle)
|
|
2595
|
+
op.ID = C.GoString(val)
|
|
2648
2596
|
}
|
|
2649
2597
|
|
|
2650
|
-
//export
|
|
2651
|
-
func
|
|
2652
|
-
op :=
|
|
2653
|
-
|
|
2598
|
+
//export whatsapp_Avatar_URL_Get
|
|
2599
|
+
func whatsapp_Avatar_URL_Get(handle CGoHandle) *C.char {
|
|
2600
|
+
op := ptrFromHandle_whatsapp_Avatar(handle)
|
|
2601
|
+
return C.CString(op.URL)
|
|
2654
2602
|
}
|
|
2655
2603
|
|
|
2656
|
-
//export
|
|
2657
|
-
func
|
|
2658
|
-
op :=
|
|
2659
|
-
|
|
2604
|
+
//export whatsapp_Avatar_URL_Set
|
|
2605
|
+
func whatsapp_Avatar_URL_Set(handle CGoHandle, val *C.char) {
|
|
2606
|
+
op := ptrFromHandle_whatsapp_Avatar(handle)
|
|
2607
|
+
op.URL = C.GoString(val)
|
|
2660
2608
|
}
|
|
2661
2609
|
|
|
2662
|
-
//
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2610
|
+
// --- wrapping struct: whatsapp.Call ---
|
|
2611
|
+
//
|
|
2612
|
+
//export whatsapp_Call_CTor
|
|
2613
|
+
func whatsapp_Call_CTor() CGoHandle {
|
|
2614
|
+
return CGoHandle(handleFromPtr_whatsapp_Call(&whatsapp.Call{}))
|
|
2666
2615
|
}
|
|
2667
2616
|
|
|
2668
|
-
//export
|
|
2669
|
-
func
|
|
2670
|
-
op :=
|
|
2671
|
-
return C.longlong(op.
|
|
2617
|
+
//export whatsapp_Call_State_Get
|
|
2618
|
+
func whatsapp_Call_State_Get(handle CGoHandle) C.longlong {
|
|
2619
|
+
op := ptrFromHandle_whatsapp_Call(handle)
|
|
2620
|
+
return C.longlong(int(op.State))
|
|
2672
2621
|
}
|
|
2673
2622
|
|
|
2674
|
-
//export
|
|
2675
|
-
func
|
|
2676
|
-
op :=
|
|
2677
|
-
op.
|
|
2623
|
+
//export whatsapp_Call_State_Set
|
|
2624
|
+
func whatsapp_Call_State_Set(handle CGoHandle, val C.longlong) {
|
|
2625
|
+
op := ptrFromHandle_whatsapp_Call(handle)
|
|
2626
|
+
op.State = whatsapp.CallState(int(val))
|
|
2678
2627
|
}
|
|
2679
2628
|
|
|
2680
|
-
//
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
return CGoHandle(handleFromPtr_whatsapp_Session(&whatsapp.Session{}))
|
|
2629
|
+
//export whatsapp_Call_JID_Get
|
|
2630
|
+
func whatsapp_Call_JID_Get(handle CGoHandle) *C.char {
|
|
2631
|
+
op := ptrFromHandle_whatsapp_Call(handle)
|
|
2632
|
+
return C.CString(op.JID)
|
|
2685
2633
|
}
|
|
2686
2634
|
|
|
2687
|
-
//export
|
|
2688
|
-
func
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
if __err != nil {
|
|
2692
|
-
return errorGoToPy(nil)
|
|
2693
|
-
}
|
|
2694
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).Login()
|
|
2695
|
-
|
|
2696
|
-
C.PyEval_RestoreThread(_saved_thread)
|
|
2697
|
-
if __err != nil {
|
|
2698
|
-
estr := C.CString(__err.Error())
|
|
2699
|
-
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
2700
|
-
return estr
|
|
2701
|
-
}
|
|
2702
|
-
return C.CString("")
|
|
2635
|
+
//export whatsapp_Call_JID_Set
|
|
2636
|
+
func whatsapp_Call_JID_Set(handle CGoHandle, val *C.char) {
|
|
2637
|
+
op := ptrFromHandle_whatsapp_Call(handle)
|
|
2638
|
+
op.JID = C.GoString(val)
|
|
2703
2639
|
}
|
|
2704
2640
|
|
|
2705
|
-
//export
|
|
2706
|
-
func
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
if __err != nil {
|
|
2710
|
-
return errorGoToPy(nil)
|
|
2711
|
-
}
|
|
2712
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).Logout()
|
|
2713
|
-
|
|
2714
|
-
C.PyEval_RestoreThread(_saved_thread)
|
|
2715
|
-
if __err != nil {
|
|
2716
|
-
estr := C.CString(__err.Error())
|
|
2717
|
-
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
2718
|
-
return estr
|
|
2719
|
-
}
|
|
2720
|
-
return C.CString("")
|
|
2641
|
+
//export whatsapp_Call_Timestamp_Get
|
|
2642
|
+
func whatsapp_Call_Timestamp_Get(handle CGoHandle) C.longlong {
|
|
2643
|
+
op := ptrFromHandle_whatsapp_Call(handle)
|
|
2644
|
+
return C.longlong(op.Timestamp)
|
|
2721
2645
|
}
|
|
2722
2646
|
|
|
2723
|
-
//export
|
|
2724
|
-
func
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
return errorGoToPy(nil)
|
|
2729
|
-
}
|
|
2730
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).Disconnect()
|
|
2647
|
+
//export whatsapp_Call_Timestamp_Set
|
|
2648
|
+
func whatsapp_Call_Timestamp_Set(handle CGoHandle, val C.longlong) {
|
|
2649
|
+
op := ptrFromHandle_whatsapp_Call(handle)
|
|
2650
|
+
op.Timestamp = int64(val)
|
|
2651
|
+
}
|
|
2731
2652
|
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
}
|
|
2738
|
-
return C.CString("")
|
|
2653
|
+
// --- wrapping struct: whatsapp.EventPayload ---
|
|
2654
|
+
//
|
|
2655
|
+
//export whatsapp_EventPayload_CTor
|
|
2656
|
+
func whatsapp_EventPayload_CTor() CGoHandle {
|
|
2657
|
+
return CGoHandle(handleFromPtr_whatsapp_EventPayload(&whatsapp.EventPayload{}))
|
|
2739
2658
|
}
|
|
2740
2659
|
|
|
2741
|
-
//export
|
|
2742
|
-
func
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
return C.CString("")
|
|
2747
|
-
}
|
|
2748
|
-
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).PairPhone(C.GoString(phone))
|
|
2660
|
+
//export whatsapp_EventPayload_QRCode_Get
|
|
2661
|
+
func whatsapp_EventPayload_QRCode_Get(handle CGoHandle) *C.char {
|
|
2662
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2663
|
+
return C.CString(op.QRCode)
|
|
2664
|
+
}
|
|
2749
2665
|
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
C.free(unsafe.Pointer(estr))
|
|
2755
|
-
return C.CString("")
|
|
2756
|
-
}
|
|
2757
|
-
return C.CString(cret)
|
|
2666
|
+
//export whatsapp_EventPayload_QRCode_Set
|
|
2667
|
+
func whatsapp_EventPayload_QRCode_Set(handle CGoHandle, val *C.char) {
|
|
2668
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2669
|
+
op.QRCode = C.GoString(val)
|
|
2758
2670
|
}
|
|
2759
2671
|
|
|
2760
|
-
//export
|
|
2761
|
-
func
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
return errorGoToPy(nil)
|
|
2766
|
-
}
|
|
2767
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SendMessage(*ptrFromHandle_whatsapp_Message(message))
|
|
2672
|
+
//export whatsapp_EventPayload_PairDeviceID_Get
|
|
2673
|
+
func whatsapp_EventPayload_PairDeviceID_Get(handle CGoHandle) *C.char {
|
|
2674
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2675
|
+
return C.CString(op.PairDeviceID)
|
|
2676
|
+
}
|
|
2768
2677
|
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
return estr
|
|
2774
|
-
}
|
|
2775
|
-
return C.CString("")
|
|
2678
|
+
//export whatsapp_EventPayload_PairDeviceID_Set
|
|
2679
|
+
func whatsapp_EventPayload_PairDeviceID_Set(handle CGoHandle, val *C.char) {
|
|
2680
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2681
|
+
op.PairDeviceID = C.GoString(val)
|
|
2776
2682
|
}
|
|
2777
2683
|
|
|
2778
|
-
//export
|
|
2779
|
-
func
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
if __err != nil {
|
|
2784
|
-
return C.CString("")
|
|
2785
|
-
}
|
|
2786
|
-
return C.CString(gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).GenerateMessageID())
|
|
2684
|
+
//export whatsapp_EventPayload_Connect_Get
|
|
2685
|
+
func whatsapp_EventPayload_Connect_Get(handle CGoHandle) CGoHandle {
|
|
2686
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2687
|
+
return handleFromPtr_whatsapp_Connect(&op.Connect)
|
|
2688
|
+
}
|
|
2787
2689
|
|
|
2690
|
+
//export whatsapp_EventPayload_Connect_Set
|
|
2691
|
+
func whatsapp_EventPayload_Connect_Set(handle CGoHandle, val CGoHandle) {
|
|
2692
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2693
|
+
op.Connect = *ptrFromHandle_whatsapp_Connect(val)
|
|
2788
2694
|
}
|
|
2789
2695
|
|
|
2790
|
-
//export
|
|
2791
|
-
func
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
return errorGoToPy(nil)
|
|
2796
|
-
}
|
|
2797
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SendChatState(*ptrFromHandle_whatsapp_ChatState(state))
|
|
2696
|
+
//export whatsapp_EventPayload_LoggedOut_Get
|
|
2697
|
+
func whatsapp_EventPayload_LoggedOut_Get(handle CGoHandle) CGoHandle {
|
|
2698
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2699
|
+
return handleFromPtr_whatsapp_LoggedOut(&op.LoggedOut)
|
|
2700
|
+
}
|
|
2798
2701
|
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
return estr
|
|
2804
|
-
}
|
|
2805
|
-
return C.CString("")
|
|
2702
|
+
//export whatsapp_EventPayload_LoggedOut_Set
|
|
2703
|
+
func whatsapp_EventPayload_LoggedOut_Set(handle CGoHandle, val CGoHandle) {
|
|
2704
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2705
|
+
op.LoggedOut = *ptrFromHandle_whatsapp_LoggedOut(val)
|
|
2806
2706
|
}
|
|
2807
2707
|
|
|
2808
|
-
//export
|
|
2809
|
-
func
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
return errorGoToPy(nil)
|
|
2814
|
-
}
|
|
2815
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SendReceipt(*ptrFromHandle_whatsapp_Receipt(receipt))
|
|
2708
|
+
//export whatsapp_EventPayload_Contact_Get
|
|
2709
|
+
func whatsapp_EventPayload_Contact_Get(handle CGoHandle) CGoHandle {
|
|
2710
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2711
|
+
return handleFromPtr_whatsapp_Contact(&op.Contact)
|
|
2712
|
+
}
|
|
2816
2713
|
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
return estr
|
|
2822
|
-
}
|
|
2823
|
-
return C.CString("")
|
|
2714
|
+
//export whatsapp_EventPayload_Contact_Set
|
|
2715
|
+
func whatsapp_EventPayload_Contact_Set(handle CGoHandle, val CGoHandle) {
|
|
2716
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2717
|
+
op.Contact = *ptrFromHandle_whatsapp_Contact(val)
|
|
2824
2718
|
}
|
|
2825
2719
|
|
|
2826
|
-
//export
|
|
2827
|
-
func
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
return errorGoToPy(nil)
|
|
2832
|
-
}
|
|
2833
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SendPresence(whatsapp.PresenceKind(int(presence)), C.GoString(statusMessage))
|
|
2720
|
+
//export whatsapp_EventPayload_Presence_Get
|
|
2721
|
+
func whatsapp_EventPayload_Presence_Get(handle CGoHandle) CGoHandle {
|
|
2722
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2723
|
+
return handleFromPtr_whatsapp_Presence(&op.Presence)
|
|
2724
|
+
}
|
|
2834
2725
|
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
return estr
|
|
2840
|
-
}
|
|
2841
|
-
return C.CString("")
|
|
2726
|
+
//export whatsapp_EventPayload_Presence_Set
|
|
2727
|
+
func whatsapp_EventPayload_Presence_Set(handle CGoHandle, val CGoHandle) {
|
|
2728
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2729
|
+
op.Presence = *ptrFromHandle_whatsapp_Presence(val)
|
|
2842
2730
|
}
|
|
2843
2731
|
|
|
2844
|
-
//export
|
|
2845
|
-
func
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
return handleFromPtr_Slice_whatsapp_Contact(nil)
|
|
2850
|
-
}
|
|
2851
|
-
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).GetContacts(boolPyToGo(refresh))
|
|
2732
|
+
//export whatsapp_EventPayload_Message_Get
|
|
2733
|
+
func whatsapp_EventPayload_Message_Get(handle CGoHandle) CGoHandle {
|
|
2734
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2735
|
+
return handleFromPtr_whatsapp_Message(&op.Message)
|
|
2736
|
+
}
|
|
2852
2737
|
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
C.free(unsafe.Pointer(estr))
|
|
2858
|
-
return handleFromPtr_Slice_whatsapp_Contact(nil)
|
|
2859
|
-
}
|
|
2860
|
-
return handleFromPtr_Slice_whatsapp_Contact(&cret)
|
|
2738
|
+
//export whatsapp_EventPayload_Message_Set
|
|
2739
|
+
func whatsapp_EventPayload_Message_Set(handle CGoHandle, val CGoHandle) {
|
|
2740
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2741
|
+
op.Message = *ptrFromHandle_whatsapp_Message(val)
|
|
2861
2742
|
}
|
|
2862
2743
|
|
|
2863
|
-
//export
|
|
2864
|
-
func
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
return handleFromPtr_Slice_whatsapp_Group(nil)
|
|
2869
|
-
}
|
|
2870
|
-
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).GetGroups()
|
|
2744
|
+
//export whatsapp_EventPayload_ChatState_Get
|
|
2745
|
+
func whatsapp_EventPayload_ChatState_Get(handle CGoHandle) CGoHandle {
|
|
2746
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2747
|
+
return handleFromPtr_whatsapp_ChatState(&op.ChatState)
|
|
2748
|
+
}
|
|
2871
2749
|
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
C.free(unsafe.Pointer(estr))
|
|
2877
|
-
return handleFromPtr_Slice_whatsapp_Group(nil)
|
|
2878
|
-
}
|
|
2879
|
-
return handleFromPtr_Slice_whatsapp_Group(&cret)
|
|
2750
|
+
//export whatsapp_EventPayload_ChatState_Set
|
|
2751
|
+
func whatsapp_EventPayload_ChatState_Set(handle CGoHandle, val CGoHandle) {
|
|
2752
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2753
|
+
op.ChatState = *ptrFromHandle_whatsapp_ChatState(val)
|
|
2880
2754
|
}
|
|
2881
2755
|
|
|
2882
|
-
//export
|
|
2883
|
-
func
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
return handleFromPtr_whatsapp_Group(nil)
|
|
2888
|
-
}
|
|
2889
|
-
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).CreateGroup(C.GoString(name), deptrFromHandle_Slice_string(participants))
|
|
2756
|
+
//export whatsapp_EventPayload_Receipt_Get
|
|
2757
|
+
func whatsapp_EventPayload_Receipt_Get(handle CGoHandle) CGoHandle {
|
|
2758
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2759
|
+
return handleFromPtr_whatsapp_Receipt(&op.Receipt)
|
|
2760
|
+
}
|
|
2890
2761
|
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
C.free(unsafe.Pointer(estr))
|
|
2896
|
-
return handleFromPtr_whatsapp_Group(nil)
|
|
2897
|
-
}
|
|
2898
|
-
return handleFromPtr_whatsapp_Group(&cret)
|
|
2762
|
+
//export whatsapp_EventPayload_Receipt_Set
|
|
2763
|
+
func whatsapp_EventPayload_Receipt_Set(handle CGoHandle, val CGoHandle) {
|
|
2764
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2765
|
+
op.Receipt = *ptrFromHandle_whatsapp_Receipt(val)
|
|
2899
2766
|
}
|
|
2900
2767
|
|
|
2901
|
-
//export
|
|
2902
|
-
func
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
return errorGoToPy(nil)
|
|
2907
|
-
}
|
|
2908
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).LeaveGroup(C.GoString(resourceID))
|
|
2768
|
+
//export whatsapp_EventPayload_Group_Get
|
|
2769
|
+
func whatsapp_EventPayload_Group_Get(handle CGoHandle) CGoHandle {
|
|
2770
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2771
|
+
return handleFromPtr_whatsapp_Group(&op.Group)
|
|
2772
|
+
}
|
|
2909
2773
|
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
return estr
|
|
2915
|
-
}
|
|
2916
|
-
return C.CString("")
|
|
2774
|
+
//export whatsapp_EventPayload_Group_Set
|
|
2775
|
+
func whatsapp_EventPayload_Group_Set(handle CGoHandle, val CGoHandle) {
|
|
2776
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2777
|
+
op.Group = *ptrFromHandle_whatsapp_Group(val)
|
|
2917
2778
|
}
|
|
2918
2779
|
|
|
2919
|
-
//export
|
|
2920
|
-
func
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
return handleFromPtr_whatsapp_Avatar(nil)
|
|
2925
|
-
}
|
|
2926
|
-
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).GetAvatar(C.GoString(resourceID), C.GoString(avatarID))
|
|
2780
|
+
//export whatsapp_EventPayload_Call_Get
|
|
2781
|
+
func whatsapp_EventPayload_Call_Get(handle CGoHandle) CGoHandle {
|
|
2782
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2783
|
+
return handleFromPtr_whatsapp_Call(&op.Call)
|
|
2784
|
+
}
|
|
2927
2785
|
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
C.free(unsafe.Pointer(estr))
|
|
2933
|
-
return handleFromPtr_whatsapp_Avatar(nil)
|
|
2934
|
-
}
|
|
2935
|
-
return handleFromPtr_whatsapp_Avatar(&cret)
|
|
2786
|
+
//export whatsapp_EventPayload_Call_Set
|
|
2787
|
+
func whatsapp_EventPayload_Call_Set(handle CGoHandle, val CGoHandle) {
|
|
2788
|
+
op := ptrFromHandle_whatsapp_EventPayload(handle)
|
|
2789
|
+
op.Call = *ptrFromHandle_whatsapp_Call(val)
|
|
2936
2790
|
}
|
|
2937
2791
|
|
|
2938
|
-
//
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
}
|
|
2945
|
-
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetAvatar(C.GoString(resourceID), deptrFromHandle_Slice_byte(avatar))
|
|
2792
|
+
// --- wrapping struct: whatsapp.Gateway ---
|
|
2793
|
+
//
|
|
2794
|
+
//export whatsapp_Gateway_CTor
|
|
2795
|
+
func whatsapp_Gateway_CTor() CGoHandle {
|
|
2796
|
+
return CGoHandle(handleFromPtr_whatsapp_Gateway(&whatsapp.Gateway{}))
|
|
2797
|
+
}
|
|
2946
2798
|
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
C.free(unsafe.Pointer(estr))
|
|
2952
|
-
return C.CString("")
|
|
2953
|
-
}
|
|
2954
|
-
return C.CString(cret)
|
|
2799
|
+
//export whatsapp_Gateway_DBPath_Get
|
|
2800
|
+
func whatsapp_Gateway_DBPath_Get(handle CGoHandle) *C.char {
|
|
2801
|
+
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2802
|
+
return C.CString(op.DBPath)
|
|
2955
2803
|
}
|
|
2956
2804
|
|
|
2957
|
-
//export
|
|
2958
|
-
func
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
return errorGoToPy(nil)
|
|
2963
|
-
}
|
|
2964
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetGroupName(C.GoString(resourceID), C.GoString(name))
|
|
2805
|
+
//export whatsapp_Gateway_DBPath_Set
|
|
2806
|
+
func whatsapp_Gateway_DBPath_Set(handle CGoHandle, val *C.char) {
|
|
2807
|
+
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2808
|
+
op.DBPath = C.GoString(val)
|
|
2809
|
+
}
|
|
2965
2810
|
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
return estr
|
|
2971
|
-
}
|
|
2972
|
-
return C.CString("")
|
|
2811
|
+
//export whatsapp_Gateway_Name_Get
|
|
2812
|
+
func whatsapp_Gateway_Name_Get(handle CGoHandle) *C.char {
|
|
2813
|
+
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2814
|
+
return C.CString(op.Name)
|
|
2973
2815
|
}
|
|
2974
2816
|
|
|
2975
|
-
//export
|
|
2976
|
-
func
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
return errorGoToPy(nil)
|
|
2981
|
-
}
|
|
2982
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetGroupTopic(C.GoString(resourceID), C.GoString(topic))
|
|
2817
|
+
//export whatsapp_Gateway_Name_Set
|
|
2818
|
+
func whatsapp_Gateway_Name_Set(handle CGoHandle, val *C.char) {
|
|
2819
|
+
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2820
|
+
op.Name = C.GoString(val)
|
|
2821
|
+
}
|
|
2983
2822
|
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
return estr
|
|
2989
|
-
}
|
|
2990
|
-
return C.CString("")
|
|
2823
|
+
//export whatsapp_Gateway_LogLevel_Get
|
|
2824
|
+
func whatsapp_Gateway_LogLevel_Get(handle CGoHandle) *C.char {
|
|
2825
|
+
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2826
|
+
return C.CString(op.LogLevel)
|
|
2991
2827
|
}
|
|
2992
2828
|
|
|
2993
|
-
//export
|
|
2994
|
-
func
|
|
2829
|
+
//export whatsapp_Gateway_LogLevel_Set
|
|
2830
|
+
func whatsapp_Gateway_LogLevel_Set(handle CGoHandle, val *C.char) {
|
|
2831
|
+
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2832
|
+
op.LogLevel = C.GoString(val)
|
|
2833
|
+
}
|
|
2834
|
+
|
|
2835
|
+
//export whatsapp_Gateway_TempDir_Get
|
|
2836
|
+
func whatsapp_Gateway_TempDir_Get(handle CGoHandle) *C.char {
|
|
2837
|
+
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2838
|
+
return C.CString(op.TempDir)
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2841
|
+
//export whatsapp_Gateway_TempDir_Set
|
|
2842
|
+
func whatsapp_Gateway_TempDir_Set(handle CGoHandle, val *C.char) {
|
|
2843
|
+
op := ptrFromHandle_whatsapp_Gateway(handle)
|
|
2844
|
+
op.TempDir = C.GoString(val)
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
//export whatsapp_Gateway_Init
|
|
2848
|
+
func whatsapp_Gateway_Init(_handle CGoHandle) *C.char {
|
|
2995
2849
|
_saved_thread := C.PyEval_SaveThread()
|
|
2996
|
-
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.
|
|
2850
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Gateway")
|
|
2997
2851
|
if __err != nil {
|
|
2998
|
-
return
|
|
2852
|
+
return errorGoToPy(nil)
|
|
2999
2853
|
}
|
|
3000
|
-
|
|
2854
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway).Init()
|
|
3001
2855
|
|
|
3002
2856
|
C.PyEval_RestoreThread(_saved_thread)
|
|
3003
2857
|
if __err != nil {
|
|
3004
2858
|
estr := C.CString(__err.Error())
|
|
3005
2859
|
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3006
|
-
|
|
3007
|
-
return handleFromPtr_Slice_whatsapp_GroupParticipant(nil)
|
|
2860
|
+
return estr
|
|
3008
2861
|
}
|
|
3009
|
-
return
|
|
2862
|
+
return C.CString("")
|
|
3010
2863
|
}
|
|
3011
2864
|
|
|
3012
|
-
//export
|
|
3013
|
-
func
|
|
2865
|
+
//export whatsapp_Gateway_NewSession
|
|
2866
|
+
func whatsapp_Gateway_NewSession(_handle CGoHandle, device CGoHandle) CGoHandle {
|
|
3014
2867
|
_saved_thread := C.PyEval_SaveThread()
|
|
3015
|
-
|
|
2868
|
+
defer C.PyEval_RestoreThread(_saved_thread)
|
|
2869
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Gateway")
|
|
3016
2870
|
if __err != nil {
|
|
3017
|
-
return
|
|
2871
|
+
return handleFromPtr_Ptr_whatsapp_Session(nil)
|
|
3018
2872
|
}
|
|
3019
|
-
|
|
2873
|
+
return handleFromPtr_Ptr_whatsapp_Session(gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway).NewSession(*ptrFromHandle_whatsapp_LinkedDevice(device)))
|
|
3020
2874
|
|
|
3021
|
-
C.PyEval_RestoreThread(_saved_thread)
|
|
3022
|
-
if __err != nil {
|
|
3023
|
-
estr := C.CString(__err.Error())
|
|
3024
|
-
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3025
|
-
C.free(unsafe.Pointer(estr))
|
|
3026
|
-
return handleFromPtr_whatsapp_Contact(nil)
|
|
3027
|
-
}
|
|
3028
|
-
return handleFromPtr_whatsapp_Contact(&cret)
|
|
3029
2875
|
}
|
|
3030
2876
|
|
|
3031
|
-
//export
|
|
3032
|
-
func
|
|
2877
|
+
//export whatsapp_Gateway_CleanupSession
|
|
2878
|
+
func whatsapp_Gateway_CleanupSession(_handle CGoHandle, device CGoHandle) *C.char {
|
|
3033
2879
|
_saved_thread := C.PyEval_SaveThread()
|
|
3034
|
-
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.
|
|
2880
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Gateway")
|
|
3035
2881
|
if __err != nil {
|
|
3036
2882
|
return errorGoToPy(nil)
|
|
3037
2883
|
}
|
|
3038
|
-
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.
|
|
2884
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Gateway{})).(*whatsapp.Gateway).CleanupSession(*ptrFromHandle_whatsapp_LinkedDevice(device))
|
|
3039
2885
|
|
|
3040
2886
|
C.PyEval_RestoreThread(_saved_thread)
|
|
3041
2887
|
if __err != nil {
|
|
@@ -3046,156 +2892,6 @@ func whatsapp_Session_RequestMessageHistory(_handle CGoHandle, resourceID *C.cha
|
|
|
3046
2892
|
return C.CString("")
|
|
3047
2893
|
}
|
|
3048
2894
|
|
|
3049
|
-
//export whatsapp_Session_SetEventHandler
|
|
3050
|
-
func whatsapp_Session_SetEventHandler(_handle CGoHandle, h *C.PyObject, goRun C.char) {
|
|
3051
|
-
_fun_arg := h
|
|
3052
|
-
_saved_thread := C.PyEval_SaveThread()
|
|
3053
|
-
defer C.PyEval_RestoreThread(_saved_thread)
|
|
3054
|
-
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3055
|
-
if __err != nil {
|
|
3056
|
-
return
|
|
3057
|
-
}
|
|
3058
|
-
if boolPyToGo(goRun) {
|
|
3059
|
-
go gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetEventHandler(func(arg_0 whatsapp.EventKind, arg_1 *whatsapp.EventPayload) {
|
|
3060
|
-
if C.PyCallable_Check(_fun_arg) == 0 {
|
|
3061
|
-
return
|
|
3062
|
-
}
|
|
3063
|
-
_gstate := C.PyGILState_Ensure()
|
|
3064
|
-
_fcargs := C.PyTuple_New(2)
|
|
3065
|
-
C.PyTuple_SetItem(_fcargs, 0, C.gopy_build_int64(C.int64_t(arg_0)))
|
|
3066
|
-
C.PyTuple_SetItem(_fcargs, 1, C.gopy_build_int64(C.int64_t(handleFromPtr_Ptr_whatsapp_EventPayload(arg_1))))
|
|
3067
|
-
C.PyObject_CallObject(_fun_arg, _fcargs)
|
|
3068
|
-
C.gopy_decref(_fcargs)
|
|
3069
|
-
C.gopy_err_handle()
|
|
3070
|
-
C.PyGILState_Release(_gstate)
|
|
3071
|
-
})
|
|
3072
|
-
} else {
|
|
3073
|
-
gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetEventHandler(func(arg_0 whatsapp.EventKind, arg_1 *whatsapp.EventPayload) {
|
|
3074
|
-
if C.PyCallable_Check(_fun_arg) == 0 {
|
|
3075
|
-
return
|
|
3076
|
-
}
|
|
3077
|
-
_gstate := C.PyGILState_Ensure()
|
|
3078
|
-
_fcargs := C.PyTuple_New(2)
|
|
3079
|
-
C.PyTuple_SetItem(_fcargs, 0, C.gopy_build_int64(C.int64_t(arg_0)))
|
|
3080
|
-
C.PyTuple_SetItem(_fcargs, 1, C.gopy_build_int64(C.int64_t(handleFromPtr_Ptr_whatsapp_EventPayload(arg_1))))
|
|
3081
|
-
C.PyObject_CallObject(_fun_arg, _fcargs)
|
|
3082
|
-
C.gopy_decref(_fcargs)
|
|
3083
|
-
C.gopy_err_handle()
|
|
3084
|
-
C.PyGILState_Release(_gstate)
|
|
3085
|
-
})
|
|
3086
|
-
}
|
|
3087
|
-
}
|
|
3088
|
-
|
|
3089
|
-
// --- wrapping struct: whatsapp.Avatar ---
|
|
3090
|
-
//
|
|
3091
|
-
//export whatsapp_Avatar_CTor
|
|
3092
|
-
func whatsapp_Avatar_CTor() CGoHandle {
|
|
3093
|
-
return CGoHandle(handleFromPtr_whatsapp_Avatar(&whatsapp.Avatar{}))
|
|
3094
|
-
}
|
|
3095
|
-
|
|
3096
|
-
//export whatsapp_Avatar_ID_Get
|
|
3097
|
-
func whatsapp_Avatar_ID_Get(handle CGoHandle) *C.char {
|
|
3098
|
-
op := ptrFromHandle_whatsapp_Avatar(handle)
|
|
3099
|
-
return C.CString(op.ID)
|
|
3100
|
-
}
|
|
3101
|
-
|
|
3102
|
-
//export whatsapp_Avatar_ID_Set
|
|
3103
|
-
func whatsapp_Avatar_ID_Set(handle CGoHandle, val *C.char) {
|
|
3104
|
-
op := ptrFromHandle_whatsapp_Avatar(handle)
|
|
3105
|
-
op.ID = C.GoString(val)
|
|
3106
|
-
}
|
|
3107
|
-
|
|
3108
|
-
//export whatsapp_Avatar_URL_Get
|
|
3109
|
-
func whatsapp_Avatar_URL_Get(handle CGoHandle) *C.char {
|
|
3110
|
-
op := ptrFromHandle_whatsapp_Avatar(handle)
|
|
3111
|
-
return C.CString(op.URL)
|
|
3112
|
-
}
|
|
3113
|
-
|
|
3114
|
-
//export whatsapp_Avatar_URL_Set
|
|
3115
|
-
func whatsapp_Avatar_URL_Set(handle CGoHandle, val *C.char) {
|
|
3116
|
-
op := ptrFromHandle_whatsapp_Avatar(handle)
|
|
3117
|
-
op.URL = C.GoString(val)
|
|
3118
|
-
}
|
|
3119
|
-
|
|
3120
|
-
// --- wrapping struct: whatsapp.Group ---
|
|
3121
|
-
//
|
|
3122
|
-
//export whatsapp_Group_CTor
|
|
3123
|
-
func whatsapp_Group_CTor() CGoHandle {
|
|
3124
|
-
return CGoHandle(handleFromPtr_whatsapp_Group(&whatsapp.Group{}))
|
|
3125
|
-
}
|
|
3126
|
-
|
|
3127
|
-
//export whatsapp_Group_JID_Get
|
|
3128
|
-
func whatsapp_Group_JID_Get(handle CGoHandle) *C.char {
|
|
3129
|
-
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3130
|
-
return C.CString(op.JID)
|
|
3131
|
-
}
|
|
3132
|
-
|
|
3133
|
-
//export whatsapp_Group_JID_Set
|
|
3134
|
-
func whatsapp_Group_JID_Set(handle CGoHandle, val *C.char) {
|
|
3135
|
-
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3136
|
-
op.JID = C.GoString(val)
|
|
3137
|
-
}
|
|
3138
|
-
|
|
3139
|
-
//export whatsapp_Group_Name_Get
|
|
3140
|
-
func whatsapp_Group_Name_Get(handle CGoHandle) *C.char {
|
|
3141
|
-
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3142
|
-
return C.CString(op.Name)
|
|
3143
|
-
}
|
|
3144
|
-
|
|
3145
|
-
//export whatsapp_Group_Name_Set
|
|
3146
|
-
func whatsapp_Group_Name_Set(handle CGoHandle, val *C.char) {
|
|
3147
|
-
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3148
|
-
op.Name = C.GoString(val)
|
|
3149
|
-
}
|
|
3150
|
-
|
|
3151
|
-
//export whatsapp_Group_Subject_Get
|
|
3152
|
-
func whatsapp_Group_Subject_Get(handle CGoHandle) CGoHandle {
|
|
3153
|
-
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3154
|
-
return handleFromPtr_whatsapp_GroupSubject(&op.Subject)
|
|
3155
|
-
}
|
|
3156
|
-
|
|
3157
|
-
//export whatsapp_Group_Subject_Set
|
|
3158
|
-
func whatsapp_Group_Subject_Set(handle CGoHandle, val CGoHandle) {
|
|
3159
|
-
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3160
|
-
op.Subject = *ptrFromHandle_whatsapp_GroupSubject(val)
|
|
3161
|
-
}
|
|
3162
|
-
|
|
3163
|
-
//export whatsapp_Group_Nickname_Get
|
|
3164
|
-
func whatsapp_Group_Nickname_Get(handle CGoHandle) *C.char {
|
|
3165
|
-
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3166
|
-
return C.CString(op.Nickname)
|
|
3167
|
-
}
|
|
3168
|
-
|
|
3169
|
-
//export whatsapp_Group_Nickname_Set
|
|
3170
|
-
func whatsapp_Group_Nickname_Set(handle CGoHandle, val *C.char) {
|
|
3171
|
-
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3172
|
-
op.Nickname = C.GoString(val)
|
|
3173
|
-
}
|
|
3174
|
-
|
|
3175
|
-
//export whatsapp_Group_Participants_Get
|
|
3176
|
-
func whatsapp_Group_Participants_Get(handle CGoHandle) CGoHandle {
|
|
3177
|
-
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3178
|
-
return handleFromPtr_Slice_whatsapp_GroupParticipant(&op.Participants)
|
|
3179
|
-
}
|
|
3180
|
-
|
|
3181
|
-
//export whatsapp_Group_Participants_Set
|
|
3182
|
-
func whatsapp_Group_Participants_Set(handle CGoHandle, val CGoHandle) {
|
|
3183
|
-
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3184
|
-
op.Participants = deptrFromHandle_Slice_whatsapp_GroupParticipant(val)
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
//export whatsapp_Group_InviteCode_Get
|
|
3188
|
-
func whatsapp_Group_InviteCode_Get(handle CGoHandle) *C.char {
|
|
3189
|
-
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3190
|
-
return C.CString(op.InviteCode)
|
|
3191
|
-
}
|
|
3192
|
-
|
|
3193
|
-
//export whatsapp_Group_InviteCode_Set
|
|
3194
|
-
func whatsapp_Group_InviteCode_Set(handle CGoHandle, val *C.char) {
|
|
3195
|
-
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3196
|
-
op.InviteCode = C.GoString(val)
|
|
3197
|
-
}
|
|
3198
|
-
|
|
3199
2895
|
// --- wrapping struct: whatsapp.Message ---
|
|
3200
2896
|
//
|
|
3201
2897
|
//export whatsapp_Message_CTor
|
|
@@ -3455,377 +3151,590 @@ func whatsapp_Message_IsHistory_Set(handle CGoHandle, val C.char) {
|
|
|
3455
3151
|
op.IsHistory = boolPyToGo(val)
|
|
3456
3152
|
}
|
|
3457
3153
|
|
|
3458
|
-
// --- wrapping struct: whatsapp.
|
|
3154
|
+
// --- wrapping struct: whatsapp.Preview ---
|
|
3459
3155
|
//
|
|
3460
|
-
//export
|
|
3461
|
-
func
|
|
3462
|
-
return CGoHandle(
|
|
3463
|
-
}
|
|
3464
|
-
|
|
3465
|
-
//export whatsapp_Album_IsAlbum_Get
|
|
3466
|
-
func whatsapp_Album_IsAlbum_Get(handle CGoHandle) C.char {
|
|
3467
|
-
op := ptrFromHandle_whatsapp_Album(handle)
|
|
3468
|
-
return boolGoToPy(op.IsAlbum)
|
|
3156
|
+
//export whatsapp_Preview_CTor
|
|
3157
|
+
func whatsapp_Preview_CTor() CGoHandle {
|
|
3158
|
+
return CGoHandle(handleFromPtr_whatsapp_Preview(&whatsapp.Preview{}))
|
|
3469
3159
|
}
|
|
3470
3160
|
|
|
3471
|
-
//export
|
|
3472
|
-
func
|
|
3473
|
-
op :=
|
|
3474
|
-
op.
|
|
3161
|
+
//export whatsapp_Preview_Kind_Get
|
|
3162
|
+
func whatsapp_Preview_Kind_Get(handle CGoHandle) C.longlong {
|
|
3163
|
+
op := ptrFromHandle_whatsapp_Preview(handle)
|
|
3164
|
+
return C.longlong(int(op.Kind))
|
|
3475
3165
|
}
|
|
3476
3166
|
|
|
3477
|
-
//export
|
|
3478
|
-
func
|
|
3479
|
-
op :=
|
|
3480
|
-
|
|
3167
|
+
//export whatsapp_Preview_Kind_Set
|
|
3168
|
+
func whatsapp_Preview_Kind_Set(handle CGoHandle, val C.longlong) {
|
|
3169
|
+
op := ptrFromHandle_whatsapp_Preview(handle)
|
|
3170
|
+
op.Kind = whatsapp.PreviewKind(int(val))
|
|
3481
3171
|
}
|
|
3482
3172
|
|
|
3483
|
-
//export
|
|
3484
|
-
func
|
|
3485
|
-
op :=
|
|
3486
|
-
op.
|
|
3173
|
+
//export whatsapp_Preview_URL_Get
|
|
3174
|
+
func whatsapp_Preview_URL_Get(handle CGoHandle) *C.char {
|
|
3175
|
+
op := ptrFromHandle_whatsapp_Preview(handle)
|
|
3176
|
+
return C.CString(op.URL)
|
|
3487
3177
|
}
|
|
3488
3178
|
|
|
3489
|
-
//export
|
|
3490
|
-
func
|
|
3491
|
-
op :=
|
|
3492
|
-
|
|
3179
|
+
//export whatsapp_Preview_URL_Set
|
|
3180
|
+
func whatsapp_Preview_URL_Set(handle CGoHandle, val *C.char) {
|
|
3181
|
+
op := ptrFromHandle_whatsapp_Preview(handle)
|
|
3182
|
+
op.URL = C.GoString(val)
|
|
3493
3183
|
}
|
|
3494
3184
|
|
|
3495
|
-
//export
|
|
3496
|
-
func
|
|
3497
|
-
op :=
|
|
3498
|
-
op.
|
|
3185
|
+
//export whatsapp_Preview_Title_Get
|
|
3186
|
+
func whatsapp_Preview_Title_Get(handle CGoHandle) *C.char {
|
|
3187
|
+
op := ptrFromHandle_whatsapp_Preview(handle)
|
|
3188
|
+
return C.CString(op.Title)
|
|
3499
3189
|
}
|
|
3500
3190
|
|
|
3501
|
-
//
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
return CGoHandle(handleFromPtr_whatsapp_Attachment(&whatsapp.Attachment{}))
|
|
3191
|
+
//export whatsapp_Preview_Title_Set
|
|
3192
|
+
func whatsapp_Preview_Title_Set(handle CGoHandle, val *C.char) {
|
|
3193
|
+
op := ptrFromHandle_whatsapp_Preview(handle)
|
|
3194
|
+
op.Title = C.GoString(val)
|
|
3506
3195
|
}
|
|
3507
3196
|
|
|
3508
|
-
//export
|
|
3509
|
-
func
|
|
3510
|
-
op :=
|
|
3511
|
-
return C.CString(op.
|
|
3197
|
+
//export whatsapp_Preview_Description_Get
|
|
3198
|
+
func whatsapp_Preview_Description_Get(handle CGoHandle) *C.char {
|
|
3199
|
+
op := ptrFromHandle_whatsapp_Preview(handle)
|
|
3200
|
+
return C.CString(op.Description)
|
|
3512
3201
|
}
|
|
3513
3202
|
|
|
3514
|
-
//export
|
|
3515
|
-
func
|
|
3516
|
-
op :=
|
|
3517
|
-
op.
|
|
3203
|
+
//export whatsapp_Preview_Description_Set
|
|
3204
|
+
func whatsapp_Preview_Description_Set(handle CGoHandle, val *C.char) {
|
|
3205
|
+
op := ptrFromHandle_whatsapp_Preview(handle)
|
|
3206
|
+
op.Description = C.GoString(val)
|
|
3518
3207
|
}
|
|
3519
3208
|
|
|
3520
|
-
//export
|
|
3521
|
-
func
|
|
3522
|
-
op :=
|
|
3523
|
-
return
|
|
3209
|
+
//export whatsapp_Preview_Thumbnail_Get
|
|
3210
|
+
func whatsapp_Preview_Thumbnail_Get(handle CGoHandle) CGoHandle {
|
|
3211
|
+
op := ptrFromHandle_whatsapp_Preview(handle)
|
|
3212
|
+
return handleFromPtr_Slice_byte(&op.Thumbnail)
|
|
3524
3213
|
}
|
|
3525
3214
|
|
|
3526
|
-
//export
|
|
3527
|
-
func
|
|
3528
|
-
op :=
|
|
3529
|
-
op.
|
|
3215
|
+
//export whatsapp_Preview_Thumbnail_Set
|
|
3216
|
+
func whatsapp_Preview_Thumbnail_Set(handle CGoHandle, val CGoHandle) {
|
|
3217
|
+
op := ptrFromHandle_whatsapp_Preview(handle)
|
|
3218
|
+
op.Thumbnail = deptrFromHandle_Slice_byte(val)
|
|
3530
3219
|
}
|
|
3531
3220
|
|
|
3532
|
-
//
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3221
|
+
// --- wrapping struct: whatsapp.Session ---
|
|
3222
|
+
//
|
|
3223
|
+
//export whatsapp_Session_CTor
|
|
3224
|
+
func whatsapp_Session_CTor() CGoHandle {
|
|
3225
|
+
return CGoHandle(handleFromPtr_whatsapp_Session(&whatsapp.Session{}))
|
|
3536
3226
|
}
|
|
3537
3227
|
|
|
3538
|
-
//export
|
|
3539
|
-
func
|
|
3540
|
-
|
|
3541
|
-
|
|
3228
|
+
//export whatsapp_Session_Login
|
|
3229
|
+
func whatsapp_Session_Login(_handle CGoHandle) *C.char {
|
|
3230
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3231
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3232
|
+
if __err != nil {
|
|
3233
|
+
return errorGoToPy(nil)
|
|
3234
|
+
}
|
|
3235
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).Login()
|
|
3236
|
+
|
|
3237
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3238
|
+
if __err != nil {
|
|
3239
|
+
estr := C.CString(__err.Error())
|
|
3240
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3241
|
+
return estr
|
|
3242
|
+
}
|
|
3243
|
+
return C.CString("")
|
|
3542
3244
|
}
|
|
3543
3245
|
|
|
3544
|
-
//export
|
|
3545
|
-
func
|
|
3546
|
-
|
|
3547
|
-
|
|
3246
|
+
//export whatsapp_Session_Logout
|
|
3247
|
+
func whatsapp_Session_Logout(_handle CGoHandle) *C.char {
|
|
3248
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3249
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3250
|
+
if __err != nil {
|
|
3251
|
+
return errorGoToPy(nil)
|
|
3252
|
+
}
|
|
3253
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).Logout()
|
|
3254
|
+
|
|
3255
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3256
|
+
if __err != nil {
|
|
3257
|
+
estr := C.CString(__err.Error())
|
|
3258
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3259
|
+
return estr
|
|
3260
|
+
}
|
|
3261
|
+
return C.CString("")
|
|
3548
3262
|
}
|
|
3549
3263
|
|
|
3550
|
-
//export
|
|
3551
|
-
func
|
|
3552
|
-
|
|
3553
|
-
|
|
3264
|
+
//export whatsapp_Session_Disconnect
|
|
3265
|
+
func whatsapp_Session_Disconnect(_handle CGoHandle) *C.char {
|
|
3266
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3267
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3268
|
+
if __err != nil {
|
|
3269
|
+
return errorGoToPy(nil)
|
|
3270
|
+
}
|
|
3271
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).Disconnect()
|
|
3272
|
+
|
|
3273
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3274
|
+
if __err != nil {
|
|
3275
|
+
estr := C.CString(__err.Error())
|
|
3276
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3277
|
+
return estr
|
|
3278
|
+
}
|
|
3279
|
+
return C.CString("")
|
|
3554
3280
|
}
|
|
3555
3281
|
|
|
3556
|
-
//export
|
|
3557
|
-
func
|
|
3282
|
+
//export whatsapp_Session_PairPhone
|
|
3283
|
+
func whatsapp_Session_PairPhone(_handle CGoHandle, phone *C.char) *C.char {
|
|
3558
3284
|
_saved_thread := C.PyEval_SaveThread()
|
|
3559
|
-
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.
|
|
3285
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3560
3286
|
if __err != nil {
|
|
3561
|
-
return
|
|
3287
|
+
return C.CString("")
|
|
3562
3288
|
}
|
|
3563
|
-
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.
|
|
3289
|
+
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).PairPhone(C.GoString(phone))
|
|
3564
3290
|
|
|
3565
3291
|
C.PyEval_RestoreThread(_saved_thread)
|
|
3566
3292
|
if __err != nil {
|
|
3567
3293
|
estr := C.CString(__err.Error())
|
|
3568
3294
|
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3569
3295
|
C.free(unsafe.Pointer(estr))
|
|
3570
|
-
return
|
|
3296
|
+
return C.CString("")
|
|
3571
3297
|
}
|
|
3572
|
-
return
|
|
3298
|
+
return C.CString(cret)
|
|
3573
3299
|
}
|
|
3574
3300
|
|
|
3575
|
-
//
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3301
|
+
//export whatsapp_Session_SendMessage
|
|
3302
|
+
func whatsapp_Session_SendMessage(_handle CGoHandle, message CGoHandle) *C.char {
|
|
3303
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3304
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3305
|
+
if __err != nil {
|
|
3306
|
+
return errorGoToPy(nil)
|
|
3307
|
+
}
|
|
3308
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SendMessage(*ptrFromHandle_whatsapp_Message(message))
|
|
3581
3309
|
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3310
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3311
|
+
if __err != nil {
|
|
3312
|
+
estr := C.CString(__err.Error())
|
|
3313
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3314
|
+
return estr
|
|
3315
|
+
}
|
|
3316
|
+
return C.CString("")
|
|
3586
3317
|
}
|
|
3587
3318
|
|
|
3588
|
-
//export
|
|
3589
|
-
func
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3319
|
+
//export whatsapp_Session_GenerateMessageID
|
|
3320
|
+
func whatsapp_Session_GenerateMessageID(_handle CGoHandle) *C.char {
|
|
3321
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3322
|
+
defer C.PyEval_RestoreThread(_saved_thread)
|
|
3323
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3324
|
+
if __err != nil {
|
|
3325
|
+
return C.CString("")
|
|
3326
|
+
}
|
|
3327
|
+
return C.CString(gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).GenerateMessageID())
|
|
3593
3328
|
|
|
3594
|
-
//export whatsapp_Call_JID_Get
|
|
3595
|
-
func whatsapp_Call_JID_Get(handle CGoHandle) *C.char {
|
|
3596
|
-
op := ptrFromHandle_whatsapp_Call(handle)
|
|
3597
|
-
return C.CString(op.JID)
|
|
3598
3329
|
}
|
|
3599
3330
|
|
|
3600
|
-
//export
|
|
3601
|
-
func
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3331
|
+
//export whatsapp_Session_SendChatState
|
|
3332
|
+
func whatsapp_Session_SendChatState(_handle CGoHandle, state CGoHandle) *C.char {
|
|
3333
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3334
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3335
|
+
if __err != nil {
|
|
3336
|
+
return errorGoToPy(nil)
|
|
3337
|
+
}
|
|
3338
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SendChatState(*ptrFromHandle_whatsapp_ChatState(state))
|
|
3605
3339
|
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3340
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3341
|
+
if __err != nil {
|
|
3342
|
+
estr := C.CString(__err.Error())
|
|
3343
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3344
|
+
return estr
|
|
3345
|
+
}
|
|
3346
|
+
return C.CString("")
|
|
3610
3347
|
}
|
|
3611
3348
|
|
|
3612
|
-
//export
|
|
3613
|
-
func
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3349
|
+
//export whatsapp_Session_SendReceipt
|
|
3350
|
+
func whatsapp_Session_SendReceipt(_handle CGoHandle, receipt CGoHandle) *C.char {
|
|
3351
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3352
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3353
|
+
if __err != nil {
|
|
3354
|
+
return errorGoToPy(nil)
|
|
3355
|
+
}
|
|
3356
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SendReceipt(*ptrFromHandle_whatsapp_Receipt(receipt))
|
|
3617
3357
|
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3358
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3359
|
+
if __err != nil {
|
|
3360
|
+
estr := C.CString(__err.Error())
|
|
3361
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3362
|
+
return estr
|
|
3363
|
+
}
|
|
3364
|
+
return C.CString("")
|
|
3623
3365
|
}
|
|
3624
3366
|
|
|
3625
|
-
//export
|
|
3626
|
-
func
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3367
|
+
//export whatsapp_Session_SendPresence
|
|
3368
|
+
func whatsapp_Session_SendPresence(_handle CGoHandle, presence C.longlong, statusMessage *C.char) *C.char {
|
|
3369
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3370
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3371
|
+
if __err != nil {
|
|
3372
|
+
return errorGoToPy(nil)
|
|
3373
|
+
}
|
|
3374
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SendPresence(whatsapp.PresenceKind(int(presence)), C.GoString(statusMessage))
|
|
3630
3375
|
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3376
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3377
|
+
if __err != nil {
|
|
3378
|
+
estr := C.CString(__err.Error())
|
|
3379
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3380
|
+
return estr
|
|
3381
|
+
}
|
|
3382
|
+
return C.CString("")
|
|
3635
3383
|
}
|
|
3636
3384
|
|
|
3637
|
-
//export
|
|
3638
|
-
func
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3385
|
+
//export whatsapp_Session_GetContacts
|
|
3386
|
+
func whatsapp_Session_GetContacts(_handle CGoHandle, refresh C.char) CGoHandle {
|
|
3387
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3388
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3389
|
+
if __err != nil {
|
|
3390
|
+
return handleFromPtr_Slice_whatsapp_Contact(nil)
|
|
3391
|
+
}
|
|
3392
|
+
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).GetContacts(boolPyToGo(refresh))
|
|
3642
3393
|
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3394
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3395
|
+
if __err != nil {
|
|
3396
|
+
estr := C.CString(__err.Error())
|
|
3397
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3398
|
+
C.free(unsafe.Pointer(estr))
|
|
3399
|
+
return handleFromPtr_Slice_whatsapp_Contact(nil)
|
|
3400
|
+
}
|
|
3401
|
+
return handleFromPtr_Slice_whatsapp_Contact(&cret)
|
|
3647
3402
|
}
|
|
3648
3403
|
|
|
3649
|
-
//export
|
|
3650
|
-
func
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3404
|
+
//export whatsapp_Session_GetGroups
|
|
3405
|
+
func whatsapp_Session_GetGroups(_handle CGoHandle) CGoHandle {
|
|
3406
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3407
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3408
|
+
if __err != nil {
|
|
3409
|
+
return handleFromPtr_Slice_whatsapp_Group(nil)
|
|
3410
|
+
}
|
|
3411
|
+
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).GetGroups()
|
|
3654
3412
|
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3413
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3414
|
+
if __err != nil {
|
|
3415
|
+
estr := C.CString(__err.Error())
|
|
3416
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3417
|
+
C.free(unsafe.Pointer(estr))
|
|
3418
|
+
return handleFromPtr_Slice_whatsapp_Group(nil)
|
|
3419
|
+
}
|
|
3420
|
+
return handleFromPtr_Slice_whatsapp_Group(&cret)
|
|
3659
3421
|
}
|
|
3660
3422
|
|
|
3661
|
-
//
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3423
|
+
//export whatsapp_Session_CreateGroup
|
|
3424
|
+
func whatsapp_Session_CreateGroup(_handle CGoHandle, name *C.char, participants CGoHandle) CGoHandle {
|
|
3425
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3426
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3427
|
+
if __err != nil {
|
|
3428
|
+
return handleFromPtr_whatsapp_Group(nil)
|
|
3429
|
+
}
|
|
3430
|
+
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).CreateGroup(C.GoString(name), deptrFromHandle_Slice_string(participants))
|
|
3431
|
+
|
|
3432
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3433
|
+
if __err != nil {
|
|
3434
|
+
estr := C.CString(__err.Error())
|
|
3435
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3436
|
+
C.free(unsafe.Pointer(estr))
|
|
3437
|
+
return handleFromPtr_whatsapp_Group(nil)
|
|
3438
|
+
}
|
|
3439
|
+
return handleFromPtr_whatsapp_Group(&cret)
|
|
3666
3440
|
}
|
|
3667
3441
|
|
|
3668
|
-
//export
|
|
3669
|
-
func
|
|
3670
|
-
|
|
3671
|
-
|
|
3442
|
+
//export whatsapp_Session_LeaveGroup
|
|
3443
|
+
func whatsapp_Session_LeaveGroup(_handle CGoHandle, resourceID *C.char) *C.char {
|
|
3444
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3445
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3446
|
+
if __err != nil {
|
|
3447
|
+
return errorGoToPy(nil)
|
|
3448
|
+
}
|
|
3449
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).LeaveGroup(C.GoString(resourceID))
|
|
3450
|
+
|
|
3451
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3452
|
+
if __err != nil {
|
|
3453
|
+
estr := C.CString(__err.Error())
|
|
3454
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3455
|
+
return estr
|
|
3456
|
+
}
|
|
3457
|
+
return C.CString("")
|
|
3672
3458
|
}
|
|
3673
3459
|
|
|
3674
|
-
//export
|
|
3675
|
-
func
|
|
3676
|
-
|
|
3677
|
-
|
|
3460
|
+
//export whatsapp_Session_GetAvatar
|
|
3461
|
+
func whatsapp_Session_GetAvatar(_handle CGoHandle, resourceID *C.char, avatarID *C.char) CGoHandle {
|
|
3462
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3463
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3464
|
+
if __err != nil {
|
|
3465
|
+
return handleFromPtr_whatsapp_Avatar(nil)
|
|
3466
|
+
}
|
|
3467
|
+
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).GetAvatar(C.GoString(resourceID), C.GoString(avatarID))
|
|
3468
|
+
|
|
3469
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3470
|
+
if __err != nil {
|
|
3471
|
+
estr := C.CString(__err.Error())
|
|
3472
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3473
|
+
C.free(unsafe.Pointer(estr))
|
|
3474
|
+
return handleFromPtr_whatsapp_Avatar(nil)
|
|
3475
|
+
}
|
|
3476
|
+
return handleFromPtr_whatsapp_Avatar(&cret)
|
|
3678
3477
|
}
|
|
3679
3478
|
|
|
3680
|
-
//export
|
|
3681
|
-
func
|
|
3682
|
-
|
|
3683
|
-
|
|
3479
|
+
//export whatsapp_Session_SetAvatar
|
|
3480
|
+
func whatsapp_Session_SetAvatar(_handle CGoHandle, resourceID *C.char, avatar CGoHandle) *C.char {
|
|
3481
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3482
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3483
|
+
if __err != nil {
|
|
3484
|
+
return C.CString("")
|
|
3485
|
+
}
|
|
3486
|
+
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetAvatar(C.GoString(resourceID), deptrFromHandle_Slice_byte(avatar))
|
|
3487
|
+
|
|
3488
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3489
|
+
if __err != nil {
|
|
3490
|
+
estr := C.CString(__err.Error())
|
|
3491
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3492
|
+
C.free(unsafe.Pointer(estr))
|
|
3493
|
+
return C.CString("")
|
|
3494
|
+
}
|
|
3495
|
+
return C.CString(cret)
|
|
3684
3496
|
}
|
|
3685
3497
|
|
|
3686
|
-
//export
|
|
3687
|
-
func
|
|
3688
|
-
|
|
3689
|
-
|
|
3498
|
+
//export whatsapp_Session_SetGroupName
|
|
3499
|
+
func whatsapp_Session_SetGroupName(_handle CGoHandle, resourceID *C.char, name *C.char) *C.char {
|
|
3500
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3501
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3502
|
+
if __err != nil {
|
|
3503
|
+
return errorGoToPy(nil)
|
|
3504
|
+
}
|
|
3505
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetGroupName(C.GoString(resourceID), C.GoString(name))
|
|
3506
|
+
|
|
3507
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3508
|
+
if __err != nil {
|
|
3509
|
+
estr := C.CString(__err.Error())
|
|
3510
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3511
|
+
return estr
|
|
3512
|
+
}
|
|
3513
|
+
return C.CString("")
|
|
3690
3514
|
}
|
|
3691
3515
|
|
|
3692
|
-
//
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3516
|
+
//export whatsapp_Session_SetGroupTopic
|
|
3517
|
+
func whatsapp_Session_SetGroupTopic(_handle CGoHandle, resourceID *C.char, topic *C.char) *C.char {
|
|
3518
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3519
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3520
|
+
if __err != nil {
|
|
3521
|
+
return errorGoToPy(nil)
|
|
3522
|
+
}
|
|
3523
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetGroupTopic(C.GoString(resourceID), C.GoString(topic))
|
|
3524
|
+
|
|
3525
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3526
|
+
if __err != nil {
|
|
3527
|
+
estr := C.CString(__err.Error())
|
|
3528
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3529
|
+
return estr
|
|
3530
|
+
}
|
|
3531
|
+
return C.CString("")
|
|
3697
3532
|
}
|
|
3698
3533
|
|
|
3699
|
-
//export
|
|
3700
|
-
func
|
|
3701
|
-
|
|
3702
|
-
|
|
3534
|
+
//export whatsapp_Session_UpdateGroupParticipants
|
|
3535
|
+
func whatsapp_Session_UpdateGroupParticipants(_handle CGoHandle, resourceID *C.char, participants CGoHandle) CGoHandle {
|
|
3536
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3537
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3538
|
+
if __err != nil {
|
|
3539
|
+
return handleFromPtr_Slice_whatsapp_GroupParticipant(nil)
|
|
3540
|
+
}
|
|
3541
|
+
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).UpdateGroupParticipants(C.GoString(resourceID), deptrFromHandle_Slice_whatsapp_GroupParticipant(participants))
|
|
3542
|
+
|
|
3543
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3544
|
+
if __err != nil {
|
|
3545
|
+
estr := C.CString(__err.Error())
|
|
3546
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3547
|
+
C.free(unsafe.Pointer(estr))
|
|
3548
|
+
return handleFromPtr_Slice_whatsapp_GroupParticipant(nil)
|
|
3549
|
+
}
|
|
3550
|
+
return handleFromPtr_Slice_whatsapp_GroupParticipant(&cret)
|
|
3703
3551
|
}
|
|
3704
3552
|
|
|
3705
|
-
//export
|
|
3706
|
-
func
|
|
3707
|
-
|
|
3708
|
-
|
|
3553
|
+
//export whatsapp_Session_FindContact
|
|
3554
|
+
func whatsapp_Session_FindContact(_handle CGoHandle, phone *C.char) CGoHandle {
|
|
3555
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3556
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3557
|
+
if __err != nil {
|
|
3558
|
+
return handleFromPtr_whatsapp_Contact(nil)
|
|
3559
|
+
}
|
|
3560
|
+
cret, __err := gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).FindContact(C.GoString(phone))
|
|
3561
|
+
|
|
3562
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3563
|
+
if __err != nil {
|
|
3564
|
+
estr := C.CString(__err.Error())
|
|
3565
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3566
|
+
C.free(unsafe.Pointer(estr))
|
|
3567
|
+
return handleFromPtr_whatsapp_Contact(nil)
|
|
3568
|
+
}
|
|
3569
|
+
return handleFromPtr_whatsapp_Contact(&cret)
|
|
3709
3570
|
}
|
|
3710
3571
|
|
|
3711
|
-
//export
|
|
3712
|
-
func
|
|
3713
|
-
|
|
3714
|
-
|
|
3572
|
+
//export whatsapp_Session_RequestMessageHistory
|
|
3573
|
+
func whatsapp_Session_RequestMessageHistory(_handle CGoHandle, resourceID *C.char, oldestMessage CGoHandle) *C.char {
|
|
3574
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3575
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3576
|
+
if __err != nil {
|
|
3577
|
+
return errorGoToPy(nil)
|
|
3578
|
+
}
|
|
3579
|
+
__err = gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).RequestMessageHistory(C.GoString(resourceID), *ptrFromHandle_whatsapp_Message(oldestMessage))
|
|
3580
|
+
|
|
3581
|
+
C.PyEval_RestoreThread(_saved_thread)
|
|
3582
|
+
if __err != nil {
|
|
3583
|
+
estr := C.CString(__err.Error())
|
|
3584
|
+
C.PyErr_SetString(C.PyExc_RuntimeError, estr)
|
|
3585
|
+
return estr
|
|
3586
|
+
}
|
|
3587
|
+
return C.CString("")
|
|
3715
3588
|
}
|
|
3716
3589
|
|
|
3717
|
-
//export
|
|
3718
|
-
func
|
|
3719
|
-
|
|
3720
|
-
|
|
3590
|
+
//export whatsapp_Session_SetEventHandler
|
|
3591
|
+
func whatsapp_Session_SetEventHandler(_handle CGoHandle, h *C.PyObject, goRun C.char) {
|
|
3592
|
+
_fun_arg := h
|
|
3593
|
+
_saved_thread := C.PyEval_SaveThread()
|
|
3594
|
+
defer C.PyEval_RestoreThread(_saved_thread)
|
|
3595
|
+
vifc, __err := gopyh.VarFromHandleTry((gopyh.CGoHandle)(_handle), "*whatsapp.Session")
|
|
3596
|
+
if __err != nil {
|
|
3597
|
+
return
|
|
3598
|
+
}
|
|
3599
|
+
if boolPyToGo(goRun) {
|
|
3600
|
+
go gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetEventHandler(func(arg_0 whatsapp.EventKind, arg_1 *whatsapp.EventPayload) {
|
|
3601
|
+
if C.PyCallable_Check(_fun_arg) == 0 {
|
|
3602
|
+
return
|
|
3603
|
+
}
|
|
3604
|
+
_gstate := C.PyGILState_Ensure()
|
|
3605
|
+
_fcargs := C.PyTuple_New(2)
|
|
3606
|
+
C.PyTuple_SetItem(_fcargs, 0, C.gopy_build_int64(C.int64_t(arg_0)))
|
|
3607
|
+
C.PyTuple_SetItem(_fcargs, 1, C.gopy_build_int64(C.int64_t(handleFromPtr_Ptr_whatsapp_EventPayload(arg_1))))
|
|
3608
|
+
C.PyObject_CallObject(_fun_arg, _fcargs)
|
|
3609
|
+
C.gopy_decref(_fcargs)
|
|
3610
|
+
C.gopy_err_handle()
|
|
3611
|
+
C.PyGILState_Release(_gstate)
|
|
3612
|
+
})
|
|
3613
|
+
} else {
|
|
3614
|
+
gopyh.Embed(vifc, reflect.TypeOf(whatsapp.Session{})).(*whatsapp.Session).SetEventHandler(func(arg_0 whatsapp.EventKind, arg_1 *whatsapp.EventPayload) {
|
|
3615
|
+
if C.PyCallable_Check(_fun_arg) == 0 {
|
|
3616
|
+
return
|
|
3617
|
+
}
|
|
3618
|
+
_gstate := C.PyGILState_Ensure()
|
|
3619
|
+
_fcargs := C.PyTuple_New(2)
|
|
3620
|
+
C.PyTuple_SetItem(_fcargs, 0, C.gopy_build_int64(C.int64_t(arg_0)))
|
|
3621
|
+
C.PyTuple_SetItem(_fcargs, 1, C.gopy_build_int64(C.int64_t(handleFromPtr_Ptr_whatsapp_EventPayload(arg_1))))
|
|
3622
|
+
C.PyObject_CallObject(_fun_arg, _fcargs)
|
|
3623
|
+
C.gopy_decref(_fcargs)
|
|
3624
|
+
C.gopy_err_handle()
|
|
3625
|
+
C.PyGILState_Release(_gstate)
|
|
3626
|
+
})
|
|
3627
|
+
}
|
|
3721
3628
|
}
|
|
3722
3629
|
|
|
3723
|
-
//
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3630
|
+
// --- wrapping struct: whatsapp.Connect ---
|
|
3631
|
+
//
|
|
3632
|
+
//export whatsapp_Connect_CTor
|
|
3633
|
+
func whatsapp_Connect_CTor() CGoHandle {
|
|
3634
|
+
return CGoHandle(handleFromPtr_whatsapp_Connect(&whatsapp.Connect{}))
|
|
3727
3635
|
}
|
|
3728
3636
|
|
|
3729
|
-
//export
|
|
3730
|
-
func
|
|
3731
|
-
op :=
|
|
3732
|
-
op.
|
|
3637
|
+
//export whatsapp_Connect_JID_Get
|
|
3638
|
+
func whatsapp_Connect_JID_Get(handle CGoHandle) *C.char {
|
|
3639
|
+
op := ptrFromHandle_whatsapp_Connect(handle)
|
|
3640
|
+
return C.CString(op.JID)
|
|
3733
3641
|
}
|
|
3734
3642
|
|
|
3735
|
-
//export
|
|
3736
|
-
func
|
|
3737
|
-
op :=
|
|
3738
|
-
|
|
3643
|
+
//export whatsapp_Connect_JID_Set
|
|
3644
|
+
func whatsapp_Connect_JID_Set(handle CGoHandle, val *C.char) {
|
|
3645
|
+
op := ptrFromHandle_whatsapp_Connect(handle)
|
|
3646
|
+
op.JID = C.GoString(val)
|
|
3739
3647
|
}
|
|
3740
3648
|
|
|
3741
|
-
//export
|
|
3742
|
-
func
|
|
3743
|
-
op :=
|
|
3744
|
-
op.
|
|
3649
|
+
//export whatsapp_Connect_Error_Get
|
|
3650
|
+
func whatsapp_Connect_Error_Get(handle CGoHandle) *C.char {
|
|
3651
|
+
op := ptrFromHandle_whatsapp_Connect(handle)
|
|
3652
|
+
return C.CString(op.Error)
|
|
3745
3653
|
}
|
|
3746
3654
|
|
|
3747
|
-
//export
|
|
3748
|
-
func
|
|
3749
|
-
op :=
|
|
3750
|
-
|
|
3655
|
+
//export whatsapp_Connect_Error_Set
|
|
3656
|
+
func whatsapp_Connect_Error_Set(handle CGoHandle, val *C.char) {
|
|
3657
|
+
op := ptrFromHandle_whatsapp_Connect(handle)
|
|
3658
|
+
op.Error = C.GoString(val)
|
|
3751
3659
|
}
|
|
3752
3660
|
|
|
3753
|
-
//
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3661
|
+
// --- wrapping struct: whatsapp.Group ---
|
|
3662
|
+
//
|
|
3663
|
+
//export whatsapp_Group_CTor
|
|
3664
|
+
func whatsapp_Group_CTor() CGoHandle {
|
|
3665
|
+
return CGoHandle(handleFromPtr_whatsapp_Group(&whatsapp.Group{}))
|
|
3757
3666
|
}
|
|
3758
3667
|
|
|
3759
|
-
//export
|
|
3760
|
-
func
|
|
3761
|
-
op :=
|
|
3762
|
-
return
|
|
3668
|
+
//export whatsapp_Group_JID_Get
|
|
3669
|
+
func whatsapp_Group_JID_Get(handle CGoHandle) *C.char {
|
|
3670
|
+
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3671
|
+
return C.CString(op.JID)
|
|
3763
3672
|
}
|
|
3764
3673
|
|
|
3765
|
-
//export
|
|
3766
|
-
func
|
|
3767
|
-
op :=
|
|
3768
|
-
op.
|
|
3674
|
+
//export whatsapp_Group_JID_Set
|
|
3675
|
+
func whatsapp_Group_JID_Set(handle CGoHandle, val *C.char) {
|
|
3676
|
+
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3677
|
+
op.JID = C.GoString(val)
|
|
3769
3678
|
}
|
|
3770
3679
|
|
|
3771
|
-
//export
|
|
3772
|
-
func
|
|
3773
|
-
op :=
|
|
3774
|
-
return
|
|
3680
|
+
//export whatsapp_Group_Name_Get
|
|
3681
|
+
func whatsapp_Group_Name_Get(handle CGoHandle) *C.char {
|
|
3682
|
+
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3683
|
+
return C.CString(op.Name)
|
|
3775
3684
|
}
|
|
3776
3685
|
|
|
3777
|
-
//export
|
|
3778
|
-
func
|
|
3779
|
-
op :=
|
|
3780
|
-
op.
|
|
3686
|
+
//export whatsapp_Group_Name_Set
|
|
3687
|
+
func whatsapp_Group_Name_Set(handle CGoHandle, val *C.char) {
|
|
3688
|
+
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3689
|
+
op.Name = C.GoString(val)
|
|
3781
3690
|
}
|
|
3782
3691
|
|
|
3783
|
-
//export
|
|
3784
|
-
func
|
|
3785
|
-
op :=
|
|
3786
|
-
return
|
|
3692
|
+
//export whatsapp_Group_Subject_Get
|
|
3693
|
+
func whatsapp_Group_Subject_Get(handle CGoHandle) CGoHandle {
|
|
3694
|
+
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3695
|
+
return handleFromPtr_whatsapp_GroupSubject(&op.Subject)
|
|
3787
3696
|
}
|
|
3788
3697
|
|
|
3789
|
-
//export
|
|
3790
|
-
func
|
|
3791
|
-
op :=
|
|
3792
|
-
op.
|
|
3698
|
+
//export whatsapp_Group_Subject_Set
|
|
3699
|
+
func whatsapp_Group_Subject_Set(handle CGoHandle, val CGoHandle) {
|
|
3700
|
+
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3701
|
+
op.Subject = *ptrFromHandle_whatsapp_GroupSubject(val)
|
|
3793
3702
|
}
|
|
3794
3703
|
|
|
3795
|
-
//export
|
|
3796
|
-
func
|
|
3797
|
-
op :=
|
|
3798
|
-
return
|
|
3704
|
+
//export whatsapp_Group_Nickname_Get
|
|
3705
|
+
func whatsapp_Group_Nickname_Get(handle CGoHandle) *C.char {
|
|
3706
|
+
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3707
|
+
return C.CString(op.Nickname)
|
|
3799
3708
|
}
|
|
3800
3709
|
|
|
3801
|
-
//export
|
|
3802
|
-
func
|
|
3803
|
-
op :=
|
|
3804
|
-
op.
|
|
3710
|
+
//export whatsapp_Group_Nickname_Set
|
|
3711
|
+
func whatsapp_Group_Nickname_Set(handle CGoHandle, val *C.char) {
|
|
3712
|
+
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3713
|
+
op.Nickname = C.GoString(val)
|
|
3805
3714
|
}
|
|
3806
3715
|
|
|
3807
|
-
//export
|
|
3808
|
-
func
|
|
3809
|
-
op :=
|
|
3810
|
-
return
|
|
3716
|
+
//export whatsapp_Group_Participants_Get
|
|
3717
|
+
func whatsapp_Group_Participants_Get(handle CGoHandle) CGoHandle {
|
|
3718
|
+
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3719
|
+
return handleFromPtr_Slice_whatsapp_GroupParticipant(&op.Participants)
|
|
3811
3720
|
}
|
|
3812
3721
|
|
|
3813
|
-
//export
|
|
3814
|
-
func
|
|
3815
|
-
op :=
|
|
3816
|
-
op.
|
|
3722
|
+
//export whatsapp_Group_Participants_Set
|
|
3723
|
+
func whatsapp_Group_Participants_Set(handle CGoHandle, val CGoHandle) {
|
|
3724
|
+
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3725
|
+
op.Participants = deptrFromHandle_Slice_whatsapp_GroupParticipant(val)
|
|
3817
3726
|
}
|
|
3818
3727
|
|
|
3819
|
-
//export
|
|
3820
|
-
func
|
|
3821
|
-
op :=
|
|
3822
|
-
return
|
|
3728
|
+
//export whatsapp_Group_InviteCode_Get
|
|
3729
|
+
func whatsapp_Group_InviteCode_Get(handle CGoHandle) *C.char {
|
|
3730
|
+
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3731
|
+
return C.CString(op.InviteCode)
|
|
3823
3732
|
}
|
|
3824
3733
|
|
|
3825
|
-
//export
|
|
3826
|
-
func
|
|
3827
|
-
op :=
|
|
3828
|
-
op.
|
|
3734
|
+
//export whatsapp_Group_InviteCode_Set
|
|
3735
|
+
func whatsapp_Group_InviteCode_Set(handle CGoHandle, val *C.char) {
|
|
3736
|
+
op := ptrFromHandle_whatsapp_Group(handle)
|
|
3737
|
+
op.InviteCode = C.GoString(val)
|
|
3829
3738
|
}
|
|
3830
3739
|
|
|
3831
3740
|
// --- wrapping struct: whatsapp.GroupSubject ---
|
|
@@ -3903,6 +3812,97 @@ func whatsapp_LinkedDevice_JID(_handle CGoHandle) CGoHandle {
|
|
|
3903
3812
|
return handleFromPtr_types_JID(&cret)
|
|
3904
3813
|
}
|
|
3905
3814
|
|
|
3815
|
+
// --- wrapping struct: whatsapp.Location ---
|
|
3816
|
+
//
|
|
3817
|
+
//export whatsapp_Location_CTor
|
|
3818
|
+
func whatsapp_Location_CTor() CGoHandle {
|
|
3819
|
+
return CGoHandle(handleFromPtr_whatsapp_Location(&whatsapp.Location{}))
|
|
3820
|
+
}
|
|
3821
|
+
|
|
3822
|
+
//export whatsapp_Location_Latitude_Get
|
|
3823
|
+
func whatsapp_Location_Latitude_Get(handle CGoHandle) C.double {
|
|
3824
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3825
|
+
return C.double(op.Latitude)
|
|
3826
|
+
}
|
|
3827
|
+
|
|
3828
|
+
//export whatsapp_Location_Latitude_Set
|
|
3829
|
+
func whatsapp_Location_Latitude_Set(handle CGoHandle, val C.double) {
|
|
3830
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3831
|
+
op.Latitude = float64(val)
|
|
3832
|
+
}
|
|
3833
|
+
|
|
3834
|
+
//export whatsapp_Location_Longitude_Get
|
|
3835
|
+
func whatsapp_Location_Longitude_Get(handle CGoHandle) C.double {
|
|
3836
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3837
|
+
return C.double(op.Longitude)
|
|
3838
|
+
}
|
|
3839
|
+
|
|
3840
|
+
//export whatsapp_Location_Longitude_Set
|
|
3841
|
+
func whatsapp_Location_Longitude_Set(handle CGoHandle, val C.double) {
|
|
3842
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3843
|
+
op.Longitude = float64(val)
|
|
3844
|
+
}
|
|
3845
|
+
|
|
3846
|
+
//export whatsapp_Location_Accuracy_Get
|
|
3847
|
+
func whatsapp_Location_Accuracy_Get(handle CGoHandle) C.longlong {
|
|
3848
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3849
|
+
return C.longlong(op.Accuracy)
|
|
3850
|
+
}
|
|
3851
|
+
|
|
3852
|
+
//export whatsapp_Location_Accuracy_Set
|
|
3853
|
+
func whatsapp_Location_Accuracy_Set(handle CGoHandle, val C.longlong) {
|
|
3854
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3855
|
+
op.Accuracy = int(val)
|
|
3856
|
+
}
|
|
3857
|
+
|
|
3858
|
+
//export whatsapp_Location_IsLive_Get
|
|
3859
|
+
func whatsapp_Location_IsLive_Get(handle CGoHandle) C.char {
|
|
3860
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3861
|
+
return boolGoToPy(op.IsLive)
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
//export whatsapp_Location_IsLive_Set
|
|
3865
|
+
func whatsapp_Location_IsLive_Set(handle CGoHandle, val C.char) {
|
|
3866
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3867
|
+
op.IsLive = boolPyToGo(val)
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
//export whatsapp_Location_Name_Get
|
|
3871
|
+
func whatsapp_Location_Name_Get(handle CGoHandle) *C.char {
|
|
3872
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3873
|
+
return C.CString(op.Name)
|
|
3874
|
+
}
|
|
3875
|
+
|
|
3876
|
+
//export whatsapp_Location_Name_Set
|
|
3877
|
+
func whatsapp_Location_Name_Set(handle CGoHandle, val *C.char) {
|
|
3878
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3879
|
+
op.Name = C.GoString(val)
|
|
3880
|
+
}
|
|
3881
|
+
|
|
3882
|
+
//export whatsapp_Location_Address_Get
|
|
3883
|
+
func whatsapp_Location_Address_Get(handle CGoHandle) *C.char {
|
|
3884
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3885
|
+
return C.CString(op.Address)
|
|
3886
|
+
}
|
|
3887
|
+
|
|
3888
|
+
//export whatsapp_Location_Address_Set
|
|
3889
|
+
func whatsapp_Location_Address_Set(handle CGoHandle, val *C.char) {
|
|
3890
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3891
|
+
op.Address = C.GoString(val)
|
|
3892
|
+
}
|
|
3893
|
+
|
|
3894
|
+
//export whatsapp_Location_URL_Get
|
|
3895
|
+
func whatsapp_Location_URL_Get(handle CGoHandle) *C.char {
|
|
3896
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3897
|
+
return C.CString(op.URL)
|
|
3898
|
+
}
|
|
3899
|
+
|
|
3900
|
+
//export whatsapp_Location_URL_Set
|
|
3901
|
+
func whatsapp_Location_URL_Set(handle CGoHandle, val *C.char) {
|
|
3902
|
+
op := ptrFromHandle_whatsapp_Location(handle)
|
|
3903
|
+
op.URL = C.GoString(val)
|
|
3904
|
+
}
|
|
3905
|
+
|
|
3906
3906
|
// ---- Slices ---
|
|
3907
3907
|
|
|
3908
3908
|
// ---- Maps ---
|