github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/webrtcloggingprivate/apis_js_wasm.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  
     4  package webrtcloggingprivate
     5  
     6  import (
     7  	"github.com/primecitizens/pcz/std/core/abi"
     8  	"github.com/primecitizens/pcz/std/core/mark"
     9  	"github.com/primecitizens/pcz/std/ffi/js"
    10  	"github.com/primecitizens/pcz/std/plat/js/webext/webrtcloggingprivate/bindings"
    11  )
    12  
    13  type GenericDoneCallbackFunc func(this js.Ref) js.Ref
    14  
    15  func (fn GenericDoneCallbackFunc) Register() js.Func[func()] {
    16  	return js.RegisterCallback[func()](
    17  		fn, abi.FuncPCABIInternal(fn),
    18  	)
    19  }
    20  
    21  func (fn GenericDoneCallbackFunc) DispatchCallback(
    22  	targetPC uintptr, ctx *js.CallbackContext,
    23  ) {
    24  	args := ctx.Args()
    25  	if len(args) != 0+1 /* js this */ ||
    26  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
    27  		js.ThrowInvalidCallbackInvocation()
    28  	}
    29  
    30  	if ctx.Return(fn(
    31  		args[0],
    32  	)) {
    33  		return
    34  	}
    35  
    36  	js.ThrowCallbackValueNotReturned()
    37  }
    38  
    39  type GenericDoneCallback[T any] struct {
    40  	Fn  func(arg T, this js.Ref) js.Ref
    41  	Arg T
    42  }
    43  
    44  func (cb *GenericDoneCallback[T]) Register() js.Func[func()] {
    45  	return js.RegisterCallback[func()](
    46  		cb, abi.FuncPCABIInternal(cb.Fn),
    47  	)
    48  }
    49  
    50  func (cb *GenericDoneCallback[T]) DispatchCallback(
    51  	targetPC uintptr, ctx *js.CallbackContext,
    52  ) {
    53  	args := ctx.Args()
    54  	if len(args) != 0+1 /* js this */ ||
    55  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
    56  		js.ThrowInvalidCallbackInvocation()
    57  	}
    58  
    59  	if ctx.Return(cb.Fn(
    60  		cb.Arg,
    61  		args[0],
    62  	)) {
    63  		return
    64  	}
    65  
    66  	js.ThrowCallbackValueNotReturned()
    67  }
    68  
    69  type GetLogsDirectoryCallbackFunc func(this js.Ref, entry js.Object) js.Ref
    70  
    71  func (fn GetLogsDirectoryCallbackFunc) Register() js.Func[func(entry js.Object)] {
    72  	return js.RegisterCallback[func(entry js.Object)](
    73  		fn, abi.FuncPCABIInternal(fn),
    74  	)
    75  }
    76  
    77  func (fn GetLogsDirectoryCallbackFunc) DispatchCallback(
    78  	targetPC uintptr, ctx *js.CallbackContext,
    79  ) {
    80  	args := ctx.Args()
    81  	if len(args) != 1+1 /* js this */ ||
    82  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
    83  		js.ThrowInvalidCallbackInvocation()
    84  	}
    85  
    86  	if ctx.Return(fn(
    87  		args[0],
    88  
    89  		js.Object{}.FromRef(args[0+1]),
    90  	)) {
    91  		return
    92  	}
    93  
    94  	js.ThrowCallbackValueNotReturned()
    95  }
    96  
    97  type GetLogsDirectoryCallback[T any] struct {
    98  	Fn  func(arg T, this js.Ref, entry js.Object) js.Ref
    99  	Arg T
   100  }
   101  
   102  func (cb *GetLogsDirectoryCallback[T]) Register() js.Func[func(entry js.Object)] {
   103  	return js.RegisterCallback[func(entry js.Object)](
   104  		cb, abi.FuncPCABIInternal(cb.Fn),
   105  	)
   106  }
   107  
   108  func (cb *GetLogsDirectoryCallback[T]) DispatchCallback(
   109  	targetPC uintptr, ctx *js.CallbackContext,
   110  ) {
   111  	args := ctx.Args()
   112  	if len(args) != 1+1 /* js this */ ||
   113  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
   114  		js.ThrowInvalidCallbackInvocation()
   115  	}
   116  
   117  	if ctx.Return(cb.Fn(
   118  		cb.Arg,
   119  		args[0],
   120  
   121  		js.Object{}.FromRef(args[0+1]),
   122  	)) {
   123  		return
   124  	}
   125  
   126  	js.ThrowCallbackValueNotReturned()
   127  }
   128  
   129  type MetaDataEntry struct {
   130  	// Key is "MetaDataEntry.key"
   131  	//
   132  	// Optional
   133  	Key js.String
   134  	// Value is "MetaDataEntry.value"
   135  	//
   136  	// Optional
   137  	Value js.String
   138  
   139  	FFI_USE bool
   140  }
   141  
   142  // FromRef calls UpdateFrom and returns a MetaDataEntry with all fields set.
   143  func (p MetaDataEntry) FromRef(ref js.Ref) MetaDataEntry {
   144  	p.UpdateFrom(ref)
   145  	return p
   146  }
   147  
   148  // New creates a new MetaDataEntry in the application heap.
   149  func (p MetaDataEntry) New() js.Ref {
   150  	return bindings.MetaDataEntryJSLoad(
   151  		js.Pointer(&p), js.True, 0,
   152  	)
   153  }
   154  
   155  // UpdateFrom copies value of all fields of the heap object to p.
   156  func (p *MetaDataEntry) UpdateFrom(ref js.Ref) {
   157  	bindings.MetaDataEntryJSStore(
   158  		js.Pointer(p), ref,
   159  	)
   160  }
   161  
   162  // Update writes all fields of the p to the heap object referenced by ref.
   163  func (p *MetaDataEntry) Update(ref js.Ref) {
   164  	bindings.MetaDataEntryJSLoad(
   165  		js.Pointer(p), js.False, ref,
   166  	)
   167  }
   168  
   169  // FreeMembers frees fields with heap reference, if recursive is true
   170  // free all heap references reachable from p.
   171  func (p *MetaDataEntry) FreeMembers(recursive bool) {
   172  	js.Free(
   173  		p.Key.Ref(),
   174  		p.Value.Ref(),
   175  	)
   176  	p.Key = p.Key.FromRef(js.Undefined)
   177  	p.Value = p.Value.FromRef(js.Undefined)
   178  }
   179  
   180  type RecordingDoneCallbackFunc func(this js.Ref, info *RecordingInfo) js.Ref
   181  
   182  func (fn RecordingDoneCallbackFunc) Register() js.Func[func(info *RecordingInfo)] {
   183  	return js.RegisterCallback[func(info *RecordingInfo)](
   184  		fn, abi.FuncPCABIInternal(fn),
   185  	)
   186  }
   187  
   188  func (fn RecordingDoneCallbackFunc) DispatchCallback(
   189  	targetPC uintptr, ctx *js.CallbackContext,
   190  ) {
   191  	args := ctx.Args()
   192  	if len(args) != 1+1 /* js this */ ||
   193  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
   194  		js.ThrowInvalidCallbackInvocation()
   195  	}
   196  	var arg0 RecordingInfo
   197  	arg0.UpdateFrom(args[0+1])
   198  	defer arg0.FreeMembers(true)
   199  
   200  	if ctx.Return(fn(
   201  		args[0],
   202  
   203  		mark.NoEscape(&arg0),
   204  	)) {
   205  		return
   206  	}
   207  
   208  	js.ThrowCallbackValueNotReturned()
   209  }
   210  
   211  type RecordingDoneCallback[T any] struct {
   212  	Fn  func(arg T, this js.Ref, info *RecordingInfo) js.Ref
   213  	Arg T
   214  }
   215  
   216  func (cb *RecordingDoneCallback[T]) Register() js.Func[func(info *RecordingInfo)] {
   217  	return js.RegisterCallback[func(info *RecordingInfo)](
   218  		cb, abi.FuncPCABIInternal(cb.Fn),
   219  	)
   220  }
   221  
   222  func (cb *RecordingDoneCallback[T]) DispatchCallback(
   223  	targetPC uintptr, ctx *js.CallbackContext,
   224  ) {
   225  	args := ctx.Args()
   226  	if len(args) != 1+1 /* js this */ ||
   227  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
   228  		js.ThrowInvalidCallbackInvocation()
   229  	}
   230  	var arg0 RecordingInfo
   231  	arg0.UpdateFrom(args[0+1])
   232  	defer arg0.FreeMembers(true)
   233  
   234  	if ctx.Return(cb.Fn(
   235  		cb.Arg,
   236  		args[0],
   237  
   238  		mark.NoEscape(&arg0),
   239  	)) {
   240  		return
   241  	}
   242  
   243  	js.ThrowCallbackValueNotReturned()
   244  }
   245  
   246  type RecordingInfo struct {
   247  	// PrefixPath is "RecordingInfo.prefixPath"
   248  	//
   249  	// Optional
   250  	PrefixPath js.String
   251  	// DidStop is "RecordingInfo.didStop"
   252  	//
   253  	// Optional
   254  	//
   255  	// NOTE: FFI_USE_DidStop MUST be set to true to make this field effective.
   256  	DidStop bool
   257  	// DidManualStop is "RecordingInfo.didManualStop"
   258  	//
   259  	// Optional
   260  	//
   261  	// NOTE: FFI_USE_DidManualStop MUST be set to true to make this field effective.
   262  	DidManualStop bool
   263  
   264  	FFI_USE_DidStop       bool // for DidStop.
   265  	FFI_USE_DidManualStop bool // for DidManualStop.
   266  
   267  	FFI_USE bool
   268  }
   269  
   270  // FromRef calls UpdateFrom and returns a RecordingInfo with all fields set.
   271  func (p RecordingInfo) FromRef(ref js.Ref) RecordingInfo {
   272  	p.UpdateFrom(ref)
   273  	return p
   274  }
   275  
   276  // New creates a new RecordingInfo in the application heap.
   277  func (p RecordingInfo) New() js.Ref {
   278  	return bindings.RecordingInfoJSLoad(
   279  		js.Pointer(&p), js.True, 0,
   280  	)
   281  }
   282  
   283  // UpdateFrom copies value of all fields of the heap object to p.
   284  func (p *RecordingInfo) UpdateFrom(ref js.Ref) {
   285  	bindings.RecordingInfoJSStore(
   286  		js.Pointer(p), ref,
   287  	)
   288  }
   289  
   290  // Update writes all fields of the p to the heap object referenced by ref.
   291  func (p *RecordingInfo) Update(ref js.Ref) {
   292  	bindings.RecordingInfoJSLoad(
   293  		js.Pointer(p), js.False, ref,
   294  	)
   295  }
   296  
   297  // FreeMembers frees fields with heap reference, if recursive is true
   298  // free all heap references reachable from p.
   299  func (p *RecordingInfo) FreeMembers(recursive bool) {
   300  	js.Free(
   301  		p.PrefixPath.Ref(),
   302  	)
   303  	p.PrefixPath = p.PrefixPath.FromRef(js.Undefined)
   304  }
   305  
   306  type RequestInfo struct {
   307  	// TabId is "RequestInfo.tabId"
   308  	//
   309  	// Optional
   310  	//
   311  	// NOTE: FFI_USE_TabId MUST be set to true to make this field effective.
   312  	TabId int32
   313  	// GuestProcessId is "RequestInfo.guestProcessId"
   314  	//
   315  	// Optional
   316  	//
   317  	// NOTE: FFI_USE_GuestProcessId MUST be set to true to make this field effective.
   318  	GuestProcessId int32
   319  	// TargetWebview is "RequestInfo.targetWebview"
   320  	//
   321  	// Optional
   322  	//
   323  	// NOTE: FFI_USE_TargetWebview MUST be set to true to make this field effective.
   324  	TargetWebview bool
   325  
   326  	FFI_USE_TabId          bool // for TabId.
   327  	FFI_USE_GuestProcessId bool // for GuestProcessId.
   328  	FFI_USE_TargetWebview  bool // for TargetWebview.
   329  
   330  	FFI_USE bool
   331  }
   332  
   333  // FromRef calls UpdateFrom and returns a RequestInfo with all fields set.
   334  func (p RequestInfo) FromRef(ref js.Ref) RequestInfo {
   335  	p.UpdateFrom(ref)
   336  	return p
   337  }
   338  
   339  // New creates a new RequestInfo in the application heap.
   340  func (p RequestInfo) New() js.Ref {
   341  	return bindings.RequestInfoJSLoad(
   342  		js.Pointer(&p), js.True, 0,
   343  	)
   344  }
   345  
   346  // UpdateFrom copies value of all fields of the heap object to p.
   347  func (p *RequestInfo) UpdateFrom(ref js.Ref) {
   348  	bindings.RequestInfoJSStore(
   349  		js.Pointer(p), ref,
   350  	)
   351  }
   352  
   353  // Update writes all fields of the p to the heap object referenced by ref.
   354  func (p *RequestInfo) Update(ref js.Ref) {
   355  	bindings.RequestInfoJSLoad(
   356  		js.Pointer(p), js.False, ref,
   357  	)
   358  }
   359  
   360  // FreeMembers frees fields with heap reference, if recursive is true
   361  // free all heap references reachable from p.
   362  func (p *RequestInfo) FreeMembers(recursive bool) {
   363  }
   364  
   365  type StartEventLoggingCallbackFunc func(this js.Ref, result *StartEventLoggingResult) js.Ref
   366  
   367  func (fn StartEventLoggingCallbackFunc) Register() js.Func[func(result *StartEventLoggingResult)] {
   368  	return js.RegisterCallback[func(result *StartEventLoggingResult)](
   369  		fn, abi.FuncPCABIInternal(fn),
   370  	)
   371  }
   372  
   373  func (fn StartEventLoggingCallbackFunc) DispatchCallback(
   374  	targetPC uintptr, ctx *js.CallbackContext,
   375  ) {
   376  	args := ctx.Args()
   377  	if len(args) != 1+1 /* js this */ ||
   378  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
   379  		js.ThrowInvalidCallbackInvocation()
   380  	}
   381  	var arg0 StartEventLoggingResult
   382  	arg0.UpdateFrom(args[0+1])
   383  	defer arg0.FreeMembers(true)
   384  
   385  	if ctx.Return(fn(
   386  		args[0],
   387  
   388  		mark.NoEscape(&arg0),
   389  	)) {
   390  		return
   391  	}
   392  
   393  	js.ThrowCallbackValueNotReturned()
   394  }
   395  
   396  type StartEventLoggingCallback[T any] struct {
   397  	Fn  func(arg T, this js.Ref, result *StartEventLoggingResult) js.Ref
   398  	Arg T
   399  }
   400  
   401  func (cb *StartEventLoggingCallback[T]) Register() js.Func[func(result *StartEventLoggingResult)] {
   402  	return js.RegisterCallback[func(result *StartEventLoggingResult)](
   403  		cb, abi.FuncPCABIInternal(cb.Fn),
   404  	)
   405  }
   406  
   407  func (cb *StartEventLoggingCallback[T]) DispatchCallback(
   408  	targetPC uintptr, ctx *js.CallbackContext,
   409  ) {
   410  	args := ctx.Args()
   411  	if len(args) != 1+1 /* js this */ ||
   412  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
   413  		js.ThrowInvalidCallbackInvocation()
   414  	}
   415  	var arg0 StartEventLoggingResult
   416  	arg0.UpdateFrom(args[0+1])
   417  	defer arg0.FreeMembers(true)
   418  
   419  	if ctx.Return(cb.Fn(
   420  		cb.Arg,
   421  		args[0],
   422  
   423  		mark.NoEscape(&arg0),
   424  	)) {
   425  		return
   426  	}
   427  
   428  	js.ThrowCallbackValueNotReturned()
   429  }
   430  
   431  type StartEventLoggingResult struct {
   432  	// LogId is "StartEventLoggingResult.logId"
   433  	//
   434  	// Optional
   435  	LogId js.String
   436  
   437  	FFI_USE bool
   438  }
   439  
   440  // FromRef calls UpdateFrom and returns a StartEventLoggingResult with all fields set.
   441  func (p StartEventLoggingResult) FromRef(ref js.Ref) StartEventLoggingResult {
   442  	p.UpdateFrom(ref)
   443  	return p
   444  }
   445  
   446  // New creates a new StartEventLoggingResult in the application heap.
   447  func (p StartEventLoggingResult) New() js.Ref {
   448  	return bindings.StartEventLoggingResultJSLoad(
   449  		js.Pointer(&p), js.True, 0,
   450  	)
   451  }
   452  
   453  // UpdateFrom copies value of all fields of the heap object to p.
   454  func (p *StartEventLoggingResult) UpdateFrom(ref js.Ref) {
   455  	bindings.StartEventLoggingResultJSStore(
   456  		js.Pointer(p), ref,
   457  	)
   458  }
   459  
   460  // Update writes all fields of the p to the heap object referenced by ref.
   461  func (p *StartEventLoggingResult) Update(ref js.Ref) {
   462  	bindings.StartEventLoggingResultJSLoad(
   463  		js.Pointer(p), js.False, ref,
   464  	)
   465  }
   466  
   467  // FreeMembers frees fields with heap reference, if recursive is true
   468  // free all heap references reachable from p.
   469  func (p *StartEventLoggingResult) FreeMembers(recursive bool) {
   470  	js.Free(
   471  		p.LogId.Ref(),
   472  	)
   473  	p.LogId = p.LogId.FromRef(js.Undefined)
   474  }
   475  
   476  type UploadDoneCallbackFunc func(this js.Ref, result *UploadResult) js.Ref
   477  
   478  func (fn UploadDoneCallbackFunc) Register() js.Func[func(result *UploadResult)] {
   479  	return js.RegisterCallback[func(result *UploadResult)](
   480  		fn, abi.FuncPCABIInternal(fn),
   481  	)
   482  }
   483  
   484  func (fn UploadDoneCallbackFunc) DispatchCallback(
   485  	targetPC uintptr, ctx *js.CallbackContext,
   486  ) {
   487  	args := ctx.Args()
   488  	if len(args) != 1+1 /* js this */ ||
   489  		targetPC != uintptr(abi.FuncPCABIInternal(fn)) {
   490  		js.ThrowInvalidCallbackInvocation()
   491  	}
   492  	var arg0 UploadResult
   493  	arg0.UpdateFrom(args[0+1])
   494  	defer arg0.FreeMembers(true)
   495  
   496  	if ctx.Return(fn(
   497  		args[0],
   498  
   499  		mark.NoEscape(&arg0),
   500  	)) {
   501  		return
   502  	}
   503  
   504  	js.ThrowCallbackValueNotReturned()
   505  }
   506  
   507  type UploadDoneCallback[T any] struct {
   508  	Fn  func(arg T, this js.Ref, result *UploadResult) js.Ref
   509  	Arg T
   510  }
   511  
   512  func (cb *UploadDoneCallback[T]) Register() js.Func[func(result *UploadResult)] {
   513  	return js.RegisterCallback[func(result *UploadResult)](
   514  		cb, abi.FuncPCABIInternal(cb.Fn),
   515  	)
   516  }
   517  
   518  func (cb *UploadDoneCallback[T]) DispatchCallback(
   519  	targetPC uintptr, ctx *js.CallbackContext,
   520  ) {
   521  	args := ctx.Args()
   522  	if len(args) != 1+1 /* js this */ ||
   523  		targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) {
   524  		js.ThrowInvalidCallbackInvocation()
   525  	}
   526  	var arg0 UploadResult
   527  	arg0.UpdateFrom(args[0+1])
   528  	defer arg0.FreeMembers(true)
   529  
   530  	if ctx.Return(cb.Fn(
   531  		cb.Arg,
   532  		args[0],
   533  
   534  		mark.NoEscape(&arg0),
   535  	)) {
   536  		return
   537  	}
   538  
   539  	js.ThrowCallbackValueNotReturned()
   540  }
   541  
   542  type UploadResult struct {
   543  	// ReportId is "UploadResult.reportId"
   544  	//
   545  	// Optional
   546  	ReportId js.String
   547  
   548  	FFI_USE bool
   549  }
   550  
   551  // FromRef calls UpdateFrom and returns a UploadResult with all fields set.
   552  func (p UploadResult) FromRef(ref js.Ref) UploadResult {
   553  	p.UpdateFrom(ref)
   554  	return p
   555  }
   556  
   557  // New creates a new UploadResult in the application heap.
   558  func (p UploadResult) New() js.Ref {
   559  	return bindings.UploadResultJSLoad(
   560  		js.Pointer(&p), js.True, 0,
   561  	)
   562  }
   563  
   564  // UpdateFrom copies value of all fields of the heap object to p.
   565  func (p *UploadResult) UpdateFrom(ref js.Ref) {
   566  	bindings.UploadResultJSStore(
   567  		js.Pointer(p), ref,
   568  	)
   569  }
   570  
   571  // Update writes all fields of the p to the heap object referenced by ref.
   572  func (p *UploadResult) Update(ref js.Ref) {
   573  	bindings.UploadResultJSLoad(
   574  		js.Pointer(p), js.False, ref,
   575  	)
   576  }
   577  
   578  // FreeMembers frees fields with heap reference, if recursive is true
   579  // free all heap references reachable from p.
   580  func (p *UploadResult) FreeMembers(recursive bool) {
   581  	js.Free(
   582  		p.ReportId.Ref(),
   583  	)
   584  	p.ReportId = p.ReportId.FromRef(js.Undefined)
   585  }
   586  
   587  // HasFuncDiscard returns true if the function "WEBEXT.webrtcLoggingPrivate.discard" exists.
   588  func HasFuncDiscard() bool {
   589  	return js.True == bindings.HasFuncDiscard()
   590  }
   591  
   592  // FuncDiscard returns the function "WEBEXT.webrtcLoggingPrivate.discard".
   593  func FuncDiscard() (fn js.Func[func(request RequestInfo, securityOrigin js.String, callback js.Func[func()])]) {
   594  	bindings.FuncDiscard(
   595  		js.Pointer(&fn),
   596  	)
   597  	return
   598  }
   599  
   600  // Discard calls the function "WEBEXT.webrtcLoggingPrivate.discard" directly.
   601  func Discard(request RequestInfo, securityOrigin js.String, callback js.Func[func()]) (ret js.Void) {
   602  	bindings.CallDiscard(
   603  		js.Pointer(&ret),
   604  		js.Pointer(&request),
   605  		securityOrigin.Ref(),
   606  		callback.Ref(),
   607  	)
   608  
   609  	return
   610  }
   611  
   612  // TryDiscard calls the function "WEBEXT.webrtcLoggingPrivate.discard"
   613  // in a try/catch block and returns (_, err, ok = false) when it went through
   614  // the catch clause.
   615  func TryDiscard(request RequestInfo, securityOrigin js.String, callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) {
   616  	ok = js.True == bindings.TryDiscard(
   617  		js.Pointer(&ret), js.Pointer(&exception),
   618  		js.Pointer(&request),
   619  		securityOrigin.Ref(),
   620  		callback.Ref(),
   621  	)
   622  
   623  	return
   624  }
   625  
   626  // HasFuncGetLogsDirectory returns true if the function "WEBEXT.webrtcLoggingPrivate.getLogsDirectory" exists.
   627  func HasFuncGetLogsDirectory() bool {
   628  	return js.True == bindings.HasFuncGetLogsDirectory()
   629  }
   630  
   631  // FuncGetLogsDirectory returns the function "WEBEXT.webrtcLoggingPrivate.getLogsDirectory".
   632  func FuncGetLogsDirectory() (fn js.Func[func(callback js.Func[func(entry js.Object)])]) {
   633  	bindings.FuncGetLogsDirectory(
   634  		js.Pointer(&fn),
   635  	)
   636  	return
   637  }
   638  
   639  // GetLogsDirectory calls the function "WEBEXT.webrtcLoggingPrivate.getLogsDirectory" directly.
   640  func GetLogsDirectory(callback js.Func[func(entry js.Object)]) (ret js.Void) {
   641  	bindings.CallGetLogsDirectory(
   642  		js.Pointer(&ret),
   643  		callback.Ref(),
   644  	)
   645  
   646  	return
   647  }
   648  
   649  // TryGetLogsDirectory calls the function "WEBEXT.webrtcLoggingPrivate.getLogsDirectory"
   650  // in a try/catch block and returns (_, err, ok = false) when it went through
   651  // the catch clause.
   652  func TryGetLogsDirectory(callback js.Func[func(entry js.Object)]) (ret js.Void, exception js.Any, ok bool) {
   653  	ok = js.True == bindings.TryGetLogsDirectory(
   654  		js.Pointer(&ret), js.Pointer(&exception),
   655  		callback.Ref(),
   656  	)
   657  
   658  	return
   659  }
   660  
   661  // HasFuncSetMetaData returns true if the function "WEBEXT.webrtcLoggingPrivate.setMetaData" exists.
   662  func HasFuncSetMetaData() bool {
   663  	return js.True == bindings.HasFuncSetMetaData()
   664  }
   665  
   666  // FuncSetMetaData returns the function "WEBEXT.webrtcLoggingPrivate.setMetaData".
   667  func FuncSetMetaData() (fn js.Func[func(request RequestInfo, securityOrigin js.String, metaData js.Array[MetaDataEntry], callback js.Func[func()])]) {
   668  	bindings.FuncSetMetaData(
   669  		js.Pointer(&fn),
   670  	)
   671  	return
   672  }
   673  
   674  // SetMetaData calls the function "WEBEXT.webrtcLoggingPrivate.setMetaData" directly.
   675  func SetMetaData(request RequestInfo, securityOrigin js.String, metaData js.Array[MetaDataEntry], callback js.Func[func()]) (ret js.Void) {
   676  	bindings.CallSetMetaData(
   677  		js.Pointer(&ret),
   678  		js.Pointer(&request),
   679  		securityOrigin.Ref(),
   680  		metaData.Ref(),
   681  		callback.Ref(),
   682  	)
   683  
   684  	return
   685  }
   686  
   687  // TrySetMetaData calls the function "WEBEXT.webrtcLoggingPrivate.setMetaData"
   688  // in a try/catch block and returns (_, err, ok = false) when it went through
   689  // the catch clause.
   690  func TrySetMetaData(request RequestInfo, securityOrigin js.String, metaData js.Array[MetaDataEntry], callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) {
   691  	ok = js.True == bindings.TrySetMetaData(
   692  		js.Pointer(&ret), js.Pointer(&exception),
   693  		js.Pointer(&request),
   694  		securityOrigin.Ref(),
   695  		metaData.Ref(),
   696  		callback.Ref(),
   697  	)
   698  
   699  	return
   700  }
   701  
   702  // HasFuncSetUploadOnRenderClose returns true if the function "WEBEXT.webrtcLoggingPrivate.setUploadOnRenderClose" exists.
   703  func HasFuncSetUploadOnRenderClose() bool {
   704  	return js.True == bindings.HasFuncSetUploadOnRenderClose()
   705  }
   706  
   707  // FuncSetUploadOnRenderClose returns the function "WEBEXT.webrtcLoggingPrivate.setUploadOnRenderClose".
   708  func FuncSetUploadOnRenderClose() (fn js.Func[func(request RequestInfo, securityOrigin js.String, shouldUpload bool)]) {
   709  	bindings.FuncSetUploadOnRenderClose(
   710  		js.Pointer(&fn),
   711  	)
   712  	return
   713  }
   714  
   715  // SetUploadOnRenderClose calls the function "WEBEXT.webrtcLoggingPrivate.setUploadOnRenderClose" directly.
   716  func SetUploadOnRenderClose(request RequestInfo, securityOrigin js.String, shouldUpload bool) (ret js.Void) {
   717  	bindings.CallSetUploadOnRenderClose(
   718  		js.Pointer(&ret),
   719  		js.Pointer(&request),
   720  		securityOrigin.Ref(),
   721  		js.Bool(bool(shouldUpload)),
   722  	)
   723  
   724  	return
   725  }
   726  
   727  // TrySetUploadOnRenderClose calls the function "WEBEXT.webrtcLoggingPrivate.setUploadOnRenderClose"
   728  // in a try/catch block and returns (_, err, ok = false) when it went through
   729  // the catch clause.
   730  func TrySetUploadOnRenderClose(request RequestInfo, securityOrigin js.String, shouldUpload bool) (ret js.Void, exception js.Any, ok bool) {
   731  	ok = js.True == bindings.TrySetUploadOnRenderClose(
   732  		js.Pointer(&ret), js.Pointer(&exception),
   733  		js.Pointer(&request),
   734  		securityOrigin.Ref(),
   735  		js.Bool(bool(shouldUpload)),
   736  	)
   737  
   738  	return
   739  }
   740  
   741  // HasFuncStart returns true if the function "WEBEXT.webrtcLoggingPrivate.start" exists.
   742  func HasFuncStart() bool {
   743  	return js.True == bindings.HasFuncStart()
   744  }
   745  
   746  // FuncStart returns the function "WEBEXT.webrtcLoggingPrivate.start".
   747  func FuncStart() (fn js.Func[func(request RequestInfo, securityOrigin js.String, callback js.Func[func()])]) {
   748  	bindings.FuncStart(
   749  		js.Pointer(&fn),
   750  	)
   751  	return
   752  }
   753  
   754  // Start calls the function "WEBEXT.webrtcLoggingPrivate.start" directly.
   755  func Start(request RequestInfo, securityOrigin js.String, callback js.Func[func()]) (ret js.Void) {
   756  	bindings.CallStart(
   757  		js.Pointer(&ret),
   758  		js.Pointer(&request),
   759  		securityOrigin.Ref(),
   760  		callback.Ref(),
   761  	)
   762  
   763  	return
   764  }
   765  
   766  // TryStart calls the function "WEBEXT.webrtcLoggingPrivate.start"
   767  // in a try/catch block and returns (_, err, ok = false) when it went through
   768  // the catch clause.
   769  func TryStart(request RequestInfo, securityOrigin js.String, callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) {
   770  	ok = js.True == bindings.TryStart(
   771  		js.Pointer(&ret), js.Pointer(&exception),
   772  		js.Pointer(&request),
   773  		securityOrigin.Ref(),
   774  		callback.Ref(),
   775  	)
   776  
   777  	return
   778  }
   779  
   780  // HasFuncStartAudioDebugRecordings returns true if the function "WEBEXT.webrtcLoggingPrivate.startAudioDebugRecordings" exists.
   781  func HasFuncStartAudioDebugRecordings() bool {
   782  	return js.True == bindings.HasFuncStartAudioDebugRecordings()
   783  }
   784  
   785  // FuncStartAudioDebugRecordings returns the function "WEBEXT.webrtcLoggingPrivate.startAudioDebugRecordings".
   786  func FuncStartAudioDebugRecordings() (fn js.Func[func(request RequestInfo, securityOrigin js.String, seconds int32, callback js.Func[func(info *RecordingInfo)])]) {
   787  	bindings.FuncStartAudioDebugRecordings(
   788  		js.Pointer(&fn),
   789  	)
   790  	return
   791  }
   792  
   793  // StartAudioDebugRecordings calls the function "WEBEXT.webrtcLoggingPrivate.startAudioDebugRecordings" directly.
   794  func StartAudioDebugRecordings(request RequestInfo, securityOrigin js.String, seconds int32, callback js.Func[func(info *RecordingInfo)]) (ret js.Void) {
   795  	bindings.CallStartAudioDebugRecordings(
   796  		js.Pointer(&ret),
   797  		js.Pointer(&request),
   798  		securityOrigin.Ref(),
   799  		int32(seconds),
   800  		callback.Ref(),
   801  	)
   802  
   803  	return
   804  }
   805  
   806  // TryStartAudioDebugRecordings calls the function "WEBEXT.webrtcLoggingPrivate.startAudioDebugRecordings"
   807  // in a try/catch block and returns (_, err, ok = false) when it went through
   808  // the catch clause.
   809  func TryStartAudioDebugRecordings(request RequestInfo, securityOrigin js.String, seconds int32, callback js.Func[func(info *RecordingInfo)]) (ret js.Void, exception js.Any, ok bool) {
   810  	ok = js.True == bindings.TryStartAudioDebugRecordings(
   811  		js.Pointer(&ret), js.Pointer(&exception),
   812  		js.Pointer(&request),
   813  		securityOrigin.Ref(),
   814  		int32(seconds),
   815  		callback.Ref(),
   816  	)
   817  
   818  	return
   819  }
   820  
   821  // HasFuncStartEventLogging returns true if the function "WEBEXT.webrtcLoggingPrivate.startEventLogging" exists.
   822  func HasFuncStartEventLogging() bool {
   823  	return js.True == bindings.HasFuncStartEventLogging()
   824  }
   825  
   826  // FuncStartEventLogging returns the function "WEBEXT.webrtcLoggingPrivate.startEventLogging".
   827  func FuncStartEventLogging() (fn js.Func[func(request RequestInfo, securityOrigin js.String, sessionId js.String, maxLogSizeBytes int32, outputPeriodMs int32, webAppId int32, callback js.Func[func(result *StartEventLoggingResult)])]) {
   828  	bindings.FuncStartEventLogging(
   829  		js.Pointer(&fn),
   830  	)
   831  	return
   832  }
   833  
   834  // StartEventLogging calls the function "WEBEXT.webrtcLoggingPrivate.startEventLogging" directly.
   835  func StartEventLogging(request RequestInfo, securityOrigin js.String, sessionId js.String, maxLogSizeBytes int32, outputPeriodMs int32, webAppId int32, callback js.Func[func(result *StartEventLoggingResult)]) (ret js.Void) {
   836  	bindings.CallStartEventLogging(
   837  		js.Pointer(&ret),
   838  		js.Pointer(&request),
   839  		securityOrigin.Ref(),
   840  		sessionId.Ref(),
   841  		int32(maxLogSizeBytes),
   842  		int32(outputPeriodMs),
   843  		int32(webAppId),
   844  		callback.Ref(),
   845  	)
   846  
   847  	return
   848  }
   849  
   850  // TryStartEventLogging calls the function "WEBEXT.webrtcLoggingPrivate.startEventLogging"
   851  // in a try/catch block and returns (_, err, ok = false) when it went through
   852  // the catch clause.
   853  func TryStartEventLogging(request RequestInfo, securityOrigin js.String, sessionId js.String, maxLogSizeBytes int32, outputPeriodMs int32, webAppId int32, callback js.Func[func(result *StartEventLoggingResult)]) (ret js.Void, exception js.Any, ok bool) {
   854  	ok = js.True == bindings.TryStartEventLogging(
   855  		js.Pointer(&ret), js.Pointer(&exception),
   856  		js.Pointer(&request),
   857  		securityOrigin.Ref(),
   858  		sessionId.Ref(),
   859  		int32(maxLogSizeBytes),
   860  		int32(outputPeriodMs),
   861  		int32(webAppId),
   862  		callback.Ref(),
   863  	)
   864  
   865  	return
   866  }
   867  
   868  // HasFuncStartRtpDump returns true if the function "WEBEXT.webrtcLoggingPrivate.startRtpDump" exists.
   869  func HasFuncStartRtpDump() bool {
   870  	return js.True == bindings.HasFuncStartRtpDump()
   871  }
   872  
   873  // FuncStartRtpDump returns the function "WEBEXT.webrtcLoggingPrivate.startRtpDump".
   874  func FuncStartRtpDump() (fn js.Func[func(request RequestInfo, securityOrigin js.String, incoming bool, outgoing bool, callback js.Func[func()])]) {
   875  	bindings.FuncStartRtpDump(
   876  		js.Pointer(&fn),
   877  	)
   878  	return
   879  }
   880  
   881  // StartRtpDump calls the function "WEBEXT.webrtcLoggingPrivate.startRtpDump" directly.
   882  func StartRtpDump(request RequestInfo, securityOrigin js.String, incoming bool, outgoing bool, callback js.Func[func()]) (ret js.Void) {
   883  	bindings.CallStartRtpDump(
   884  		js.Pointer(&ret),
   885  		js.Pointer(&request),
   886  		securityOrigin.Ref(),
   887  		js.Bool(bool(incoming)),
   888  		js.Bool(bool(outgoing)),
   889  		callback.Ref(),
   890  	)
   891  
   892  	return
   893  }
   894  
   895  // TryStartRtpDump calls the function "WEBEXT.webrtcLoggingPrivate.startRtpDump"
   896  // in a try/catch block and returns (_, err, ok = false) when it went through
   897  // the catch clause.
   898  func TryStartRtpDump(request RequestInfo, securityOrigin js.String, incoming bool, outgoing bool, callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) {
   899  	ok = js.True == bindings.TryStartRtpDump(
   900  		js.Pointer(&ret), js.Pointer(&exception),
   901  		js.Pointer(&request),
   902  		securityOrigin.Ref(),
   903  		js.Bool(bool(incoming)),
   904  		js.Bool(bool(outgoing)),
   905  		callback.Ref(),
   906  	)
   907  
   908  	return
   909  }
   910  
   911  // HasFuncStop returns true if the function "WEBEXT.webrtcLoggingPrivate.stop" exists.
   912  func HasFuncStop() bool {
   913  	return js.True == bindings.HasFuncStop()
   914  }
   915  
   916  // FuncStop returns the function "WEBEXT.webrtcLoggingPrivate.stop".
   917  func FuncStop() (fn js.Func[func(request RequestInfo, securityOrigin js.String, callback js.Func[func()])]) {
   918  	bindings.FuncStop(
   919  		js.Pointer(&fn),
   920  	)
   921  	return
   922  }
   923  
   924  // Stop calls the function "WEBEXT.webrtcLoggingPrivate.stop" directly.
   925  func Stop(request RequestInfo, securityOrigin js.String, callback js.Func[func()]) (ret js.Void) {
   926  	bindings.CallStop(
   927  		js.Pointer(&ret),
   928  		js.Pointer(&request),
   929  		securityOrigin.Ref(),
   930  		callback.Ref(),
   931  	)
   932  
   933  	return
   934  }
   935  
   936  // TryStop calls the function "WEBEXT.webrtcLoggingPrivate.stop"
   937  // in a try/catch block and returns (_, err, ok = false) when it went through
   938  // the catch clause.
   939  func TryStop(request RequestInfo, securityOrigin js.String, callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) {
   940  	ok = js.True == bindings.TryStop(
   941  		js.Pointer(&ret), js.Pointer(&exception),
   942  		js.Pointer(&request),
   943  		securityOrigin.Ref(),
   944  		callback.Ref(),
   945  	)
   946  
   947  	return
   948  }
   949  
   950  // HasFuncStopAudioDebugRecordings returns true if the function "WEBEXT.webrtcLoggingPrivate.stopAudioDebugRecordings" exists.
   951  func HasFuncStopAudioDebugRecordings() bool {
   952  	return js.True == bindings.HasFuncStopAudioDebugRecordings()
   953  }
   954  
   955  // FuncStopAudioDebugRecordings returns the function "WEBEXT.webrtcLoggingPrivate.stopAudioDebugRecordings".
   956  func FuncStopAudioDebugRecordings() (fn js.Func[func(request RequestInfo, securityOrigin js.String, callback js.Func[func(info *RecordingInfo)])]) {
   957  	bindings.FuncStopAudioDebugRecordings(
   958  		js.Pointer(&fn),
   959  	)
   960  	return
   961  }
   962  
   963  // StopAudioDebugRecordings calls the function "WEBEXT.webrtcLoggingPrivate.stopAudioDebugRecordings" directly.
   964  func StopAudioDebugRecordings(request RequestInfo, securityOrigin js.String, callback js.Func[func(info *RecordingInfo)]) (ret js.Void) {
   965  	bindings.CallStopAudioDebugRecordings(
   966  		js.Pointer(&ret),
   967  		js.Pointer(&request),
   968  		securityOrigin.Ref(),
   969  		callback.Ref(),
   970  	)
   971  
   972  	return
   973  }
   974  
   975  // TryStopAudioDebugRecordings calls the function "WEBEXT.webrtcLoggingPrivate.stopAudioDebugRecordings"
   976  // in a try/catch block and returns (_, err, ok = false) when it went through
   977  // the catch clause.
   978  func TryStopAudioDebugRecordings(request RequestInfo, securityOrigin js.String, callback js.Func[func(info *RecordingInfo)]) (ret js.Void, exception js.Any, ok bool) {
   979  	ok = js.True == bindings.TryStopAudioDebugRecordings(
   980  		js.Pointer(&ret), js.Pointer(&exception),
   981  		js.Pointer(&request),
   982  		securityOrigin.Ref(),
   983  		callback.Ref(),
   984  	)
   985  
   986  	return
   987  }
   988  
   989  // HasFuncStopRtpDump returns true if the function "WEBEXT.webrtcLoggingPrivate.stopRtpDump" exists.
   990  func HasFuncStopRtpDump() bool {
   991  	return js.True == bindings.HasFuncStopRtpDump()
   992  }
   993  
   994  // FuncStopRtpDump returns the function "WEBEXT.webrtcLoggingPrivate.stopRtpDump".
   995  func FuncStopRtpDump() (fn js.Func[func(request RequestInfo, securityOrigin js.String, incoming bool, outgoing bool, callback js.Func[func()])]) {
   996  	bindings.FuncStopRtpDump(
   997  		js.Pointer(&fn),
   998  	)
   999  	return
  1000  }
  1001  
  1002  // StopRtpDump calls the function "WEBEXT.webrtcLoggingPrivate.stopRtpDump" directly.
  1003  func StopRtpDump(request RequestInfo, securityOrigin js.String, incoming bool, outgoing bool, callback js.Func[func()]) (ret js.Void) {
  1004  	bindings.CallStopRtpDump(
  1005  		js.Pointer(&ret),
  1006  		js.Pointer(&request),
  1007  		securityOrigin.Ref(),
  1008  		js.Bool(bool(incoming)),
  1009  		js.Bool(bool(outgoing)),
  1010  		callback.Ref(),
  1011  	)
  1012  
  1013  	return
  1014  }
  1015  
  1016  // TryStopRtpDump calls the function "WEBEXT.webrtcLoggingPrivate.stopRtpDump"
  1017  // in a try/catch block and returns (_, err, ok = false) when it went through
  1018  // the catch clause.
  1019  func TryStopRtpDump(request RequestInfo, securityOrigin js.String, incoming bool, outgoing bool, callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) {
  1020  	ok = js.True == bindings.TryStopRtpDump(
  1021  		js.Pointer(&ret), js.Pointer(&exception),
  1022  		js.Pointer(&request),
  1023  		securityOrigin.Ref(),
  1024  		js.Bool(bool(incoming)),
  1025  		js.Bool(bool(outgoing)),
  1026  		callback.Ref(),
  1027  	)
  1028  
  1029  	return
  1030  }
  1031  
  1032  // HasFuncStore returns true if the function "WEBEXT.webrtcLoggingPrivate.store" exists.
  1033  func HasFuncStore() bool {
  1034  	return js.True == bindings.HasFuncStore()
  1035  }
  1036  
  1037  // FuncStore returns the function "WEBEXT.webrtcLoggingPrivate.store".
  1038  func FuncStore() (fn js.Func[func(request RequestInfo, securityOrigin js.String, logId js.String, callback js.Func[func()])]) {
  1039  	bindings.FuncStore(
  1040  		js.Pointer(&fn),
  1041  	)
  1042  	return
  1043  }
  1044  
  1045  // Store calls the function "WEBEXT.webrtcLoggingPrivate.store" directly.
  1046  func Store(request RequestInfo, securityOrigin js.String, logId js.String, callback js.Func[func()]) (ret js.Void) {
  1047  	bindings.CallStore(
  1048  		js.Pointer(&ret),
  1049  		js.Pointer(&request),
  1050  		securityOrigin.Ref(),
  1051  		logId.Ref(),
  1052  		callback.Ref(),
  1053  	)
  1054  
  1055  	return
  1056  }
  1057  
  1058  // TryStore calls the function "WEBEXT.webrtcLoggingPrivate.store"
  1059  // in a try/catch block and returns (_, err, ok = false) when it went through
  1060  // the catch clause.
  1061  func TryStore(request RequestInfo, securityOrigin js.String, logId js.String, callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) {
  1062  	ok = js.True == bindings.TryStore(
  1063  		js.Pointer(&ret), js.Pointer(&exception),
  1064  		js.Pointer(&request),
  1065  		securityOrigin.Ref(),
  1066  		logId.Ref(),
  1067  		callback.Ref(),
  1068  	)
  1069  
  1070  	return
  1071  }
  1072  
  1073  // HasFuncUpload returns true if the function "WEBEXT.webrtcLoggingPrivate.upload" exists.
  1074  func HasFuncUpload() bool {
  1075  	return js.True == bindings.HasFuncUpload()
  1076  }
  1077  
  1078  // FuncUpload returns the function "WEBEXT.webrtcLoggingPrivate.upload".
  1079  func FuncUpload() (fn js.Func[func(request RequestInfo, securityOrigin js.String, callback js.Func[func(result *UploadResult)])]) {
  1080  	bindings.FuncUpload(
  1081  		js.Pointer(&fn),
  1082  	)
  1083  	return
  1084  }
  1085  
  1086  // Upload calls the function "WEBEXT.webrtcLoggingPrivate.upload" directly.
  1087  func Upload(request RequestInfo, securityOrigin js.String, callback js.Func[func(result *UploadResult)]) (ret js.Void) {
  1088  	bindings.CallUpload(
  1089  		js.Pointer(&ret),
  1090  		js.Pointer(&request),
  1091  		securityOrigin.Ref(),
  1092  		callback.Ref(),
  1093  	)
  1094  
  1095  	return
  1096  }
  1097  
  1098  // TryUpload calls the function "WEBEXT.webrtcLoggingPrivate.upload"
  1099  // in a try/catch block and returns (_, err, ok = false) when it went through
  1100  // the catch clause.
  1101  func TryUpload(request RequestInfo, securityOrigin js.String, callback js.Func[func(result *UploadResult)]) (ret js.Void, exception js.Any, ok bool) {
  1102  	ok = js.True == bindings.TryUpload(
  1103  		js.Pointer(&ret), js.Pointer(&exception),
  1104  		js.Pointer(&request),
  1105  		securityOrigin.Ref(),
  1106  		callback.Ref(),
  1107  	)
  1108  
  1109  	return
  1110  }
  1111  
  1112  // HasFuncUploadStored returns true if the function "WEBEXT.webrtcLoggingPrivate.uploadStored" exists.
  1113  func HasFuncUploadStored() bool {
  1114  	return js.True == bindings.HasFuncUploadStored()
  1115  }
  1116  
  1117  // FuncUploadStored returns the function "WEBEXT.webrtcLoggingPrivate.uploadStored".
  1118  func FuncUploadStored() (fn js.Func[func(request RequestInfo, securityOrigin js.String, logId js.String, callback js.Func[func(result *UploadResult)])]) {
  1119  	bindings.FuncUploadStored(
  1120  		js.Pointer(&fn),
  1121  	)
  1122  	return
  1123  }
  1124  
  1125  // UploadStored calls the function "WEBEXT.webrtcLoggingPrivate.uploadStored" directly.
  1126  func UploadStored(request RequestInfo, securityOrigin js.String, logId js.String, callback js.Func[func(result *UploadResult)]) (ret js.Void) {
  1127  	bindings.CallUploadStored(
  1128  		js.Pointer(&ret),
  1129  		js.Pointer(&request),
  1130  		securityOrigin.Ref(),
  1131  		logId.Ref(),
  1132  		callback.Ref(),
  1133  	)
  1134  
  1135  	return
  1136  }
  1137  
  1138  // TryUploadStored calls the function "WEBEXT.webrtcLoggingPrivate.uploadStored"
  1139  // in a try/catch block and returns (_, err, ok = false) when it went through
  1140  // the catch clause.
  1141  func TryUploadStored(request RequestInfo, securityOrigin js.String, logId js.String, callback js.Func[func(result *UploadResult)]) (ret js.Void, exception js.Any, ok bool) {
  1142  	ok = js.True == bindings.TryUploadStored(
  1143  		js.Pointer(&ret), js.Pointer(&exception),
  1144  		js.Pointer(&request),
  1145  		securityOrigin.Ref(),
  1146  		logId.Ref(),
  1147  		callback.Ref(),
  1148  	)
  1149  
  1150  	return
  1151  }