github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/filemanagerprivateinternal/bindings/ffi_bindings.ts (about)

     1  import { importModule, Application, heap, Pointer } from "@ffi";
     2  
     3  importModule("plat/js/webext/filemanagerprivateinternal", (A: Application) => {
     4    const WEBEXT = typeof globalThis.browser === "undefined" ? globalThis.chrome : globalThis.browser;
     5  
     6    return {
     7      "store_EntryDescription": (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 + 14, false);
    12          A.store.Ref(ptr + 0, undefined);
    13          A.store.Ref(ptr + 4, undefined);
    14          A.store.Ref(ptr + 8, undefined);
    15          A.store.Bool(ptr + 13, false);
    16          A.store.Bool(ptr + 12, false);
    17        } else {
    18          A.store.Bool(ptr + 14, true);
    19          A.store.Ref(ptr + 0, x["fileSystemName"]);
    20          A.store.Ref(ptr + 4, x["fileSystemRoot"]);
    21          A.store.Ref(ptr + 8, x["fileFullPath"]);
    22          A.store.Bool(ptr + 13, "fileIsDirectory" in x ? true : false);
    23          A.store.Bool(ptr + 12, x["fileIsDirectory"] ? true : false);
    24        }
    25      },
    26      "load_EntryDescription": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
    27        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
    28  
    29        x["fileSystemName"] = A.load.Ref(ptr + 0, undefined);
    30        x["fileSystemRoot"] = A.load.Ref(ptr + 4, undefined);
    31        x["fileFullPath"] = A.load.Ref(ptr + 8, undefined);
    32        if (A.load.Bool(ptr + 13)) {
    33          x["fileIsDirectory"] = A.load.Bool(ptr + 12);
    34        } else {
    35          delete x["fileIsDirectory"];
    36        }
    37        return create === A.H.TRUE ? A.H.push(x) : ref;
    38      },
    39  
    40      "store_IOTaskParams": (ptr: Pointer, ref: heap.Ref<any>) => {
    41        const x = A.H.get<any>(ref);
    42  
    43        if (typeof x === "undefined") {
    44          A.store.Bool(ptr + 10, false);
    45          A.store.Ref(ptr + 0, undefined);
    46          A.store.Ref(ptr + 4, undefined);
    47          A.store.Bool(ptr + 9, false);
    48          A.store.Bool(ptr + 8, false);
    49        } else {
    50          A.store.Bool(ptr + 10, true);
    51          A.store.Ref(ptr + 0, x["destinationFolderUrl"]);
    52          A.store.Ref(ptr + 4, x["password"]);
    53          A.store.Bool(ptr + 9, "showNotification" in x ? true : false);
    54          A.store.Bool(ptr + 8, x["showNotification"] ? true : false);
    55        }
    56      },
    57      "load_IOTaskParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
    58        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
    59  
    60        x["destinationFolderUrl"] = A.load.Ref(ptr + 0, undefined);
    61        x["password"] = A.load.Ref(ptr + 4, undefined);
    62        if (A.load.Bool(ptr + 9)) {
    63          x["showNotification"] = A.load.Bool(ptr + 8);
    64        } else {
    65          delete x["showNotification"];
    66        }
    67        return create === A.H.TRUE ? A.H.push(x) : ref;
    68      },
    69  
    70      "store_ParsedTrashInfoFile": (ptr: Pointer, ref: heap.Ref<any>) => {
    71        const x = A.H.get<any>(ref);
    72  
    73        if (typeof x === "undefined") {
    74          A.store.Bool(ptr + 33, false);
    75  
    76          A.store.Bool(ptr + 0 + 14, false);
    77          A.store.Ref(ptr + 0 + 0, undefined);
    78          A.store.Ref(ptr + 0 + 4, undefined);
    79          A.store.Ref(ptr + 0 + 8, undefined);
    80          A.store.Bool(ptr + 0 + 13, false);
    81          A.store.Bool(ptr + 0 + 12, false);
    82          A.store.Ref(ptr + 16, undefined);
    83          A.store.Bool(ptr + 32, false);
    84          A.store.Float64(ptr + 24, 0);
    85        } else {
    86          A.store.Bool(ptr + 33, true);
    87  
    88          if (typeof x["restoreEntry"] === "undefined") {
    89            A.store.Bool(ptr + 0 + 14, false);
    90            A.store.Ref(ptr + 0 + 0, undefined);
    91            A.store.Ref(ptr + 0 + 4, undefined);
    92            A.store.Ref(ptr + 0 + 8, undefined);
    93            A.store.Bool(ptr + 0 + 13, false);
    94            A.store.Bool(ptr + 0 + 12, false);
    95          } else {
    96            A.store.Bool(ptr + 0 + 14, true);
    97            A.store.Ref(ptr + 0 + 0, x["restoreEntry"]["fileSystemName"]);
    98            A.store.Ref(ptr + 0 + 4, x["restoreEntry"]["fileSystemRoot"]);
    99            A.store.Ref(ptr + 0 + 8, x["restoreEntry"]["fileFullPath"]);
   100            A.store.Bool(ptr + 0 + 13, "fileIsDirectory" in x["restoreEntry"] ? true : false);
   101            A.store.Bool(ptr + 0 + 12, x["restoreEntry"]["fileIsDirectory"] ? true : false);
   102          }
   103          A.store.Ref(ptr + 16, x["trashInfoFileName"]);
   104          A.store.Bool(ptr + 32, "deletionDate" in x ? true : false);
   105          A.store.Float64(ptr + 24, x["deletionDate"] === undefined ? 0 : (x["deletionDate"] as number));
   106        }
   107      },
   108      "load_ParsedTrashInfoFile": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   109        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   110  
   111        if (A.load.Bool(ptr + 0 + 14)) {
   112          x["restoreEntry"] = {};
   113          x["restoreEntry"]["fileSystemName"] = A.load.Ref(ptr + 0 + 0, undefined);
   114          x["restoreEntry"]["fileSystemRoot"] = A.load.Ref(ptr + 0 + 4, undefined);
   115          x["restoreEntry"]["fileFullPath"] = A.load.Ref(ptr + 0 + 8, undefined);
   116          if (A.load.Bool(ptr + 0 + 13)) {
   117            x["restoreEntry"]["fileIsDirectory"] = A.load.Bool(ptr + 0 + 12);
   118          } else {
   119            delete x["restoreEntry"]["fileIsDirectory"];
   120          }
   121        } else {
   122          delete x["restoreEntry"];
   123        }
   124        x["trashInfoFileName"] = A.load.Ref(ptr + 16, undefined);
   125        if (A.load.Bool(ptr + 32)) {
   126          x["deletionDate"] = A.load.Float64(ptr + 24);
   127        } else {
   128          delete x["deletionDate"];
   129        }
   130        return create === A.H.TRUE ? A.H.push(x) : ref;
   131      },
   132  
   133      "store_SearchFilesParams": (ptr: Pointer, ref: heap.Ref<any>) => {
   134        const x = A.H.get<any>(ref);
   135  
   136        if (typeof x === "undefined") {
   137          A.store.Bool(ptr + 30, false);
   138          A.store.Ref(ptr + 0, undefined);
   139          A.store.Ref(ptr + 4, undefined);
   140          A.store.Enum(ptr + 8, -1);
   141          A.store.Bool(ptr + 28, false);
   142          A.store.Int32(ptr + 12, 0);
   143          A.store.Bool(ptr + 29, false);
   144          A.store.Float64(ptr + 16, 0);
   145          A.store.Enum(ptr + 24, -1);
   146        } else {
   147          A.store.Bool(ptr + 30, true);
   148          A.store.Ref(ptr + 0, x["rootUrl"]);
   149          A.store.Ref(ptr + 4, x["query"]);
   150          A.store.Enum(
   151            ptr + 8,
   152            ["EXCLUDE_DIRECTORIES", "SHARED_WITH_ME", "OFFLINE", "ALL"].indexOf(x["types"] as string)
   153          );
   154          A.store.Bool(ptr + 28, "maxResults" in x ? true : false);
   155          A.store.Int32(ptr + 12, x["maxResults"] === undefined ? 0 : (x["maxResults"] as number));
   156          A.store.Bool(ptr + 29, "modifiedTimestamp" in x ? true : false);
   157          A.store.Float64(ptr + 16, x["modifiedTimestamp"] === undefined ? 0 : (x["modifiedTimestamp"] as number));
   158          A.store.Enum(ptr + 24, ["all", "audio", "image", "video", "document"].indexOf(x["category"] as string));
   159        }
   160      },
   161      "load_SearchFilesParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   162        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   163  
   164        x["rootUrl"] = A.load.Ref(ptr + 0, undefined);
   165        x["query"] = A.load.Ref(ptr + 4, undefined);
   166        x["types"] = A.load.Enum(ptr + 8, ["EXCLUDE_DIRECTORIES", "SHARED_WITH_ME", "OFFLINE", "ALL"]);
   167        if (A.load.Bool(ptr + 28)) {
   168          x["maxResults"] = A.load.Int32(ptr + 12);
   169        } else {
   170          delete x["maxResults"];
   171        }
   172        if (A.load.Bool(ptr + 29)) {
   173          x["modifiedTimestamp"] = A.load.Float64(ptr + 16);
   174        } else {
   175          delete x["modifiedTimestamp"];
   176        }
   177        x["category"] = A.load.Enum(ptr + 24, ["all", "audio", "image", "video", "document"]);
   178        return create === A.H.TRUE ? A.H.push(x) : ref;
   179      },
   180      "has_AddFileWatch": (): heap.Ref<boolean> => {
   181        if (WEBEXT?.fileManagerPrivateInternal && "addFileWatch" in WEBEXT?.fileManagerPrivateInternal) {
   182          return A.H.TRUE;
   183        }
   184        return A.H.FALSE;
   185      },
   186      "func_AddFileWatch": (fn: Pointer): void => {
   187        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.addFileWatch);
   188      },
   189      "call_AddFileWatch": (retPtr: Pointer, url: heap.Ref<object>): void => {
   190        const _ret = WEBEXT.fileManagerPrivateInternal.addFileWatch(A.H.get<object>(url));
   191        A.store.Ref(retPtr, _ret);
   192      },
   193      "try_AddFileWatch": (retPtr: Pointer, errPtr: Pointer, url: heap.Ref<object>): heap.Ref<boolean> => {
   194        try {
   195          const _ret = WEBEXT.fileManagerPrivateInternal.addFileWatch(A.H.get<object>(url));
   196          A.store.Ref(retPtr, _ret);
   197          return A.H.TRUE;
   198        } catch (err: any) {
   199          A.store.Ref(errPtr, err);
   200          return A.H.FALSE;
   201        }
   202      },
   203      "has_ComputeChecksum": (): heap.Ref<boolean> => {
   204        if (WEBEXT?.fileManagerPrivateInternal && "computeChecksum" in WEBEXT?.fileManagerPrivateInternal) {
   205          return A.H.TRUE;
   206        }
   207        return A.H.FALSE;
   208      },
   209      "func_ComputeChecksum": (fn: Pointer): void => {
   210        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.computeChecksum);
   211      },
   212      "call_ComputeChecksum": (retPtr: Pointer, url: heap.Ref<object>): void => {
   213        const _ret = WEBEXT.fileManagerPrivateInternal.computeChecksum(A.H.get<object>(url));
   214        A.store.Ref(retPtr, _ret);
   215      },
   216      "try_ComputeChecksum": (retPtr: Pointer, errPtr: Pointer, url: heap.Ref<object>): heap.Ref<boolean> => {
   217        try {
   218          const _ret = WEBEXT.fileManagerPrivateInternal.computeChecksum(A.H.get<object>(url));
   219          A.store.Ref(retPtr, _ret);
   220          return A.H.TRUE;
   221        } catch (err: any) {
   222          A.store.Ref(errPtr, err);
   223          return A.H.FALSE;
   224        }
   225      },
   226      "has_ExecuteCustomAction": (): heap.Ref<boolean> => {
   227        if (WEBEXT?.fileManagerPrivateInternal && "executeCustomAction" in WEBEXT?.fileManagerPrivateInternal) {
   228          return A.H.TRUE;
   229        }
   230        return A.H.FALSE;
   231      },
   232      "func_ExecuteCustomAction": (fn: Pointer): void => {
   233        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.executeCustomAction);
   234      },
   235      "call_ExecuteCustomAction": (retPtr: Pointer, urls: heap.Ref<object>, actionId: heap.Ref<object>): void => {
   236        const _ret = WEBEXT.fileManagerPrivateInternal.executeCustomAction(
   237          A.H.get<object>(urls),
   238          A.H.get<object>(actionId)
   239        );
   240        A.store.Ref(retPtr, _ret);
   241      },
   242      "try_ExecuteCustomAction": (
   243        retPtr: Pointer,
   244        errPtr: Pointer,
   245        urls: heap.Ref<object>,
   246        actionId: heap.Ref<object>
   247      ): heap.Ref<boolean> => {
   248        try {
   249          const _ret = WEBEXT.fileManagerPrivateInternal.executeCustomAction(
   250            A.H.get<object>(urls),
   251            A.H.get<object>(actionId)
   252          );
   253          A.store.Ref(retPtr, _ret);
   254          return A.H.TRUE;
   255        } catch (err: any) {
   256          A.store.Ref(errPtr, err);
   257          return A.H.FALSE;
   258        }
   259      },
   260      "has_ExecuteTask": (): heap.Ref<boolean> => {
   261        if (WEBEXT?.fileManagerPrivateInternal && "executeTask" in WEBEXT?.fileManagerPrivateInternal) {
   262          return A.H.TRUE;
   263        }
   264        return A.H.FALSE;
   265      },
   266      "func_ExecuteTask": (fn: Pointer): void => {
   267        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.executeTask);
   268      },
   269      "call_ExecuteTask": (retPtr: Pointer, descriptor: Pointer, urls: heap.Ref<object>): void => {
   270        const descriptor_ffi = {};
   271  
   272        descriptor_ffi["appId"] = A.load.Ref(descriptor + 0, undefined);
   273        descriptor_ffi["taskType"] = A.load.Ref(descriptor + 4, undefined);
   274        descriptor_ffi["actionId"] = A.load.Ref(descriptor + 8, undefined);
   275  
   276        const _ret = WEBEXT.fileManagerPrivateInternal.executeTask(descriptor_ffi, A.H.get<object>(urls));
   277        A.store.Ref(retPtr, _ret);
   278      },
   279      "try_ExecuteTask": (
   280        retPtr: Pointer,
   281        errPtr: Pointer,
   282        descriptor: Pointer,
   283        urls: heap.Ref<object>
   284      ): heap.Ref<boolean> => {
   285        try {
   286          const descriptor_ffi = {};
   287  
   288          descriptor_ffi["appId"] = A.load.Ref(descriptor + 0, undefined);
   289          descriptor_ffi["taskType"] = A.load.Ref(descriptor + 4, undefined);
   290          descriptor_ffi["actionId"] = A.load.Ref(descriptor + 8, undefined);
   291  
   292          const _ret = WEBEXT.fileManagerPrivateInternal.executeTask(descriptor_ffi, A.H.get<object>(urls));
   293          A.store.Ref(retPtr, _ret);
   294          return A.H.TRUE;
   295        } catch (err: any) {
   296          A.store.Ref(errPtr, err);
   297          return A.H.FALSE;
   298        }
   299      },
   300      "has_GetContentMetadata": (): heap.Ref<boolean> => {
   301        if (WEBEXT?.fileManagerPrivateInternal && "getContentMetadata" in WEBEXT?.fileManagerPrivateInternal) {
   302          return A.H.TRUE;
   303        }
   304        return A.H.FALSE;
   305      },
   306      "func_GetContentMetadata": (fn: Pointer): void => {
   307        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getContentMetadata);
   308      },
   309      "call_GetContentMetadata": (
   310        retPtr: Pointer,
   311        blobUUID: heap.Ref<object>,
   312        mimeType: heap.Ref<object>,
   313        includeImages: heap.Ref<boolean>
   314      ): void => {
   315        const _ret = WEBEXT.fileManagerPrivateInternal.getContentMetadata(
   316          A.H.get<object>(blobUUID),
   317          A.H.get<object>(mimeType),
   318          includeImages === A.H.TRUE
   319        );
   320        A.store.Ref(retPtr, _ret);
   321      },
   322      "try_GetContentMetadata": (
   323        retPtr: Pointer,
   324        errPtr: Pointer,
   325        blobUUID: heap.Ref<object>,
   326        mimeType: heap.Ref<object>,
   327        includeImages: heap.Ref<boolean>
   328      ): heap.Ref<boolean> => {
   329        try {
   330          const _ret = WEBEXT.fileManagerPrivateInternal.getContentMetadata(
   331            A.H.get<object>(blobUUID),
   332            A.H.get<object>(mimeType),
   333            includeImages === A.H.TRUE
   334          );
   335          A.store.Ref(retPtr, _ret);
   336          return A.H.TRUE;
   337        } catch (err: any) {
   338          A.store.Ref(errPtr, err);
   339          return A.H.FALSE;
   340        }
   341      },
   342      "has_GetContentMimeType": (): heap.Ref<boolean> => {
   343        if (WEBEXT?.fileManagerPrivateInternal && "getContentMimeType" in WEBEXT?.fileManagerPrivateInternal) {
   344          return A.H.TRUE;
   345        }
   346        return A.H.FALSE;
   347      },
   348      "func_GetContentMimeType": (fn: Pointer): void => {
   349        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getContentMimeType);
   350      },
   351      "call_GetContentMimeType": (retPtr: Pointer, blobUUID: heap.Ref<object>): void => {
   352        const _ret = WEBEXT.fileManagerPrivateInternal.getContentMimeType(A.H.get<object>(blobUUID));
   353        A.store.Ref(retPtr, _ret);
   354      },
   355      "try_GetContentMimeType": (retPtr: Pointer, errPtr: Pointer, blobUUID: heap.Ref<object>): heap.Ref<boolean> => {
   356        try {
   357          const _ret = WEBEXT.fileManagerPrivateInternal.getContentMimeType(A.H.get<object>(blobUUID));
   358          A.store.Ref(retPtr, _ret);
   359          return A.H.TRUE;
   360        } catch (err: any) {
   361          A.store.Ref(errPtr, err);
   362          return A.H.FALSE;
   363        }
   364      },
   365      "has_GetCrostiniSharedPaths": (): heap.Ref<boolean> => {
   366        if (WEBEXT?.fileManagerPrivateInternal && "getCrostiniSharedPaths" in WEBEXT?.fileManagerPrivateInternal) {
   367          return A.H.TRUE;
   368        }
   369        return A.H.FALSE;
   370      },
   371      "func_GetCrostiniSharedPaths": (fn: Pointer): void => {
   372        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getCrostiniSharedPaths);
   373      },
   374      "call_GetCrostiniSharedPaths": (
   375        retPtr: Pointer,
   376        observeFirstForSession: heap.Ref<boolean>,
   377        vmName: heap.Ref<object>,
   378        callback: heap.Ref<object>
   379      ): void => {
   380        const _ret = WEBEXT.fileManagerPrivateInternal.getCrostiniSharedPaths(
   381          observeFirstForSession === A.H.TRUE,
   382          A.H.get<object>(vmName),
   383          A.H.get<object>(callback)
   384        );
   385      },
   386      "try_GetCrostiniSharedPaths": (
   387        retPtr: Pointer,
   388        errPtr: Pointer,
   389        observeFirstForSession: heap.Ref<boolean>,
   390        vmName: heap.Ref<object>,
   391        callback: heap.Ref<object>
   392      ): heap.Ref<boolean> => {
   393        try {
   394          const _ret = WEBEXT.fileManagerPrivateInternal.getCrostiniSharedPaths(
   395            observeFirstForSession === A.H.TRUE,
   396            A.H.get<object>(vmName),
   397            A.H.get<object>(callback)
   398          );
   399          return A.H.TRUE;
   400        } catch (err: any) {
   401          A.store.Ref(errPtr, err);
   402          return A.H.FALSE;
   403        }
   404      },
   405      "has_GetCustomActions": (): heap.Ref<boolean> => {
   406        if (WEBEXT?.fileManagerPrivateInternal && "getCustomActions" in WEBEXT?.fileManagerPrivateInternal) {
   407          return A.H.TRUE;
   408        }
   409        return A.H.FALSE;
   410      },
   411      "func_GetCustomActions": (fn: Pointer): void => {
   412        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getCustomActions);
   413      },
   414      "call_GetCustomActions": (retPtr: Pointer, urls: heap.Ref<object>): void => {
   415        const _ret = WEBEXT.fileManagerPrivateInternal.getCustomActions(A.H.get<object>(urls));
   416        A.store.Ref(retPtr, _ret);
   417      },
   418      "try_GetCustomActions": (retPtr: Pointer, errPtr: Pointer, urls: heap.Ref<object>): heap.Ref<boolean> => {
   419        try {
   420          const _ret = WEBEXT.fileManagerPrivateInternal.getCustomActions(A.H.get<object>(urls));
   421          A.store.Ref(retPtr, _ret);
   422          return A.H.TRUE;
   423        } catch (err: any) {
   424          A.store.Ref(errPtr, err);
   425          return A.H.FALSE;
   426        }
   427      },
   428      "has_GetDirectorySize": (): heap.Ref<boolean> => {
   429        if (WEBEXT?.fileManagerPrivateInternal && "getDirectorySize" in WEBEXT?.fileManagerPrivateInternal) {
   430          return A.H.TRUE;
   431        }
   432        return A.H.FALSE;
   433      },
   434      "func_GetDirectorySize": (fn: Pointer): void => {
   435        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getDirectorySize);
   436      },
   437      "call_GetDirectorySize": (retPtr: Pointer, url: heap.Ref<object>): void => {
   438        const _ret = WEBEXT.fileManagerPrivateInternal.getDirectorySize(A.H.get<object>(url));
   439        A.store.Ref(retPtr, _ret);
   440      },
   441      "try_GetDirectorySize": (retPtr: Pointer, errPtr: Pointer, url: heap.Ref<object>): heap.Ref<boolean> => {
   442        try {
   443          const _ret = WEBEXT.fileManagerPrivateInternal.getDirectorySize(A.H.get<object>(url));
   444          A.store.Ref(retPtr, _ret);
   445          return A.H.TRUE;
   446        } catch (err: any) {
   447          A.store.Ref(errPtr, err);
   448          return A.H.FALSE;
   449        }
   450      },
   451      "has_GetDisallowedTransfers": (): heap.Ref<boolean> => {
   452        if (WEBEXT?.fileManagerPrivateInternal && "getDisallowedTransfers" in WEBEXT?.fileManagerPrivateInternal) {
   453          return A.H.TRUE;
   454        }
   455        return A.H.FALSE;
   456      },
   457      "func_GetDisallowedTransfers": (fn: Pointer): void => {
   458        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getDisallowedTransfers);
   459      },
   460      "call_GetDisallowedTransfers": (
   461        retPtr: Pointer,
   462        entries: heap.Ref<object>,
   463        destinationEntry: heap.Ref<object>,
   464        isMove: heap.Ref<boolean>
   465      ): void => {
   466        const _ret = WEBEXT.fileManagerPrivateInternal.getDisallowedTransfers(
   467          A.H.get<object>(entries),
   468          A.H.get<object>(destinationEntry),
   469          isMove === A.H.TRUE
   470        );
   471        A.store.Ref(retPtr, _ret);
   472      },
   473      "try_GetDisallowedTransfers": (
   474        retPtr: Pointer,
   475        errPtr: Pointer,
   476        entries: heap.Ref<object>,
   477        destinationEntry: heap.Ref<object>,
   478        isMove: heap.Ref<boolean>
   479      ): heap.Ref<boolean> => {
   480        try {
   481          const _ret = WEBEXT.fileManagerPrivateInternal.getDisallowedTransfers(
   482            A.H.get<object>(entries),
   483            A.H.get<object>(destinationEntry),
   484            isMove === A.H.TRUE
   485          );
   486          A.store.Ref(retPtr, _ret);
   487          return A.H.TRUE;
   488        } catch (err: any) {
   489          A.store.Ref(errPtr, err);
   490          return A.H.FALSE;
   491        }
   492      },
   493      "has_GetDlpMetadata": (): heap.Ref<boolean> => {
   494        if (WEBEXT?.fileManagerPrivateInternal && "getDlpMetadata" in WEBEXT?.fileManagerPrivateInternal) {
   495          return A.H.TRUE;
   496        }
   497        return A.H.FALSE;
   498      },
   499      "func_GetDlpMetadata": (fn: Pointer): void => {
   500        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getDlpMetadata);
   501      },
   502      "call_GetDlpMetadata": (retPtr: Pointer, entries: heap.Ref<object>): void => {
   503        const _ret = WEBEXT.fileManagerPrivateInternal.getDlpMetadata(A.H.get<object>(entries));
   504        A.store.Ref(retPtr, _ret);
   505      },
   506      "try_GetDlpMetadata": (retPtr: Pointer, errPtr: Pointer, entries: heap.Ref<object>): heap.Ref<boolean> => {
   507        try {
   508          const _ret = WEBEXT.fileManagerPrivateInternal.getDlpMetadata(A.H.get<object>(entries));
   509          A.store.Ref(retPtr, _ret);
   510          return A.H.TRUE;
   511        } catch (err: any) {
   512          A.store.Ref(errPtr, err);
   513          return A.H.FALSE;
   514        }
   515      },
   516      "has_GetDriveQuotaMetadata": (): heap.Ref<boolean> => {
   517        if (WEBEXT?.fileManagerPrivateInternal && "getDriveQuotaMetadata" in WEBEXT?.fileManagerPrivateInternal) {
   518          return A.H.TRUE;
   519        }
   520        return A.H.FALSE;
   521      },
   522      "func_GetDriveQuotaMetadata": (fn: Pointer): void => {
   523        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getDriveQuotaMetadata);
   524      },
   525      "call_GetDriveQuotaMetadata": (retPtr: Pointer, url: heap.Ref<object>): void => {
   526        const _ret = WEBEXT.fileManagerPrivateInternal.getDriveQuotaMetadata(A.H.get<object>(url));
   527        A.store.Ref(retPtr, _ret);
   528      },
   529      "try_GetDriveQuotaMetadata": (retPtr: Pointer, errPtr: Pointer, url: heap.Ref<object>): heap.Ref<boolean> => {
   530        try {
   531          const _ret = WEBEXT.fileManagerPrivateInternal.getDriveQuotaMetadata(A.H.get<object>(url));
   532          A.store.Ref(retPtr, _ret);
   533          return A.H.TRUE;
   534        } catch (err: any) {
   535          A.store.Ref(errPtr, err);
   536          return A.H.FALSE;
   537        }
   538      },
   539      "has_GetEntryProperties": (): heap.Ref<boolean> => {
   540        if (WEBEXT?.fileManagerPrivateInternal && "getEntryProperties" in WEBEXT?.fileManagerPrivateInternal) {
   541          return A.H.TRUE;
   542        }
   543        return A.H.FALSE;
   544      },
   545      "func_GetEntryProperties": (fn: Pointer): void => {
   546        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getEntryProperties);
   547      },
   548      "call_GetEntryProperties": (retPtr: Pointer, urls: heap.Ref<object>, names: heap.Ref<object>): void => {
   549        const _ret = WEBEXT.fileManagerPrivateInternal.getEntryProperties(A.H.get<object>(urls), A.H.get<object>(names));
   550        A.store.Ref(retPtr, _ret);
   551      },
   552      "try_GetEntryProperties": (
   553        retPtr: Pointer,
   554        errPtr: Pointer,
   555        urls: heap.Ref<object>,
   556        names: heap.Ref<object>
   557      ): heap.Ref<boolean> => {
   558        try {
   559          const _ret = WEBEXT.fileManagerPrivateInternal.getEntryProperties(
   560            A.H.get<object>(urls),
   561            A.H.get<object>(names)
   562          );
   563          A.store.Ref(retPtr, _ret);
   564          return A.H.TRUE;
   565        } catch (err: any) {
   566          A.store.Ref(errPtr, err);
   567          return A.H.FALSE;
   568        }
   569      },
   570      "has_GetFileTasks": (): heap.Ref<boolean> => {
   571        if (WEBEXT?.fileManagerPrivateInternal && "getFileTasks" in WEBEXT?.fileManagerPrivateInternal) {
   572          return A.H.TRUE;
   573        }
   574        return A.H.FALSE;
   575      },
   576      "func_GetFileTasks": (fn: Pointer): void => {
   577        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getFileTasks);
   578      },
   579      "call_GetFileTasks": (retPtr: Pointer, urls: heap.Ref<object>, dlpSourceUrls: heap.Ref<object>): void => {
   580        const _ret = WEBEXT.fileManagerPrivateInternal.getFileTasks(
   581          A.H.get<object>(urls),
   582          A.H.get<object>(dlpSourceUrls)
   583        );
   584        A.store.Ref(retPtr, _ret);
   585      },
   586      "try_GetFileTasks": (
   587        retPtr: Pointer,
   588        errPtr: Pointer,
   589        urls: heap.Ref<object>,
   590        dlpSourceUrls: heap.Ref<object>
   591      ): heap.Ref<boolean> => {
   592        try {
   593          const _ret = WEBEXT.fileManagerPrivateInternal.getFileTasks(
   594            A.H.get<object>(urls),
   595            A.H.get<object>(dlpSourceUrls)
   596          );
   597          A.store.Ref(retPtr, _ret);
   598          return A.H.TRUE;
   599        } catch (err: any) {
   600          A.store.Ref(errPtr, err);
   601          return A.H.FALSE;
   602        }
   603      },
   604      "has_GetLinuxPackageInfo": (): heap.Ref<boolean> => {
   605        if (WEBEXT?.fileManagerPrivateInternal && "getLinuxPackageInfo" in WEBEXT?.fileManagerPrivateInternal) {
   606          return A.H.TRUE;
   607        }
   608        return A.H.FALSE;
   609      },
   610      "func_GetLinuxPackageInfo": (fn: Pointer): void => {
   611        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getLinuxPackageInfo);
   612      },
   613      "call_GetLinuxPackageInfo": (retPtr: Pointer, url: heap.Ref<object>): void => {
   614        const _ret = WEBEXT.fileManagerPrivateInternal.getLinuxPackageInfo(A.H.get<object>(url));
   615        A.store.Ref(retPtr, _ret);
   616      },
   617      "try_GetLinuxPackageInfo": (retPtr: Pointer, errPtr: Pointer, url: heap.Ref<object>): heap.Ref<boolean> => {
   618        try {
   619          const _ret = WEBEXT.fileManagerPrivateInternal.getLinuxPackageInfo(A.H.get<object>(url));
   620          A.store.Ref(retPtr, _ret);
   621          return A.H.TRUE;
   622        } catch (err: any) {
   623          A.store.Ref(errPtr, err);
   624          return A.H.FALSE;
   625        }
   626      },
   627      "has_GetMimeType": (): heap.Ref<boolean> => {
   628        if (WEBEXT?.fileManagerPrivateInternal && "getMimeType" in WEBEXT?.fileManagerPrivateInternal) {
   629          return A.H.TRUE;
   630        }
   631        return A.H.FALSE;
   632      },
   633      "func_GetMimeType": (fn: Pointer): void => {
   634        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getMimeType);
   635      },
   636      "call_GetMimeType": (retPtr: Pointer, url: heap.Ref<object>): void => {
   637        const _ret = WEBEXT.fileManagerPrivateInternal.getMimeType(A.H.get<object>(url));
   638        A.store.Ref(retPtr, _ret);
   639      },
   640      "try_GetMimeType": (retPtr: Pointer, errPtr: Pointer, url: heap.Ref<object>): heap.Ref<boolean> => {
   641        try {
   642          const _ret = WEBEXT.fileManagerPrivateInternal.getMimeType(A.H.get<object>(url));
   643          A.store.Ref(retPtr, _ret);
   644          return A.H.TRUE;
   645        } catch (err: any) {
   646          A.store.Ref(errPtr, err);
   647          return A.H.FALSE;
   648        }
   649      },
   650      "has_GetRecentFiles": (): heap.Ref<boolean> => {
   651        if (WEBEXT?.fileManagerPrivateInternal && "getRecentFiles" in WEBEXT?.fileManagerPrivateInternal) {
   652          return A.H.TRUE;
   653        }
   654        return A.H.FALSE;
   655      },
   656      "func_GetRecentFiles": (fn: Pointer): void => {
   657        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getRecentFiles);
   658      },
   659      "call_GetRecentFiles": (
   660        retPtr: Pointer,
   661        restriction: number,
   662        file_category: number,
   663        invalidate_cache: heap.Ref<boolean>
   664      ): void => {
   665        const _ret = WEBEXT.fileManagerPrivateInternal.getRecentFiles(
   666          restriction > 0 && restriction <= 2 ? ["any_source", "native_source"][restriction - 1] : undefined,
   667          file_category > 0 && file_category <= 5
   668            ? ["all", "audio", "image", "video", "document"][file_category - 1]
   669            : undefined,
   670          invalidate_cache === A.H.TRUE
   671        );
   672        A.store.Ref(retPtr, _ret);
   673      },
   674      "try_GetRecentFiles": (
   675        retPtr: Pointer,
   676        errPtr: Pointer,
   677        restriction: number,
   678        file_category: number,
   679        invalidate_cache: heap.Ref<boolean>
   680      ): heap.Ref<boolean> => {
   681        try {
   682          const _ret = WEBEXT.fileManagerPrivateInternal.getRecentFiles(
   683            restriction > 0 && restriction <= 2 ? ["any_source", "native_source"][restriction - 1] : undefined,
   684            file_category > 0 && file_category <= 5
   685              ? ["all", "audio", "image", "video", "document"][file_category - 1]
   686              : undefined,
   687            invalidate_cache === A.H.TRUE
   688          );
   689          A.store.Ref(retPtr, _ret);
   690          return A.H.TRUE;
   691        } catch (err: any) {
   692          A.store.Ref(errPtr, err);
   693          return A.H.FALSE;
   694        }
   695      },
   696      "has_GetVolumeRoot": (): heap.Ref<boolean> => {
   697        if (WEBEXT?.fileManagerPrivateInternal && "getVolumeRoot" in WEBEXT?.fileManagerPrivateInternal) {
   698          return A.H.TRUE;
   699        }
   700        return A.H.FALSE;
   701      },
   702      "func_GetVolumeRoot": (fn: Pointer): void => {
   703        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.getVolumeRoot);
   704      },
   705      "call_GetVolumeRoot": (retPtr: Pointer, options: Pointer): void => {
   706        const options_ffi = {};
   707  
   708        options_ffi["volumeId"] = A.load.Ref(options + 0, undefined);
   709        if (A.load.Bool(options + 5)) {
   710          options_ffi["writable"] = A.load.Bool(options + 4);
   711        }
   712  
   713        const _ret = WEBEXT.fileManagerPrivateInternal.getVolumeRoot(options_ffi);
   714        A.store.Ref(retPtr, _ret);
   715      },
   716      "try_GetVolumeRoot": (retPtr: Pointer, errPtr: Pointer, options: Pointer): heap.Ref<boolean> => {
   717        try {
   718          const options_ffi = {};
   719  
   720          options_ffi["volumeId"] = A.load.Ref(options + 0, undefined);
   721          if (A.load.Bool(options + 5)) {
   722            options_ffi["writable"] = A.load.Bool(options + 4);
   723          }
   724  
   725          const _ret = WEBEXT.fileManagerPrivateInternal.getVolumeRoot(options_ffi);
   726          A.store.Ref(retPtr, _ret);
   727          return A.H.TRUE;
   728        } catch (err: any) {
   729          A.store.Ref(errPtr, err);
   730          return A.H.FALSE;
   731        }
   732      },
   733      "has_ImportCrostiniImage": (): heap.Ref<boolean> => {
   734        if (WEBEXT?.fileManagerPrivateInternal && "importCrostiniImage" in WEBEXT?.fileManagerPrivateInternal) {
   735          return A.H.TRUE;
   736        }
   737        return A.H.FALSE;
   738      },
   739      "func_ImportCrostiniImage": (fn: Pointer): void => {
   740        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.importCrostiniImage);
   741      },
   742      "call_ImportCrostiniImage": (retPtr: Pointer, url: heap.Ref<object>): void => {
   743        const _ret = WEBEXT.fileManagerPrivateInternal.importCrostiniImage(A.H.get<object>(url));
   744      },
   745      "try_ImportCrostiniImage": (retPtr: Pointer, errPtr: Pointer, url: heap.Ref<object>): heap.Ref<boolean> => {
   746        try {
   747          const _ret = WEBEXT.fileManagerPrivateInternal.importCrostiniImage(A.H.get<object>(url));
   748          return A.H.TRUE;
   749        } catch (err: any) {
   750          A.store.Ref(errPtr, err);
   751          return A.H.FALSE;
   752        }
   753      },
   754      "has_InstallLinuxPackage": (): heap.Ref<boolean> => {
   755        if (WEBEXT?.fileManagerPrivateInternal && "installLinuxPackage" in WEBEXT?.fileManagerPrivateInternal) {
   756          return A.H.TRUE;
   757        }
   758        return A.H.FALSE;
   759      },
   760      "func_InstallLinuxPackage": (fn: Pointer): void => {
   761        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.installLinuxPackage);
   762      },
   763      "call_InstallLinuxPackage": (retPtr: Pointer, url: heap.Ref<object>, callback: heap.Ref<object>): void => {
   764        const _ret = WEBEXT.fileManagerPrivateInternal.installLinuxPackage(
   765          A.H.get<object>(url),
   766          A.H.get<object>(callback)
   767        );
   768      },
   769      "try_InstallLinuxPackage": (
   770        retPtr: Pointer,
   771        errPtr: Pointer,
   772        url: heap.Ref<object>,
   773        callback: heap.Ref<object>
   774      ): heap.Ref<boolean> => {
   775        try {
   776          const _ret = WEBEXT.fileManagerPrivateInternal.installLinuxPackage(
   777            A.H.get<object>(url),
   778            A.H.get<object>(callback)
   779          );
   780          return A.H.TRUE;
   781        } catch (err: any) {
   782          A.store.Ref(errPtr, err);
   783          return A.H.FALSE;
   784        }
   785      },
   786      "has_InvokeSharesheet": (): heap.Ref<boolean> => {
   787        if (WEBEXT?.fileManagerPrivateInternal && "invokeSharesheet" in WEBEXT?.fileManagerPrivateInternal) {
   788          return A.H.TRUE;
   789        }
   790        return A.H.FALSE;
   791      },
   792      "func_InvokeSharesheet": (fn: Pointer): void => {
   793        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.invokeSharesheet);
   794      },
   795      "call_InvokeSharesheet": (
   796        retPtr: Pointer,
   797        urls: heap.Ref<object>,
   798        launchSource: number,
   799        dlpSourceUrls: heap.Ref<object>
   800      ): void => {
   801        const _ret = WEBEXT.fileManagerPrivateInternal.invokeSharesheet(
   802          A.H.get<object>(urls),
   803          launchSource > 0 && launchSource <= 3
   804            ? ["context_menu", "sharesheet_button", "unknown"][launchSource - 1]
   805            : undefined,
   806          A.H.get<object>(dlpSourceUrls)
   807        );
   808        A.store.Ref(retPtr, _ret);
   809      },
   810      "try_InvokeSharesheet": (
   811        retPtr: Pointer,
   812        errPtr: Pointer,
   813        urls: heap.Ref<object>,
   814        launchSource: number,
   815        dlpSourceUrls: heap.Ref<object>
   816      ): heap.Ref<boolean> => {
   817        try {
   818          const _ret = WEBEXT.fileManagerPrivateInternal.invokeSharesheet(
   819            A.H.get<object>(urls),
   820            launchSource > 0 && launchSource <= 3
   821              ? ["context_menu", "sharesheet_button", "unknown"][launchSource - 1]
   822              : undefined,
   823            A.H.get<object>(dlpSourceUrls)
   824          );
   825          A.store.Ref(retPtr, _ret);
   826          return A.H.TRUE;
   827        } catch (err: any) {
   828          A.store.Ref(errPtr, err);
   829          return A.H.FALSE;
   830        }
   831      },
   832      "has_ParseTrashInfoFiles": (): heap.Ref<boolean> => {
   833        if (WEBEXT?.fileManagerPrivateInternal && "parseTrashInfoFiles" in WEBEXT?.fileManagerPrivateInternal) {
   834          return A.H.TRUE;
   835        }
   836        return A.H.FALSE;
   837      },
   838      "func_ParseTrashInfoFiles": (fn: Pointer): void => {
   839        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.parseTrashInfoFiles);
   840      },
   841      "call_ParseTrashInfoFiles": (retPtr: Pointer, urls: heap.Ref<object>): void => {
   842        const _ret = WEBEXT.fileManagerPrivateInternal.parseTrashInfoFiles(A.H.get<object>(urls));
   843        A.store.Ref(retPtr, _ret);
   844      },
   845      "try_ParseTrashInfoFiles": (retPtr: Pointer, errPtr: Pointer, urls: heap.Ref<object>): heap.Ref<boolean> => {
   846        try {
   847          const _ret = WEBEXT.fileManagerPrivateInternal.parseTrashInfoFiles(A.H.get<object>(urls));
   848          A.store.Ref(retPtr, _ret);
   849          return A.H.TRUE;
   850        } catch (err: any) {
   851          A.store.Ref(errPtr, err);
   852          return A.H.FALSE;
   853        }
   854      },
   855      "has_PinDriveFile": (): heap.Ref<boolean> => {
   856        if (WEBEXT?.fileManagerPrivateInternal && "pinDriveFile" in WEBEXT?.fileManagerPrivateInternal) {
   857          return A.H.TRUE;
   858        }
   859        return A.H.FALSE;
   860      },
   861      "func_PinDriveFile": (fn: Pointer): void => {
   862        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.pinDriveFile);
   863      },
   864      "call_PinDriveFile": (retPtr: Pointer, url: heap.Ref<object>, pin: heap.Ref<boolean>): void => {
   865        const _ret = WEBEXT.fileManagerPrivateInternal.pinDriveFile(A.H.get<object>(url), pin === A.H.TRUE);
   866        A.store.Ref(retPtr, _ret);
   867      },
   868      "try_PinDriveFile": (
   869        retPtr: Pointer,
   870        errPtr: Pointer,
   871        url: heap.Ref<object>,
   872        pin: heap.Ref<boolean>
   873      ): heap.Ref<boolean> => {
   874        try {
   875          const _ret = WEBEXT.fileManagerPrivateInternal.pinDriveFile(A.H.get<object>(url), pin === A.H.TRUE);
   876          A.store.Ref(retPtr, _ret);
   877          return A.H.TRUE;
   878        } catch (err: any) {
   879          A.store.Ref(errPtr, err);
   880          return A.H.FALSE;
   881        }
   882      },
   883      "has_RemoveFileWatch": (): heap.Ref<boolean> => {
   884        if (WEBEXT?.fileManagerPrivateInternal && "removeFileWatch" in WEBEXT?.fileManagerPrivateInternal) {
   885          return A.H.TRUE;
   886        }
   887        return A.H.FALSE;
   888      },
   889      "func_RemoveFileWatch": (fn: Pointer): void => {
   890        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.removeFileWatch);
   891      },
   892      "call_RemoveFileWatch": (retPtr: Pointer, url: heap.Ref<object>): void => {
   893        const _ret = WEBEXT.fileManagerPrivateInternal.removeFileWatch(A.H.get<object>(url));
   894        A.store.Ref(retPtr, _ret);
   895      },
   896      "try_RemoveFileWatch": (retPtr: Pointer, errPtr: Pointer, url: heap.Ref<object>): heap.Ref<boolean> => {
   897        try {
   898          const _ret = WEBEXT.fileManagerPrivateInternal.removeFileWatch(A.H.get<object>(url));
   899          A.store.Ref(retPtr, _ret);
   900          return A.H.TRUE;
   901        } catch (err: any) {
   902          A.store.Ref(errPtr, err);
   903          return A.H.FALSE;
   904        }
   905      },
   906      "has_ResolveIsolatedEntries": (): heap.Ref<boolean> => {
   907        if (WEBEXT?.fileManagerPrivateInternal && "resolveIsolatedEntries" in WEBEXT?.fileManagerPrivateInternal) {
   908          return A.H.TRUE;
   909        }
   910        return A.H.FALSE;
   911      },
   912      "func_ResolveIsolatedEntries": (fn: Pointer): void => {
   913        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.resolveIsolatedEntries);
   914      },
   915      "call_ResolveIsolatedEntries": (retPtr: Pointer, urls: heap.Ref<object>): void => {
   916        const _ret = WEBEXT.fileManagerPrivateInternal.resolveIsolatedEntries(A.H.get<object>(urls));
   917        A.store.Ref(retPtr, _ret);
   918      },
   919      "try_ResolveIsolatedEntries": (retPtr: Pointer, errPtr: Pointer, urls: heap.Ref<object>): heap.Ref<boolean> => {
   920        try {
   921          const _ret = WEBEXT.fileManagerPrivateInternal.resolveIsolatedEntries(A.H.get<object>(urls));
   922          A.store.Ref(retPtr, _ret);
   923          return A.H.TRUE;
   924        } catch (err: any) {
   925          A.store.Ref(errPtr, err);
   926          return A.H.FALSE;
   927        }
   928      },
   929      "has_SearchFiles": (): heap.Ref<boolean> => {
   930        if (WEBEXT?.fileManagerPrivateInternal && "searchFiles" in WEBEXT?.fileManagerPrivateInternal) {
   931          return A.H.TRUE;
   932        }
   933        return A.H.FALSE;
   934      },
   935      "func_SearchFiles": (fn: Pointer): void => {
   936        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.searchFiles);
   937      },
   938      "call_SearchFiles": (retPtr: Pointer, searchParams: Pointer): void => {
   939        const searchParams_ffi = {};
   940  
   941        searchParams_ffi["rootUrl"] = A.load.Ref(searchParams + 0, undefined);
   942        searchParams_ffi["query"] = A.load.Ref(searchParams + 4, undefined);
   943        searchParams_ffi["types"] = A.load.Enum(searchParams + 8, [
   944          "EXCLUDE_DIRECTORIES",
   945          "SHARED_WITH_ME",
   946          "OFFLINE",
   947          "ALL",
   948        ]);
   949        if (A.load.Bool(searchParams + 28)) {
   950          searchParams_ffi["maxResults"] = A.load.Int32(searchParams + 12);
   951        }
   952        if (A.load.Bool(searchParams + 29)) {
   953          searchParams_ffi["modifiedTimestamp"] = A.load.Float64(searchParams + 16);
   954        }
   955        searchParams_ffi["category"] = A.load.Enum(searchParams + 24, ["all", "audio", "image", "video", "document"]);
   956  
   957        const _ret = WEBEXT.fileManagerPrivateInternal.searchFiles(searchParams_ffi);
   958        A.store.Ref(retPtr, _ret);
   959      },
   960      "try_SearchFiles": (retPtr: Pointer, errPtr: Pointer, searchParams: Pointer): heap.Ref<boolean> => {
   961        try {
   962          const searchParams_ffi = {};
   963  
   964          searchParams_ffi["rootUrl"] = A.load.Ref(searchParams + 0, undefined);
   965          searchParams_ffi["query"] = A.load.Ref(searchParams + 4, undefined);
   966          searchParams_ffi["types"] = A.load.Enum(searchParams + 8, [
   967            "EXCLUDE_DIRECTORIES",
   968            "SHARED_WITH_ME",
   969            "OFFLINE",
   970            "ALL",
   971          ]);
   972          if (A.load.Bool(searchParams + 28)) {
   973            searchParams_ffi["maxResults"] = A.load.Int32(searchParams + 12);
   974          }
   975          if (A.load.Bool(searchParams + 29)) {
   976            searchParams_ffi["modifiedTimestamp"] = A.load.Float64(searchParams + 16);
   977          }
   978          searchParams_ffi["category"] = A.load.Enum(searchParams + 24, ["all", "audio", "image", "video", "document"]);
   979  
   980          const _ret = WEBEXT.fileManagerPrivateInternal.searchFiles(searchParams_ffi);
   981          A.store.Ref(retPtr, _ret);
   982          return A.H.TRUE;
   983        } catch (err: any) {
   984          A.store.Ref(errPtr, err);
   985          return A.H.FALSE;
   986        }
   987      },
   988      "has_SetDefaultTask": (): heap.Ref<boolean> => {
   989        if (WEBEXT?.fileManagerPrivateInternal && "setDefaultTask" in WEBEXT?.fileManagerPrivateInternal) {
   990          return A.H.TRUE;
   991        }
   992        return A.H.FALSE;
   993      },
   994      "func_SetDefaultTask": (fn: Pointer): void => {
   995        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.setDefaultTask);
   996      },
   997      "call_SetDefaultTask": (
   998        retPtr: Pointer,
   999        descriptor: Pointer,
  1000        urls: heap.Ref<object>,
  1001        mimeTypes: heap.Ref<object>
  1002      ): void => {
  1003        const descriptor_ffi = {};
  1004  
  1005        descriptor_ffi["appId"] = A.load.Ref(descriptor + 0, undefined);
  1006        descriptor_ffi["taskType"] = A.load.Ref(descriptor + 4, undefined);
  1007        descriptor_ffi["actionId"] = A.load.Ref(descriptor + 8, undefined);
  1008  
  1009        const _ret = WEBEXT.fileManagerPrivateInternal.setDefaultTask(
  1010          descriptor_ffi,
  1011          A.H.get<object>(urls),
  1012          A.H.get<object>(mimeTypes)
  1013        );
  1014        A.store.Ref(retPtr, _ret);
  1015      },
  1016      "try_SetDefaultTask": (
  1017        retPtr: Pointer,
  1018        errPtr: Pointer,
  1019        descriptor: Pointer,
  1020        urls: heap.Ref<object>,
  1021        mimeTypes: heap.Ref<object>
  1022      ): heap.Ref<boolean> => {
  1023        try {
  1024          const descriptor_ffi = {};
  1025  
  1026          descriptor_ffi["appId"] = A.load.Ref(descriptor + 0, undefined);
  1027          descriptor_ffi["taskType"] = A.load.Ref(descriptor + 4, undefined);
  1028          descriptor_ffi["actionId"] = A.load.Ref(descriptor + 8, undefined);
  1029  
  1030          const _ret = WEBEXT.fileManagerPrivateInternal.setDefaultTask(
  1031            descriptor_ffi,
  1032            A.H.get<object>(urls),
  1033            A.H.get<object>(mimeTypes)
  1034          );
  1035          A.store.Ref(retPtr, _ret);
  1036          return A.H.TRUE;
  1037        } catch (err: any) {
  1038          A.store.Ref(errPtr, err);
  1039          return A.H.FALSE;
  1040        }
  1041      },
  1042      "has_SharePathsWithCrostini": (): heap.Ref<boolean> => {
  1043        if (WEBEXT?.fileManagerPrivateInternal && "sharePathsWithCrostini" in WEBEXT?.fileManagerPrivateInternal) {
  1044          return A.H.TRUE;
  1045        }
  1046        return A.H.FALSE;
  1047      },
  1048      "func_SharePathsWithCrostini": (fn: Pointer): void => {
  1049        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.sharePathsWithCrostini);
  1050      },
  1051      "call_SharePathsWithCrostini": (
  1052        retPtr: Pointer,
  1053        vmName: heap.Ref<object>,
  1054        urls: heap.Ref<object>,
  1055        persist: heap.Ref<boolean>
  1056      ): void => {
  1057        const _ret = WEBEXT.fileManagerPrivateInternal.sharePathsWithCrostini(
  1058          A.H.get<object>(vmName),
  1059          A.H.get<object>(urls),
  1060          persist === A.H.TRUE
  1061        );
  1062        A.store.Ref(retPtr, _ret);
  1063      },
  1064      "try_SharePathsWithCrostini": (
  1065        retPtr: Pointer,
  1066        errPtr: Pointer,
  1067        vmName: heap.Ref<object>,
  1068        urls: heap.Ref<object>,
  1069        persist: heap.Ref<boolean>
  1070      ): heap.Ref<boolean> => {
  1071        try {
  1072          const _ret = WEBEXT.fileManagerPrivateInternal.sharePathsWithCrostini(
  1073            A.H.get<object>(vmName),
  1074            A.H.get<object>(urls),
  1075            persist === A.H.TRUE
  1076          );
  1077          A.store.Ref(retPtr, _ret);
  1078          return A.H.TRUE;
  1079        } catch (err: any) {
  1080          A.store.Ref(errPtr, err);
  1081          return A.H.FALSE;
  1082        }
  1083      },
  1084      "has_SharesheetHasTargets": (): heap.Ref<boolean> => {
  1085        if (WEBEXT?.fileManagerPrivateInternal && "sharesheetHasTargets" in WEBEXT?.fileManagerPrivateInternal) {
  1086          return A.H.TRUE;
  1087        }
  1088        return A.H.FALSE;
  1089      },
  1090      "func_SharesheetHasTargets": (fn: Pointer): void => {
  1091        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.sharesheetHasTargets);
  1092      },
  1093      "call_SharesheetHasTargets": (retPtr: Pointer, urls: heap.Ref<object>): void => {
  1094        const _ret = WEBEXT.fileManagerPrivateInternal.sharesheetHasTargets(A.H.get<object>(urls));
  1095        A.store.Ref(retPtr, _ret);
  1096      },
  1097      "try_SharesheetHasTargets": (retPtr: Pointer, errPtr: Pointer, urls: heap.Ref<object>): heap.Ref<boolean> => {
  1098        try {
  1099          const _ret = WEBEXT.fileManagerPrivateInternal.sharesheetHasTargets(A.H.get<object>(urls));
  1100          A.store.Ref(retPtr, _ret);
  1101          return A.H.TRUE;
  1102        } catch (err: any) {
  1103          A.store.Ref(errPtr, err);
  1104          return A.H.FALSE;
  1105        }
  1106      },
  1107      "has_StartIOTask": (): heap.Ref<boolean> => {
  1108        if (WEBEXT?.fileManagerPrivateInternal && "startIOTask" in WEBEXT?.fileManagerPrivateInternal) {
  1109          return A.H.TRUE;
  1110        }
  1111        return A.H.FALSE;
  1112      },
  1113      "func_StartIOTask": (fn: Pointer): void => {
  1114        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.startIOTask);
  1115      },
  1116      "call_StartIOTask": (retPtr: Pointer, type: number, urls: heap.Ref<object>, params: Pointer): void => {
  1117        const params_ffi = {};
  1118  
  1119        params_ffi["destinationFolderUrl"] = A.load.Ref(params + 0, undefined);
  1120        params_ffi["password"] = A.load.Ref(params + 4, undefined);
  1121        if (A.load.Bool(params + 9)) {
  1122          params_ffi["showNotification"] = A.load.Bool(params + 8);
  1123        }
  1124  
  1125        const _ret = WEBEXT.fileManagerPrivateInternal.startIOTask(
  1126          type > 0 && type <= 9
  1127            ? ["copy", "delete", "empty_trash", "extract", "move", "restore", "restore_to_destination", "trash", "zip"][
  1128                type - 1
  1129              ]
  1130            : undefined,
  1131          A.H.get<object>(urls),
  1132          params_ffi
  1133        );
  1134        A.store.Ref(retPtr, _ret);
  1135      },
  1136      "try_StartIOTask": (
  1137        retPtr: Pointer,
  1138        errPtr: Pointer,
  1139        type: number,
  1140        urls: heap.Ref<object>,
  1141        params: Pointer
  1142      ): heap.Ref<boolean> => {
  1143        try {
  1144          const params_ffi = {};
  1145  
  1146          params_ffi["destinationFolderUrl"] = A.load.Ref(params + 0, undefined);
  1147          params_ffi["password"] = A.load.Ref(params + 4, undefined);
  1148          if (A.load.Bool(params + 9)) {
  1149            params_ffi["showNotification"] = A.load.Bool(params + 8);
  1150          }
  1151  
  1152          const _ret = WEBEXT.fileManagerPrivateInternal.startIOTask(
  1153            type > 0 && type <= 9
  1154              ? ["copy", "delete", "empty_trash", "extract", "move", "restore", "restore_to_destination", "trash", "zip"][
  1155                  type - 1
  1156                ]
  1157              : undefined,
  1158            A.H.get<object>(urls),
  1159            params_ffi
  1160          );
  1161          A.store.Ref(retPtr, _ret);
  1162          return A.H.TRUE;
  1163        } catch (err: any) {
  1164          A.store.Ref(errPtr, err);
  1165          return A.H.FALSE;
  1166        }
  1167      },
  1168      "has_ToggleAddedToHoldingSpace": (): heap.Ref<boolean> => {
  1169        if (WEBEXT?.fileManagerPrivateInternal && "toggleAddedToHoldingSpace" in WEBEXT?.fileManagerPrivateInternal) {
  1170          return A.H.TRUE;
  1171        }
  1172        return A.H.FALSE;
  1173      },
  1174      "func_ToggleAddedToHoldingSpace": (fn: Pointer): void => {
  1175        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.toggleAddedToHoldingSpace);
  1176      },
  1177      "call_ToggleAddedToHoldingSpace": (retPtr: Pointer, urls: heap.Ref<object>, add: heap.Ref<boolean>): void => {
  1178        const _ret = WEBEXT.fileManagerPrivateInternal.toggleAddedToHoldingSpace(A.H.get<object>(urls), add === A.H.TRUE);
  1179        A.store.Ref(retPtr, _ret);
  1180      },
  1181      "try_ToggleAddedToHoldingSpace": (
  1182        retPtr: Pointer,
  1183        errPtr: Pointer,
  1184        urls: heap.Ref<object>,
  1185        add: heap.Ref<boolean>
  1186      ): heap.Ref<boolean> => {
  1187        try {
  1188          const _ret = WEBEXT.fileManagerPrivateInternal.toggleAddedToHoldingSpace(
  1189            A.H.get<object>(urls),
  1190            add === A.H.TRUE
  1191          );
  1192          A.store.Ref(retPtr, _ret);
  1193          return A.H.TRUE;
  1194        } catch (err: any) {
  1195          A.store.Ref(errPtr, err);
  1196          return A.H.FALSE;
  1197        }
  1198      },
  1199      "has_UnsharePathWithCrostini": (): heap.Ref<boolean> => {
  1200        if (WEBEXT?.fileManagerPrivateInternal && "unsharePathWithCrostini" in WEBEXT?.fileManagerPrivateInternal) {
  1201          return A.H.TRUE;
  1202        }
  1203        return A.H.FALSE;
  1204      },
  1205      "func_UnsharePathWithCrostini": (fn: Pointer): void => {
  1206        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.unsharePathWithCrostini);
  1207      },
  1208      "call_UnsharePathWithCrostini": (retPtr: Pointer, vmName: heap.Ref<object>, url: heap.Ref<object>): void => {
  1209        const _ret = WEBEXT.fileManagerPrivateInternal.unsharePathWithCrostini(
  1210          A.H.get<object>(vmName),
  1211          A.H.get<object>(url)
  1212        );
  1213        A.store.Ref(retPtr, _ret);
  1214      },
  1215      "try_UnsharePathWithCrostini": (
  1216        retPtr: Pointer,
  1217        errPtr: Pointer,
  1218        vmName: heap.Ref<object>,
  1219        url: heap.Ref<object>
  1220      ): heap.Ref<boolean> => {
  1221        try {
  1222          const _ret = WEBEXT.fileManagerPrivateInternal.unsharePathWithCrostini(
  1223            A.H.get<object>(vmName),
  1224            A.H.get<object>(url)
  1225          );
  1226          A.store.Ref(retPtr, _ret);
  1227          return A.H.TRUE;
  1228        } catch (err: any) {
  1229          A.store.Ref(errPtr, err);
  1230          return A.H.FALSE;
  1231        }
  1232      },
  1233      "has_ValidatePathNameLength": (): heap.Ref<boolean> => {
  1234        if (WEBEXT?.fileManagerPrivateInternal && "validatePathNameLength" in WEBEXT?.fileManagerPrivateInternal) {
  1235          return A.H.TRUE;
  1236        }
  1237        return A.H.FALSE;
  1238      },
  1239      "func_ValidatePathNameLength": (fn: Pointer): void => {
  1240        A.store.Ref(fn, WEBEXT.fileManagerPrivateInternal.validatePathNameLength);
  1241      },
  1242      "call_ValidatePathNameLength": (retPtr: Pointer, parentUrl: heap.Ref<object>, name: heap.Ref<object>): void => {
  1243        const _ret = WEBEXT.fileManagerPrivateInternal.validatePathNameLength(
  1244          A.H.get<object>(parentUrl),
  1245          A.H.get<object>(name)
  1246        );
  1247        A.store.Ref(retPtr, _ret);
  1248      },
  1249      "try_ValidatePathNameLength": (
  1250        retPtr: Pointer,
  1251        errPtr: Pointer,
  1252        parentUrl: heap.Ref<object>,
  1253        name: heap.Ref<object>
  1254      ): heap.Ref<boolean> => {
  1255        try {
  1256          const _ret = WEBEXT.fileManagerPrivateInternal.validatePathNameLength(
  1257            A.H.get<object>(parentUrl),
  1258            A.H.get<object>(name)
  1259          );
  1260          A.store.Ref(retPtr, _ret);
  1261          return A.H.TRUE;
  1262        } catch (err: any) {
  1263          A.store.Ref(errPtr, err);
  1264          return A.H.FALSE;
  1265        }
  1266      },
  1267    };
  1268  });