github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/webrtcloggingprivate/bindings/ffi_bindings.ts (about) 1 import { importModule, Application, heap, Pointer } from "@ffi"; 2 3 importModule("plat/js/webext/webrtcloggingprivate", (A: Application) => { 4 const WEBEXT = typeof globalThis.browser === "undefined" ? globalThis.chrome : globalThis.browser; 5 6 return { 7 "store_MetaDataEntry": (ptr: Pointer, ref: heap.Ref<any>) => { 8 const x = A.H.get<any>(ref); 9 10 if (typeof x === "undefined") { 11 A.store.Bool(ptr + 8, false); 12 A.store.Ref(ptr + 0, undefined); 13 A.store.Ref(ptr + 4, undefined); 14 } else { 15 A.store.Bool(ptr + 8, true); 16 A.store.Ref(ptr + 0, x["key"]); 17 A.store.Ref(ptr + 4, x["value"]); 18 } 19 }, 20 "load_MetaDataEntry": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 21 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 22 23 x["key"] = A.load.Ref(ptr + 0, undefined); 24 x["value"] = A.load.Ref(ptr + 4, undefined); 25 return create === A.H.TRUE ? A.H.push(x) : ref; 26 }, 27 28 "store_RecordingInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 29 const x = A.H.get<any>(ref); 30 31 if (typeof x === "undefined") { 32 A.store.Bool(ptr + 8, false); 33 A.store.Ref(ptr + 0, undefined); 34 A.store.Bool(ptr + 6, false); 35 A.store.Bool(ptr + 4, false); 36 A.store.Bool(ptr + 7, false); 37 A.store.Bool(ptr + 5, false); 38 } else { 39 A.store.Bool(ptr + 8, true); 40 A.store.Ref(ptr + 0, x["prefixPath"]); 41 A.store.Bool(ptr + 6, "didStop" in x ? true : false); 42 A.store.Bool(ptr + 4, x["didStop"] ? true : false); 43 A.store.Bool(ptr + 7, "didManualStop" in x ? true : false); 44 A.store.Bool(ptr + 5, x["didManualStop"] ? true : false); 45 } 46 }, 47 "load_RecordingInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 48 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 49 50 x["prefixPath"] = A.load.Ref(ptr + 0, undefined); 51 if (A.load.Bool(ptr + 6)) { 52 x["didStop"] = A.load.Bool(ptr + 4); 53 } else { 54 delete x["didStop"]; 55 } 56 if (A.load.Bool(ptr + 7)) { 57 x["didManualStop"] = A.load.Bool(ptr + 5); 58 } else { 59 delete x["didManualStop"]; 60 } 61 return create === A.H.TRUE ? A.H.push(x) : ref; 62 }, 63 64 "store_RequestInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 65 const x = A.H.get<any>(ref); 66 67 if (typeof x === "undefined") { 68 A.store.Bool(ptr + 12, false); 69 A.store.Bool(ptr + 9, false); 70 A.store.Int32(ptr + 0, 0); 71 A.store.Bool(ptr + 10, false); 72 A.store.Int32(ptr + 4, 0); 73 A.store.Bool(ptr + 11, false); 74 A.store.Bool(ptr + 8, false); 75 } else { 76 A.store.Bool(ptr + 12, true); 77 A.store.Bool(ptr + 9, "tabId" in x ? true : false); 78 A.store.Int32(ptr + 0, x["tabId"] === undefined ? 0 : (x["tabId"] as number)); 79 A.store.Bool(ptr + 10, "guestProcessId" in x ? true : false); 80 A.store.Int32(ptr + 4, x["guestProcessId"] === undefined ? 0 : (x["guestProcessId"] as number)); 81 A.store.Bool(ptr + 11, "targetWebview" in x ? true : false); 82 A.store.Bool(ptr + 8, x["targetWebview"] ? true : false); 83 } 84 }, 85 "load_RequestInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 86 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 87 88 if (A.load.Bool(ptr + 9)) { 89 x["tabId"] = A.load.Int32(ptr + 0); 90 } else { 91 delete x["tabId"]; 92 } 93 if (A.load.Bool(ptr + 10)) { 94 x["guestProcessId"] = A.load.Int32(ptr + 4); 95 } else { 96 delete x["guestProcessId"]; 97 } 98 if (A.load.Bool(ptr + 11)) { 99 x["targetWebview"] = A.load.Bool(ptr + 8); 100 } else { 101 delete x["targetWebview"]; 102 } 103 return create === A.H.TRUE ? A.H.push(x) : ref; 104 }, 105 106 "store_StartEventLoggingResult": (ptr: Pointer, ref: heap.Ref<any>) => { 107 const x = A.H.get<any>(ref); 108 109 if (typeof x === "undefined") { 110 A.store.Bool(ptr + 4, false); 111 A.store.Ref(ptr + 0, undefined); 112 } else { 113 A.store.Bool(ptr + 4, true); 114 A.store.Ref(ptr + 0, x["logId"]); 115 } 116 }, 117 "load_StartEventLoggingResult": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 118 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 119 120 x["logId"] = A.load.Ref(ptr + 0, undefined); 121 return create === A.H.TRUE ? A.H.push(x) : ref; 122 }, 123 124 "store_UploadResult": (ptr: Pointer, ref: heap.Ref<any>) => { 125 const x = A.H.get<any>(ref); 126 127 if (typeof x === "undefined") { 128 A.store.Bool(ptr + 4, false); 129 A.store.Ref(ptr + 0, undefined); 130 } else { 131 A.store.Bool(ptr + 4, true); 132 A.store.Ref(ptr + 0, x["reportId"]); 133 } 134 }, 135 "load_UploadResult": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 136 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 137 138 x["reportId"] = A.load.Ref(ptr + 0, undefined); 139 return create === A.H.TRUE ? A.H.push(x) : ref; 140 }, 141 "has_Discard": (): heap.Ref<boolean> => { 142 if (WEBEXT?.webrtcLoggingPrivate && "discard" in WEBEXT?.webrtcLoggingPrivate) { 143 return A.H.TRUE; 144 } 145 return A.H.FALSE; 146 }, 147 "func_Discard": (fn: Pointer): void => { 148 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.discard); 149 }, 150 "call_Discard": ( 151 retPtr: Pointer, 152 request: Pointer, 153 securityOrigin: heap.Ref<object>, 154 callback: heap.Ref<object> 155 ): void => { 156 const request_ffi = {}; 157 158 if (A.load.Bool(request + 9)) { 159 request_ffi["tabId"] = A.load.Int32(request + 0); 160 } 161 if (A.load.Bool(request + 10)) { 162 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 163 } 164 if (A.load.Bool(request + 11)) { 165 request_ffi["targetWebview"] = A.load.Bool(request + 8); 166 } 167 168 const _ret = WEBEXT.webrtcLoggingPrivate.discard( 169 request_ffi, 170 A.H.get<object>(securityOrigin), 171 A.H.get<object>(callback) 172 ); 173 }, 174 "try_Discard": ( 175 retPtr: Pointer, 176 errPtr: Pointer, 177 request: Pointer, 178 securityOrigin: heap.Ref<object>, 179 callback: heap.Ref<object> 180 ): heap.Ref<boolean> => { 181 try { 182 const request_ffi = {}; 183 184 if (A.load.Bool(request + 9)) { 185 request_ffi["tabId"] = A.load.Int32(request + 0); 186 } 187 if (A.load.Bool(request + 10)) { 188 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 189 } 190 if (A.load.Bool(request + 11)) { 191 request_ffi["targetWebview"] = A.load.Bool(request + 8); 192 } 193 194 const _ret = WEBEXT.webrtcLoggingPrivate.discard( 195 request_ffi, 196 A.H.get<object>(securityOrigin), 197 A.H.get<object>(callback) 198 ); 199 return A.H.TRUE; 200 } catch (err: any) { 201 A.store.Ref(errPtr, err); 202 return A.H.FALSE; 203 } 204 }, 205 "has_GetLogsDirectory": (): heap.Ref<boolean> => { 206 if (WEBEXT?.webrtcLoggingPrivate && "getLogsDirectory" in WEBEXT?.webrtcLoggingPrivate) { 207 return A.H.TRUE; 208 } 209 return A.H.FALSE; 210 }, 211 "func_GetLogsDirectory": (fn: Pointer): void => { 212 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.getLogsDirectory); 213 }, 214 "call_GetLogsDirectory": (retPtr: Pointer, callback: heap.Ref<object>): void => { 215 const _ret = WEBEXT.webrtcLoggingPrivate.getLogsDirectory(A.H.get<object>(callback)); 216 }, 217 "try_GetLogsDirectory": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 218 try { 219 const _ret = WEBEXT.webrtcLoggingPrivate.getLogsDirectory(A.H.get<object>(callback)); 220 return A.H.TRUE; 221 } catch (err: any) { 222 A.store.Ref(errPtr, err); 223 return A.H.FALSE; 224 } 225 }, 226 "has_SetMetaData": (): heap.Ref<boolean> => { 227 if (WEBEXT?.webrtcLoggingPrivate && "setMetaData" in WEBEXT?.webrtcLoggingPrivate) { 228 return A.H.TRUE; 229 } 230 return A.H.FALSE; 231 }, 232 "func_SetMetaData": (fn: Pointer): void => { 233 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.setMetaData); 234 }, 235 "call_SetMetaData": ( 236 retPtr: Pointer, 237 request: Pointer, 238 securityOrigin: heap.Ref<object>, 239 metaData: heap.Ref<object>, 240 callback: heap.Ref<object> 241 ): void => { 242 const request_ffi = {}; 243 244 if (A.load.Bool(request + 9)) { 245 request_ffi["tabId"] = A.load.Int32(request + 0); 246 } 247 if (A.load.Bool(request + 10)) { 248 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 249 } 250 if (A.load.Bool(request + 11)) { 251 request_ffi["targetWebview"] = A.load.Bool(request + 8); 252 } 253 254 const _ret = WEBEXT.webrtcLoggingPrivate.setMetaData( 255 request_ffi, 256 A.H.get<object>(securityOrigin), 257 A.H.get<object>(metaData), 258 A.H.get<object>(callback) 259 ); 260 }, 261 "try_SetMetaData": ( 262 retPtr: Pointer, 263 errPtr: Pointer, 264 request: Pointer, 265 securityOrigin: heap.Ref<object>, 266 metaData: heap.Ref<object>, 267 callback: heap.Ref<object> 268 ): heap.Ref<boolean> => { 269 try { 270 const request_ffi = {}; 271 272 if (A.load.Bool(request + 9)) { 273 request_ffi["tabId"] = A.load.Int32(request + 0); 274 } 275 if (A.load.Bool(request + 10)) { 276 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 277 } 278 if (A.load.Bool(request + 11)) { 279 request_ffi["targetWebview"] = A.load.Bool(request + 8); 280 } 281 282 const _ret = WEBEXT.webrtcLoggingPrivate.setMetaData( 283 request_ffi, 284 A.H.get<object>(securityOrigin), 285 A.H.get<object>(metaData), 286 A.H.get<object>(callback) 287 ); 288 return A.H.TRUE; 289 } catch (err: any) { 290 A.store.Ref(errPtr, err); 291 return A.H.FALSE; 292 } 293 }, 294 "has_SetUploadOnRenderClose": (): heap.Ref<boolean> => { 295 if (WEBEXT?.webrtcLoggingPrivate && "setUploadOnRenderClose" in WEBEXT?.webrtcLoggingPrivate) { 296 return A.H.TRUE; 297 } 298 return A.H.FALSE; 299 }, 300 "func_SetUploadOnRenderClose": (fn: Pointer): void => { 301 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.setUploadOnRenderClose); 302 }, 303 "call_SetUploadOnRenderClose": ( 304 retPtr: Pointer, 305 request: Pointer, 306 securityOrigin: heap.Ref<object>, 307 shouldUpload: heap.Ref<boolean> 308 ): void => { 309 const request_ffi = {}; 310 311 if (A.load.Bool(request + 9)) { 312 request_ffi["tabId"] = A.load.Int32(request + 0); 313 } 314 if (A.load.Bool(request + 10)) { 315 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 316 } 317 if (A.load.Bool(request + 11)) { 318 request_ffi["targetWebview"] = A.load.Bool(request + 8); 319 } 320 321 const _ret = WEBEXT.webrtcLoggingPrivate.setUploadOnRenderClose( 322 request_ffi, 323 A.H.get<object>(securityOrigin), 324 shouldUpload === A.H.TRUE 325 ); 326 }, 327 "try_SetUploadOnRenderClose": ( 328 retPtr: Pointer, 329 errPtr: Pointer, 330 request: Pointer, 331 securityOrigin: heap.Ref<object>, 332 shouldUpload: heap.Ref<boolean> 333 ): heap.Ref<boolean> => { 334 try { 335 const request_ffi = {}; 336 337 if (A.load.Bool(request + 9)) { 338 request_ffi["tabId"] = A.load.Int32(request + 0); 339 } 340 if (A.load.Bool(request + 10)) { 341 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 342 } 343 if (A.load.Bool(request + 11)) { 344 request_ffi["targetWebview"] = A.load.Bool(request + 8); 345 } 346 347 const _ret = WEBEXT.webrtcLoggingPrivate.setUploadOnRenderClose( 348 request_ffi, 349 A.H.get<object>(securityOrigin), 350 shouldUpload === A.H.TRUE 351 ); 352 return A.H.TRUE; 353 } catch (err: any) { 354 A.store.Ref(errPtr, err); 355 return A.H.FALSE; 356 } 357 }, 358 "has_Start": (): heap.Ref<boolean> => { 359 if (WEBEXT?.webrtcLoggingPrivate && "start" in WEBEXT?.webrtcLoggingPrivate) { 360 return A.H.TRUE; 361 } 362 return A.H.FALSE; 363 }, 364 "func_Start": (fn: Pointer): void => { 365 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.start); 366 }, 367 "call_Start": ( 368 retPtr: Pointer, 369 request: Pointer, 370 securityOrigin: heap.Ref<object>, 371 callback: heap.Ref<object> 372 ): void => { 373 const request_ffi = {}; 374 375 if (A.load.Bool(request + 9)) { 376 request_ffi["tabId"] = A.load.Int32(request + 0); 377 } 378 if (A.load.Bool(request + 10)) { 379 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 380 } 381 if (A.load.Bool(request + 11)) { 382 request_ffi["targetWebview"] = A.load.Bool(request + 8); 383 } 384 385 const _ret = WEBEXT.webrtcLoggingPrivate.start( 386 request_ffi, 387 A.H.get<object>(securityOrigin), 388 A.H.get<object>(callback) 389 ); 390 }, 391 "try_Start": ( 392 retPtr: Pointer, 393 errPtr: Pointer, 394 request: Pointer, 395 securityOrigin: heap.Ref<object>, 396 callback: heap.Ref<object> 397 ): heap.Ref<boolean> => { 398 try { 399 const request_ffi = {}; 400 401 if (A.load.Bool(request + 9)) { 402 request_ffi["tabId"] = A.load.Int32(request + 0); 403 } 404 if (A.load.Bool(request + 10)) { 405 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 406 } 407 if (A.load.Bool(request + 11)) { 408 request_ffi["targetWebview"] = A.load.Bool(request + 8); 409 } 410 411 const _ret = WEBEXT.webrtcLoggingPrivate.start( 412 request_ffi, 413 A.H.get<object>(securityOrigin), 414 A.H.get<object>(callback) 415 ); 416 return A.H.TRUE; 417 } catch (err: any) { 418 A.store.Ref(errPtr, err); 419 return A.H.FALSE; 420 } 421 }, 422 "has_StartAudioDebugRecordings": (): heap.Ref<boolean> => { 423 if (WEBEXT?.webrtcLoggingPrivate && "startAudioDebugRecordings" in WEBEXT?.webrtcLoggingPrivate) { 424 return A.H.TRUE; 425 } 426 return A.H.FALSE; 427 }, 428 "func_StartAudioDebugRecordings": (fn: Pointer): void => { 429 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.startAudioDebugRecordings); 430 }, 431 "call_StartAudioDebugRecordings": ( 432 retPtr: Pointer, 433 request: Pointer, 434 securityOrigin: heap.Ref<object>, 435 seconds: number, 436 callback: heap.Ref<object> 437 ): void => { 438 const request_ffi = {}; 439 440 if (A.load.Bool(request + 9)) { 441 request_ffi["tabId"] = A.load.Int32(request + 0); 442 } 443 if (A.load.Bool(request + 10)) { 444 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 445 } 446 if (A.load.Bool(request + 11)) { 447 request_ffi["targetWebview"] = A.load.Bool(request + 8); 448 } 449 450 const _ret = WEBEXT.webrtcLoggingPrivate.startAudioDebugRecordings( 451 request_ffi, 452 A.H.get<object>(securityOrigin), 453 seconds, 454 A.H.get<object>(callback) 455 ); 456 }, 457 "try_StartAudioDebugRecordings": ( 458 retPtr: Pointer, 459 errPtr: Pointer, 460 request: Pointer, 461 securityOrigin: heap.Ref<object>, 462 seconds: number, 463 callback: heap.Ref<object> 464 ): heap.Ref<boolean> => { 465 try { 466 const request_ffi = {}; 467 468 if (A.load.Bool(request + 9)) { 469 request_ffi["tabId"] = A.load.Int32(request + 0); 470 } 471 if (A.load.Bool(request + 10)) { 472 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 473 } 474 if (A.load.Bool(request + 11)) { 475 request_ffi["targetWebview"] = A.load.Bool(request + 8); 476 } 477 478 const _ret = WEBEXT.webrtcLoggingPrivate.startAudioDebugRecordings( 479 request_ffi, 480 A.H.get<object>(securityOrigin), 481 seconds, 482 A.H.get<object>(callback) 483 ); 484 return A.H.TRUE; 485 } catch (err: any) { 486 A.store.Ref(errPtr, err); 487 return A.H.FALSE; 488 } 489 }, 490 "has_StartEventLogging": (): heap.Ref<boolean> => { 491 if (WEBEXT?.webrtcLoggingPrivate && "startEventLogging" in WEBEXT?.webrtcLoggingPrivate) { 492 return A.H.TRUE; 493 } 494 return A.H.FALSE; 495 }, 496 "func_StartEventLogging": (fn: Pointer): void => { 497 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.startEventLogging); 498 }, 499 "call_StartEventLogging": ( 500 retPtr: Pointer, 501 request: Pointer, 502 securityOrigin: heap.Ref<object>, 503 sessionId: heap.Ref<object>, 504 maxLogSizeBytes: number, 505 outputPeriodMs: number, 506 webAppId: number, 507 callback: heap.Ref<object> 508 ): void => { 509 const request_ffi = {}; 510 511 if (A.load.Bool(request + 9)) { 512 request_ffi["tabId"] = A.load.Int32(request + 0); 513 } 514 if (A.load.Bool(request + 10)) { 515 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 516 } 517 if (A.load.Bool(request + 11)) { 518 request_ffi["targetWebview"] = A.load.Bool(request + 8); 519 } 520 521 const _ret = WEBEXT.webrtcLoggingPrivate.startEventLogging( 522 request_ffi, 523 A.H.get<object>(securityOrigin), 524 A.H.get<object>(sessionId), 525 maxLogSizeBytes, 526 outputPeriodMs, 527 webAppId, 528 A.H.get<object>(callback) 529 ); 530 }, 531 "try_StartEventLogging": ( 532 retPtr: Pointer, 533 errPtr: Pointer, 534 request: Pointer, 535 securityOrigin: heap.Ref<object>, 536 sessionId: heap.Ref<object>, 537 maxLogSizeBytes: number, 538 outputPeriodMs: number, 539 webAppId: number, 540 callback: heap.Ref<object> 541 ): heap.Ref<boolean> => { 542 try { 543 const request_ffi = {}; 544 545 if (A.load.Bool(request + 9)) { 546 request_ffi["tabId"] = A.load.Int32(request + 0); 547 } 548 if (A.load.Bool(request + 10)) { 549 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 550 } 551 if (A.load.Bool(request + 11)) { 552 request_ffi["targetWebview"] = A.load.Bool(request + 8); 553 } 554 555 const _ret = WEBEXT.webrtcLoggingPrivate.startEventLogging( 556 request_ffi, 557 A.H.get<object>(securityOrigin), 558 A.H.get<object>(sessionId), 559 maxLogSizeBytes, 560 outputPeriodMs, 561 webAppId, 562 A.H.get<object>(callback) 563 ); 564 return A.H.TRUE; 565 } catch (err: any) { 566 A.store.Ref(errPtr, err); 567 return A.H.FALSE; 568 } 569 }, 570 "has_StartRtpDump": (): heap.Ref<boolean> => { 571 if (WEBEXT?.webrtcLoggingPrivate && "startRtpDump" in WEBEXT?.webrtcLoggingPrivate) { 572 return A.H.TRUE; 573 } 574 return A.H.FALSE; 575 }, 576 "func_StartRtpDump": (fn: Pointer): void => { 577 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.startRtpDump); 578 }, 579 "call_StartRtpDump": ( 580 retPtr: Pointer, 581 request: Pointer, 582 securityOrigin: heap.Ref<object>, 583 incoming: heap.Ref<boolean>, 584 outgoing: heap.Ref<boolean>, 585 callback: heap.Ref<object> 586 ): void => { 587 const request_ffi = {}; 588 589 if (A.load.Bool(request + 9)) { 590 request_ffi["tabId"] = A.load.Int32(request + 0); 591 } 592 if (A.load.Bool(request + 10)) { 593 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 594 } 595 if (A.load.Bool(request + 11)) { 596 request_ffi["targetWebview"] = A.load.Bool(request + 8); 597 } 598 599 const _ret = WEBEXT.webrtcLoggingPrivate.startRtpDump( 600 request_ffi, 601 A.H.get<object>(securityOrigin), 602 incoming === A.H.TRUE, 603 outgoing === A.H.TRUE, 604 A.H.get<object>(callback) 605 ); 606 }, 607 "try_StartRtpDump": ( 608 retPtr: Pointer, 609 errPtr: Pointer, 610 request: Pointer, 611 securityOrigin: heap.Ref<object>, 612 incoming: heap.Ref<boolean>, 613 outgoing: heap.Ref<boolean>, 614 callback: heap.Ref<object> 615 ): heap.Ref<boolean> => { 616 try { 617 const request_ffi = {}; 618 619 if (A.load.Bool(request + 9)) { 620 request_ffi["tabId"] = A.load.Int32(request + 0); 621 } 622 if (A.load.Bool(request + 10)) { 623 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 624 } 625 if (A.load.Bool(request + 11)) { 626 request_ffi["targetWebview"] = A.load.Bool(request + 8); 627 } 628 629 const _ret = WEBEXT.webrtcLoggingPrivate.startRtpDump( 630 request_ffi, 631 A.H.get<object>(securityOrigin), 632 incoming === A.H.TRUE, 633 outgoing === A.H.TRUE, 634 A.H.get<object>(callback) 635 ); 636 return A.H.TRUE; 637 } catch (err: any) { 638 A.store.Ref(errPtr, err); 639 return A.H.FALSE; 640 } 641 }, 642 "has_Stop": (): heap.Ref<boolean> => { 643 if (WEBEXT?.webrtcLoggingPrivate && "stop" in WEBEXT?.webrtcLoggingPrivate) { 644 return A.H.TRUE; 645 } 646 return A.H.FALSE; 647 }, 648 "func_Stop": (fn: Pointer): void => { 649 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.stop); 650 }, 651 "call_Stop": ( 652 retPtr: Pointer, 653 request: Pointer, 654 securityOrigin: heap.Ref<object>, 655 callback: heap.Ref<object> 656 ): void => { 657 const request_ffi = {}; 658 659 if (A.load.Bool(request + 9)) { 660 request_ffi["tabId"] = A.load.Int32(request + 0); 661 } 662 if (A.load.Bool(request + 10)) { 663 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 664 } 665 if (A.load.Bool(request + 11)) { 666 request_ffi["targetWebview"] = A.load.Bool(request + 8); 667 } 668 669 const _ret = WEBEXT.webrtcLoggingPrivate.stop( 670 request_ffi, 671 A.H.get<object>(securityOrigin), 672 A.H.get<object>(callback) 673 ); 674 }, 675 "try_Stop": ( 676 retPtr: Pointer, 677 errPtr: Pointer, 678 request: Pointer, 679 securityOrigin: heap.Ref<object>, 680 callback: heap.Ref<object> 681 ): heap.Ref<boolean> => { 682 try { 683 const request_ffi = {}; 684 685 if (A.load.Bool(request + 9)) { 686 request_ffi["tabId"] = A.load.Int32(request + 0); 687 } 688 if (A.load.Bool(request + 10)) { 689 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 690 } 691 if (A.load.Bool(request + 11)) { 692 request_ffi["targetWebview"] = A.load.Bool(request + 8); 693 } 694 695 const _ret = WEBEXT.webrtcLoggingPrivate.stop( 696 request_ffi, 697 A.H.get<object>(securityOrigin), 698 A.H.get<object>(callback) 699 ); 700 return A.H.TRUE; 701 } catch (err: any) { 702 A.store.Ref(errPtr, err); 703 return A.H.FALSE; 704 } 705 }, 706 "has_StopAudioDebugRecordings": (): heap.Ref<boolean> => { 707 if (WEBEXT?.webrtcLoggingPrivate && "stopAudioDebugRecordings" in WEBEXT?.webrtcLoggingPrivate) { 708 return A.H.TRUE; 709 } 710 return A.H.FALSE; 711 }, 712 "func_StopAudioDebugRecordings": (fn: Pointer): void => { 713 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.stopAudioDebugRecordings); 714 }, 715 "call_StopAudioDebugRecordings": ( 716 retPtr: Pointer, 717 request: Pointer, 718 securityOrigin: heap.Ref<object>, 719 callback: heap.Ref<object> 720 ): void => { 721 const request_ffi = {}; 722 723 if (A.load.Bool(request + 9)) { 724 request_ffi["tabId"] = A.load.Int32(request + 0); 725 } 726 if (A.load.Bool(request + 10)) { 727 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 728 } 729 if (A.load.Bool(request + 11)) { 730 request_ffi["targetWebview"] = A.load.Bool(request + 8); 731 } 732 733 const _ret = WEBEXT.webrtcLoggingPrivate.stopAudioDebugRecordings( 734 request_ffi, 735 A.H.get<object>(securityOrigin), 736 A.H.get<object>(callback) 737 ); 738 }, 739 "try_StopAudioDebugRecordings": ( 740 retPtr: Pointer, 741 errPtr: Pointer, 742 request: Pointer, 743 securityOrigin: heap.Ref<object>, 744 callback: heap.Ref<object> 745 ): heap.Ref<boolean> => { 746 try { 747 const request_ffi = {}; 748 749 if (A.load.Bool(request + 9)) { 750 request_ffi["tabId"] = A.load.Int32(request + 0); 751 } 752 if (A.load.Bool(request + 10)) { 753 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 754 } 755 if (A.load.Bool(request + 11)) { 756 request_ffi["targetWebview"] = A.load.Bool(request + 8); 757 } 758 759 const _ret = WEBEXT.webrtcLoggingPrivate.stopAudioDebugRecordings( 760 request_ffi, 761 A.H.get<object>(securityOrigin), 762 A.H.get<object>(callback) 763 ); 764 return A.H.TRUE; 765 } catch (err: any) { 766 A.store.Ref(errPtr, err); 767 return A.H.FALSE; 768 } 769 }, 770 "has_StopRtpDump": (): heap.Ref<boolean> => { 771 if (WEBEXT?.webrtcLoggingPrivate && "stopRtpDump" in WEBEXT?.webrtcLoggingPrivate) { 772 return A.H.TRUE; 773 } 774 return A.H.FALSE; 775 }, 776 "func_StopRtpDump": (fn: Pointer): void => { 777 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.stopRtpDump); 778 }, 779 "call_StopRtpDump": ( 780 retPtr: Pointer, 781 request: Pointer, 782 securityOrigin: heap.Ref<object>, 783 incoming: heap.Ref<boolean>, 784 outgoing: heap.Ref<boolean>, 785 callback: heap.Ref<object> 786 ): void => { 787 const request_ffi = {}; 788 789 if (A.load.Bool(request + 9)) { 790 request_ffi["tabId"] = A.load.Int32(request + 0); 791 } 792 if (A.load.Bool(request + 10)) { 793 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 794 } 795 if (A.load.Bool(request + 11)) { 796 request_ffi["targetWebview"] = A.load.Bool(request + 8); 797 } 798 799 const _ret = WEBEXT.webrtcLoggingPrivate.stopRtpDump( 800 request_ffi, 801 A.H.get<object>(securityOrigin), 802 incoming === A.H.TRUE, 803 outgoing === A.H.TRUE, 804 A.H.get<object>(callback) 805 ); 806 }, 807 "try_StopRtpDump": ( 808 retPtr: Pointer, 809 errPtr: Pointer, 810 request: Pointer, 811 securityOrigin: heap.Ref<object>, 812 incoming: heap.Ref<boolean>, 813 outgoing: heap.Ref<boolean>, 814 callback: heap.Ref<object> 815 ): heap.Ref<boolean> => { 816 try { 817 const request_ffi = {}; 818 819 if (A.load.Bool(request + 9)) { 820 request_ffi["tabId"] = A.load.Int32(request + 0); 821 } 822 if (A.load.Bool(request + 10)) { 823 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 824 } 825 if (A.load.Bool(request + 11)) { 826 request_ffi["targetWebview"] = A.load.Bool(request + 8); 827 } 828 829 const _ret = WEBEXT.webrtcLoggingPrivate.stopRtpDump( 830 request_ffi, 831 A.H.get<object>(securityOrigin), 832 incoming === A.H.TRUE, 833 outgoing === A.H.TRUE, 834 A.H.get<object>(callback) 835 ); 836 return A.H.TRUE; 837 } catch (err: any) { 838 A.store.Ref(errPtr, err); 839 return A.H.FALSE; 840 } 841 }, 842 "has_Store": (): heap.Ref<boolean> => { 843 if (WEBEXT?.webrtcLoggingPrivate && "store" in WEBEXT?.webrtcLoggingPrivate) { 844 return A.H.TRUE; 845 } 846 return A.H.FALSE; 847 }, 848 "func_Store": (fn: Pointer): void => { 849 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.store); 850 }, 851 "call_Store": ( 852 retPtr: Pointer, 853 request: Pointer, 854 securityOrigin: heap.Ref<object>, 855 logId: heap.Ref<object>, 856 callback: heap.Ref<object> 857 ): void => { 858 const request_ffi = {}; 859 860 if (A.load.Bool(request + 9)) { 861 request_ffi["tabId"] = A.load.Int32(request + 0); 862 } 863 if (A.load.Bool(request + 10)) { 864 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 865 } 866 if (A.load.Bool(request + 11)) { 867 request_ffi["targetWebview"] = A.load.Bool(request + 8); 868 } 869 870 const _ret = WEBEXT.webrtcLoggingPrivate.store( 871 request_ffi, 872 A.H.get<object>(securityOrigin), 873 A.H.get<object>(logId), 874 A.H.get<object>(callback) 875 ); 876 }, 877 "try_Store": ( 878 retPtr: Pointer, 879 errPtr: Pointer, 880 request: Pointer, 881 securityOrigin: heap.Ref<object>, 882 logId: heap.Ref<object>, 883 callback: heap.Ref<object> 884 ): heap.Ref<boolean> => { 885 try { 886 const request_ffi = {}; 887 888 if (A.load.Bool(request + 9)) { 889 request_ffi["tabId"] = A.load.Int32(request + 0); 890 } 891 if (A.load.Bool(request + 10)) { 892 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 893 } 894 if (A.load.Bool(request + 11)) { 895 request_ffi["targetWebview"] = A.load.Bool(request + 8); 896 } 897 898 const _ret = WEBEXT.webrtcLoggingPrivate.store( 899 request_ffi, 900 A.H.get<object>(securityOrigin), 901 A.H.get<object>(logId), 902 A.H.get<object>(callback) 903 ); 904 return A.H.TRUE; 905 } catch (err: any) { 906 A.store.Ref(errPtr, err); 907 return A.H.FALSE; 908 } 909 }, 910 "has_Upload": (): heap.Ref<boolean> => { 911 if (WEBEXT?.webrtcLoggingPrivate && "upload" in WEBEXT?.webrtcLoggingPrivate) { 912 return A.H.TRUE; 913 } 914 return A.H.FALSE; 915 }, 916 "func_Upload": (fn: Pointer): void => { 917 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.upload); 918 }, 919 "call_Upload": ( 920 retPtr: Pointer, 921 request: Pointer, 922 securityOrigin: heap.Ref<object>, 923 callback: heap.Ref<object> 924 ): void => { 925 const request_ffi = {}; 926 927 if (A.load.Bool(request + 9)) { 928 request_ffi["tabId"] = A.load.Int32(request + 0); 929 } 930 if (A.load.Bool(request + 10)) { 931 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 932 } 933 if (A.load.Bool(request + 11)) { 934 request_ffi["targetWebview"] = A.load.Bool(request + 8); 935 } 936 937 const _ret = WEBEXT.webrtcLoggingPrivate.upload( 938 request_ffi, 939 A.H.get<object>(securityOrigin), 940 A.H.get<object>(callback) 941 ); 942 }, 943 "try_Upload": ( 944 retPtr: Pointer, 945 errPtr: Pointer, 946 request: Pointer, 947 securityOrigin: heap.Ref<object>, 948 callback: heap.Ref<object> 949 ): heap.Ref<boolean> => { 950 try { 951 const request_ffi = {}; 952 953 if (A.load.Bool(request + 9)) { 954 request_ffi["tabId"] = A.load.Int32(request + 0); 955 } 956 if (A.load.Bool(request + 10)) { 957 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 958 } 959 if (A.load.Bool(request + 11)) { 960 request_ffi["targetWebview"] = A.load.Bool(request + 8); 961 } 962 963 const _ret = WEBEXT.webrtcLoggingPrivate.upload( 964 request_ffi, 965 A.H.get<object>(securityOrigin), 966 A.H.get<object>(callback) 967 ); 968 return A.H.TRUE; 969 } catch (err: any) { 970 A.store.Ref(errPtr, err); 971 return A.H.FALSE; 972 } 973 }, 974 "has_UploadStored": (): heap.Ref<boolean> => { 975 if (WEBEXT?.webrtcLoggingPrivate && "uploadStored" in WEBEXT?.webrtcLoggingPrivate) { 976 return A.H.TRUE; 977 } 978 return A.H.FALSE; 979 }, 980 "func_UploadStored": (fn: Pointer): void => { 981 A.store.Ref(fn, WEBEXT.webrtcLoggingPrivate.uploadStored); 982 }, 983 "call_UploadStored": ( 984 retPtr: Pointer, 985 request: Pointer, 986 securityOrigin: heap.Ref<object>, 987 logId: heap.Ref<object>, 988 callback: heap.Ref<object> 989 ): void => { 990 const request_ffi = {}; 991 992 if (A.load.Bool(request + 9)) { 993 request_ffi["tabId"] = A.load.Int32(request + 0); 994 } 995 if (A.load.Bool(request + 10)) { 996 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 997 } 998 if (A.load.Bool(request + 11)) { 999 request_ffi["targetWebview"] = A.load.Bool(request + 8); 1000 } 1001 1002 const _ret = WEBEXT.webrtcLoggingPrivate.uploadStored( 1003 request_ffi, 1004 A.H.get<object>(securityOrigin), 1005 A.H.get<object>(logId), 1006 A.H.get<object>(callback) 1007 ); 1008 }, 1009 "try_UploadStored": ( 1010 retPtr: Pointer, 1011 errPtr: Pointer, 1012 request: Pointer, 1013 securityOrigin: heap.Ref<object>, 1014 logId: heap.Ref<object>, 1015 callback: heap.Ref<object> 1016 ): heap.Ref<boolean> => { 1017 try { 1018 const request_ffi = {}; 1019 1020 if (A.load.Bool(request + 9)) { 1021 request_ffi["tabId"] = A.load.Int32(request + 0); 1022 } 1023 if (A.load.Bool(request + 10)) { 1024 request_ffi["guestProcessId"] = A.load.Int32(request + 4); 1025 } 1026 if (A.load.Bool(request + 11)) { 1027 request_ffi["targetWebview"] = A.load.Bool(request + 8); 1028 } 1029 1030 const _ret = WEBEXT.webrtcLoggingPrivate.uploadStored( 1031 request_ffi, 1032 A.H.get<object>(securityOrigin), 1033 A.H.get<object>(logId), 1034 A.H.get<object>(callback) 1035 ); 1036 return A.H.TRUE; 1037 } catch (err: any) { 1038 A.store.Ref(errPtr, err); 1039 return A.H.FALSE; 1040 } 1041 }, 1042 }; 1043 });