github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/chromeos/telemetry/bindings/ffi_bindings.ts (about) 1 import { importModule, Application, heap, Pointer } from "@ffi"; 2 3 importModule("plat/js/webext/chromeos/telemetry", (A: Application) => { 4 const WEBEXT = typeof globalThis.browser === "undefined" ? globalThis.chrome : globalThis.browser; 5 6 return { 7 "store_AudioOutputNodeInfo": (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 + 27, false); 12 A.store.Bool(ptr + 24, false); 13 A.store.Float64(ptr + 0, 0); 14 A.store.Ref(ptr + 8, undefined); 15 A.store.Ref(ptr + 12, undefined); 16 A.store.Bool(ptr + 25, false); 17 A.store.Bool(ptr + 16, false); 18 A.store.Bool(ptr + 26, false); 19 A.store.Int32(ptr + 20, 0); 20 } else { 21 A.store.Bool(ptr + 27, true); 22 A.store.Bool(ptr + 24, "id" in x ? true : false); 23 A.store.Float64(ptr + 0, x["id"] === undefined ? 0 : (x["id"] as number)); 24 A.store.Ref(ptr + 8, x["name"]); 25 A.store.Ref(ptr + 12, x["deviceName"]); 26 A.store.Bool(ptr + 25, "active" in x ? true : false); 27 A.store.Bool(ptr + 16, x["active"] ? true : false); 28 A.store.Bool(ptr + 26, "nodeVolume" in x ? true : false); 29 A.store.Int32(ptr + 20, x["nodeVolume"] === undefined ? 0 : (x["nodeVolume"] as number)); 30 } 31 }, 32 "load_AudioOutputNodeInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 33 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 34 35 if (A.load.Bool(ptr + 24)) { 36 x["id"] = A.load.Float64(ptr + 0); 37 } else { 38 delete x["id"]; 39 } 40 x["name"] = A.load.Ref(ptr + 8, undefined); 41 x["deviceName"] = A.load.Ref(ptr + 12, undefined); 42 if (A.load.Bool(ptr + 25)) { 43 x["active"] = A.load.Bool(ptr + 16); 44 } else { 45 delete x["active"]; 46 } 47 if (A.load.Bool(ptr + 26)) { 48 x["nodeVolume"] = A.load.Int32(ptr + 20); 49 } else { 50 delete x["nodeVolume"]; 51 } 52 return create === A.H.TRUE ? A.H.push(x) : ref; 53 }, 54 55 "store_AudioInputNodeInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 56 const x = A.H.get<any>(ref); 57 58 if (typeof x === "undefined") { 59 A.store.Bool(ptr + 27, false); 60 A.store.Bool(ptr + 24, false); 61 A.store.Float64(ptr + 0, 0); 62 A.store.Ref(ptr + 8, undefined); 63 A.store.Ref(ptr + 12, undefined); 64 A.store.Bool(ptr + 25, false); 65 A.store.Bool(ptr + 16, false); 66 A.store.Bool(ptr + 26, false); 67 A.store.Int32(ptr + 20, 0); 68 } else { 69 A.store.Bool(ptr + 27, true); 70 A.store.Bool(ptr + 24, "id" in x ? true : false); 71 A.store.Float64(ptr + 0, x["id"] === undefined ? 0 : (x["id"] as number)); 72 A.store.Ref(ptr + 8, x["name"]); 73 A.store.Ref(ptr + 12, x["deviceName"]); 74 A.store.Bool(ptr + 25, "active" in x ? true : false); 75 A.store.Bool(ptr + 16, x["active"] ? true : false); 76 A.store.Bool(ptr + 26, "nodeGain" in x ? true : false); 77 A.store.Int32(ptr + 20, x["nodeGain"] === undefined ? 0 : (x["nodeGain"] as number)); 78 } 79 }, 80 "load_AudioInputNodeInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 81 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 82 83 if (A.load.Bool(ptr + 24)) { 84 x["id"] = A.load.Float64(ptr + 0); 85 } else { 86 delete x["id"]; 87 } 88 x["name"] = A.load.Ref(ptr + 8, undefined); 89 x["deviceName"] = A.load.Ref(ptr + 12, undefined); 90 if (A.load.Bool(ptr + 25)) { 91 x["active"] = A.load.Bool(ptr + 16); 92 } else { 93 delete x["active"]; 94 } 95 if (A.load.Bool(ptr + 26)) { 96 x["nodeGain"] = A.load.Int32(ptr + 20); 97 } else { 98 delete x["nodeGain"]; 99 } 100 return create === A.H.TRUE ? A.H.push(x) : ref; 101 }, 102 103 "store_AudioInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 104 const x = A.H.get<any>(ref); 105 106 if (typeof x === "undefined") { 107 A.store.Bool(ptr + 24, false); 108 A.store.Bool(ptr + 20, false); 109 A.store.Bool(ptr + 0, false); 110 A.store.Bool(ptr + 21, false); 111 A.store.Bool(ptr + 1, false); 112 A.store.Bool(ptr + 22, false); 113 A.store.Int32(ptr + 4, 0); 114 A.store.Bool(ptr + 23, false); 115 A.store.Int32(ptr + 8, 0); 116 A.store.Ref(ptr + 12, undefined); 117 A.store.Ref(ptr + 16, undefined); 118 } else { 119 A.store.Bool(ptr + 24, true); 120 A.store.Bool(ptr + 20, "outputMute" in x ? true : false); 121 A.store.Bool(ptr + 0, x["outputMute"] ? true : false); 122 A.store.Bool(ptr + 21, "inputMute" in x ? true : false); 123 A.store.Bool(ptr + 1, x["inputMute"] ? true : false); 124 A.store.Bool(ptr + 22, "underruns" in x ? true : false); 125 A.store.Int32(ptr + 4, x["underruns"] === undefined ? 0 : (x["underruns"] as number)); 126 A.store.Bool(ptr + 23, "severeUnderruns" in x ? true : false); 127 A.store.Int32(ptr + 8, x["severeUnderruns"] === undefined ? 0 : (x["severeUnderruns"] as number)); 128 A.store.Ref(ptr + 12, x["outputNodes"]); 129 A.store.Ref(ptr + 16, x["inputNodes"]); 130 } 131 }, 132 "load_AudioInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 133 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 134 135 if (A.load.Bool(ptr + 20)) { 136 x["outputMute"] = A.load.Bool(ptr + 0); 137 } else { 138 delete x["outputMute"]; 139 } 140 if (A.load.Bool(ptr + 21)) { 141 x["inputMute"] = A.load.Bool(ptr + 1); 142 } else { 143 delete x["inputMute"]; 144 } 145 if (A.load.Bool(ptr + 22)) { 146 x["underruns"] = A.load.Int32(ptr + 4); 147 } else { 148 delete x["underruns"]; 149 } 150 if (A.load.Bool(ptr + 23)) { 151 x["severeUnderruns"] = A.load.Int32(ptr + 8); 152 } else { 153 delete x["severeUnderruns"]; 154 } 155 x["outputNodes"] = A.load.Ref(ptr + 12, undefined); 156 x["inputNodes"] = A.load.Ref(ptr + 16, undefined); 157 return create === A.H.TRUE ? A.H.push(x) : ref; 158 }, 159 160 "store_BatteryInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 161 const x = A.H.get<any>(ref); 162 163 if (typeof x === "undefined") { 164 A.store.Bool(ptr + 104, false); 165 A.store.Bool(ptr + 96, false); 166 A.store.Float64(ptr + 0, 0); 167 A.store.Bool(ptr + 97, false); 168 A.store.Float64(ptr + 8, 0); 169 A.store.Ref(ptr + 16, undefined); 170 A.store.Ref(ptr + 20, undefined); 171 A.store.Bool(ptr + 98, false); 172 A.store.Float64(ptr + 24, 0); 173 A.store.Bool(ptr + 99, false); 174 A.store.Float64(ptr + 32, 0); 175 A.store.Bool(ptr + 100, false); 176 A.store.Float64(ptr + 40, 0); 177 A.store.Ref(ptr + 48, undefined); 178 A.store.Bool(ptr + 101, false); 179 A.store.Float64(ptr + 56, 0); 180 A.store.Bool(ptr + 102, false); 181 A.store.Float64(ptr + 64, 0); 182 A.store.Ref(ptr + 72, undefined); 183 A.store.Ref(ptr + 76, undefined); 184 A.store.Ref(ptr + 80, undefined); 185 A.store.Bool(ptr + 103, false); 186 A.store.Float64(ptr + 88, 0); 187 } else { 188 A.store.Bool(ptr + 104, true); 189 A.store.Bool(ptr + 96, "cycleCount" in x ? true : false); 190 A.store.Float64(ptr + 0, x["cycleCount"] === undefined ? 0 : (x["cycleCount"] as number)); 191 A.store.Bool(ptr + 97, "voltageNow" in x ? true : false); 192 A.store.Float64(ptr + 8, x["voltageNow"] === undefined ? 0 : (x["voltageNow"] as number)); 193 A.store.Ref(ptr + 16, x["vendor"]); 194 A.store.Ref(ptr + 20, x["serialNumber"]); 195 A.store.Bool(ptr + 98, "chargeFullDesign" in x ? true : false); 196 A.store.Float64(ptr + 24, x["chargeFullDesign"] === undefined ? 0 : (x["chargeFullDesign"] as number)); 197 A.store.Bool(ptr + 99, "chargeFull" in x ? true : false); 198 A.store.Float64(ptr + 32, x["chargeFull"] === undefined ? 0 : (x["chargeFull"] as number)); 199 A.store.Bool(ptr + 100, "voltageMinDesign" in x ? true : false); 200 A.store.Float64(ptr + 40, x["voltageMinDesign"] === undefined ? 0 : (x["voltageMinDesign"] as number)); 201 A.store.Ref(ptr + 48, x["modelName"]); 202 A.store.Bool(ptr + 101, "chargeNow" in x ? true : false); 203 A.store.Float64(ptr + 56, x["chargeNow"] === undefined ? 0 : (x["chargeNow"] as number)); 204 A.store.Bool(ptr + 102, "currentNow" in x ? true : false); 205 A.store.Float64(ptr + 64, x["currentNow"] === undefined ? 0 : (x["currentNow"] as number)); 206 A.store.Ref(ptr + 72, x["technology"]); 207 A.store.Ref(ptr + 76, x["status"]); 208 A.store.Ref(ptr + 80, x["manufactureDate"]); 209 A.store.Bool(ptr + 103, "temperature" in x ? true : false); 210 A.store.Float64(ptr + 88, x["temperature"] === undefined ? 0 : (x["temperature"] as number)); 211 } 212 }, 213 "load_BatteryInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 214 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 215 216 if (A.load.Bool(ptr + 96)) { 217 x["cycleCount"] = A.load.Float64(ptr + 0); 218 } else { 219 delete x["cycleCount"]; 220 } 221 if (A.load.Bool(ptr + 97)) { 222 x["voltageNow"] = A.load.Float64(ptr + 8); 223 } else { 224 delete x["voltageNow"]; 225 } 226 x["vendor"] = A.load.Ref(ptr + 16, undefined); 227 x["serialNumber"] = A.load.Ref(ptr + 20, undefined); 228 if (A.load.Bool(ptr + 98)) { 229 x["chargeFullDesign"] = A.load.Float64(ptr + 24); 230 } else { 231 delete x["chargeFullDesign"]; 232 } 233 if (A.load.Bool(ptr + 99)) { 234 x["chargeFull"] = A.load.Float64(ptr + 32); 235 } else { 236 delete x["chargeFull"]; 237 } 238 if (A.load.Bool(ptr + 100)) { 239 x["voltageMinDesign"] = A.load.Float64(ptr + 40); 240 } else { 241 delete x["voltageMinDesign"]; 242 } 243 x["modelName"] = A.load.Ref(ptr + 48, undefined); 244 if (A.load.Bool(ptr + 101)) { 245 x["chargeNow"] = A.load.Float64(ptr + 56); 246 } else { 247 delete x["chargeNow"]; 248 } 249 if (A.load.Bool(ptr + 102)) { 250 x["currentNow"] = A.load.Float64(ptr + 64); 251 } else { 252 delete x["currentNow"]; 253 } 254 x["technology"] = A.load.Ref(ptr + 72, undefined); 255 x["status"] = A.load.Ref(ptr + 76, undefined); 256 x["manufactureDate"] = A.load.Ref(ptr + 80, undefined); 257 if (A.load.Bool(ptr + 103)) { 258 x["temperature"] = A.load.Float64(ptr + 88); 259 } else { 260 delete x["temperature"]; 261 } 262 return create === A.H.TRUE ? A.H.push(x) : ref; 263 }, 264 "constof_CpuArchitectureEnum": (ref: heap.Ref<string>): number => { 265 const idx = ["unknown", "x86_64", "aarch64", "armv7l"].indexOf(A.H.get(ref)); 266 return idx < 0 ? 0 : idx + 1; 267 }, 268 269 "store_CpuCStateInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 270 const x = A.H.get<any>(ref); 271 272 if (typeof x === "undefined") { 273 A.store.Bool(ptr + 17, false); 274 A.store.Ref(ptr + 0, undefined); 275 A.store.Bool(ptr + 16, false); 276 A.store.Float64(ptr + 8, 0); 277 } else { 278 A.store.Bool(ptr + 17, true); 279 A.store.Ref(ptr + 0, x["name"]); 280 A.store.Bool(ptr + 16, "timeInStateSinceLastBootUs" in x ? true : false); 281 A.store.Float64( 282 ptr + 8, 283 x["timeInStateSinceLastBootUs"] === undefined ? 0 : (x["timeInStateSinceLastBootUs"] as number) 284 ); 285 } 286 }, 287 "load_CpuCStateInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 288 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 289 290 x["name"] = A.load.Ref(ptr + 0, undefined); 291 if (A.load.Bool(ptr + 16)) { 292 x["timeInStateSinceLastBootUs"] = A.load.Float64(ptr + 8); 293 } else { 294 delete x["timeInStateSinceLastBootUs"]; 295 } 296 return create === A.H.TRUE ? A.H.push(x) : ref; 297 }, 298 299 "store_LogicalCpuInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 300 const x = A.H.get<any>(ref); 301 302 if (typeof x === "undefined") { 303 A.store.Bool(ptr + 37, false); 304 A.store.Bool(ptr + 32, false); 305 A.store.Int32(ptr + 0, 0); 306 A.store.Bool(ptr + 33, false); 307 A.store.Int32(ptr + 4, 0); 308 A.store.Bool(ptr + 34, false); 309 A.store.Int32(ptr + 8, 0); 310 A.store.Bool(ptr + 35, false); 311 A.store.Float64(ptr + 16, 0); 312 A.store.Ref(ptr + 24, undefined); 313 A.store.Bool(ptr + 36, false); 314 A.store.Int32(ptr + 28, 0); 315 } else { 316 A.store.Bool(ptr + 37, true); 317 A.store.Bool(ptr + 32, "maxClockSpeedKhz" in x ? true : false); 318 A.store.Int32(ptr + 0, x["maxClockSpeedKhz"] === undefined ? 0 : (x["maxClockSpeedKhz"] as number)); 319 A.store.Bool(ptr + 33, "scalingMaxFrequencyKhz" in x ? true : false); 320 A.store.Int32(ptr + 4, x["scalingMaxFrequencyKhz"] === undefined ? 0 : (x["scalingMaxFrequencyKhz"] as number)); 321 A.store.Bool(ptr + 34, "scalingCurrentFrequencyKhz" in x ? true : false); 322 A.store.Int32( 323 ptr + 8, 324 x["scalingCurrentFrequencyKhz"] === undefined ? 0 : (x["scalingCurrentFrequencyKhz"] as number) 325 ); 326 A.store.Bool(ptr + 35, "idleTimeMs" in x ? true : false); 327 A.store.Float64(ptr + 16, x["idleTimeMs"] === undefined ? 0 : (x["idleTimeMs"] as number)); 328 A.store.Ref(ptr + 24, x["cStates"]); 329 A.store.Bool(ptr + 36, "coreId" in x ? true : false); 330 A.store.Int32(ptr + 28, x["coreId"] === undefined ? 0 : (x["coreId"] as number)); 331 } 332 }, 333 "load_LogicalCpuInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 334 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 335 336 if (A.load.Bool(ptr + 32)) { 337 x["maxClockSpeedKhz"] = A.load.Int32(ptr + 0); 338 } else { 339 delete x["maxClockSpeedKhz"]; 340 } 341 if (A.load.Bool(ptr + 33)) { 342 x["scalingMaxFrequencyKhz"] = A.load.Int32(ptr + 4); 343 } else { 344 delete x["scalingMaxFrequencyKhz"]; 345 } 346 if (A.load.Bool(ptr + 34)) { 347 x["scalingCurrentFrequencyKhz"] = A.load.Int32(ptr + 8); 348 } else { 349 delete x["scalingCurrentFrequencyKhz"]; 350 } 351 if (A.load.Bool(ptr + 35)) { 352 x["idleTimeMs"] = A.load.Float64(ptr + 16); 353 } else { 354 delete x["idleTimeMs"]; 355 } 356 x["cStates"] = A.load.Ref(ptr + 24, undefined); 357 if (A.load.Bool(ptr + 36)) { 358 x["coreId"] = A.load.Int32(ptr + 28); 359 } else { 360 delete x["coreId"]; 361 } 362 return create === A.H.TRUE ? A.H.push(x) : ref; 363 }, 364 365 "store_PhysicalCpuInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 366 const x = A.H.get<any>(ref); 367 368 if (typeof x === "undefined") { 369 A.store.Bool(ptr + 8, false); 370 A.store.Ref(ptr + 0, undefined); 371 A.store.Ref(ptr + 4, undefined); 372 } else { 373 A.store.Bool(ptr + 8, true); 374 A.store.Ref(ptr + 0, x["modelName"]); 375 A.store.Ref(ptr + 4, x["logicalCpus"]); 376 } 377 }, 378 "load_PhysicalCpuInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 379 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 380 381 x["modelName"] = A.load.Ref(ptr + 0, undefined); 382 x["logicalCpus"] = A.load.Ref(ptr + 4, undefined); 383 return create === A.H.TRUE ? A.H.push(x) : ref; 384 }, 385 386 "store_CpuInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 387 const x = A.H.get<any>(ref); 388 389 if (typeof x === "undefined") { 390 A.store.Bool(ptr + 13, false); 391 A.store.Bool(ptr + 12, false); 392 A.store.Int32(ptr + 0, 0); 393 A.store.Enum(ptr + 4, -1); 394 A.store.Ref(ptr + 8, undefined); 395 } else { 396 A.store.Bool(ptr + 13, true); 397 A.store.Bool(ptr + 12, "numTotalThreads" in x ? true : false); 398 A.store.Int32(ptr + 0, x["numTotalThreads"] === undefined ? 0 : (x["numTotalThreads"] as number)); 399 A.store.Enum(ptr + 4, ["unknown", "x86_64", "aarch64", "armv7l"].indexOf(x["architecture"] as string)); 400 A.store.Ref(ptr + 8, x["physicalCpus"]); 401 } 402 }, 403 "load_CpuInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 404 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 405 406 if (A.load.Bool(ptr + 12)) { 407 x["numTotalThreads"] = A.load.Int32(ptr + 0); 408 } else { 409 delete x["numTotalThreads"]; 410 } 411 x["architecture"] = A.load.Enum(ptr + 4, ["unknown", "x86_64", "aarch64", "armv7l"]); 412 x["physicalCpus"] = A.load.Ref(ptr + 8, undefined); 413 return create === A.H.TRUE ? A.H.push(x) : ref; 414 }, 415 "constof_DisplayInputType": (ref: heap.Ref<string>): number => { 416 const idx = ["unknown", "digital", "analog"].indexOf(A.H.get(ref)); 417 return idx < 0 ? 0 : idx + 1; 418 }, 419 420 "store_EmbeddedDisplayInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 421 const x = A.H.get<any>(ref); 422 423 if (typeof x === "undefined") { 424 A.store.Bool(ptr + 75, false); 425 A.store.Bool(ptr + 64, false); 426 A.store.Bool(ptr + 0, false); 427 A.store.Bool(ptr + 65, false); 428 A.store.Bool(ptr + 1, false); 429 A.store.Bool(ptr + 66, false); 430 A.store.Int32(ptr + 4, 0); 431 A.store.Bool(ptr + 67, false); 432 A.store.Int32(ptr + 8, 0); 433 A.store.Bool(ptr + 68, false); 434 A.store.Int32(ptr + 12, 0); 435 A.store.Bool(ptr + 69, false); 436 A.store.Int32(ptr + 16, 0); 437 A.store.Bool(ptr + 70, false); 438 A.store.Float64(ptr + 24, 0); 439 A.store.Ref(ptr + 32, undefined); 440 A.store.Bool(ptr + 71, false); 441 A.store.Int32(ptr + 36, 0); 442 A.store.Bool(ptr + 72, false); 443 A.store.Int32(ptr + 40, 0); 444 A.store.Bool(ptr + 73, false); 445 A.store.Int32(ptr + 44, 0); 446 A.store.Bool(ptr + 74, false); 447 A.store.Int32(ptr + 48, 0); 448 A.store.Ref(ptr + 52, undefined); 449 A.store.Enum(ptr + 56, -1); 450 A.store.Ref(ptr + 60, undefined); 451 } else { 452 A.store.Bool(ptr + 75, true); 453 A.store.Bool(ptr + 64, "privacyScreenSupported" in x ? true : false); 454 A.store.Bool(ptr + 0, x["privacyScreenSupported"] ? true : false); 455 A.store.Bool(ptr + 65, "privacyScreenEnabled" in x ? true : false); 456 A.store.Bool(ptr + 1, x["privacyScreenEnabled"] ? true : false); 457 A.store.Bool(ptr + 66, "displayWidth" in x ? true : false); 458 A.store.Int32(ptr + 4, x["displayWidth"] === undefined ? 0 : (x["displayWidth"] as number)); 459 A.store.Bool(ptr + 67, "displayHeight" in x ? true : false); 460 A.store.Int32(ptr + 8, x["displayHeight"] === undefined ? 0 : (x["displayHeight"] as number)); 461 A.store.Bool(ptr + 68, "resolutionHorizontal" in x ? true : false); 462 A.store.Int32(ptr + 12, x["resolutionHorizontal"] === undefined ? 0 : (x["resolutionHorizontal"] as number)); 463 A.store.Bool(ptr + 69, "resolutionVertical" in x ? true : false); 464 A.store.Int32(ptr + 16, x["resolutionVertical"] === undefined ? 0 : (x["resolutionVertical"] as number)); 465 A.store.Bool(ptr + 70, "refreshRate" in x ? true : false); 466 A.store.Float64(ptr + 24, x["refreshRate"] === undefined ? 0 : (x["refreshRate"] as number)); 467 A.store.Ref(ptr + 32, x["manufacturer"]); 468 A.store.Bool(ptr + 71, "modelId" in x ? true : false); 469 A.store.Int32(ptr + 36, x["modelId"] === undefined ? 0 : (x["modelId"] as number)); 470 A.store.Bool(ptr + 72, "serialNumber" in x ? true : false); 471 A.store.Int32(ptr + 40, x["serialNumber"] === undefined ? 0 : (x["serialNumber"] as number)); 472 A.store.Bool(ptr + 73, "manufactureWeek" in x ? true : false); 473 A.store.Int32(ptr + 44, x["manufactureWeek"] === undefined ? 0 : (x["manufactureWeek"] as number)); 474 A.store.Bool(ptr + 74, "manufactureYear" in x ? true : false); 475 A.store.Int32(ptr + 48, x["manufactureYear"] === undefined ? 0 : (x["manufactureYear"] as number)); 476 A.store.Ref(ptr + 52, x["edidVersion"]); 477 A.store.Enum(ptr + 56, ["unknown", "digital", "analog"].indexOf(x["inputType"] as string)); 478 A.store.Ref(ptr + 60, x["displayName"]); 479 } 480 }, 481 "load_EmbeddedDisplayInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 482 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 483 484 if (A.load.Bool(ptr + 64)) { 485 x["privacyScreenSupported"] = A.load.Bool(ptr + 0); 486 } else { 487 delete x["privacyScreenSupported"]; 488 } 489 if (A.load.Bool(ptr + 65)) { 490 x["privacyScreenEnabled"] = A.load.Bool(ptr + 1); 491 } else { 492 delete x["privacyScreenEnabled"]; 493 } 494 if (A.load.Bool(ptr + 66)) { 495 x["displayWidth"] = A.load.Int32(ptr + 4); 496 } else { 497 delete x["displayWidth"]; 498 } 499 if (A.load.Bool(ptr + 67)) { 500 x["displayHeight"] = A.load.Int32(ptr + 8); 501 } else { 502 delete x["displayHeight"]; 503 } 504 if (A.load.Bool(ptr + 68)) { 505 x["resolutionHorizontal"] = A.load.Int32(ptr + 12); 506 } else { 507 delete x["resolutionHorizontal"]; 508 } 509 if (A.load.Bool(ptr + 69)) { 510 x["resolutionVertical"] = A.load.Int32(ptr + 16); 511 } else { 512 delete x["resolutionVertical"]; 513 } 514 if (A.load.Bool(ptr + 70)) { 515 x["refreshRate"] = A.load.Float64(ptr + 24); 516 } else { 517 delete x["refreshRate"]; 518 } 519 x["manufacturer"] = A.load.Ref(ptr + 32, undefined); 520 if (A.load.Bool(ptr + 71)) { 521 x["modelId"] = A.load.Int32(ptr + 36); 522 } else { 523 delete x["modelId"]; 524 } 525 if (A.load.Bool(ptr + 72)) { 526 x["serialNumber"] = A.load.Int32(ptr + 40); 527 } else { 528 delete x["serialNumber"]; 529 } 530 if (A.load.Bool(ptr + 73)) { 531 x["manufactureWeek"] = A.load.Int32(ptr + 44); 532 } else { 533 delete x["manufactureWeek"]; 534 } 535 if (A.load.Bool(ptr + 74)) { 536 x["manufactureYear"] = A.load.Int32(ptr + 48); 537 } else { 538 delete x["manufactureYear"]; 539 } 540 x["edidVersion"] = A.load.Ref(ptr + 52, undefined); 541 x["inputType"] = A.load.Enum(ptr + 56, ["unknown", "digital", "analog"]); 542 x["displayName"] = A.load.Ref(ptr + 60, undefined); 543 return create === A.H.TRUE ? A.H.push(x) : ref; 544 }, 545 546 "store_ExternalDisplayInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 547 const x = A.H.get<any>(ref); 548 549 if (typeof x === "undefined") { 550 A.store.Bool(ptr + 65, false); 551 A.store.Bool(ptr + 56, false); 552 A.store.Int32(ptr + 0, 0); 553 A.store.Bool(ptr + 57, false); 554 A.store.Int32(ptr + 4, 0); 555 A.store.Bool(ptr + 58, false); 556 A.store.Int32(ptr + 8, 0); 557 A.store.Bool(ptr + 59, false); 558 A.store.Int32(ptr + 12, 0); 559 A.store.Bool(ptr + 60, false); 560 A.store.Float64(ptr + 16, 0); 561 A.store.Ref(ptr + 24, undefined); 562 A.store.Bool(ptr + 61, false); 563 A.store.Int32(ptr + 28, 0); 564 A.store.Bool(ptr + 62, false); 565 A.store.Int32(ptr + 32, 0); 566 A.store.Bool(ptr + 63, false); 567 A.store.Int32(ptr + 36, 0); 568 A.store.Bool(ptr + 64, false); 569 A.store.Int32(ptr + 40, 0); 570 A.store.Ref(ptr + 44, undefined); 571 A.store.Enum(ptr + 48, -1); 572 A.store.Ref(ptr + 52, undefined); 573 } else { 574 A.store.Bool(ptr + 65, true); 575 A.store.Bool(ptr + 56, "displayWidth" in x ? true : false); 576 A.store.Int32(ptr + 0, x["displayWidth"] === undefined ? 0 : (x["displayWidth"] as number)); 577 A.store.Bool(ptr + 57, "displayHeight" in x ? true : false); 578 A.store.Int32(ptr + 4, x["displayHeight"] === undefined ? 0 : (x["displayHeight"] as number)); 579 A.store.Bool(ptr + 58, "resolutionHorizontal" in x ? true : false); 580 A.store.Int32(ptr + 8, x["resolutionHorizontal"] === undefined ? 0 : (x["resolutionHorizontal"] as number)); 581 A.store.Bool(ptr + 59, "resolutionVertical" in x ? true : false); 582 A.store.Int32(ptr + 12, x["resolutionVertical"] === undefined ? 0 : (x["resolutionVertical"] as number)); 583 A.store.Bool(ptr + 60, "refreshRate" in x ? true : false); 584 A.store.Float64(ptr + 16, x["refreshRate"] === undefined ? 0 : (x["refreshRate"] as number)); 585 A.store.Ref(ptr + 24, x["manufacturer"]); 586 A.store.Bool(ptr + 61, "modelId" in x ? true : false); 587 A.store.Int32(ptr + 28, x["modelId"] === undefined ? 0 : (x["modelId"] as number)); 588 A.store.Bool(ptr + 62, "serialNumber" in x ? true : false); 589 A.store.Int32(ptr + 32, x["serialNumber"] === undefined ? 0 : (x["serialNumber"] as number)); 590 A.store.Bool(ptr + 63, "manufactureWeek" in x ? true : false); 591 A.store.Int32(ptr + 36, x["manufactureWeek"] === undefined ? 0 : (x["manufactureWeek"] as number)); 592 A.store.Bool(ptr + 64, "manufactureYear" in x ? true : false); 593 A.store.Int32(ptr + 40, x["manufactureYear"] === undefined ? 0 : (x["manufactureYear"] as number)); 594 A.store.Ref(ptr + 44, x["edidVersion"]); 595 A.store.Enum(ptr + 48, ["unknown", "digital", "analog"].indexOf(x["inputType"] as string)); 596 A.store.Ref(ptr + 52, x["displayName"]); 597 } 598 }, 599 "load_ExternalDisplayInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 600 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 601 602 if (A.load.Bool(ptr + 56)) { 603 x["displayWidth"] = A.load.Int32(ptr + 0); 604 } else { 605 delete x["displayWidth"]; 606 } 607 if (A.load.Bool(ptr + 57)) { 608 x["displayHeight"] = A.load.Int32(ptr + 4); 609 } else { 610 delete x["displayHeight"]; 611 } 612 if (A.load.Bool(ptr + 58)) { 613 x["resolutionHorizontal"] = A.load.Int32(ptr + 8); 614 } else { 615 delete x["resolutionHorizontal"]; 616 } 617 if (A.load.Bool(ptr + 59)) { 618 x["resolutionVertical"] = A.load.Int32(ptr + 12); 619 } else { 620 delete x["resolutionVertical"]; 621 } 622 if (A.load.Bool(ptr + 60)) { 623 x["refreshRate"] = A.load.Float64(ptr + 16); 624 } else { 625 delete x["refreshRate"]; 626 } 627 x["manufacturer"] = A.load.Ref(ptr + 24, undefined); 628 if (A.load.Bool(ptr + 61)) { 629 x["modelId"] = A.load.Int32(ptr + 28); 630 } else { 631 delete x["modelId"]; 632 } 633 if (A.load.Bool(ptr + 62)) { 634 x["serialNumber"] = A.load.Int32(ptr + 32); 635 } else { 636 delete x["serialNumber"]; 637 } 638 if (A.load.Bool(ptr + 63)) { 639 x["manufactureWeek"] = A.load.Int32(ptr + 36); 640 } else { 641 delete x["manufactureWeek"]; 642 } 643 if (A.load.Bool(ptr + 64)) { 644 x["manufactureYear"] = A.load.Int32(ptr + 40); 645 } else { 646 delete x["manufactureYear"]; 647 } 648 x["edidVersion"] = A.load.Ref(ptr + 44, undefined); 649 x["inputType"] = A.load.Enum(ptr + 48, ["unknown", "digital", "analog"]); 650 x["displayName"] = A.load.Ref(ptr + 52, undefined); 651 return create === A.H.TRUE ? A.H.push(x) : ref; 652 }, 653 654 "store_DisplayInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 655 const x = A.H.get<any>(ref); 656 657 if (typeof x === "undefined") { 658 A.store.Bool(ptr + 80, false); 659 660 A.store.Bool(ptr + 0 + 75, false); 661 A.store.Bool(ptr + 0 + 64, false); 662 A.store.Bool(ptr + 0 + 0, false); 663 A.store.Bool(ptr + 0 + 65, false); 664 A.store.Bool(ptr + 0 + 1, false); 665 A.store.Bool(ptr + 0 + 66, false); 666 A.store.Int32(ptr + 0 + 4, 0); 667 A.store.Bool(ptr + 0 + 67, false); 668 A.store.Int32(ptr + 0 + 8, 0); 669 A.store.Bool(ptr + 0 + 68, false); 670 A.store.Int32(ptr + 0 + 12, 0); 671 A.store.Bool(ptr + 0 + 69, false); 672 A.store.Int32(ptr + 0 + 16, 0); 673 A.store.Bool(ptr + 0 + 70, false); 674 A.store.Float64(ptr + 0 + 24, 0); 675 A.store.Ref(ptr + 0 + 32, undefined); 676 A.store.Bool(ptr + 0 + 71, false); 677 A.store.Int32(ptr + 0 + 36, 0); 678 A.store.Bool(ptr + 0 + 72, false); 679 A.store.Int32(ptr + 0 + 40, 0); 680 A.store.Bool(ptr + 0 + 73, false); 681 A.store.Int32(ptr + 0 + 44, 0); 682 A.store.Bool(ptr + 0 + 74, false); 683 A.store.Int32(ptr + 0 + 48, 0); 684 A.store.Ref(ptr + 0 + 52, undefined); 685 A.store.Enum(ptr + 0 + 56, -1); 686 A.store.Ref(ptr + 0 + 60, undefined); 687 A.store.Ref(ptr + 76, undefined); 688 } else { 689 A.store.Bool(ptr + 80, true); 690 691 if (typeof x["embeddedDisplay"] === "undefined") { 692 A.store.Bool(ptr + 0 + 75, false); 693 A.store.Bool(ptr + 0 + 64, false); 694 A.store.Bool(ptr + 0 + 0, false); 695 A.store.Bool(ptr + 0 + 65, false); 696 A.store.Bool(ptr + 0 + 1, false); 697 A.store.Bool(ptr + 0 + 66, false); 698 A.store.Int32(ptr + 0 + 4, 0); 699 A.store.Bool(ptr + 0 + 67, false); 700 A.store.Int32(ptr + 0 + 8, 0); 701 A.store.Bool(ptr + 0 + 68, false); 702 A.store.Int32(ptr + 0 + 12, 0); 703 A.store.Bool(ptr + 0 + 69, false); 704 A.store.Int32(ptr + 0 + 16, 0); 705 A.store.Bool(ptr + 0 + 70, false); 706 A.store.Float64(ptr + 0 + 24, 0); 707 A.store.Ref(ptr + 0 + 32, undefined); 708 A.store.Bool(ptr + 0 + 71, false); 709 A.store.Int32(ptr + 0 + 36, 0); 710 A.store.Bool(ptr + 0 + 72, false); 711 A.store.Int32(ptr + 0 + 40, 0); 712 A.store.Bool(ptr + 0 + 73, false); 713 A.store.Int32(ptr + 0 + 44, 0); 714 A.store.Bool(ptr + 0 + 74, false); 715 A.store.Int32(ptr + 0 + 48, 0); 716 A.store.Ref(ptr + 0 + 52, undefined); 717 A.store.Enum(ptr + 0 + 56, -1); 718 A.store.Ref(ptr + 0 + 60, undefined); 719 } else { 720 A.store.Bool(ptr + 0 + 75, true); 721 A.store.Bool(ptr + 0 + 64, "privacyScreenSupported" in x["embeddedDisplay"] ? true : false); 722 A.store.Bool(ptr + 0 + 0, x["embeddedDisplay"]["privacyScreenSupported"] ? true : false); 723 A.store.Bool(ptr + 0 + 65, "privacyScreenEnabled" in x["embeddedDisplay"] ? true : false); 724 A.store.Bool(ptr + 0 + 1, x["embeddedDisplay"]["privacyScreenEnabled"] ? true : false); 725 A.store.Bool(ptr + 0 + 66, "displayWidth" in x["embeddedDisplay"] ? true : false); 726 A.store.Int32( 727 ptr + 0 + 4, 728 x["embeddedDisplay"]["displayWidth"] === undefined ? 0 : (x["embeddedDisplay"]["displayWidth"] as number) 729 ); 730 A.store.Bool(ptr + 0 + 67, "displayHeight" in x["embeddedDisplay"] ? true : false); 731 A.store.Int32( 732 ptr + 0 + 8, 733 x["embeddedDisplay"]["displayHeight"] === undefined ? 0 : (x["embeddedDisplay"]["displayHeight"] as number) 734 ); 735 A.store.Bool(ptr + 0 + 68, "resolutionHorizontal" in x["embeddedDisplay"] ? true : false); 736 A.store.Int32( 737 ptr + 0 + 12, 738 x["embeddedDisplay"]["resolutionHorizontal"] === undefined 739 ? 0 740 : (x["embeddedDisplay"]["resolutionHorizontal"] as number) 741 ); 742 A.store.Bool(ptr + 0 + 69, "resolutionVertical" in x["embeddedDisplay"] ? true : false); 743 A.store.Int32( 744 ptr + 0 + 16, 745 x["embeddedDisplay"]["resolutionVertical"] === undefined 746 ? 0 747 : (x["embeddedDisplay"]["resolutionVertical"] as number) 748 ); 749 A.store.Bool(ptr + 0 + 70, "refreshRate" in x["embeddedDisplay"] ? true : false); 750 A.store.Float64( 751 ptr + 0 + 24, 752 x["embeddedDisplay"]["refreshRate"] === undefined ? 0 : (x["embeddedDisplay"]["refreshRate"] as number) 753 ); 754 A.store.Ref(ptr + 0 + 32, x["embeddedDisplay"]["manufacturer"]); 755 A.store.Bool(ptr + 0 + 71, "modelId" in x["embeddedDisplay"] ? true : false); 756 A.store.Int32( 757 ptr + 0 + 36, 758 x["embeddedDisplay"]["modelId"] === undefined ? 0 : (x["embeddedDisplay"]["modelId"] as number) 759 ); 760 A.store.Bool(ptr + 0 + 72, "serialNumber" in x["embeddedDisplay"] ? true : false); 761 A.store.Int32( 762 ptr + 0 + 40, 763 x["embeddedDisplay"]["serialNumber"] === undefined ? 0 : (x["embeddedDisplay"]["serialNumber"] as number) 764 ); 765 A.store.Bool(ptr + 0 + 73, "manufactureWeek" in x["embeddedDisplay"] ? true : false); 766 A.store.Int32( 767 ptr + 0 + 44, 768 x["embeddedDisplay"]["manufactureWeek"] === undefined 769 ? 0 770 : (x["embeddedDisplay"]["manufactureWeek"] as number) 771 ); 772 A.store.Bool(ptr + 0 + 74, "manufactureYear" in x["embeddedDisplay"] ? true : false); 773 A.store.Int32( 774 ptr + 0 + 48, 775 x["embeddedDisplay"]["manufactureYear"] === undefined 776 ? 0 777 : (x["embeddedDisplay"]["manufactureYear"] as number) 778 ); 779 A.store.Ref(ptr + 0 + 52, x["embeddedDisplay"]["edidVersion"]); 780 A.store.Enum( 781 ptr + 0 + 56, 782 ["unknown", "digital", "analog"].indexOf(x["embeddedDisplay"]["inputType"] as string) 783 ); 784 A.store.Ref(ptr + 0 + 60, x["embeddedDisplay"]["displayName"]); 785 } 786 A.store.Ref(ptr + 76, x["externalDisplays"]); 787 } 788 }, 789 "load_DisplayInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 790 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 791 792 if (A.load.Bool(ptr + 0 + 75)) { 793 x["embeddedDisplay"] = {}; 794 if (A.load.Bool(ptr + 0 + 64)) { 795 x["embeddedDisplay"]["privacyScreenSupported"] = A.load.Bool(ptr + 0 + 0); 796 } else { 797 delete x["embeddedDisplay"]["privacyScreenSupported"]; 798 } 799 if (A.load.Bool(ptr + 0 + 65)) { 800 x["embeddedDisplay"]["privacyScreenEnabled"] = A.load.Bool(ptr + 0 + 1); 801 } else { 802 delete x["embeddedDisplay"]["privacyScreenEnabled"]; 803 } 804 if (A.load.Bool(ptr + 0 + 66)) { 805 x["embeddedDisplay"]["displayWidth"] = A.load.Int32(ptr + 0 + 4); 806 } else { 807 delete x["embeddedDisplay"]["displayWidth"]; 808 } 809 if (A.load.Bool(ptr + 0 + 67)) { 810 x["embeddedDisplay"]["displayHeight"] = A.load.Int32(ptr + 0 + 8); 811 } else { 812 delete x["embeddedDisplay"]["displayHeight"]; 813 } 814 if (A.load.Bool(ptr + 0 + 68)) { 815 x["embeddedDisplay"]["resolutionHorizontal"] = A.load.Int32(ptr + 0 + 12); 816 } else { 817 delete x["embeddedDisplay"]["resolutionHorizontal"]; 818 } 819 if (A.load.Bool(ptr + 0 + 69)) { 820 x["embeddedDisplay"]["resolutionVertical"] = A.load.Int32(ptr + 0 + 16); 821 } else { 822 delete x["embeddedDisplay"]["resolutionVertical"]; 823 } 824 if (A.load.Bool(ptr + 0 + 70)) { 825 x["embeddedDisplay"]["refreshRate"] = A.load.Float64(ptr + 0 + 24); 826 } else { 827 delete x["embeddedDisplay"]["refreshRate"]; 828 } 829 x["embeddedDisplay"]["manufacturer"] = A.load.Ref(ptr + 0 + 32, undefined); 830 if (A.load.Bool(ptr + 0 + 71)) { 831 x["embeddedDisplay"]["modelId"] = A.load.Int32(ptr + 0 + 36); 832 } else { 833 delete x["embeddedDisplay"]["modelId"]; 834 } 835 if (A.load.Bool(ptr + 0 + 72)) { 836 x["embeddedDisplay"]["serialNumber"] = A.load.Int32(ptr + 0 + 40); 837 } else { 838 delete x["embeddedDisplay"]["serialNumber"]; 839 } 840 if (A.load.Bool(ptr + 0 + 73)) { 841 x["embeddedDisplay"]["manufactureWeek"] = A.load.Int32(ptr + 0 + 44); 842 } else { 843 delete x["embeddedDisplay"]["manufactureWeek"]; 844 } 845 if (A.load.Bool(ptr + 0 + 74)) { 846 x["embeddedDisplay"]["manufactureYear"] = A.load.Int32(ptr + 0 + 48); 847 } else { 848 delete x["embeddedDisplay"]["manufactureYear"]; 849 } 850 x["embeddedDisplay"]["edidVersion"] = A.load.Ref(ptr + 0 + 52, undefined); 851 x["embeddedDisplay"]["inputType"] = A.load.Enum(ptr + 0 + 56, ["unknown", "digital", "analog"]); 852 x["embeddedDisplay"]["displayName"] = A.load.Ref(ptr + 0 + 60, undefined); 853 } else { 854 delete x["embeddedDisplay"]; 855 } 856 x["externalDisplays"] = A.load.Ref(ptr + 76, undefined); 857 return create === A.H.TRUE ? A.H.push(x) : ref; 858 }, 859 "constof_FwupdVersionFormat": (ref: heap.Ref<string>): number => { 860 const idx = [ 861 "plain", 862 "number", 863 "pair", 864 "triplet", 865 "quad", 866 "bcd", 867 "intelMe", 868 "intelMe2", 869 "surfaceLegacy", 870 "surface", 871 "dellBios", 872 "hex", 873 ].indexOf(A.H.get(ref)); 874 return idx < 0 ? 0 : idx + 1; 875 }, 876 877 "store_FwupdFirmwareVersionInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 878 const x = A.H.get<any>(ref); 879 880 if (typeof x === "undefined") { 881 A.store.Bool(ptr + 8, false); 882 A.store.Ref(ptr + 0, undefined); 883 A.store.Enum(ptr + 4, -1); 884 } else { 885 A.store.Bool(ptr + 8, true); 886 A.store.Ref(ptr + 0, x["version"]); 887 A.store.Enum( 888 ptr + 4, 889 [ 890 "plain", 891 "number", 892 "pair", 893 "triplet", 894 "quad", 895 "bcd", 896 "intelMe", 897 "intelMe2", 898 "surfaceLegacy", 899 "surface", 900 "dellBios", 901 "hex", 902 ].indexOf(x["version_format"] as string) 903 ); 904 } 905 }, 906 "load_FwupdFirmwareVersionInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 907 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 908 909 x["version"] = A.load.Ref(ptr + 0, undefined); 910 x["version_format"] = A.load.Enum(ptr + 4, [ 911 "plain", 912 "number", 913 "pair", 914 "triplet", 915 "quad", 916 "bcd", 917 "intelMe", 918 "intelMe2", 919 "surfaceLegacy", 920 "surface", 921 "dellBios", 922 "hex", 923 ]); 924 return create === A.H.TRUE ? A.H.push(x) : ref; 925 }, 926 "constof_NetworkType": (ref: heap.Ref<string>): number => { 927 const idx = ["cellular", "ethernet", "tether", "vpn", "wifi"].indexOf(A.H.get(ref)); 928 return idx < 0 ? 0 : idx + 1; 929 }, 930 "constof_NetworkState": (ref: heap.Ref<string>): number => { 931 const idx = [ 932 "uninitialized", 933 "disabled", 934 "prohibited", 935 "not_connected", 936 "connecting", 937 "portal", 938 "connected", 939 "online", 940 ].indexOf(A.H.get(ref)); 941 return idx < 0 ? 0 : idx + 1; 942 }, 943 944 "store_NetworkInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 945 const x = A.H.get<any>(ref); 946 947 if (typeof x === "undefined") { 948 A.store.Bool(ptr + 33, false); 949 A.store.Enum(ptr + 0, -1); 950 A.store.Enum(ptr + 4, -1); 951 A.store.Ref(ptr + 8, undefined); 952 A.store.Ref(ptr + 12, undefined); 953 A.store.Ref(ptr + 16, undefined); 954 A.store.Bool(ptr + 32, false); 955 A.store.Float64(ptr + 24, 0); 956 } else { 957 A.store.Bool(ptr + 33, true); 958 A.store.Enum(ptr + 0, ["cellular", "ethernet", "tether", "vpn", "wifi"].indexOf(x["type"] as string)); 959 A.store.Enum( 960 ptr + 4, 961 [ 962 "uninitialized", 963 "disabled", 964 "prohibited", 965 "not_connected", 966 "connecting", 967 "portal", 968 "connected", 969 "online", 970 ].indexOf(x["state"] as string) 971 ); 972 A.store.Ref(ptr + 8, x["macAddress"]); 973 A.store.Ref(ptr + 12, x["ipv4Address"]); 974 A.store.Ref(ptr + 16, x["ipv6Addresses"]); 975 A.store.Bool(ptr + 32, "signalStrength" in x ? true : false); 976 A.store.Float64(ptr + 24, x["signalStrength"] === undefined ? 0 : (x["signalStrength"] as number)); 977 } 978 }, 979 "load_NetworkInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 980 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 981 982 x["type"] = A.load.Enum(ptr + 0, ["cellular", "ethernet", "tether", "vpn", "wifi"]); 983 x["state"] = A.load.Enum(ptr + 4, [ 984 "uninitialized", 985 "disabled", 986 "prohibited", 987 "not_connected", 988 "connecting", 989 "portal", 990 "connected", 991 "online", 992 ]); 993 x["macAddress"] = A.load.Ref(ptr + 8, undefined); 994 x["ipv4Address"] = A.load.Ref(ptr + 12, undefined); 995 x["ipv6Addresses"] = A.load.Ref(ptr + 16, undefined); 996 if (A.load.Bool(ptr + 32)) { 997 x["signalStrength"] = A.load.Float64(ptr + 24); 998 } else { 999 delete x["signalStrength"]; 1000 } 1001 return create === A.H.TRUE ? A.H.push(x) : ref; 1002 }, 1003 1004 "store_InternetConnectivityInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 1005 const x = A.H.get<any>(ref); 1006 1007 if (typeof x === "undefined") { 1008 A.store.Bool(ptr + 4, false); 1009 A.store.Ref(ptr + 0, undefined); 1010 } else { 1011 A.store.Bool(ptr + 4, true); 1012 A.store.Ref(ptr + 0, x["networks"]); 1013 } 1014 }, 1015 "load_InternetConnectivityInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1016 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1017 1018 x["networks"] = A.load.Ref(ptr + 0, undefined); 1019 return create === A.H.TRUE ? A.H.push(x) : ref; 1020 }, 1021 1022 "store_MarketingInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 1023 const x = A.H.get<any>(ref); 1024 1025 if (typeof x === "undefined") { 1026 A.store.Bool(ptr + 4, false); 1027 A.store.Ref(ptr + 0, undefined); 1028 } else { 1029 A.store.Bool(ptr + 4, true); 1030 A.store.Ref(ptr + 0, x["marketingName"]); 1031 } 1032 }, 1033 "load_MarketingInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1034 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1035 1036 x["marketingName"] = A.load.Ref(ptr + 0, undefined); 1037 return create === A.H.TRUE ? A.H.push(x) : ref; 1038 }, 1039 1040 "store_MemoryInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 1041 const x = A.H.get<any>(ref); 1042 1043 if (typeof x === "undefined") { 1044 A.store.Bool(ptr + 28, false); 1045 A.store.Bool(ptr + 24, false); 1046 A.store.Int32(ptr + 0, 0); 1047 A.store.Bool(ptr + 25, false); 1048 A.store.Int32(ptr + 4, 0); 1049 A.store.Bool(ptr + 26, false); 1050 A.store.Int32(ptr + 8, 0); 1051 A.store.Bool(ptr + 27, false); 1052 A.store.Float64(ptr + 16, 0); 1053 } else { 1054 A.store.Bool(ptr + 28, true); 1055 A.store.Bool(ptr + 24, "totalMemoryKiB" in x ? true : false); 1056 A.store.Int32(ptr + 0, x["totalMemoryKiB"] === undefined ? 0 : (x["totalMemoryKiB"] as number)); 1057 A.store.Bool(ptr + 25, "freeMemoryKiB" in x ? true : false); 1058 A.store.Int32(ptr + 4, x["freeMemoryKiB"] === undefined ? 0 : (x["freeMemoryKiB"] as number)); 1059 A.store.Bool(ptr + 26, "availableMemoryKiB" in x ? true : false); 1060 A.store.Int32(ptr + 8, x["availableMemoryKiB"] === undefined ? 0 : (x["availableMemoryKiB"] as number)); 1061 A.store.Bool(ptr + 27, "pageFaultsSinceLastBoot" in x ? true : false); 1062 A.store.Float64( 1063 ptr + 16, 1064 x["pageFaultsSinceLastBoot"] === undefined ? 0 : (x["pageFaultsSinceLastBoot"] as number) 1065 ); 1066 } 1067 }, 1068 "load_MemoryInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1069 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1070 1071 if (A.load.Bool(ptr + 24)) { 1072 x["totalMemoryKiB"] = A.load.Int32(ptr + 0); 1073 } else { 1074 delete x["totalMemoryKiB"]; 1075 } 1076 if (A.load.Bool(ptr + 25)) { 1077 x["freeMemoryKiB"] = A.load.Int32(ptr + 4); 1078 } else { 1079 delete x["freeMemoryKiB"]; 1080 } 1081 if (A.load.Bool(ptr + 26)) { 1082 x["availableMemoryKiB"] = A.load.Int32(ptr + 8); 1083 } else { 1084 delete x["availableMemoryKiB"]; 1085 } 1086 if (A.load.Bool(ptr + 27)) { 1087 x["pageFaultsSinceLastBoot"] = A.load.Float64(ptr + 16); 1088 } else { 1089 delete x["pageFaultsSinceLastBoot"]; 1090 } 1091 return create === A.H.TRUE ? A.H.push(x) : ref; 1092 }, 1093 1094 "store_NonRemovableBlockDeviceInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 1095 const x = A.H.get<any>(ref); 1096 1097 if (typeof x === "undefined") { 1098 A.store.Bool(ptr + 17, false); 1099 A.store.Ref(ptr + 0, undefined); 1100 A.store.Ref(ptr + 4, undefined); 1101 A.store.Bool(ptr + 16, false); 1102 A.store.Float64(ptr + 8, 0); 1103 } else { 1104 A.store.Bool(ptr + 17, true); 1105 A.store.Ref(ptr + 0, x["name"]); 1106 A.store.Ref(ptr + 4, x["type"]); 1107 A.store.Bool(ptr + 16, "size" in x ? true : false); 1108 A.store.Float64(ptr + 8, x["size"] === undefined ? 0 : (x["size"] as number)); 1109 } 1110 }, 1111 "load_NonRemovableBlockDeviceInfo": ( 1112 ptr: Pointer, 1113 create: heap.Ref<boolean>, 1114 ref: heap.Ref<any> 1115 ): heap.Ref<any> => { 1116 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1117 1118 x["name"] = A.load.Ref(ptr + 0, undefined); 1119 x["type"] = A.load.Ref(ptr + 4, undefined); 1120 if (A.load.Bool(ptr + 16)) { 1121 x["size"] = A.load.Float64(ptr + 8); 1122 } else { 1123 delete x["size"]; 1124 } 1125 return create === A.H.TRUE ? A.H.push(x) : ref; 1126 }, 1127 1128 "store_NonRemovableBlockDeviceInfoResponse": (ptr: Pointer, ref: heap.Ref<any>) => { 1129 const x = A.H.get<any>(ref); 1130 1131 if (typeof x === "undefined") { 1132 A.store.Bool(ptr + 4, false); 1133 A.store.Ref(ptr + 0, undefined); 1134 } else { 1135 A.store.Bool(ptr + 4, true); 1136 A.store.Ref(ptr + 0, x["deviceInfos"]); 1137 } 1138 }, 1139 "load_NonRemovableBlockDeviceInfoResponse": ( 1140 ptr: Pointer, 1141 create: heap.Ref<boolean>, 1142 ref: heap.Ref<any> 1143 ): heap.Ref<any> => { 1144 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1145 1146 x["deviceInfos"] = A.load.Ref(ptr + 0, undefined); 1147 return create === A.H.TRUE ? A.H.push(x) : ref; 1148 }, 1149 1150 "store_OemData": (ptr: Pointer, ref: heap.Ref<any>) => { 1151 const x = A.H.get<any>(ref); 1152 1153 if (typeof x === "undefined") { 1154 A.store.Bool(ptr + 4, false); 1155 A.store.Ref(ptr + 0, undefined); 1156 } else { 1157 A.store.Bool(ptr + 4, true); 1158 A.store.Ref(ptr + 0, x["oemData"]); 1159 } 1160 }, 1161 "load_OemData": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1162 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1163 1164 x["oemData"] = A.load.Ref(ptr + 0, undefined); 1165 return create === A.H.TRUE ? A.H.push(x) : ref; 1166 }, 1167 1168 "store_OsVersionInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 1169 const x = A.H.get<any>(ref); 1170 1171 if (typeof x === "undefined") { 1172 A.store.Bool(ptr + 16, false); 1173 A.store.Ref(ptr + 0, undefined); 1174 A.store.Ref(ptr + 4, undefined); 1175 A.store.Ref(ptr + 8, undefined); 1176 A.store.Ref(ptr + 12, undefined); 1177 } else { 1178 A.store.Bool(ptr + 16, true); 1179 A.store.Ref(ptr + 0, x["releaseMilestone"]); 1180 A.store.Ref(ptr + 4, x["buildNumber"]); 1181 A.store.Ref(ptr + 8, x["patchNumber"]); 1182 A.store.Ref(ptr + 12, x["releaseChannel"]); 1183 } 1184 }, 1185 "load_OsVersionInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1186 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1187 1188 x["releaseMilestone"] = A.load.Ref(ptr + 0, undefined); 1189 x["buildNumber"] = A.load.Ref(ptr + 4, undefined); 1190 x["patchNumber"] = A.load.Ref(ptr + 8, undefined); 1191 x["releaseChannel"] = A.load.Ref(ptr + 12, undefined); 1192 return create === A.H.TRUE ? A.H.push(x) : ref; 1193 }, 1194 1195 "store_StatefulPartitionInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 1196 const x = A.H.get<any>(ref); 1197 1198 if (typeof x === "undefined") { 1199 A.store.Bool(ptr + 18, false); 1200 A.store.Bool(ptr + 16, false); 1201 A.store.Float64(ptr + 0, 0); 1202 A.store.Bool(ptr + 17, false); 1203 A.store.Float64(ptr + 8, 0); 1204 } else { 1205 A.store.Bool(ptr + 18, true); 1206 A.store.Bool(ptr + 16, "availableSpace" in x ? true : false); 1207 A.store.Float64(ptr + 0, x["availableSpace"] === undefined ? 0 : (x["availableSpace"] as number)); 1208 A.store.Bool(ptr + 17, "totalSpace" in x ? true : false); 1209 A.store.Float64(ptr + 8, x["totalSpace"] === undefined ? 0 : (x["totalSpace"] as number)); 1210 } 1211 }, 1212 "load_StatefulPartitionInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1213 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1214 1215 if (A.load.Bool(ptr + 16)) { 1216 x["availableSpace"] = A.load.Float64(ptr + 0); 1217 } else { 1218 delete x["availableSpace"]; 1219 } 1220 if (A.load.Bool(ptr + 17)) { 1221 x["totalSpace"] = A.load.Float64(ptr + 8); 1222 } else { 1223 delete x["totalSpace"]; 1224 } 1225 return create === A.H.TRUE ? A.H.push(x) : ref; 1226 }, 1227 1228 "store_TpmDictionaryAttack": (ptr: Pointer, ref: heap.Ref<any>) => { 1229 const x = A.H.get<any>(ref); 1230 1231 if (typeof x === "undefined") { 1232 A.store.Bool(ptr + 20, false); 1233 A.store.Bool(ptr + 16, false); 1234 A.store.Int32(ptr + 0, 0); 1235 A.store.Bool(ptr + 17, false); 1236 A.store.Int32(ptr + 4, 0); 1237 A.store.Bool(ptr + 18, false); 1238 A.store.Bool(ptr + 8, false); 1239 A.store.Bool(ptr + 19, false); 1240 A.store.Int32(ptr + 12, 0); 1241 } else { 1242 A.store.Bool(ptr + 20, true); 1243 A.store.Bool(ptr + 16, "counter" in x ? true : false); 1244 A.store.Int32(ptr + 0, x["counter"] === undefined ? 0 : (x["counter"] as number)); 1245 A.store.Bool(ptr + 17, "threshold" in x ? true : false); 1246 A.store.Int32(ptr + 4, x["threshold"] === undefined ? 0 : (x["threshold"] as number)); 1247 A.store.Bool(ptr + 18, "lockoutInEffect" in x ? true : false); 1248 A.store.Bool(ptr + 8, x["lockoutInEffect"] ? true : false); 1249 A.store.Bool(ptr + 19, "lockoutSecondsRemaining" in x ? true : false); 1250 A.store.Int32( 1251 ptr + 12, 1252 x["lockoutSecondsRemaining"] === undefined ? 0 : (x["lockoutSecondsRemaining"] as number) 1253 ); 1254 } 1255 }, 1256 "load_TpmDictionaryAttack": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1257 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1258 1259 if (A.load.Bool(ptr + 16)) { 1260 x["counter"] = A.load.Int32(ptr + 0); 1261 } else { 1262 delete x["counter"]; 1263 } 1264 if (A.load.Bool(ptr + 17)) { 1265 x["threshold"] = A.load.Int32(ptr + 4); 1266 } else { 1267 delete x["threshold"]; 1268 } 1269 if (A.load.Bool(ptr + 18)) { 1270 x["lockoutInEffect"] = A.load.Bool(ptr + 8); 1271 } else { 1272 delete x["lockoutInEffect"]; 1273 } 1274 if (A.load.Bool(ptr + 19)) { 1275 x["lockoutSecondsRemaining"] = A.load.Int32(ptr + 12); 1276 } else { 1277 delete x["lockoutSecondsRemaining"]; 1278 } 1279 return create === A.H.TRUE ? A.H.push(x) : ref; 1280 }, 1281 "constof_TpmGSCVersion": (ref: heap.Ref<string>): number => { 1282 const idx = ["not_gsc", "cr50", "ti50"].indexOf(A.H.get(ref)); 1283 return idx < 0 ? 0 : idx + 1; 1284 }, 1285 1286 "store_TpmVersion": (ptr: Pointer, ref: heap.Ref<any>) => { 1287 const x = A.H.get<any>(ref); 1288 1289 if (typeof x === "undefined") { 1290 A.store.Bool(ptr + 41, false); 1291 A.store.Enum(ptr + 0, -1); 1292 A.store.Bool(ptr + 36, false); 1293 A.store.Int32(ptr + 4, 0); 1294 A.store.Bool(ptr + 37, false); 1295 A.store.Float64(ptr + 8, 0); 1296 A.store.Bool(ptr + 38, false); 1297 A.store.Int32(ptr + 16, 0); 1298 A.store.Bool(ptr + 39, false); 1299 A.store.Int32(ptr + 20, 0); 1300 A.store.Bool(ptr + 40, false); 1301 A.store.Float64(ptr + 24, 0); 1302 A.store.Ref(ptr + 32, undefined); 1303 } else { 1304 A.store.Bool(ptr + 41, true); 1305 A.store.Enum(ptr + 0, ["not_gsc", "cr50", "ti50"].indexOf(x["gscVersion"] as string)); 1306 A.store.Bool(ptr + 36, "family" in x ? true : false); 1307 A.store.Int32(ptr + 4, x["family"] === undefined ? 0 : (x["family"] as number)); 1308 A.store.Bool(ptr + 37, "specLevel" in x ? true : false); 1309 A.store.Float64(ptr + 8, x["specLevel"] === undefined ? 0 : (x["specLevel"] as number)); 1310 A.store.Bool(ptr + 38, "manufacturer" in x ? true : false); 1311 A.store.Int32(ptr + 16, x["manufacturer"] === undefined ? 0 : (x["manufacturer"] as number)); 1312 A.store.Bool(ptr + 39, "tpmModel" in x ? true : false); 1313 A.store.Int32(ptr + 20, x["tpmModel"] === undefined ? 0 : (x["tpmModel"] as number)); 1314 A.store.Bool(ptr + 40, "firmwareVersion" in x ? true : false); 1315 A.store.Float64(ptr + 24, x["firmwareVersion"] === undefined ? 0 : (x["firmwareVersion"] as number)); 1316 A.store.Ref(ptr + 32, x["vendorSpecific"]); 1317 } 1318 }, 1319 "load_TpmVersion": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1320 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1321 1322 x["gscVersion"] = A.load.Enum(ptr + 0, ["not_gsc", "cr50", "ti50"]); 1323 if (A.load.Bool(ptr + 36)) { 1324 x["family"] = A.load.Int32(ptr + 4); 1325 } else { 1326 delete x["family"]; 1327 } 1328 if (A.load.Bool(ptr + 37)) { 1329 x["specLevel"] = A.load.Float64(ptr + 8); 1330 } else { 1331 delete x["specLevel"]; 1332 } 1333 if (A.load.Bool(ptr + 38)) { 1334 x["manufacturer"] = A.load.Int32(ptr + 16); 1335 } else { 1336 delete x["manufacturer"]; 1337 } 1338 if (A.load.Bool(ptr + 39)) { 1339 x["tpmModel"] = A.load.Int32(ptr + 20); 1340 } else { 1341 delete x["tpmModel"]; 1342 } 1343 if (A.load.Bool(ptr + 40)) { 1344 x["firmwareVersion"] = A.load.Float64(ptr + 24); 1345 } else { 1346 delete x["firmwareVersion"]; 1347 } 1348 x["vendorSpecific"] = A.load.Ref(ptr + 32, undefined); 1349 return create === A.H.TRUE ? A.H.push(x) : ref; 1350 }, 1351 1352 "store_TpmStatus": (ptr: Pointer, ref: heap.Ref<any>) => { 1353 const x = A.H.get<any>(ref); 1354 1355 if (typeof x === "undefined") { 1356 A.store.Bool(ptr + 6, false); 1357 A.store.Bool(ptr + 3, false); 1358 A.store.Bool(ptr + 0, false); 1359 A.store.Bool(ptr + 4, false); 1360 A.store.Bool(ptr + 1, false); 1361 A.store.Bool(ptr + 5, false); 1362 A.store.Bool(ptr + 2, false); 1363 } else { 1364 A.store.Bool(ptr + 6, true); 1365 A.store.Bool(ptr + 3, "enabled" in x ? true : false); 1366 A.store.Bool(ptr + 0, x["enabled"] ? true : false); 1367 A.store.Bool(ptr + 4, "owned" in x ? true : false); 1368 A.store.Bool(ptr + 1, x["owned"] ? true : false); 1369 A.store.Bool(ptr + 5, "ownerPasswordIsPresent" in x ? true : false); 1370 A.store.Bool(ptr + 2, x["ownerPasswordIsPresent"] ? true : false); 1371 } 1372 }, 1373 "load_TpmStatus": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1374 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1375 1376 if (A.load.Bool(ptr + 3)) { 1377 x["enabled"] = A.load.Bool(ptr + 0); 1378 } else { 1379 delete x["enabled"]; 1380 } 1381 if (A.load.Bool(ptr + 4)) { 1382 x["owned"] = A.load.Bool(ptr + 1); 1383 } else { 1384 delete x["owned"]; 1385 } 1386 if (A.load.Bool(ptr + 5)) { 1387 x["ownerPasswordIsPresent"] = A.load.Bool(ptr + 2); 1388 } else { 1389 delete x["ownerPasswordIsPresent"]; 1390 } 1391 return create === A.H.TRUE ? A.H.push(x) : ref; 1392 }, 1393 1394 "store_TpmInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 1395 const x = A.H.get<any>(ref); 1396 1397 if (typeof x === "undefined") { 1398 A.store.Bool(ptr + 73, false); 1399 1400 A.store.Bool(ptr + 0 + 41, false); 1401 A.store.Enum(ptr + 0 + 0, -1); 1402 A.store.Bool(ptr + 0 + 36, false); 1403 A.store.Int32(ptr + 0 + 4, 0); 1404 A.store.Bool(ptr + 0 + 37, false); 1405 A.store.Float64(ptr + 0 + 8, 0); 1406 A.store.Bool(ptr + 0 + 38, false); 1407 A.store.Int32(ptr + 0 + 16, 0); 1408 A.store.Bool(ptr + 0 + 39, false); 1409 A.store.Int32(ptr + 0 + 20, 0); 1410 A.store.Bool(ptr + 0 + 40, false); 1411 A.store.Float64(ptr + 0 + 24, 0); 1412 A.store.Ref(ptr + 0 + 32, undefined); 1413 1414 A.store.Bool(ptr + 42 + 6, false); 1415 A.store.Bool(ptr + 42 + 3, false); 1416 A.store.Bool(ptr + 42 + 0, false); 1417 A.store.Bool(ptr + 42 + 4, false); 1418 A.store.Bool(ptr + 42 + 1, false); 1419 A.store.Bool(ptr + 42 + 5, false); 1420 A.store.Bool(ptr + 42 + 2, false); 1421 1422 A.store.Bool(ptr + 52 + 20, false); 1423 A.store.Bool(ptr + 52 + 16, false); 1424 A.store.Int32(ptr + 52 + 0, 0); 1425 A.store.Bool(ptr + 52 + 17, false); 1426 A.store.Int32(ptr + 52 + 4, 0); 1427 A.store.Bool(ptr + 52 + 18, false); 1428 A.store.Bool(ptr + 52 + 8, false); 1429 A.store.Bool(ptr + 52 + 19, false); 1430 A.store.Int32(ptr + 52 + 12, 0); 1431 } else { 1432 A.store.Bool(ptr + 73, true); 1433 1434 if (typeof x["version"] === "undefined") { 1435 A.store.Bool(ptr + 0 + 41, false); 1436 A.store.Enum(ptr + 0 + 0, -1); 1437 A.store.Bool(ptr + 0 + 36, false); 1438 A.store.Int32(ptr + 0 + 4, 0); 1439 A.store.Bool(ptr + 0 + 37, false); 1440 A.store.Float64(ptr + 0 + 8, 0); 1441 A.store.Bool(ptr + 0 + 38, false); 1442 A.store.Int32(ptr + 0 + 16, 0); 1443 A.store.Bool(ptr + 0 + 39, false); 1444 A.store.Int32(ptr + 0 + 20, 0); 1445 A.store.Bool(ptr + 0 + 40, false); 1446 A.store.Float64(ptr + 0 + 24, 0); 1447 A.store.Ref(ptr + 0 + 32, undefined); 1448 } else { 1449 A.store.Bool(ptr + 0 + 41, true); 1450 A.store.Enum(ptr + 0 + 0, ["not_gsc", "cr50", "ti50"].indexOf(x["version"]["gscVersion"] as string)); 1451 A.store.Bool(ptr + 0 + 36, "family" in x["version"] ? true : false); 1452 A.store.Int32(ptr + 0 + 4, x["version"]["family"] === undefined ? 0 : (x["version"]["family"] as number)); 1453 A.store.Bool(ptr + 0 + 37, "specLevel" in x["version"] ? true : false); 1454 A.store.Float64( 1455 ptr + 0 + 8, 1456 x["version"]["specLevel"] === undefined ? 0 : (x["version"]["specLevel"] as number) 1457 ); 1458 A.store.Bool(ptr + 0 + 38, "manufacturer" in x["version"] ? true : false); 1459 A.store.Int32( 1460 ptr + 0 + 16, 1461 x["version"]["manufacturer"] === undefined ? 0 : (x["version"]["manufacturer"] as number) 1462 ); 1463 A.store.Bool(ptr + 0 + 39, "tpmModel" in x["version"] ? true : false); 1464 A.store.Int32( 1465 ptr + 0 + 20, 1466 x["version"]["tpmModel"] === undefined ? 0 : (x["version"]["tpmModel"] as number) 1467 ); 1468 A.store.Bool(ptr + 0 + 40, "firmwareVersion" in x["version"] ? true : false); 1469 A.store.Float64( 1470 ptr + 0 + 24, 1471 x["version"]["firmwareVersion"] === undefined ? 0 : (x["version"]["firmwareVersion"] as number) 1472 ); 1473 A.store.Ref(ptr + 0 + 32, x["version"]["vendorSpecific"]); 1474 } 1475 1476 if (typeof x["status"] === "undefined") { 1477 A.store.Bool(ptr + 42 + 6, false); 1478 A.store.Bool(ptr + 42 + 3, false); 1479 A.store.Bool(ptr + 42 + 0, false); 1480 A.store.Bool(ptr + 42 + 4, false); 1481 A.store.Bool(ptr + 42 + 1, false); 1482 A.store.Bool(ptr + 42 + 5, false); 1483 A.store.Bool(ptr + 42 + 2, false); 1484 } else { 1485 A.store.Bool(ptr + 42 + 6, true); 1486 A.store.Bool(ptr + 42 + 3, "enabled" in x["status"] ? true : false); 1487 A.store.Bool(ptr + 42 + 0, x["status"]["enabled"] ? true : false); 1488 A.store.Bool(ptr + 42 + 4, "owned" in x["status"] ? true : false); 1489 A.store.Bool(ptr + 42 + 1, x["status"]["owned"] ? true : false); 1490 A.store.Bool(ptr + 42 + 5, "ownerPasswordIsPresent" in x["status"] ? true : false); 1491 A.store.Bool(ptr + 42 + 2, x["status"]["ownerPasswordIsPresent"] ? true : false); 1492 } 1493 1494 if (typeof x["dictionaryAttack"] === "undefined") { 1495 A.store.Bool(ptr + 52 + 20, false); 1496 A.store.Bool(ptr + 52 + 16, false); 1497 A.store.Int32(ptr + 52 + 0, 0); 1498 A.store.Bool(ptr + 52 + 17, false); 1499 A.store.Int32(ptr + 52 + 4, 0); 1500 A.store.Bool(ptr + 52 + 18, false); 1501 A.store.Bool(ptr + 52 + 8, false); 1502 A.store.Bool(ptr + 52 + 19, false); 1503 A.store.Int32(ptr + 52 + 12, 0); 1504 } else { 1505 A.store.Bool(ptr + 52 + 20, true); 1506 A.store.Bool(ptr + 52 + 16, "counter" in x["dictionaryAttack"] ? true : false); 1507 A.store.Int32( 1508 ptr + 52 + 0, 1509 x["dictionaryAttack"]["counter"] === undefined ? 0 : (x["dictionaryAttack"]["counter"] as number) 1510 ); 1511 A.store.Bool(ptr + 52 + 17, "threshold" in x["dictionaryAttack"] ? true : false); 1512 A.store.Int32( 1513 ptr + 52 + 4, 1514 x["dictionaryAttack"]["threshold"] === undefined ? 0 : (x["dictionaryAttack"]["threshold"] as number) 1515 ); 1516 A.store.Bool(ptr + 52 + 18, "lockoutInEffect" in x["dictionaryAttack"] ? true : false); 1517 A.store.Bool(ptr + 52 + 8, x["dictionaryAttack"]["lockoutInEffect"] ? true : false); 1518 A.store.Bool(ptr + 52 + 19, "lockoutSecondsRemaining" in x["dictionaryAttack"] ? true : false); 1519 A.store.Int32( 1520 ptr + 52 + 12, 1521 x["dictionaryAttack"]["lockoutSecondsRemaining"] === undefined 1522 ? 0 1523 : (x["dictionaryAttack"]["lockoutSecondsRemaining"] as number) 1524 ); 1525 } 1526 } 1527 }, 1528 "load_TpmInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1529 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1530 1531 if (A.load.Bool(ptr + 0 + 41)) { 1532 x["version"] = {}; 1533 x["version"]["gscVersion"] = A.load.Enum(ptr + 0 + 0, ["not_gsc", "cr50", "ti50"]); 1534 if (A.load.Bool(ptr + 0 + 36)) { 1535 x["version"]["family"] = A.load.Int32(ptr + 0 + 4); 1536 } else { 1537 delete x["version"]["family"]; 1538 } 1539 if (A.load.Bool(ptr + 0 + 37)) { 1540 x["version"]["specLevel"] = A.load.Float64(ptr + 0 + 8); 1541 } else { 1542 delete x["version"]["specLevel"]; 1543 } 1544 if (A.load.Bool(ptr + 0 + 38)) { 1545 x["version"]["manufacturer"] = A.load.Int32(ptr + 0 + 16); 1546 } else { 1547 delete x["version"]["manufacturer"]; 1548 } 1549 if (A.load.Bool(ptr + 0 + 39)) { 1550 x["version"]["tpmModel"] = A.load.Int32(ptr + 0 + 20); 1551 } else { 1552 delete x["version"]["tpmModel"]; 1553 } 1554 if (A.load.Bool(ptr + 0 + 40)) { 1555 x["version"]["firmwareVersion"] = A.load.Float64(ptr + 0 + 24); 1556 } else { 1557 delete x["version"]["firmwareVersion"]; 1558 } 1559 x["version"]["vendorSpecific"] = A.load.Ref(ptr + 0 + 32, undefined); 1560 } else { 1561 delete x["version"]; 1562 } 1563 if (A.load.Bool(ptr + 42 + 6)) { 1564 x["status"] = {}; 1565 if (A.load.Bool(ptr + 42 + 3)) { 1566 x["status"]["enabled"] = A.load.Bool(ptr + 42 + 0); 1567 } else { 1568 delete x["status"]["enabled"]; 1569 } 1570 if (A.load.Bool(ptr + 42 + 4)) { 1571 x["status"]["owned"] = A.load.Bool(ptr + 42 + 1); 1572 } else { 1573 delete x["status"]["owned"]; 1574 } 1575 if (A.load.Bool(ptr + 42 + 5)) { 1576 x["status"]["ownerPasswordIsPresent"] = A.load.Bool(ptr + 42 + 2); 1577 } else { 1578 delete x["status"]["ownerPasswordIsPresent"]; 1579 } 1580 } else { 1581 delete x["status"]; 1582 } 1583 if (A.load.Bool(ptr + 52 + 20)) { 1584 x["dictionaryAttack"] = {}; 1585 if (A.load.Bool(ptr + 52 + 16)) { 1586 x["dictionaryAttack"]["counter"] = A.load.Int32(ptr + 52 + 0); 1587 } else { 1588 delete x["dictionaryAttack"]["counter"]; 1589 } 1590 if (A.load.Bool(ptr + 52 + 17)) { 1591 x["dictionaryAttack"]["threshold"] = A.load.Int32(ptr + 52 + 4); 1592 } else { 1593 delete x["dictionaryAttack"]["threshold"]; 1594 } 1595 if (A.load.Bool(ptr + 52 + 18)) { 1596 x["dictionaryAttack"]["lockoutInEffect"] = A.load.Bool(ptr + 52 + 8); 1597 } else { 1598 delete x["dictionaryAttack"]["lockoutInEffect"]; 1599 } 1600 if (A.load.Bool(ptr + 52 + 19)) { 1601 x["dictionaryAttack"]["lockoutSecondsRemaining"] = A.load.Int32(ptr + 52 + 12); 1602 } else { 1603 delete x["dictionaryAttack"]["lockoutSecondsRemaining"]; 1604 } 1605 } else { 1606 delete x["dictionaryAttack"]; 1607 } 1608 return create === A.H.TRUE ? A.H.push(x) : ref; 1609 }, 1610 1611 "store_UsbBusInterfaceInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 1612 const x = A.H.get<any>(ref); 1613 1614 if (typeof x === "undefined") { 1615 A.store.Bool(ptr + 40, false); 1616 A.store.Bool(ptr + 36, false); 1617 A.store.Float64(ptr + 0, 0); 1618 A.store.Bool(ptr + 37, false); 1619 A.store.Float64(ptr + 8, 0); 1620 A.store.Bool(ptr + 38, false); 1621 A.store.Float64(ptr + 16, 0); 1622 A.store.Bool(ptr + 39, false); 1623 A.store.Float64(ptr + 24, 0); 1624 A.store.Ref(ptr + 32, undefined); 1625 } else { 1626 A.store.Bool(ptr + 40, true); 1627 A.store.Bool(ptr + 36, "interfaceNumber" in x ? true : false); 1628 A.store.Float64(ptr + 0, x["interfaceNumber"] === undefined ? 0 : (x["interfaceNumber"] as number)); 1629 A.store.Bool(ptr + 37, "classId" in x ? true : false); 1630 A.store.Float64(ptr + 8, x["classId"] === undefined ? 0 : (x["classId"] as number)); 1631 A.store.Bool(ptr + 38, "subclassId" in x ? true : false); 1632 A.store.Float64(ptr + 16, x["subclassId"] === undefined ? 0 : (x["subclassId"] as number)); 1633 A.store.Bool(ptr + 39, "protocolId" in x ? true : false); 1634 A.store.Float64(ptr + 24, x["protocolId"] === undefined ? 0 : (x["protocolId"] as number)); 1635 A.store.Ref(ptr + 32, x["driver"]); 1636 } 1637 }, 1638 "load_UsbBusInterfaceInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1639 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1640 1641 if (A.load.Bool(ptr + 36)) { 1642 x["interfaceNumber"] = A.load.Float64(ptr + 0); 1643 } else { 1644 delete x["interfaceNumber"]; 1645 } 1646 if (A.load.Bool(ptr + 37)) { 1647 x["classId"] = A.load.Float64(ptr + 8); 1648 } else { 1649 delete x["classId"]; 1650 } 1651 if (A.load.Bool(ptr + 38)) { 1652 x["subclassId"] = A.load.Float64(ptr + 16); 1653 } else { 1654 delete x["subclassId"]; 1655 } 1656 if (A.load.Bool(ptr + 39)) { 1657 x["protocolId"] = A.load.Float64(ptr + 24); 1658 } else { 1659 delete x["protocolId"]; 1660 } 1661 x["driver"] = A.load.Ref(ptr + 32, undefined); 1662 return create === A.H.TRUE ? A.H.push(x) : ref; 1663 }, 1664 "constof_UsbVersion": (ref: heap.Ref<string>): number => { 1665 const idx = ["unknown", "usb1", "usb2", "usb3"].indexOf(A.H.get(ref)); 1666 return idx < 0 ? 0 : idx + 1; 1667 }, 1668 "constof_UsbSpecSpeed": (ref: heap.Ref<string>): number => { 1669 const idx = ["unknown", "n1_5Mbps", "n12Mbps", "n480Mbps", "n5Gbps", "n10Gbps", "n20Gbps"].indexOf(A.H.get(ref)); 1670 return idx < 0 ? 0 : idx + 1; 1671 }, 1672 1673 "store_UsbBusInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 1674 const x = A.H.get<any>(ref); 1675 1676 if (typeof x === "undefined") { 1677 A.store.Bool(ptr + 69, false); 1678 A.store.Bool(ptr + 64, false); 1679 A.store.Float64(ptr + 0, 0); 1680 A.store.Bool(ptr + 65, false); 1681 A.store.Float64(ptr + 8, 0); 1682 A.store.Bool(ptr + 66, false); 1683 A.store.Float64(ptr + 16, 0); 1684 A.store.Bool(ptr + 67, false); 1685 A.store.Float64(ptr + 24, 0); 1686 A.store.Bool(ptr + 68, false); 1687 A.store.Float64(ptr + 32, 0); 1688 A.store.Ref(ptr + 40, undefined); 1689 1690 A.store.Bool(ptr + 44 + 8, false); 1691 A.store.Ref(ptr + 44 + 0, undefined); 1692 A.store.Enum(ptr + 44 + 4, -1); 1693 A.store.Enum(ptr + 56, -1); 1694 A.store.Enum(ptr + 60, -1); 1695 } else { 1696 A.store.Bool(ptr + 69, true); 1697 A.store.Bool(ptr + 64, "classId" in x ? true : false); 1698 A.store.Float64(ptr + 0, x["classId"] === undefined ? 0 : (x["classId"] as number)); 1699 A.store.Bool(ptr + 65, "subclassId" in x ? true : false); 1700 A.store.Float64(ptr + 8, x["subclassId"] === undefined ? 0 : (x["subclassId"] as number)); 1701 A.store.Bool(ptr + 66, "protocolId" in x ? true : false); 1702 A.store.Float64(ptr + 16, x["protocolId"] === undefined ? 0 : (x["protocolId"] as number)); 1703 A.store.Bool(ptr + 67, "vendorId" in x ? true : false); 1704 A.store.Float64(ptr + 24, x["vendorId"] === undefined ? 0 : (x["vendorId"] as number)); 1705 A.store.Bool(ptr + 68, "productId" in x ? true : false); 1706 A.store.Float64(ptr + 32, x["productId"] === undefined ? 0 : (x["productId"] as number)); 1707 A.store.Ref(ptr + 40, x["interfaces"]); 1708 1709 if (typeof x["fwupdFirmwareVersionInfo"] === "undefined") { 1710 A.store.Bool(ptr + 44 + 8, false); 1711 A.store.Ref(ptr + 44 + 0, undefined); 1712 A.store.Enum(ptr + 44 + 4, -1); 1713 } else { 1714 A.store.Bool(ptr + 44 + 8, true); 1715 A.store.Ref(ptr + 44 + 0, x["fwupdFirmwareVersionInfo"]["version"]); 1716 A.store.Enum( 1717 ptr + 44 + 4, 1718 [ 1719 "plain", 1720 "number", 1721 "pair", 1722 "triplet", 1723 "quad", 1724 "bcd", 1725 "intelMe", 1726 "intelMe2", 1727 "surfaceLegacy", 1728 "surface", 1729 "dellBios", 1730 "hex", 1731 ].indexOf(x["fwupdFirmwareVersionInfo"]["version_format"] as string) 1732 ); 1733 } 1734 A.store.Enum(ptr + 56, ["unknown", "usb1", "usb2", "usb3"].indexOf(x["version"] as string)); 1735 A.store.Enum( 1736 ptr + 60, 1737 ["unknown", "n1_5Mbps", "n12Mbps", "n480Mbps", "n5Gbps", "n10Gbps", "n20Gbps"].indexOf( 1738 x["spec_speed"] as string 1739 ) 1740 ); 1741 } 1742 }, 1743 "load_UsbBusInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1744 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1745 1746 if (A.load.Bool(ptr + 64)) { 1747 x["classId"] = A.load.Float64(ptr + 0); 1748 } else { 1749 delete x["classId"]; 1750 } 1751 if (A.load.Bool(ptr + 65)) { 1752 x["subclassId"] = A.load.Float64(ptr + 8); 1753 } else { 1754 delete x["subclassId"]; 1755 } 1756 if (A.load.Bool(ptr + 66)) { 1757 x["protocolId"] = A.load.Float64(ptr + 16); 1758 } else { 1759 delete x["protocolId"]; 1760 } 1761 if (A.load.Bool(ptr + 67)) { 1762 x["vendorId"] = A.load.Float64(ptr + 24); 1763 } else { 1764 delete x["vendorId"]; 1765 } 1766 if (A.load.Bool(ptr + 68)) { 1767 x["productId"] = A.load.Float64(ptr + 32); 1768 } else { 1769 delete x["productId"]; 1770 } 1771 x["interfaces"] = A.load.Ref(ptr + 40, undefined); 1772 if (A.load.Bool(ptr + 44 + 8)) { 1773 x["fwupdFirmwareVersionInfo"] = {}; 1774 x["fwupdFirmwareVersionInfo"]["version"] = A.load.Ref(ptr + 44 + 0, undefined); 1775 x["fwupdFirmwareVersionInfo"]["version_format"] = A.load.Enum(ptr + 44 + 4, [ 1776 "plain", 1777 "number", 1778 "pair", 1779 "triplet", 1780 "quad", 1781 "bcd", 1782 "intelMe", 1783 "intelMe2", 1784 "surfaceLegacy", 1785 "surface", 1786 "dellBios", 1787 "hex", 1788 ]); 1789 } else { 1790 delete x["fwupdFirmwareVersionInfo"]; 1791 } 1792 x["version"] = A.load.Enum(ptr + 56, ["unknown", "usb1", "usb2", "usb3"]); 1793 x["spec_speed"] = A.load.Enum(ptr + 60, [ 1794 "unknown", 1795 "n1_5Mbps", 1796 "n12Mbps", 1797 "n480Mbps", 1798 "n5Gbps", 1799 "n10Gbps", 1800 "n20Gbps", 1801 ]); 1802 return create === A.H.TRUE ? A.H.push(x) : ref; 1803 }, 1804 1805 "store_UsbBusDevices": (ptr: Pointer, ref: heap.Ref<any>) => { 1806 const x = A.H.get<any>(ref); 1807 1808 if (typeof x === "undefined") { 1809 A.store.Bool(ptr + 4, false); 1810 A.store.Ref(ptr + 0, undefined); 1811 } else { 1812 A.store.Bool(ptr + 4, true); 1813 A.store.Ref(ptr + 0, x["devices"]); 1814 } 1815 }, 1816 "load_UsbBusDevices": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1817 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1818 1819 x["devices"] = A.load.Ref(ptr + 0, undefined); 1820 return create === A.H.TRUE ? A.H.push(x) : ref; 1821 }, 1822 1823 "store_VpdInfo": (ptr: Pointer, ref: heap.Ref<any>) => { 1824 const x = A.H.get<any>(ref); 1825 1826 if (typeof x === "undefined") { 1827 A.store.Bool(ptr + 16, false); 1828 A.store.Ref(ptr + 0, undefined); 1829 A.store.Ref(ptr + 4, undefined); 1830 A.store.Ref(ptr + 8, undefined); 1831 A.store.Ref(ptr + 12, undefined); 1832 } else { 1833 A.store.Bool(ptr + 16, true); 1834 A.store.Ref(ptr + 0, x["activateDate"]); 1835 A.store.Ref(ptr + 4, x["modelName"]); 1836 A.store.Ref(ptr + 8, x["serialNumber"]); 1837 A.store.Ref(ptr + 12, x["skuNumber"]); 1838 } 1839 }, 1840 "load_VpdInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 1841 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 1842 1843 x["activateDate"] = A.load.Ref(ptr + 0, undefined); 1844 x["modelName"] = A.load.Ref(ptr + 4, undefined); 1845 x["serialNumber"] = A.load.Ref(ptr + 8, undefined); 1846 x["skuNumber"] = A.load.Ref(ptr + 12, undefined); 1847 return create === A.H.TRUE ? A.H.push(x) : ref; 1848 }, 1849 "has_GetAudioInfo": (): heap.Ref<boolean> => { 1850 if (WEBEXT?.os?.telemetry && "getAudioInfo" in WEBEXT?.os?.telemetry) { 1851 return A.H.TRUE; 1852 } 1853 return A.H.FALSE; 1854 }, 1855 "func_GetAudioInfo": (fn: Pointer): void => { 1856 A.store.Ref(fn, WEBEXT.os.telemetry.getAudioInfo); 1857 }, 1858 "call_GetAudioInfo": (retPtr: Pointer): void => { 1859 const _ret = WEBEXT.os.telemetry.getAudioInfo(); 1860 A.store.Ref(retPtr, _ret); 1861 }, 1862 "try_GetAudioInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 1863 try { 1864 const _ret = WEBEXT.os.telemetry.getAudioInfo(); 1865 A.store.Ref(retPtr, _ret); 1866 return A.H.TRUE; 1867 } catch (err: any) { 1868 A.store.Ref(errPtr, err); 1869 return A.H.FALSE; 1870 } 1871 }, 1872 "has_GetBatteryInfo": (): heap.Ref<boolean> => { 1873 if (WEBEXT?.os?.telemetry && "getBatteryInfo" in WEBEXT?.os?.telemetry) { 1874 return A.H.TRUE; 1875 } 1876 return A.H.FALSE; 1877 }, 1878 "func_GetBatteryInfo": (fn: Pointer): void => { 1879 A.store.Ref(fn, WEBEXT.os.telemetry.getBatteryInfo); 1880 }, 1881 "call_GetBatteryInfo": (retPtr: Pointer): void => { 1882 const _ret = WEBEXT.os.telemetry.getBatteryInfo(); 1883 A.store.Ref(retPtr, _ret); 1884 }, 1885 "try_GetBatteryInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 1886 try { 1887 const _ret = WEBEXT.os.telemetry.getBatteryInfo(); 1888 A.store.Ref(retPtr, _ret); 1889 return A.H.TRUE; 1890 } catch (err: any) { 1891 A.store.Ref(errPtr, err); 1892 return A.H.FALSE; 1893 } 1894 }, 1895 "has_GetCpuInfo": (): heap.Ref<boolean> => { 1896 if (WEBEXT?.os?.telemetry && "getCpuInfo" in WEBEXT?.os?.telemetry) { 1897 return A.H.TRUE; 1898 } 1899 return A.H.FALSE; 1900 }, 1901 "func_GetCpuInfo": (fn: Pointer): void => { 1902 A.store.Ref(fn, WEBEXT.os.telemetry.getCpuInfo); 1903 }, 1904 "call_GetCpuInfo": (retPtr: Pointer): void => { 1905 const _ret = WEBEXT.os.telemetry.getCpuInfo(); 1906 A.store.Ref(retPtr, _ret); 1907 }, 1908 "try_GetCpuInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 1909 try { 1910 const _ret = WEBEXT.os.telemetry.getCpuInfo(); 1911 A.store.Ref(retPtr, _ret); 1912 return A.H.TRUE; 1913 } catch (err: any) { 1914 A.store.Ref(errPtr, err); 1915 return A.H.FALSE; 1916 } 1917 }, 1918 "has_GetDisplayInfo": (): heap.Ref<boolean> => { 1919 if (WEBEXT?.os?.telemetry && "getDisplayInfo" in WEBEXT?.os?.telemetry) { 1920 return A.H.TRUE; 1921 } 1922 return A.H.FALSE; 1923 }, 1924 "func_GetDisplayInfo": (fn: Pointer): void => { 1925 A.store.Ref(fn, WEBEXT.os.telemetry.getDisplayInfo); 1926 }, 1927 "call_GetDisplayInfo": (retPtr: Pointer): void => { 1928 const _ret = WEBEXT.os.telemetry.getDisplayInfo(); 1929 A.store.Ref(retPtr, _ret); 1930 }, 1931 "try_GetDisplayInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 1932 try { 1933 const _ret = WEBEXT.os.telemetry.getDisplayInfo(); 1934 A.store.Ref(retPtr, _ret); 1935 return A.H.TRUE; 1936 } catch (err: any) { 1937 A.store.Ref(errPtr, err); 1938 return A.H.FALSE; 1939 } 1940 }, 1941 "has_GetInternetConnectivityInfo": (): heap.Ref<boolean> => { 1942 if (WEBEXT?.os?.telemetry && "getInternetConnectivityInfo" in WEBEXT?.os?.telemetry) { 1943 return A.H.TRUE; 1944 } 1945 return A.H.FALSE; 1946 }, 1947 "func_GetInternetConnectivityInfo": (fn: Pointer): void => { 1948 A.store.Ref(fn, WEBEXT.os.telemetry.getInternetConnectivityInfo); 1949 }, 1950 "call_GetInternetConnectivityInfo": (retPtr: Pointer): void => { 1951 const _ret = WEBEXT.os.telemetry.getInternetConnectivityInfo(); 1952 A.store.Ref(retPtr, _ret); 1953 }, 1954 "try_GetInternetConnectivityInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 1955 try { 1956 const _ret = WEBEXT.os.telemetry.getInternetConnectivityInfo(); 1957 A.store.Ref(retPtr, _ret); 1958 return A.H.TRUE; 1959 } catch (err: any) { 1960 A.store.Ref(errPtr, err); 1961 return A.H.FALSE; 1962 } 1963 }, 1964 "has_GetMarketingInfo": (): heap.Ref<boolean> => { 1965 if (WEBEXT?.os?.telemetry && "getMarketingInfo" in WEBEXT?.os?.telemetry) { 1966 return A.H.TRUE; 1967 } 1968 return A.H.FALSE; 1969 }, 1970 "func_GetMarketingInfo": (fn: Pointer): void => { 1971 A.store.Ref(fn, WEBEXT.os.telemetry.getMarketingInfo); 1972 }, 1973 "call_GetMarketingInfo": (retPtr: Pointer): void => { 1974 const _ret = WEBEXT.os.telemetry.getMarketingInfo(); 1975 A.store.Ref(retPtr, _ret); 1976 }, 1977 "try_GetMarketingInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 1978 try { 1979 const _ret = WEBEXT.os.telemetry.getMarketingInfo(); 1980 A.store.Ref(retPtr, _ret); 1981 return A.H.TRUE; 1982 } catch (err: any) { 1983 A.store.Ref(errPtr, err); 1984 return A.H.FALSE; 1985 } 1986 }, 1987 "has_GetMemoryInfo": (): heap.Ref<boolean> => { 1988 if (WEBEXT?.os?.telemetry && "getMemoryInfo" in WEBEXT?.os?.telemetry) { 1989 return A.H.TRUE; 1990 } 1991 return A.H.FALSE; 1992 }, 1993 "func_GetMemoryInfo": (fn: Pointer): void => { 1994 A.store.Ref(fn, WEBEXT.os.telemetry.getMemoryInfo); 1995 }, 1996 "call_GetMemoryInfo": (retPtr: Pointer): void => { 1997 const _ret = WEBEXT.os.telemetry.getMemoryInfo(); 1998 A.store.Ref(retPtr, _ret); 1999 }, 2000 "try_GetMemoryInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 2001 try { 2002 const _ret = WEBEXT.os.telemetry.getMemoryInfo(); 2003 A.store.Ref(retPtr, _ret); 2004 return A.H.TRUE; 2005 } catch (err: any) { 2006 A.store.Ref(errPtr, err); 2007 return A.H.FALSE; 2008 } 2009 }, 2010 "has_GetNonRemovableBlockDevicesInfo": (): heap.Ref<boolean> => { 2011 if (WEBEXT?.os?.telemetry && "getNonRemovableBlockDevicesInfo" in WEBEXT?.os?.telemetry) { 2012 return A.H.TRUE; 2013 } 2014 return A.H.FALSE; 2015 }, 2016 "func_GetNonRemovableBlockDevicesInfo": (fn: Pointer): void => { 2017 A.store.Ref(fn, WEBEXT.os.telemetry.getNonRemovableBlockDevicesInfo); 2018 }, 2019 "call_GetNonRemovableBlockDevicesInfo": (retPtr: Pointer): void => { 2020 const _ret = WEBEXT.os.telemetry.getNonRemovableBlockDevicesInfo(); 2021 A.store.Ref(retPtr, _ret); 2022 }, 2023 "try_GetNonRemovableBlockDevicesInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 2024 try { 2025 const _ret = WEBEXT.os.telemetry.getNonRemovableBlockDevicesInfo(); 2026 A.store.Ref(retPtr, _ret); 2027 return A.H.TRUE; 2028 } catch (err: any) { 2029 A.store.Ref(errPtr, err); 2030 return A.H.FALSE; 2031 } 2032 }, 2033 "has_GetOemData": (): heap.Ref<boolean> => { 2034 if (WEBEXT?.os?.telemetry && "getOemData" in WEBEXT?.os?.telemetry) { 2035 return A.H.TRUE; 2036 } 2037 return A.H.FALSE; 2038 }, 2039 "func_GetOemData": (fn: Pointer): void => { 2040 A.store.Ref(fn, WEBEXT.os.telemetry.getOemData); 2041 }, 2042 "call_GetOemData": (retPtr: Pointer): void => { 2043 const _ret = WEBEXT.os.telemetry.getOemData(); 2044 A.store.Ref(retPtr, _ret); 2045 }, 2046 "try_GetOemData": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 2047 try { 2048 const _ret = WEBEXT.os.telemetry.getOemData(); 2049 A.store.Ref(retPtr, _ret); 2050 return A.H.TRUE; 2051 } catch (err: any) { 2052 A.store.Ref(errPtr, err); 2053 return A.H.FALSE; 2054 } 2055 }, 2056 "has_GetOsVersionInfo": (): heap.Ref<boolean> => { 2057 if (WEBEXT?.os?.telemetry && "getOsVersionInfo" in WEBEXT?.os?.telemetry) { 2058 return A.H.TRUE; 2059 } 2060 return A.H.FALSE; 2061 }, 2062 "func_GetOsVersionInfo": (fn: Pointer): void => { 2063 A.store.Ref(fn, WEBEXT.os.telemetry.getOsVersionInfo); 2064 }, 2065 "call_GetOsVersionInfo": (retPtr: Pointer): void => { 2066 const _ret = WEBEXT.os.telemetry.getOsVersionInfo(); 2067 A.store.Ref(retPtr, _ret); 2068 }, 2069 "try_GetOsVersionInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 2070 try { 2071 const _ret = WEBEXT.os.telemetry.getOsVersionInfo(); 2072 A.store.Ref(retPtr, _ret); 2073 return A.H.TRUE; 2074 } catch (err: any) { 2075 A.store.Ref(errPtr, err); 2076 return A.H.FALSE; 2077 } 2078 }, 2079 "has_GetStatefulPartitionInfo": (): heap.Ref<boolean> => { 2080 if (WEBEXT?.os?.telemetry && "getStatefulPartitionInfo" in WEBEXT?.os?.telemetry) { 2081 return A.H.TRUE; 2082 } 2083 return A.H.FALSE; 2084 }, 2085 "func_GetStatefulPartitionInfo": (fn: Pointer): void => { 2086 A.store.Ref(fn, WEBEXT.os.telemetry.getStatefulPartitionInfo); 2087 }, 2088 "call_GetStatefulPartitionInfo": (retPtr: Pointer): void => { 2089 const _ret = WEBEXT.os.telemetry.getStatefulPartitionInfo(); 2090 A.store.Ref(retPtr, _ret); 2091 }, 2092 "try_GetStatefulPartitionInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 2093 try { 2094 const _ret = WEBEXT.os.telemetry.getStatefulPartitionInfo(); 2095 A.store.Ref(retPtr, _ret); 2096 return A.H.TRUE; 2097 } catch (err: any) { 2098 A.store.Ref(errPtr, err); 2099 return A.H.FALSE; 2100 } 2101 }, 2102 "has_GetTpmInfo": (): heap.Ref<boolean> => { 2103 if (WEBEXT?.os?.telemetry && "getTpmInfo" in WEBEXT?.os?.telemetry) { 2104 return A.H.TRUE; 2105 } 2106 return A.H.FALSE; 2107 }, 2108 "func_GetTpmInfo": (fn: Pointer): void => { 2109 A.store.Ref(fn, WEBEXT.os.telemetry.getTpmInfo); 2110 }, 2111 "call_GetTpmInfo": (retPtr: Pointer): void => { 2112 const _ret = WEBEXT.os.telemetry.getTpmInfo(); 2113 A.store.Ref(retPtr, _ret); 2114 }, 2115 "try_GetTpmInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 2116 try { 2117 const _ret = WEBEXT.os.telemetry.getTpmInfo(); 2118 A.store.Ref(retPtr, _ret); 2119 return A.H.TRUE; 2120 } catch (err: any) { 2121 A.store.Ref(errPtr, err); 2122 return A.H.FALSE; 2123 } 2124 }, 2125 "has_GetUsbBusInfo": (): heap.Ref<boolean> => { 2126 if (WEBEXT?.os?.telemetry && "getUsbBusInfo" in WEBEXT?.os?.telemetry) { 2127 return A.H.TRUE; 2128 } 2129 return A.H.FALSE; 2130 }, 2131 "func_GetUsbBusInfo": (fn: Pointer): void => { 2132 A.store.Ref(fn, WEBEXT.os.telemetry.getUsbBusInfo); 2133 }, 2134 "call_GetUsbBusInfo": (retPtr: Pointer): void => { 2135 const _ret = WEBEXT.os.telemetry.getUsbBusInfo(); 2136 A.store.Ref(retPtr, _ret); 2137 }, 2138 "try_GetUsbBusInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 2139 try { 2140 const _ret = WEBEXT.os.telemetry.getUsbBusInfo(); 2141 A.store.Ref(retPtr, _ret); 2142 return A.H.TRUE; 2143 } catch (err: any) { 2144 A.store.Ref(errPtr, err); 2145 return A.H.FALSE; 2146 } 2147 }, 2148 "has_GetVpdInfo": (): heap.Ref<boolean> => { 2149 if (WEBEXT?.os?.telemetry && "getVpdInfo" in WEBEXT?.os?.telemetry) { 2150 return A.H.TRUE; 2151 } 2152 return A.H.FALSE; 2153 }, 2154 "func_GetVpdInfo": (fn: Pointer): void => { 2155 A.store.Ref(fn, WEBEXT.os.telemetry.getVpdInfo); 2156 }, 2157 "call_GetVpdInfo": (retPtr: Pointer): void => { 2158 const _ret = WEBEXT.os.telemetry.getVpdInfo(); 2159 A.store.Ref(retPtr, _ret); 2160 }, 2161 "try_GetVpdInfo": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 2162 try { 2163 const _ret = WEBEXT.os.telemetry.getVpdInfo(); 2164 A.store.Ref(retPtr, _ret); 2165 return A.H.TRUE; 2166 } catch (err: any) { 2167 A.store.Ref(errPtr, err); 2168 return A.H.FALSE; 2169 } 2170 }, 2171 }; 2172 });