1 //! PSP C type definitions 2 //! 3 //! These type declarations are not enough, as they must be ultimately resolved 4 //! by the linker. Crates that use these definitions must, somewhere in the 5 //! crate graph, include a stub provider crate such as the `psp` crate. 6 7 use crate::prelude::*; 8 9 pub type c_schar = i8; 10 pub type c_uchar = u8; 11 pub type c_short = i16; 12 pub type c_ushort = u16; 13 pub type c_int = i32; 14 pub type c_uint = u32; 15 pub type c_float = f32; 16 pub type c_double = f64; 17 pub type c_longlong = i64; 18 pub type c_ulonglong = u64; 19 pub type intmax_t = i64; 20 pub type uintmax_t = u64; 21 22 pub type size_t = usize; 23 pub type ptrdiff_t = isize; 24 pub type intptr_t = isize; 25 pub type uintptr_t = usize; 26 pub type ssize_t = isize; 27 28 pub type c_long = i64; 29 pub type c_ulong = u64; 30 31 pub type SceKernelVTimerHandler = unsafe extern "C" fn( 32 uid: SceUid, 33 arg1: *mut SceKernelSysClock, 34 arg2: *mut SceKernelSysClock, 35 arg3: *mut c_void, 36 ) -> u32; 37 38 pub type SceKernelVTimerHandlerWide = 39 unsafe extern "C" fn(uid: SceUid, arg1: i64, arg2: i64, arg3: *mut c_void) -> u32; 40 41 pub type SceKernelThreadEventHandler = 42 unsafe extern "C" fn(mask: i32, thid: SceUid, common: *mut c_void) -> i32; 43 44 pub type SceKernelAlarmHandler = unsafe extern "C" fn(common: *mut c_void) -> u32; 45 46 pub type SceKernelCallbackFunction = 47 unsafe extern "C" fn(arg1: i32, arg2: i32, arg: *mut c_void) -> i32; 48 49 pub type SceKernelThreadEntry = unsafe extern "C" fn(args: usize, argp: *mut c_void) -> i32; 50 51 pub type PowerCallback = extern "C" fn(unknown: i32, power_info: i32); 52 53 pub type IoPermissions = i32; 54 55 pub type UmdCallback = fn(unknown: i32, event: i32) -> i32; 56 57 pub type SceMpegRingbufferCb = 58 Option<unsafe extern "C" fn(data: *mut c_void, num_packets: i32, param: *mut c_void) -> i32>; 59 60 pub type GuCallback = Option<extern "C" fn(id: i32, arg: *mut c_void)>; 61 pub type GuSwapBuffersCallback = 62 Option<extern "C" fn(display: *mut *mut c_void, render: *mut *mut c_void)>; 63 64 pub type SceNetAdhocctlHandler = 65 Option<unsafe extern "C" fn(flag: i32, error: i32, unknown: *mut c_void)>; 66 67 pub type AdhocMatchingCallback = Option< 68 unsafe extern "C" fn( 69 matching_id: i32, 70 event: i32, 71 mac: *mut u8, 72 opt_len: i32, 73 opt_data: *mut c_void, 74 ), 75 >; 76 77 pub type SceNetApctlHandler = Option< 78 unsafe extern "C" fn(oldState: i32, newState: i32, event: i32, error: i32, pArg: *mut c_void), 79 >; 80 81 pub type HttpMallocFunction = Option<unsafe extern "C" fn(size: usize) -> *mut c_void>; 82 pub type HttpReallocFunction = 83 Option<unsafe extern "C" fn(p: *mut c_void, size: usize) -> *mut c_void>; 84 pub type HttpFreeFunction = Option<unsafe extern "C" fn(p: *mut c_void)>; 85 pub type HttpPasswordCB = Option< 86 unsafe extern "C" fn( 87 request: i32, 88 auth_type: HttpAuthType, 89 realm: *const u8, 90 username: *mut u8, 91 password: *mut u8, 92 need_entity: i32, 93 entity_body: *mut *mut u8, 94 entity_size: *mut usize, 95 save: *mut i32, 96 ) -> i32, 97 >; 98 99 pub type socklen_t = u32; 100 101 e! { 102 #[repr(u32)] 103 pub enum AudioFormat { 104 Stereo = 0, 105 Mono = 0x10, 106 } 107 108 #[repr(u32)] 109 pub enum DisplayMode { 110 Lcd = 0, 111 } 112 113 #[repr(u32)] 114 pub enum DisplayPixelFormat { 115 Psm5650 = 0, 116 Psm5551 = 1, 117 Psm4444 = 2, 118 Psm8888 = 3, 119 } 120 121 #[repr(u32)] 122 pub enum DisplaySetBufSync { 123 Immediate = 0, 124 NextFrame = 1, 125 } 126 127 #[repr(i32)] 128 pub enum AudioOutputFrequency { 129 Khz48 = 48000, 130 Khz44_1 = 44100, 131 Khz32 = 32000, 132 Khz24 = 24000, 133 Khz22_05 = 22050, 134 Khz16 = 16000, 135 Khz12 = 12000, 136 Khz11_025 = 11025, 137 Khz8 = 8000, 138 } 139 140 #[repr(i32)] 141 pub enum AudioInputFrequency { 142 Khz44_1 = 44100, 143 Khz22_05 = 22050, 144 Khz11_025 = 11025, 145 } 146 147 #[repr(u32)] 148 pub enum CtrlMode { 149 Digital = 0, 150 Analog, 151 } 152 153 #[repr(i32)] 154 pub enum GeMatrixType { 155 Bone0 = 0, 156 Bone1, 157 Bone2, 158 Bone3, 159 Bone4, 160 Bone5, 161 Bone6, 162 Bone7, 163 World, 164 View, 165 Projection, 166 TexGen, 167 } 168 169 #[repr(i32)] 170 pub enum GeListState { 171 Done = 0, 172 Queued, 173 DrawingDone, 174 StallReached, 175 CancelDone, 176 } 177 178 #[repr(u8)] 179 pub enum GeCommand { 180 Nop = 0, 181 Vaddr = 0x1, 182 Iaddr = 0x2, 183 Prim = 0x4, 184 Bezier = 0x5, 185 Spline = 0x6, 186 BoundingBox = 0x7, 187 Jump = 0x8, 188 BJump = 0x9, 189 Call = 0xa, 190 Ret = 0xb, 191 End = 0xc, 192 Signal = 0xe, 193 Finish = 0xf, 194 Base = 0x10, 195 VertexType = 0x12, 196 OffsetAddr = 0x13, 197 Origin = 0x14, 198 Region1 = 0x15, 199 Region2 = 0x16, 200 LightingEnable = 0x17, 201 LightEnable0 = 0x18, 202 LightEnable1 = 0x19, 203 LightEnable2 = 0x1a, 204 LightEnable3 = 0x1b, 205 DepthClampEnable = 0x1c, 206 CullFaceEnable = 0x1d, 207 TextureMapEnable = 0x1e, 208 FogEnable = 0x1f, 209 DitherEnable = 0x20, 210 AlphaBlendEnable = 0x21, 211 AlphaTestEnable = 0x22, 212 ZTestEnable = 0x23, 213 StencilTestEnable = 0x24, 214 AntiAliasEnable = 0x25, 215 PatchCullEnable = 0x26, 216 ColorTestEnable = 0x27, 217 LogicOpEnable = 0x28, 218 BoneMatrixNumber = 0x2a, 219 BoneMatrixData = 0x2b, 220 MorphWeight0 = 0x2c, 221 MorphWeight1 = 0x2d, 222 MorphWeight2 = 0x2e, 223 MorphWeight3 = 0x2f, 224 MorphWeight4 = 0x30, 225 MorphWeight5 = 0x31, 226 MorphWeight6 = 0x32, 227 MorphWeight7 = 0x33, 228 PatchDivision = 0x36, 229 PatchPrimitive = 0x37, 230 PatchFacing = 0x38, 231 WorldMatrixNumber = 0x3a, 232 WorldMatrixData = 0x3b, 233 ViewMatrixNumber = 0x3c, 234 ViewMatrixData = 0x3d, 235 ProjMatrixNumber = 0x3e, 236 ProjMatrixData = 0x3f, 237 TGenMatrixNumber = 0x40, 238 TGenMatrixData = 0x41, 239 ViewportXScale = 0x42, 240 ViewportYScale = 0x43, 241 ViewportZScale = 0x44, 242 ViewportXCenter = 0x45, 243 ViewportYCenter = 0x46, 244 ViewportZCenter = 0x47, 245 TexScaleU = 0x48, 246 TexScaleV = 0x49, 247 TexOffsetU = 0x4a, 248 TexOffsetV = 0x4b, 249 OffsetX = 0x4c, 250 OffsetY = 0x4d, 251 ShadeMode = 0x50, 252 ReverseNormal = 0x51, 253 MaterialUpdate = 0x53, 254 MaterialEmissive = 0x54, 255 MaterialAmbient = 0x55, 256 MaterialDiffuse = 0x56, 257 MaterialSpecular = 0x57, 258 MaterialAlpha = 0x58, 259 MaterialSpecularCoef = 0x5b, 260 AmbientColor = 0x5c, 261 AmbientAlpha = 0x5d, 262 LightMode = 0x5e, 263 LightType0 = 0x5f, 264 LightType1 = 0x60, 265 LightType2 = 0x61, 266 LightType3 = 0x62, 267 Light0X = 0x63, 268 Light0Y, 269 Light0Z, 270 Light1X, 271 Light1Y, 272 Light1Z, 273 Light2X, 274 Light2Y, 275 Light2Z, 276 Light3X, 277 Light3Y, 278 Light3Z, 279 Light0DirectionX = 0x6f, 280 Light0DirectionY, 281 Light0DirectionZ, 282 Light1DirectionX, 283 Light1DirectionY, 284 Light1DirectionZ, 285 Light2DirectionX, 286 Light2DirectionY, 287 Light2DirectionZ, 288 Light3DirectionX, 289 Light3DirectionY, 290 Light3DirectionZ, 291 Light0ConstantAtten = 0x7b, 292 Light0LinearAtten, 293 Light0QuadtraticAtten, 294 Light1ConstantAtten, 295 Light1LinearAtten, 296 Light1QuadtraticAtten, 297 Light2ConstantAtten, 298 Light2LinearAtten, 299 Light2QuadtraticAtten, 300 Light3ConstantAtten, 301 Light3LinearAtten, 302 Light3QuadtraticAtten, 303 Light0ExponentAtten = 0x87, 304 Light1ExponentAtten, 305 Light2ExponentAtten, 306 Light3ExponentAtten, 307 Light0CutoffAtten = 0x8b, 308 Light1CutoffAtten, 309 Light2CutoffAtten, 310 Light3CutoffAtten, 311 Light0Ambient = 0x8f, 312 Light0Diffuse, 313 Light0Specular, 314 Light1Ambient, 315 Light1Diffuse, 316 Light1Specular, 317 Light2Ambient, 318 Light2Diffuse, 319 Light2Specular, 320 Light3Ambient, 321 Light3Diffuse, 322 Light3Specular, 323 Cull = 0x9b, 324 FrameBufPtr = 0x9c, 325 FrameBufWidth = 0x9d, 326 ZBufPtr = 0x9e, 327 ZBufWidth = 0x9f, 328 TexAddr0 = 0xa0, 329 TexAddr1, 330 TexAddr2, 331 TexAddr3, 332 TexAddr4, 333 TexAddr5, 334 TexAddr6, 335 TexAddr7, 336 TexBufWidth0 = 0xa8, 337 TexBufWidth1, 338 TexBufWidth2, 339 TexBufWidth3, 340 TexBufWidth4, 341 TexBufWidth5, 342 TexBufWidth6, 343 TexBufWidth7, 344 ClutAddr = 0xb0, 345 ClutAddrUpper = 0xb1, 346 TransferSrc, 347 TransferSrcW, 348 TransferDst, 349 TransferDstW, 350 TexSize0 = 0xb8, 351 TexSize1, 352 TexSize2, 353 TexSize3, 354 TexSize4, 355 TexSize5, 356 TexSize6, 357 TexSize7, 358 TexMapMode = 0xc0, 359 TexShadeLs = 0xc1, 360 TexMode = 0xc2, 361 TexFormat = 0xc3, 362 LoadClut = 0xc4, 363 ClutFormat = 0xc5, 364 TexFilter = 0xc6, 365 TexWrap = 0xc7, 366 TexLevel = 0xc8, 367 TexFunc = 0xc9, 368 TexEnvColor = 0xca, 369 TexFlush = 0xcb, 370 TexSync = 0xcc, 371 Fog1 = 0xcd, 372 Fog2 = 0xce, 373 FogColor = 0xcf, 374 TexLodSlope = 0xd0, 375 FramebufPixFormat = 0xd2, 376 ClearMode = 0xd3, 377 Scissor1 = 0xd4, 378 Scissor2 = 0xd5, 379 MinZ = 0xd6, 380 MaxZ = 0xd7, 381 ColorTest = 0xd8, 382 ColorRef = 0xd9, 383 ColorTestmask = 0xda, 384 AlphaTest = 0xdb, 385 StencilTest = 0xdc, 386 StencilOp = 0xdd, 387 ZTest = 0xde, 388 BlendMode = 0xdf, 389 BlendFixedA = 0xe0, 390 BlendFixedB = 0xe1, 391 Dith0 = 0xe2, 392 Dith1, 393 Dith2, 394 Dith3, 395 LogicOp = 0xe6, 396 ZWriteDisable = 0xe7, 397 MaskRgb = 0xe8, 398 MaskAlpha = 0xe9, 399 TransferStart = 0xea, 400 TransferSrcPos = 0xeb, 401 TransferDstPos = 0xec, 402 TransferSize = 0xee, 403 Vscx = 0xf0, 404 Vscy = 0xf1, 405 Vscz = 0xf2, 406 Vtcs = 0xf3, 407 Vtct = 0xf4, 408 Vtcq = 0xf5, 409 Vcv = 0xf6, 410 Vap = 0xf7, 411 Vfc = 0xf8, 412 Vscv = 0xf9, 413 414 Unknown03 = 0x03, 415 Unknown0D = 0x0d, 416 Unknown11 = 0x11, 417 Unknown29 = 0x29, 418 Unknown34 = 0x34, 419 Unknown35 = 0x35, 420 Unknown39 = 0x39, 421 Unknown4E = 0x4e, 422 Unknown4F = 0x4f, 423 Unknown52 = 0x52, 424 Unknown59 = 0x59, 425 Unknown5A = 0x5a, 426 UnknownB6 = 0xb6, 427 UnknownB7 = 0xb7, 428 UnknownD1 = 0xd1, 429 UnknownED = 0xed, 430 UnknownEF = 0xef, 431 UnknownFA = 0xfa, 432 UnknownFB = 0xfb, 433 UnknownFC = 0xfc, 434 UnknownFD = 0xfd, 435 UnknownFE = 0xfe, 436 NopFF = 0xff, 437 } 438 439 #[repr(i32)] 440 pub enum SceSysMemPartitionId { 441 SceKernelUnknownPartition = 0, 442 SceKernelPrimaryKernelPartition = 1, 443 SceKernelPrimaryUserPartition = 2, 444 SceKernelOtherKernelPartition1 = 3, 445 SceKernelOtherKernelPartition2 = 4, 446 SceKernelVshellPARTITION = 5, 447 SceKernelScUserPartition = 6, 448 SceKernelMeUserPartition = 7, 449 SceKernelExtendedScKernelPartition = 8, 450 SceKernelExtendedSc2KernelPartition = 9, 451 SceKernelExtendedMeKernelPartition = 10, 452 SceKernelVshellKernelPartition = 11, 453 SceKernelExtendedKernelPartition = 12, 454 } 455 456 #[repr(i32)] 457 pub enum SceSysMemBlockTypes { 458 Low = 0, 459 High, 460 Addr, 461 } 462 463 #[repr(u32)] 464 pub enum Interrupt { 465 Gpio = 4, 466 Ata = 5, 467 Umd = 6, 468 Mscm0 = 7, 469 Wlan = 8, 470 Audio = 10, 471 I2c = 12, 472 Sircs = 14, 473 Systimer0 = 15, 474 Systimer1 = 16, 475 Systimer2 = 17, 476 Systimer3 = 18, 477 Thread0 = 19, 478 Nand = 20, 479 Dmacplus = 21, 480 Dma0 = 22, 481 Dma1 = 23, 482 Memlmd = 24, 483 Ge = 25, 484 Vblank = 30, 485 Mecodec = 31, 486 Hpremote = 36, 487 Mscm1 = 60, 488 Mscm2 = 61, 489 Thread1 = 65, 490 Interrupt = 66, 491 } 492 493 #[repr(u32)] 494 pub enum SubInterrupt { 495 Gpio = Interrupt::Gpio as u32, 496 Ata = Interrupt::Ata as u32, 497 Umd = Interrupt::Umd as u32, 498 Dmacplus = Interrupt::Dmacplus as u32, 499 Ge = Interrupt::Ge as u32, 500 Display = Interrupt::Vblank as u32, 501 } 502 503 #[repr(u32)] 504 pub enum SceKernelIdListType { 505 Thread = 1, 506 Semaphore = 2, 507 EventFlag = 3, 508 Mbox = 4, 509 Vpl = 5, 510 Fpl = 6, 511 Mpipe = 7, 512 Callback = 8, 513 ThreadEventHandler = 9, 514 Alarm = 10, 515 VTimer = 11, 516 SleepThread = 64, 517 DelayThread = 65, 518 SuspendThread = 66, 519 DormantThread = 67, 520 } 521 522 #[repr(i32)] 523 pub enum UsbCamResolution { 524 Px160_120 = 0, 525 Px176_144 = 1, 526 Px320_240 = 2, 527 Px352_288 = 3, 528 Px640_480 = 4, 529 Px1024_768 = 5, 530 Px1280_960 = 6, 531 Px480_272 = 7, 532 Px360_272 = 8, 533 } 534 535 #[repr(i32)] 536 pub enum UsbCamResolutionEx { 537 Px160_120 = 0, 538 Px176_144 = 1, 539 Px320_240 = 2, 540 Px352_288 = 3, 541 Px360_272 = 4, 542 Px480_272 = 5, 543 Px640_480 = 6, 544 Px1024_768 = 7, 545 Px1280_960 = 8, 546 } 547 548 #[repr(i32)] 549 pub enum UsbCamDelay { 550 NoDelay = 0, 551 Delay10Sec = 1, 552 Delay20Sec = 2, 553 Delay30Sec = 3, 554 } 555 556 #[repr(i32)] 557 pub enum UsbCamFrameRate { 558 Fps3_75 = 0, 559 Fps5 = 1, 560 Fps7_5 = 2, 561 Fps10 = 3, 562 Fps15 = 4, 563 Fps20 = 5, 564 Fps30 = 6, 565 Fps60 = 7, 566 } 567 568 #[repr(i32)] 569 pub enum UsbCamWb { 570 Auto = 0, 571 Daylight = 1, 572 Fluorescent = 2, 573 Incadescent = 3, 574 } 575 576 #[repr(i32)] 577 pub enum UsbCamEffectMode { 578 Normal = 0, 579 Negative = 1, 580 Blackwhite = 2, 581 Sepia = 3, 582 Blue = 4, 583 Red = 5, 584 Green = 6, 585 } 586 587 #[repr(i32)] 588 pub enum UsbCamEvLevel { 589 Pos2_0 = 0, 590 Pos1_7 = 1, 591 Pos1_5 = 2, 592 Pos1_3 = 3, 593 Pos1_0 = 4, 594 Pos0_7 = 5, 595 Pos0_5 = 6, 596 Pos0_3 = 7, 597 Zero = 8, 598 Neg0_3, 599 Neg0_5, 600 Neg0_7, 601 Neg1_0, 602 Neg1_3, 603 Neg1_5, 604 Neg1_7, 605 Neg2_0, 606 } 607 608 #[repr(i32)] 609 pub enum RtcCheckValidError { 610 InvalidYear = -1, 611 InvalidMonth = -2, 612 InvalidDay = -3, 613 InvalidHour = -4, 614 InvalidMinutes = -5, 615 InvalidSeconds = -6, 616 InvalidMicroseconds = -7, 617 } 618 619 #[repr(u32)] 620 pub enum PowerTick { 621 All = 0, 622 Suspend = 1, 623 Display = 6, 624 } 625 626 #[repr(u32)] 627 pub enum IoAssignPerms { 628 RdWr = 0, 629 RdOnly = 1, 630 } 631 632 #[repr(u32)] 633 pub enum IoWhence { 634 Set = 0, 635 Cur = 1, 636 End = 2, 637 } 638 639 #[repr(u32)] 640 pub enum UmdType { 641 Game = 0x10, 642 Video = 0x20, 643 Audio = 0x40, 644 } 645 646 #[repr(u32)] 647 pub enum GuPrimitive { 648 Points = 0, 649 Lines = 1, 650 LineStrip = 2, 651 Triangles = 3, 652 TriangleStrip = 4, 653 TriangleFan = 5, 654 Sprites = 6, 655 } 656 657 #[repr(u32)] 658 pub enum PatchPrimitive { 659 Points = 0, 660 LineStrip = 2, 661 TriangleStrip = 4, 662 } 663 664 #[repr(u32)] 665 pub enum GuState { 666 AlphaTest = 0, 667 DepthTest = 1, 668 ScissorTest = 2, 669 StencilTest = 3, 670 Blend = 4, 671 CullFace = 5, 672 Dither = 6, 673 Fog = 7, 674 ClipPlanes = 8, 675 Texture2D = 9, 676 Lighting = 10, 677 Light0 = 11, 678 Light1 = 12, 679 Light2 = 13, 680 Light3 = 14, 681 LineSmooth = 15, 682 PatchCullFace = 16, 683 ColorTest = 17, 684 ColorLogicOp = 18, 685 FaceNormalReverse = 19, 686 PatchFace = 20, 687 Fragment2X = 21, 688 } 689 690 #[repr(u32)] 691 pub enum MatrixMode { 692 Projection = 0, 693 View = 1, 694 Model = 2, 695 Texture = 3, 696 } 697 698 #[repr(u32)] 699 pub enum TexturePixelFormat { 700 Psm5650 = 0, 701 Psm5551 = 1, 702 Psm4444 = 2, 703 Psm8888 = 3, 704 PsmT4 = 4, 705 PsmT8 = 5, 706 PsmT16 = 6, 707 PsmT32 = 7, 708 PsmDxt1 = 8, 709 PsmDxt3 = 9, 710 PsmDxt5 = 10, 711 } 712 713 #[repr(u32)] 714 pub enum SplineMode { 715 FillFill = 0, 716 OpenFill = 1, 717 FillOpen = 2, 718 OpenOpen = 3, 719 } 720 721 #[repr(u32)] 722 pub enum ShadingModel { 723 Flat = 0, 724 Smooth = 1, 725 } 726 727 #[repr(u32)] 728 pub enum LogicalOperation { 729 Clear = 0, 730 And = 1, 731 AndReverse = 2, 732 Copy = 3, 733 AndInverted = 4, 734 Noop = 5, 735 Xor = 6, 736 Or = 7, 737 Nor = 8, 738 Equiv = 9, 739 Inverted = 10, 740 OrReverse = 11, 741 CopyInverted = 12, 742 OrInverted = 13, 743 Nand = 14, 744 Set = 15, 745 } 746 747 #[repr(u32)] 748 pub enum TextureFilter { 749 Nearest = 0, 750 Linear = 1, 751 NearestMipmapNearest = 4, 752 LinearMipmapNearest = 5, 753 NearestMipmapLinear = 6, 754 LinearMipmapLinear = 7, 755 } 756 757 #[repr(u32)] 758 pub enum TextureMapMode { 759 TextureCoords = 0, 760 TextureMatrix = 1, 761 EnvironmentMap = 2, 762 } 763 764 #[repr(u32)] 765 pub enum TextureLevelMode { 766 Auto = 0, 767 Const = 1, 768 Slope = 2, 769 } 770 771 #[repr(u32)] 772 pub enum TextureProjectionMapMode { 773 Position = 0, 774 Uv = 1, 775 NormalizedNormal = 2, 776 Normal = 3, 777 } 778 779 #[repr(u32)] 780 pub enum GuTexWrapMode { 781 Repeat = 0, 782 Clamp = 1, 783 } 784 785 #[repr(u32)] 786 pub enum FrontFaceDirection { 787 Clockwise = 0, 788 CounterClockwise = 1, 789 } 790 791 #[repr(u32)] 792 pub enum AlphaFunc { 793 Never = 0, 794 Always, 795 Equal, 796 NotEqual, 797 Less, 798 LessOrEqual, 799 Greater, 800 GreaterOrEqual, 801 } 802 803 #[repr(u32)] 804 pub enum StencilFunc { 805 Never = 0, 806 Always, 807 Equal, 808 NotEqual, 809 Less, 810 LessOrEqual, 811 Greater, 812 GreaterOrEqual, 813 } 814 815 #[repr(u32)] 816 pub enum ColorFunc { 817 Never = 0, 818 Always, 819 Equal, 820 NotEqual, 821 } 822 823 #[repr(u32)] 824 pub enum DepthFunc { 825 Never = 0, 826 Always, 827 Equal, 828 NotEqual, 829 Less, 830 LessOrEqual, 831 Greater, 832 GreaterOrEqual, 833 } 834 835 #[repr(u32)] 836 pub enum TextureEffect { 837 Modulate = 0, 838 Decal = 1, 839 Blend = 2, 840 Replace = 3, 841 Add = 4, 842 } 843 844 #[repr(u32)] 845 pub enum TextureColorComponent { 846 Rgb = 0, 847 Rgba = 1, 848 } 849 850 #[repr(u32)] 851 pub enum MipmapLevel { 852 None = 0, 853 Level1, 854 Level2, 855 Level3, 856 Level4, 857 Level5, 858 Level6, 859 Level7, 860 } 861 862 #[repr(u32)] 863 pub enum BlendOp { 864 Add = 0, 865 Subtract = 1, 866 ReverseSubtract = 2, 867 Min = 3, 868 Max = 4, 869 Abs = 5, 870 } 871 872 #[repr(u32)] 873 pub enum BlendSrc { 874 SrcColor = 0, 875 OneMinusSrcColor = 1, 876 SrcAlpha = 2, 877 OneMinusSrcAlpha = 3, 878 Fix = 10, 879 } 880 881 #[repr(u32)] 882 pub enum BlendDst { 883 DstColor = 0, 884 OneMinusDstColor = 1, 885 DstAlpha = 4, 886 OneMinusDstAlpha = 5, 887 Fix = 10, 888 } 889 890 #[repr(u32)] 891 pub enum StencilOperation { 892 Keep = 0, 893 Zero = 1, 894 Replace = 2, 895 Invert = 3, 896 Incr = 4, 897 Decr = 5, 898 } 899 900 #[repr(u32)] 901 pub enum LightMode { 902 SingleColor = 0, 903 SeparateSpecularColor = 1, 904 } 905 906 #[repr(u32)] 907 pub enum LightType { 908 Directional = 0, 909 Pointlight = 1, 910 Spotlight = 2, 911 } 912 913 #[repr(u32)] 914 pub enum GuContextType { 915 Direct = 0, 916 Call = 1, 917 Send = 2, 918 } 919 920 #[repr(u32)] 921 pub enum GuQueueMode { 922 Tail = 0, 923 Head = 1, 924 } 925 926 #[repr(u32)] 927 pub enum GuSyncMode { 928 Finish = 0, 929 Signal = 1, 930 Done = 2, 931 List = 3, 932 Send = 4, 933 } 934 935 #[repr(u32)] 936 pub enum GuSyncBehavior { 937 Wait = 0, 938 NoWait = 1, 939 } 940 941 #[repr(u32)] 942 pub enum GuCallbackId { 943 Signal = 1, 944 Finish = 4, 945 } 946 947 #[repr(u32)] 948 pub enum SignalBehavior { 949 Suspend = 1, 950 Continue = 2, 951 } 952 953 #[repr(u32)] 954 pub enum ClutPixelFormat { 955 Psm5650 = 0, 956 Psm5551 = 1, 957 Psm4444 = 2, 958 Psm8888 = 3, 959 } 960 961 #[repr(C)] 962 pub enum KeyType { 963 Directory = 1, 964 Integer = 2, 965 String = 3, 966 Bytes = 4, 967 } 968 969 #[repr(u32)] 970 pub enum UtilityMsgDialogMode { 971 Error, 972 Text, 973 } 974 975 #[repr(u32)] 976 pub enum UtilityMsgDialogPressed { 977 Unknown1, 978 Yes, 979 No, 980 Back, 981 } 982 983 #[repr(u32)] 984 pub enum UtilityDialogButtonAccept { 985 Circle, 986 Cross, 987 } 988 989 #[repr(u32)] 990 pub enum SceUtilityOskInputLanguage { 991 Default, 992 Japanese, 993 English, 994 French, 995 Spanish, 996 German, 997 Italian, 998 Dutch, 999 Portugese, 1000 Russian, 1001 Korean, 1002 } 1003 1004 #[repr(u32)] 1005 pub enum SceUtilityOskInputType { 1006 All, 1007 LatinDigit, 1008 LatinSymbol, 1009 LatinLowercase = 4, 1010 LatinUppercase = 8, 1011 JapaneseDigit = 0x100, 1012 JapaneseSymbol = 0x200, 1013 JapaneseLowercase = 0x400, 1014 JapaneseUppercase = 0x800, 1015 JapaneseHiragana = 0x1000, 1016 JapaneseHalfWidthKatakana = 0x2000, 1017 JapaneseKatakana = 0x4000, 1018 JapaneseKanji = 0x8000, 1019 RussianLowercase = 0x10000, 1020 RussianUppercase = 0x20000, 1021 Korean = 0x40000, 1022 Url = 0x80000, 1023 } 1024 1025 #[repr(u32)] 1026 pub enum SceUtilityOskState { 1027 None, 1028 Initializing, 1029 Initialized, 1030 Visible, 1031 Quit, 1032 Finished, 1033 } 1034 1035 #[repr(u32)] 1036 pub enum SceUtilityOskResult { 1037 Unchanged, 1038 Cancelled, 1039 Changed, 1040 } 1041 1042 #[repr(u32)] 1043 pub enum SystemParamLanguage { 1044 Japanese, 1045 English, 1046 French, 1047 Spanish, 1048 German, 1049 Italian, 1050 Dutch, 1051 Portugese, 1052 Russian, 1053 Korean, 1054 ChineseTraditional, 1055 ChineseSimplified, 1056 } 1057 1058 #[repr(u32)] 1059 pub enum SystemParamId { 1060 StringNickname = 1, 1061 AdhocChannel, 1062 WlanPowerSave, 1063 DateFormat, 1064 TimeFormat, 1065 Timezone, 1066 DaylightSavings, 1067 Language, 1068 Unknown, 1069 } 1070 1071 #[repr(u32)] 1072 pub enum SystemParamAdhocChannel { 1073 ChannelAutomatic = 0, 1074 Channel1 = 1, 1075 Channel6 = 6, 1076 Channel11 = 11, 1077 } 1078 1079 #[repr(u32)] 1080 pub enum SystemParamWlanPowerSaveState { 1081 Off, 1082 On, 1083 } 1084 1085 #[repr(u32)] 1086 pub enum SystemParamDateFormat { 1087 YYYYMMDD, 1088 MMDDYYYY, 1089 DDMMYYYY, 1090 } 1091 1092 #[repr(u32)] 1093 pub enum SystemParamTimeFormat { 1094 Hour24, 1095 Hour12, 1096 } 1097 1098 #[repr(u32)] 1099 pub enum SystemParamDaylightSavings { 1100 Std, 1101 Dst, 1102 } 1103 1104 #[repr(u32)] 1105 pub enum AvModule { 1106 AvCodec, 1107 SasCore, 1108 Atrac3Plus, 1109 MpegBase, 1110 Mp3, 1111 Vaudio, 1112 Aac, 1113 G729, 1114 } 1115 1116 #[repr(u32)] 1117 pub enum Module { 1118 NetCommon = 0x100, 1119 NetAdhoc, 1120 NetInet, 1121 NetParseUri, 1122 NetHttp, 1123 NetSsl, 1124 1125 UsbPspCm = 0x200, 1126 UsbMic, 1127 UsbCam, 1128 UsbGps, 1129 1130 AvCodec = 0x300, 1131 AvSascore, 1132 AvAtrac3Plus, 1133 AvMpegBase, 1134 AvMp3, 1135 AvVaudio, 1136 AvAac, 1137 AvG729, 1138 1139 NpCommon = 0x400, 1140 NpService, 1141 NpMatching2, 1142 NpDrm = 0x500, 1143 1144 Irda = 0x600, 1145 } 1146 1147 #[repr(u32)] 1148 pub enum NetModule { 1149 NetCommon = 1, 1150 NetAdhoc, 1151 NetInet, 1152 NetParseUri, 1153 NetHttp, 1154 NetSsl, 1155 } 1156 1157 #[repr(u32)] 1158 pub enum UsbModule { 1159 UsbPspCm = 1, 1160 UsbAcc, 1161 UsbMic, 1162 UsbCam, 1163 UsbGps, 1164 } 1165 1166 #[repr(u32)] 1167 pub enum NetParam { 1168 Name, 1169 Ssid, 1170 Secure, 1171 WepKey, 1172 IsStaticIp, 1173 Ip, 1174 NetMask, 1175 Route, 1176 ManualDns, 1177 PrimaryDns, 1178 SecondaryDns, 1179 ProxyUser, 1180 ProxyPass, 1181 UseProxy, 1182 ProxyServer, 1183 ProxyPort, 1184 Unknown1, 1185 Unknown2, 1186 } 1187 1188 #[repr(u32)] 1189 pub enum UtilityNetconfAction { 1190 ConnectAP, 1191 DisplayStatus, 1192 ConnectAdhoc, 1193 } 1194 1195 #[repr(u32)] 1196 pub enum UtilitySavedataMode { 1197 AutoLoad, 1198 AutoSave, 1199 Load, 1200 Save, 1201 ListLoad, 1202 ListSave, 1203 ListDelete, 1204 Delete, 1205 } 1206 1207 #[repr(u32)] 1208 pub enum UtilitySavedataFocus { 1209 Unknown1, 1210 FirstList, 1211 LastList, 1212 Latest, 1213 Oldest, 1214 Unknown2, 1215 Unknown3, 1216 FirstEmpty, 1217 LastEmpty, 1218 } 1219 1220 #[repr(u32)] 1221 pub enum UtilityGameSharingMode { 1222 Single = 1, 1223 Multiple, 1224 } 1225 1226 #[repr(u32)] 1227 pub enum UtilityGameSharingDataType { 1228 File = 1, 1229 Memory, 1230 } 1231 1232 #[repr(u32)] 1233 pub enum UtilityHtmlViewerInterfaceMode { 1234 Full, 1235 Limited, 1236 None, 1237 } 1238 1239 #[repr(u32)] 1240 pub enum UtilityHtmlViewerCookieMode { 1241 Disabled = 0, 1242 Enabled, 1243 Confirm, 1244 Default, 1245 } 1246 1247 #[repr(u32)] 1248 pub enum UtilityHtmlViewerTextSize { 1249 Large, 1250 Normal, 1251 Small, 1252 } 1253 1254 #[repr(u32)] 1255 pub enum UtilityHtmlViewerDisplayMode { 1256 Normal, 1257 Fit, 1258 SmartFit, 1259 } 1260 1261 #[repr(u32)] 1262 pub enum UtilityHtmlViewerConnectMode { 1263 Last, 1264 ManualOnce, 1265 ManualAll, 1266 } 1267 1268 #[repr(u32)] 1269 pub enum UtilityHtmlViewerDisconnectMode { 1270 Enable, 1271 Disable, 1272 Confirm, 1273 } 1274 1275 #[repr(u32)] 1276 pub enum ScePspnetAdhocPtpState { 1277 Closed, 1278 Listen, 1279 SynSent, 1280 SynReceived, 1281 Established, 1282 } 1283 1284 #[repr(u32)] 1285 pub enum AdhocMatchingMode { 1286 Host = 1, 1287 Client, 1288 Ptp, 1289 } 1290 1291 #[repr(u32)] 1292 pub enum ApctlState { 1293 Disconnected, 1294 Scanning, 1295 Joining, 1296 GettingIp, 1297 GotIp, 1298 EapAuth, 1299 KeyExchange, 1300 } 1301 1302 #[repr(u32)] 1303 pub enum ApctlEvent { 1304 ConnectRequest, 1305 ScanRequest, 1306 ScanComplete, 1307 Established, 1308 GetIp, 1309 DisconnectRequest, 1310 Error, 1311 Info, 1312 EapAuth, 1313 KeyExchange, 1314 Reconnect, 1315 } 1316 1317 #[repr(u32)] 1318 pub enum ApctlInfo { 1319 ProfileName, 1320 Bssid, 1321 Ssid, 1322 SsidLength, 1323 SecurityType, 1324 Strength, 1325 Channel, 1326 PowerSave, 1327 Ip, 1328 SubnetMask, 1329 Gateway, 1330 PrimaryDns, 1331 SecondaryDns, 1332 UseProxy, 1333 ProxyUrl, 1334 ProxyPort, 1335 EapType, 1336 StartBrowser, 1337 Wifisp, 1338 } 1339 1340 #[repr(u32)] 1341 pub enum ApctlInfoSecurityType { 1342 None, 1343 Wep, 1344 Wpa, 1345 } 1346 1347 #[repr(u32)] 1348 pub enum HttpMethod { 1349 Get, 1350 Post, 1351 Head, 1352 } 1353 1354 #[repr(u32)] 1355 pub enum HttpAuthType { 1356 Basic, 1357 Digest, 1358 } 1359 } 1360 1361 s_paren! { 1362 #[repr(transparent)] 1363 pub struct SceUid(pub i32); 1364 1365 #[repr(transparent)] 1366 #[allow(dead_code)] 1367 pub struct SceMpeg(*mut *mut c_void); 1368 1369 #[repr(transparent)] 1370 #[allow(dead_code)] 1371 pub struct SceMpegStream(*mut c_void); 1372 1373 #[repr(transparent)] 1374 pub struct Mp3Handle(pub i32); 1375 1376 #[repr(transparent)] 1377 #[allow(dead_code)] 1378 pub struct RegHandle(u32); 1379 } 1380 1381 s! { 1382 pub struct sockaddr { 1383 pub sa_len: u8, 1384 pub sa_family: u8, 1385 pub sa_data: [u8; 14], 1386 } 1387 1388 pub struct in_addr { 1389 pub s_addr: u32, 1390 } 1391 1392 pub struct AudioInputParams { 1393 pub unknown1: i32, 1394 pub gain: i32, 1395 pub unknown2: i32, 1396 pub unknown3: i32, 1397 pub unknown4: i32, 1398 pub unknown5: i32, 1399 } 1400 1401 pub struct Atrac3BufferInfo { 1402 pub puc_write_position_first_buf: *mut u8, 1403 pub ui_writable_byte_first_buf: u32, 1404 pub ui_min_write_byte_first_buf: u32, 1405 pub ui_read_position_first_buf: u32, 1406 pub puc_write_position_second_buf: *mut u8, 1407 pub ui_writable_byte_second_buf: u32, 1408 pub ui_min_write_byte_second_buf: u32, 1409 pub ui_read_position_second_buf: u32, 1410 } 1411 1412 pub struct SceCtrlData { 1413 pub timestamp: u32, 1414 pub buttons: i32, 1415 pub lx: u8, 1416 pub ly: u8, 1417 pub rsrv: [u8; 6], 1418 } 1419 1420 pub struct SceCtrlLatch { 1421 pub ui_make: u32, 1422 pub ui_break: u32, 1423 pub ui_press: u32, 1424 pub ui_release: u32, 1425 } 1426 1427 pub struct GeStack { 1428 pub stack: [u32; 8], 1429 } 1430 1431 pub struct GeCallbackData { 1432 pub signal_func: Option<extern "C" fn(id: i32, arg: *mut c_void)>, 1433 pub signal_arg: *mut c_void, 1434 pub finish_func: Option<extern "C" fn(id: i32, arg: *mut c_void)>, 1435 pub finish_arg: *mut c_void, 1436 } 1437 1438 pub struct GeListArgs { 1439 pub size: u32, 1440 pub context: *mut GeContext, 1441 pub num_stacks: u32, 1442 pub stacks: *mut GeStack, 1443 } 1444 1445 pub struct GeBreakParam { 1446 pub buf: [u32; 4], 1447 } 1448 1449 pub struct SceKernelLoadExecParam { 1450 pub size: usize, 1451 pub args: usize, 1452 pub argp: *mut c_void, 1453 pub key: *const u8, 1454 } 1455 1456 pub struct timeval { 1457 pub tv_sec: i32, 1458 pub tv_usec: i32, 1459 } 1460 1461 pub struct timezone { 1462 pub tz_minutes_west: i32, 1463 pub tz_dst_time: i32, 1464 } 1465 1466 pub struct IntrHandlerOptionParam { 1467 size: i32, 1468 entry: u32, 1469 common: u32, 1470 gp: u32, 1471 intr_code: u16, 1472 sub_count: u16, 1473 intr_level: u16, 1474 enabled: u16, 1475 calls: u32, 1476 field_1c: u32, 1477 total_clock_lo: u32, 1478 total_clock_hi: u32, 1479 min_clock_lo: u32, 1480 min_clock_hi: u32, 1481 max_clock_lo: u32, 1482 max_clock_hi: u32, 1483 } 1484 1485 pub struct SceKernelLMOption { 1486 pub size: usize, 1487 pub m_pid_text: SceUid, 1488 pub m_pid_data: SceUid, 1489 pub flags: u32, 1490 pub position: u8, 1491 pub access: u8, 1492 pub c_reserved: [u8; 2usize], 1493 } 1494 1495 pub struct SceKernelSMOption { 1496 pub size: usize, 1497 pub m_pid_stack: SceUid, 1498 pub stack_size: usize, 1499 pub priority: i32, 1500 pub attribute: u32, 1501 } 1502 1503 pub struct SceKernelModuleInfo { 1504 pub size: usize, 1505 pub n_segment: u8, 1506 pub reserved: [u8; 3usize], 1507 pub segment_addr: [i32; 4usize], 1508 pub segment_size: [i32; 4usize], 1509 pub entry_addr: u32, 1510 pub gp_value: u32, 1511 pub text_addr: u32, 1512 pub text_size: u32, 1513 pub data_size: u32, 1514 pub bss_size: u32, 1515 pub attribute: u16, 1516 pub version: [u8; 2usize], 1517 pub name: [u8; 28usize], 1518 } 1519 1520 pub struct DebugProfilerRegs { 1521 pub enable: u32, 1522 pub systemck: u32, 1523 pub cpuck: u32, 1524 pub internal: u32, 1525 pub memory: u32, 1526 pub copz: u32, 1527 pub vfpu: u32, 1528 pub sleep: u32, 1529 pub bus_access: u32, 1530 pub uncached_load: u32, 1531 pub uncached_store: u32, 1532 pub cached_load: u32, 1533 pub cached_store: u32, 1534 pub i_miss: u32, 1535 pub d_miss: u32, 1536 pub d_writeback: u32, 1537 pub cop0_inst: u32, 1538 pub fpu_inst: u32, 1539 pub vfpu_inst: u32, 1540 pub local_bus: u32, 1541 } 1542 1543 pub struct SceKernelSysClock { 1544 pub low: u32, 1545 pub hi: u32, 1546 } 1547 1548 pub struct SceKernelThreadOptParam { 1549 pub size: usize, 1550 pub stack_mpid: SceUid, 1551 } 1552 1553 pub struct SceKernelThreadInfo { 1554 pub size: usize, 1555 pub name: [u8; 32], 1556 pub attr: u32, 1557 pub status: i32, 1558 pub entry: SceKernelThreadEntry, 1559 pub stack: *mut c_void, 1560 pub stack_size: i32, 1561 pub gp_reg: *mut c_void, 1562 pub init_priority: i32, 1563 pub current_priority: i32, 1564 pub wait_type: i32, 1565 pub wait_id: SceUid, 1566 pub wakeup_count: i32, 1567 pub exit_status: i32, 1568 pub run_clocks: SceKernelSysClock, 1569 pub intr_preempt_count: u32, 1570 pub thread_preempt_count: u32, 1571 pub release_count: u32, 1572 } 1573 1574 pub struct SceKernelThreadRunStatus { 1575 pub size: usize, 1576 pub status: i32, 1577 pub current_priority: i32, 1578 pub wait_type: i32, 1579 pub wait_id: i32, 1580 pub wakeup_count: i32, 1581 pub run_clocks: SceKernelSysClock, 1582 pub intr_preempt_count: u32, 1583 pub thread_preempt_count: u32, 1584 pub release_count: u32, 1585 } 1586 1587 pub struct SceKernelSemaOptParam { 1588 pub size: usize, 1589 } 1590 1591 pub struct SceKernelSemaInfo { 1592 pub size: usize, 1593 pub name: [u8; 32], 1594 pub attr: u32, 1595 pub init_count: i32, 1596 pub current_count: i32, 1597 pub max_count: i32, 1598 pub num_wait_threads: i32, 1599 } 1600 1601 pub struct SceKernelEventFlagInfo { 1602 pub size: usize, 1603 pub name: [u8; 32], 1604 pub attr: u32, 1605 pub init_pattern: u32, 1606 pub current_pattern: u32, 1607 pub num_wait_threads: i32, 1608 } 1609 1610 pub struct SceKernelEventFlagOptParam { 1611 pub size: usize, 1612 } 1613 1614 pub struct SceKernelMbxOptParam { 1615 pub size: usize, 1616 } 1617 1618 pub struct SceKernelMbxInfo { 1619 pub size: usize, 1620 pub name: [u8; 32usize], 1621 pub attr: u32, 1622 pub num_wait_threads: i32, 1623 pub num_messages: i32, 1624 pub first_message: *mut c_void, 1625 } 1626 1627 pub struct SceKernelVTimerInfo { 1628 pub size: usize, 1629 pub name: [u8; 32], 1630 pub active: i32, 1631 pub base: SceKernelSysClock, 1632 pub current: SceKernelSysClock, 1633 pub schedule: SceKernelSysClock, 1634 pub handler: SceKernelVTimerHandler, 1635 pub common: *mut c_void, 1636 } 1637 1638 pub struct SceKernelThreadEventHandlerInfo { 1639 pub size: usize, 1640 pub name: [u8; 32], 1641 pub thread_id: SceUid, 1642 pub mask: i32, 1643 pub handler: SceKernelThreadEventHandler, 1644 pub common: *mut c_void, 1645 } 1646 1647 pub struct SceKernelAlarmInfo { 1648 pub size: usize, 1649 pub schedule: SceKernelSysClock, 1650 pub handler: SceKernelAlarmHandler, 1651 pub common: *mut c_void, 1652 } 1653 1654 pub struct SceKernelSystemStatus { 1655 pub size: usize, 1656 pub status: u32, 1657 pub idle_clocks: SceKernelSysClock, 1658 pub comes_out_of_idle_count: u32, 1659 pub thread_switch_count: u32, 1660 pub vfpu_switch_count: u32, 1661 } 1662 1663 pub struct SceKernelMppInfo { 1664 pub size: usize, 1665 pub name: [u8; 32], 1666 pub attr: u32, 1667 pub buf_size: i32, 1668 pub free_size: i32, 1669 pub num_send_wait_threads: i32, 1670 pub num_receive_wait_threads: i32, 1671 } 1672 1673 pub struct SceKernelVplOptParam { 1674 pub size: usize, 1675 } 1676 1677 pub struct SceKernelVplInfo { 1678 pub size: usize, 1679 pub name: [u8; 32], 1680 pub attr: u32, 1681 pub pool_size: i32, 1682 pub free_size: i32, 1683 pub num_wait_threads: i32, 1684 } 1685 1686 pub struct SceKernelFplOptParam { 1687 pub size: usize, 1688 } 1689 1690 pub struct SceKernelFplInfo { 1691 pub size: usize, 1692 pub name: [u8; 32usize], 1693 pub attr: u32, 1694 pub block_size: i32, 1695 pub num_blocks: i32, 1696 pub free_blocks: i32, 1697 pub num_wait_threads: i32, 1698 } 1699 1700 pub struct SceKernelVTimerOptParam { 1701 pub size: usize, 1702 } 1703 1704 pub struct SceKernelCallbackInfo { 1705 pub size: usize, 1706 pub name: [u8; 32usize], 1707 pub thread_id: SceUid, 1708 pub callback: SceKernelCallbackFunction, 1709 pub common: *mut c_void, 1710 pub notify_count: i32, 1711 pub notify_arg: i32, 1712 } 1713 1714 pub struct UsbCamSetupStillParam { 1715 pub size: i32, 1716 pub resolution: UsbCamResolution, 1717 pub jpeg_size: i32, 1718 pub reverse_flags: i32, 1719 pub delay: UsbCamDelay, 1720 pub comp_level: i32, 1721 } 1722 1723 pub struct UsbCamSetupStillExParam { 1724 pub size: i32, 1725 pub unk: u32, 1726 pub resolution: UsbCamResolutionEx, 1727 pub jpeg_size: i32, 1728 pub comp_level: i32, 1729 pub unk2: u32, 1730 pub unk3: u32, 1731 pub flip: i32, 1732 pub mirror: i32, 1733 pub delay: UsbCamDelay, 1734 pub unk4: [u32; 5usize], 1735 } 1736 1737 pub struct UsbCamSetupVideoParam { 1738 pub size: i32, 1739 pub resolution: UsbCamResolution, 1740 pub framerate: UsbCamFrameRate, 1741 pub white_balance: UsbCamWb, 1742 pub saturation: i32, 1743 pub brightness: i32, 1744 pub contrast: i32, 1745 pub sharpness: i32, 1746 pub effect_mode: UsbCamEffectMode, 1747 pub frame_size: i32, 1748 pub unk: u32, 1749 pub evl_evel: UsbCamEvLevel, 1750 } 1751 1752 pub struct UsbCamSetupVideoExParam { 1753 pub size: i32, 1754 pub unk: u32, 1755 pub resolution: UsbCamResolutionEx, 1756 pub framerate: UsbCamFrameRate, 1757 pub unk2: u32, 1758 pub unk3: u32, 1759 pub white_balance: UsbCamWb, 1760 pub saturation: i32, 1761 pub brightness: i32, 1762 pub contrast: i32, 1763 pub sharpness: i32, 1764 pub unk4: u32, 1765 pub unk5: u32, 1766 pub unk6: [u32; 3usize], 1767 pub effect_mode: UsbCamEffectMode, 1768 pub unk7: u32, 1769 pub unk8: u32, 1770 pub unk9: u32, 1771 pub unk10: u32, 1772 pub unk11: u32, 1773 pub frame_size: i32, 1774 pub unk12: u32, 1775 pub ev_level: UsbCamEvLevel, 1776 } 1777 1778 pub struct ScePspDateTime { 1779 pub year: u16, 1780 pub month: u16, 1781 pub day: u16, 1782 pub hour: u16, 1783 pub minutes: u16, 1784 pub seconds: u16, 1785 pub microseconds: u32, 1786 } 1787 1788 pub struct SceIoStat { 1789 pub st_mode: i32, 1790 pub st_attr: i32, 1791 pub st_size: i64, 1792 pub st_ctime: ScePspDateTime, 1793 pub st_atime: ScePspDateTime, 1794 pub st_mtime: ScePspDateTime, 1795 pub st_private: [u32; 6usize], 1796 } 1797 1798 pub struct UmdInfo { 1799 pub size: u32, 1800 pub type_: UmdType, 1801 } 1802 1803 pub struct SceMpegRingbuffer { 1804 pub packets: i32, 1805 pub unk0: u32, 1806 pub unk1: u32, 1807 pub unk2: u32, 1808 pub unk3: u32, 1809 pub data: *mut c_void, 1810 pub callback: SceMpegRingbufferCb, 1811 pub cb_param: *mut c_void, 1812 pub unk4: u32, 1813 pub unk5: u32, 1814 pub sce_mpeg: *mut c_void, 1815 } 1816 1817 pub struct SceMpegAu { 1818 pub pts_msb: u32, 1819 pub pts: u32, 1820 pub dts_msb: u32, 1821 pub dts: u32, 1822 pub es_buffer: u32, 1823 pub au_size: u32, 1824 } 1825 1826 pub struct SceMpegAvcMode { 1827 pub unk0: i32, 1828 pub pixel_format: super::DisplayPixelFormat, 1829 } 1830 1831 #[repr(align(64))] 1832 pub struct SceMpegLLI { 1833 pub src: *mut c_void, 1834 pub dst: *mut c_void, 1835 pub next: *mut c_void, 1836 pub size: i32, 1837 } 1838 1839 #[repr(align(64))] 1840 pub struct SceMpegYCrCbBuffer { 1841 pub frame_buffer_height16: i32, 1842 pub frame_buffer_width16: i32, 1843 pub unknown: i32, 1844 pub unknown2: i32, 1845 pub y_buffer: *mut c_void, 1846 pub y_buffer2: *mut c_void, 1847 pub cr_buffer: *mut c_void, 1848 pub cb_buffer: *mut c_void, 1849 pub cr_buffer2: *mut c_void, 1850 pub cb_buffer2: *mut c_void, 1851 1852 pub frame_height: i32, 1853 pub frame_width: i32, 1854 pub frame_buffer_width: i32, 1855 pub unknown3: [i32; 11usize], 1856 } 1857 1858 pub struct ScePspSRect { 1859 pub x: i16, 1860 pub y: i16, 1861 pub w: i16, 1862 pub h: i16, 1863 } 1864 1865 pub struct ScePspIRect { 1866 pub x: i32, 1867 pub y: i32, 1868 pub w: i32, 1869 pub h: i32, 1870 } 1871 1872 pub struct ScePspL64Rect { 1873 pub x: u64, 1874 pub y: u64, 1875 pub w: u64, 1876 pub h: u64, 1877 } 1878 1879 pub struct ScePspSVector2 { 1880 pub x: i16, 1881 pub y: i16, 1882 } 1883 1884 pub struct ScePspIVector2 { 1885 pub x: i32, 1886 pub y: i32, 1887 } 1888 1889 pub struct ScePspL64Vector2 { 1890 pub x: u64, 1891 pub y: u64, 1892 } 1893 1894 pub struct ScePspSVector3 { 1895 pub x: i16, 1896 pub y: i16, 1897 pub z: i16, 1898 } 1899 1900 pub struct ScePspIVector3 { 1901 pub x: i32, 1902 pub y: i32, 1903 pub z: i32, 1904 } 1905 1906 pub struct ScePspL64Vector3 { 1907 pub x: u64, 1908 pub y: u64, 1909 pub z: u64, 1910 } 1911 1912 pub struct ScePspSVector4 { 1913 pub x: i16, 1914 pub y: i16, 1915 pub z: i16, 1916 pub w: i16, 1917 } 1918 1919 pub struct ScePspIVector4 { 1920 pub x: i32, 1921 pub y: i32, 1922 pub z: i32, 1923 pub w: i32, 1924 } 1925 1926 pub struct ScePspL64Vector4 { 1927 pub x: u64, 1928 pub y: u64, 1929 pub z: u64, 1930 pub w: u64, 1931 } 1932 1933 pub struct ScePspIMatrix2 { 1934 pub x: ScePspIVector2, 1935 pub y: ScePspIVector2, 1936 } 1937 1938 pub struct ScePspIMatrix3 { 1939 pub x: ScePspIVector3, 1940 pub y: ScePspIVector3, 1941 pub z: ScePspIVector3, 1942 } 1943 1944 #[repr(align(16))] 1945 pub struct ScePspIMatrix4 { 1946 pub x: ScePspIVector4, 1947 pub y: ScePspIVector4, 1948 pub z: ScePspIVector4, 1949 pub w: ScePspIVector4, 1950 } 1951 1952 pub struct ScePspIMatrix4Unaligned { 1953 pub x: ScePspIVector4, 1954 pub y: ScePspIVector4, 1955 pub z: ScePspIVector4, 1956 pub w: ScePspIVector4, 1957 } 1958 1959 pub struct SceMp3InitArg { 1960 pub mp3_stream_start: u32, 1961 pub unk1: u32, 1962 pub mp3_stream_end: u32, 1963 pub unk2: u32, 1964 pub mp3_buf: *mut c_void, 1965 pub mp3_buf_size: i32, 1966 pub pcm_buf: *mut c_void, 1967 pub pcm_buf_size: i32, 1968 } 1969 1970 pub struct OpenPSID { 1971 pub data: [u8; 16usize], 1972 } 1973 1974 pub struct UtilityDialogCommon { 1975 pub size: u32, 1976 pub language: SystemParamLanguage, 1977 pub button_accept: UtilityDialogButtonAccept, 1978 pub graphics_thread: i32, 1979 pub access_thread: i32, 1980 pub font_thread: i32, 1981 pub sound_thread: i32, 1982 pub result: i32, 1983 pub reserved: [i32; 4usize], 1984 } 1985 1986 pub struct UtilityNetconfAdhoc { 1987 pub name: [u8; 8usize], 1988 pub timeout: u32, 1989 } 1990 1991 pub struct UtilityNetconfData { 1992 pub base: UtilityDialogCommon, 1993 pub action: UtilityNetconfAction, 1994 pub adhocparam: *mut UtilityNetconfAdhoc, 1995 pub hotspot: i32, 1996 pub hotspot_connected: i32, 1997 pub wifisp: i32, 1998 } 1999 2000 pub struct UtilitySavedataFileData { 2001 pub buf: *mut c_void, 2002 pub buf_size: usize, 2003 pub size: usize, 2004 pub unknown: i32, 2005 } 2006 2007 pub struct UtilitySavedataListSaveNewData { 2008 pub icon0: UtilitySavedataFileData, 2009 pub title: *mut u8, 2010 } 2011 2012 pub struct UtilityGameSharingParams { 2013 pub base: UtilityDialogCommon, 2014 pub unknown1: i32, 2015 pub unknown2: i32, 2016 pub name: [u8; 8usize], 2017 pub unknown3: i32, 2018 pub unknown4: i32, 2019 pub unknown5: i32, 2020 pub result: i32, 2021 pub filepath: *mut u8, 2022 pub mode: UtilityGameSharingMode, 2023 pub datatype: UtilityGameSharingDataType, 2024 pub data: *mut c_void, 2025 pub datasize: u32, 2026 } 2027 2028 pub struct UtilityHtmlViewerParam { 2029 pub base: UtilityDialogCommon, 2030 pub memaddr: *mut c_void, 2031 pub memsize: u32, 2032 pub unknown1: i32, 2033 pub unknown2: i32, 2034 pub initialurl: *mut u8, 2035 pub numtabs: u32, 2036 pub interfacemode: UtilityHtmlViewerInterfaceMode, 2037 pub options: i32, 2038 pub dldirname: *mut u8, 2039 pub dlfilename: *mut u8, 2040 pub uldirname: *mut u8, 2041 pub ulfilename: *mut u8, 2042 pub cookiemode: UtilityHtmlViewerCookieMode, 2043 pub unknown3: u32, 2044 pub homeurl: *mut u8, 2045 pub textsize: UtilityHtmlViewerTextSize, 2046 pub displaymode: UtilityHtmlViewerDisplayMode, 2047 pub connectmode: UtilityHtmlViewerConnectMode, 2048 pub disconnectmode: UtilityHtmlViewerDisconnectMode, 2049 pub memused: u32, 2050 pub unknown4: [i32; 10usize], 2051 } 2052 2053 pub struct SceUtilityOskData { 2054 pub unk_00: i32, 2055 pub unk_04: i32, 2056 pub language: SceUtilityOskInputLanguage, 2057 pub unk_12: i32, 2058 pub inputtype: SceUtilityOskInputType, 2059 pub lines: i32, 2060 pub unk_24: i32, 2061 pub desc: *mut u16, 2062 pub intext: *mut u16, 2063 pub outtextlength: i32, 2064 pub outtext: *mut u16, 2065 pub result: SceUtilityOskResult, 2066 pub outtextlimit: i32, 2067 } 2068 2069 pub struct SceUtilityOskParams { 2070 pub base: UtilityDialogCommon, 2071 pub datacount: i32, 2072 pub data: *mut SceUtilityOskData, 2073 pub state: SceUtilityOskState, 2074 pub unk_60: i32, 2075 } 2076 2077 pub struct SceNetMallocStat { 2078 pub pool: i32, 2079 pub maximum: i32, 2080 pub free: i32, 2081 } 2082 2083 pub struct SceNetAdhocctlAdhocId { 2084 pub unknown: i32, 2085 pub adhoc_id: [u8; 9usize], 2086 pub unk: [u8; 3usize], 2087 } 2088 2089 pub struct SceNetAdhocctlScanInfo { 2090 pub next: *mut SceNetAdhocctlScanInfo, 2091 pub channel: i32, 2092 pub name: [u8; 8usize], 2093 pub bssid: [u8; 6usize], 2094 pub unknown: [u8; 2usize], 2095 pub unknown2: i32, 2096 } 2097 2098 pub struct SceNetAdhocctlGameModeInfo { 2099 pub count: i32, 2100 pub macs: [[u8; 6usize]; 16usize], 2101 } 2102 2103 pub struct SceNetAdhocPtpStat { 2104 pub next: *mut SceNetAdhocPtpStat, 2105 pub ptp_id: i32, 2106 pub mac: [u8; 6usize], 2107 pub peermac: [u8; 6usize], 2108 pub port: u16, 2109 pub peerport: u16, 2110 pub sent_data: u32, 2111 pub rcvd_data: u32, 2112 pub state: ScePspnetAdhocPtpState, 2113 } 2114 2115 pub struct SceNetAdhocPdpStat { 2116 pub next: *mut SceNetAdhocPdpStat, 2117 pub pdp_id: i32, 2118 pub mac: [u8; 6usize], 2119 pub port: u16, 2120 pub rcvd_data: u32, 2121 } 2122 2123 pub struct AdhocPoolStat { 2124 pub size: i32, 2125 pub maxsize: i32, 2126 pub freesize: i32, 2127 } 2128 } 2129 2130 s_no_extra_traits! { 2131 #[allow(missing_debug_implementations)] 2132 pub struct GeContext { 2133 pub context: [u32; 512], 2134 } 2135 2136 #[allow(missing_debug_implementations)] 2137 pub struct SceKernelUtilsSha1Context { 2138 pub h: [u32; 5usize], 2139 pub us_remains: u16, 2140 pub us_computed: u16, 2141 pub ull_total_len: u64, 2142 pub buf: [u8; 64usize], 2143 } 2144 2145 #[allow(missing_debug_implementations)] 2146 pub struct SceKernelUtilsMt19937Context { 2147 pub count: u32, 2148 pub state: [u32; 624usize], 2149 } 2150 2151 #[allow(missing_debug_implementations)] 2152 pub struct SceKernelUtilsMd5Context { 2153 pub h: [u32; 4usize], 2154 pub pad: u32, 2155 pub us_remains: u16, 2156 pub us_computed: u16, 2157 pub ull_total_len: u64, 2158 pub buf: [u8; 64usize], 2159 } 2160 2161 #[allow(missing_debug_implementations)] 2162 pub struct SceIoDirent { 2163 pub d_stat: SceIoStat, 2164 pub d_name: [u8; 256usize], 2165 pub d_private: *mut c_void, 2166 pub dummy: i32, 2167 } 2168 2169 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2170 pub struct ScePspFRect { 2171 pub x: f32, 2172 pub y: f32, 2173 pub w: f32, 2174 pub h: f32, 2175 } 2176 2177 #[repr(align(16))] 2178 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2179 pub struct ScePspFVector3 { 2180 pub x: f32, 2181 pub y: f32, 2182 pub z: f32, 2183 } 2184 2185 #[repr(align(16))] 2186 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2187 pub struct ScePspFVector4 { 2188 pub x: f32, 2189 pub y: f32, 2190 pub z: f32, 2191 pub w: f32, 2192 } 2193 2194 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2195 pub struct ScePspFVector4Unaligned { 2196 pub x: f32, 2197 pub y: f32, 2198 pub z: f32, 2199 pub w: f32, 2200 } 2201 2202 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2203 pub struct ScePspFVector2 { 2204 pub x: f32, 2205 pub y: f32, 2206 } 2207 2208 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2209 pub struct ScePspFMatrix2 { 2210 pub x: ScePspFVector2, 2211 pub y: ScePspFVector2, 2212 } 2213 2214 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2215 pub struct ScePspFMatrix3 { 2216 pub x: ScePspFVector3, 2217 pub y: ScePspFVector3, 2218 pub z: ScePspFVector3, 2219 } 2220 2221 #[cfg_attr(feature = "extra_traits", derive(Debug))] 2222 #[repr(align(16))] 2223 pub struct ScePspFMatrix4 { 2224 pub x: ScePspFVector4, 2225 pub y: ScePspFVector4, 2226 pub z: ScePspFVector4, 2227 pub w: ScePspFVector4, 2228 } 2229 2230 #[allow(missing_debug_implementations)] 2231 pub struct ScePspFMatrix4Unaligned { 2232 pub x: ScePspFVector4, 2233 pub y: ScePspFVector4, 2234 pub z: ScePspFVector4, 2235 pub w: ScePspFVector4, 2236 } 2237 2238 #[allow(missing_debug_implementations)] 2239 pub union ScePspVector3 { 2240 pub fv: ScePspFVector3, 2241 pub iv: ScePspIVector3, 2242 pub f: [f32; 3usize], 2243 pub i: [i32; 3usize], 2244 } 2245 2246 #[allow(missing_debug_implementations)] 2247 pub union ScePspVector4 { 2248 pub fv: ScePspFVector4, 2249 pub iv: ScePspIVector4, 2250 pub qw: u128, 2251 pub f: [f32; 4usize], 2252 pub i: [i32; 4usize], 2253 } 2254 2255 #[allow(missing_debug_implementations)] 2256 pub union ScePspMatrix2 { 2257 pub fm: ScePspFMatrix2, 2258 pub im: ScePspIMatrix2, 2259 pub fv: [ScePspFVector2; 2usize], 2260 pub iv: [ScePspIVector2; 2usize], 2261 pub v: [ScePspVector2; 2usize], 2262 pub f: [[f32; 2usize]; 2usize], 2263 pub i: [[i32; 2usize]; 2usize], 2264 } 2265 2266 #[allow(missing_debug_implementations)] 2267 pub union ScePspMatrix3 { 2268 pub fm: ScePspFMatrix3, 2269 pub im: ScePspIMatrix3, 2270 pub fv: [ScePspFVector3; 3usize], 2271 pub iv: [ScePspIVector3; 3usize], 2272 pub v: [ScePspVector3; 3usize], 2273 pub f: [[f32; 3usize]; 3usize], 2274 pub i: [[i32; 3usize]; 3usize], 2275 } 2276 2277 #[allow(missing_debug_implementations)] 2278 pub union ScePspVector2 { 2279 pub fv: ScePspFVector2, 2280 pub iv: ScePspIVector2, 2281 pub f: [f32; 2usize], 2282 pub i: [i32; 2usize], 2283 } 2284 2285 #[allow(missing_debug_implementations)] 2286 pub union ScePspMatrix4 { 2287 pub fm: ScePspFMatrix4, 2288 pub im: ScePspIMatrix4, 2289 pub fv: [ScePspFVector4; 4usize], 2290 pub iv: [ScePspIVector4; 4usize], 2291 pub v: [ScePspVector4; 4usize], 2292 pub f: [[f32; 4usize]; 4usize], 2293 pub i: [[i32; 4usize]; 4usize], 2294 } 2295 2296 #[allow(missing_debug_implementations)] 2297 pub struct Key { 2298 pub key_type: KeyType, 2299 pub name: [u8; 256usize], 2300 pub name_len: u32, 2301 pub unk2: u32, 2302 pub unk3: u32, 2303 } 2304 2305 #[allow(missing_debug_implementations)] 2306 pub struct UtilityMsgDialogParams { 2307 pub base: UtilityDialogCommon, 2308 pub unknown: i32, 2309 pub mode: UtilityMsgDialogMode, 2310 pub error_value: u32, 2311 pub message: [u8; 512usize], 2312 pub options: i32, 2313 pub button_pressed: UtilityMsgDialogPressed, 2314 } 2315 2316 #[allow(missing_debug_implementations)] 2317 pub union UtilityNetData { 2318 pub as_uint: u32, 2319 pub as_string: [u8; 128usize], 2320 } 2321 2322 #[allow(missing_debug_implementations)] 2323 pub struct UtilitySavedataSFOParam { 2324 pub title: [u8; 128usize], 2325 pub savedata_title: [u8; 128usize], 2326 pub detail: [u8; 1024usize], 2327 pub parental_level: u8, 2328 pub unknown: [u8; 3usize], 2329 } 2330 2331 #[allow(missing_debug_implementations)] 2332 pub struct SceUtilitySavedataParam { 2333 pub base: UtilityDialogCommon, 2334 pub mode: UtilitySavedataMode, 2335 pub unknown1: i32, 2336 pub overwrite: i32, 2337 pub game_name: [u8; 13usize], 2338 pub reserved: [u8; 3usize], 2339 pub save_name: [u8; 20usize], 2340 pub save_name_list: *mut [u8; 20usize], 2341 pub file_name: [u8; 13usize], 2342 pub reserved1: [u8; 3usize], 2343 pub data_buf: *mut c_void, 2344 pub data_buf_size: usize, 2345 pub data_size: usize, 2346 pub sfo_param: UtilitySavedataSFOParam, 2347 pub icon0_file_data: UtilitySavedataFileData, 2348 pub icon1_file_data: UtilitySavedataFileData, 2349 pub pic1_file_data: UtilitySavedataFileData, 2350 pub snd0_file_data: UtilitySavedataFileData, 2351 pub new_data: *mut UtilitySavedataListSaveNewData, 2352 pub focus: UtilitySavedataFocus, 2353 pub unknown2: [i32; 4usize], 2354 pub key: [u8; 16], 2355 pub unknown3: [u8; 20], 2356 } 2357 2358 #[allow(missing_debug_implementations)] 2359 pub struct SceNetAdhocctlPeerInfo { 2360 pub next: *mut SceNetAdhocctlPeerInfo, 2361 pub nickname: [u8; 128usize], 2362 pub mac: [u8; 6usize], 2363 pub unknown: [u8; 6usize], 2364 pub timestamp: u32, 2365 } 2366 2367 #[allow(missing_debug_implementations)] 2368 pub struct SceNetAdhocctlParams { 2369 pub channel: i32, 2370 pub name: [u8; 8usize], 2371 pub bssid: [u8; 6usize], 2372 pub nickname: [u8; 128usize], 2373 } 2374 2375 #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] 2376 pub union SceNetApctlInfo { 2377 pub name: [u8; 64usize], 2378 pub bssid: [u8; 6usize], 2379 pub ssid: [u8; 32usize], 2380 pub ssid_length: u32, 2381 pub security_type: u32, 2382 pub strength: u8, 2383 pub channel: u8, 2384 pub power_save: u8, 2385 pub ip: [u8; 16usize], 2386 pub sub_net_mask: [u8; 16usize], 2387 pub gateway: [u8; 16usize], 2388 pub primary_dns: [u8; 16usize], 2389 pub secondary_dns: [u8; 16usize], 2390 pub use_proxy: u32, 2391 pub proxy_url: [u8; 128usize], 2392 pub proxy_port: u16, 2393 pub eap_type: u32, 2394 pub start_browser: u32, 2395 pub wifisp: u32, 2396 } 2397 } 2398 2399 pub const INT_MIN: c_int = -2147483648; 2400 pub const INT_MAX: c_int = 2147483647; 2401 2402 pub const AUDIO_VOLUME_MAX: u32 = 0x8000; 2403 pub const AUDIO_CHANNEL_MAX: u32 = 8; 2404 pub const AUDIO_NEXT_CHANNEL: i32 = -1; 2405 pub const AUDIO_SAMPLE_MIN: u32 = 64; 2406 pub const AUDIO_SAMPLE_MAX: u32 = 65472; 2407 2408 pub const PSP_CTRL_SELECT: i32 = 0x000001; 2409 pub const PSP_CTRL_START: i32 = 0x000008; 2410 pub const PSP_CTRL_UP: i32 = 0x000010; 2411 pub const PSP_CTRL_RIGHT: i32 = 0x000020; 2412 pub const PSP_CTRL_DOWN: i32 = 0x000040; 2413 pub const PSP_CTRL_LEFT: i32 = 0x000080; 2414 pub const PSP_CTRL_LTRIGGER: i32 = 0x000100; 2415 pub const PSP_CTRL_RTRIGGER: i32 = 0x000200; 2416 pub const PSP_CTRL_TRIANGLE: i32 = 0x001000; 2417 pub const PSP_CTRL_CIRCLE: i32 = 0x002000; 2418 pub const PSP_CTRL_CROSS: i32 = 0x004000; 2419 pub const PSP_CTRL_SQUARE: i32 = 0x008000; 2420 pub const PSP_CTRL_HOME: i32 = 0x010000; 2421 pub const PSP_CTRL_HOLD: i32 = 0x020000; 2422 pub const PSP_CTRL_NOTE: i32 = 0x800000; 2423 pub const PSP_CTRL_SCREEN: i32 = 0x400000; 2424 pub const PSP_CTRL_VOLUP: i32 = 0x100000; 2425 pub const PSP_CTRL_VOLDOWN: i32 = 0x200000; 2426 pub const PSP_CTRL_WLAN_UP: i32 = 0x040000; 2427 pub const PSP_CTRL_REMOTE: i32 = 0x080000; 2428 pub const PSP_CTRL_DISC: i32 = 0x1000000; 2429 pub const PSP_CTRL_MS: i32 = 0x2000000; 2430 2431 pub const USB_CAM_PID: i32 = 0x282; 2432 pub const USB_BUS_DRIVER_NAME: &str = "USBBusDriver"; 2433 pub const USB_CAM_DRIVER_NAME: &str = "USBCamDriver"; 2434 pub const USB_CAM_MIC_DRIVER_NAME: &str = "USBCamMicDriver"; 2435 pub const USB_STOR_DRIVER_NAME: &str = "USBStor_Driver"; 2436 2437 pub const ACTIVATED: i32 = 0x200; 2438 pub const CONNECTED: i32 = 0x020; 2439 pub const ESTABLISHED: i32 = 0x002; 2440 2441 pub const USB_CAM_FLIP: i32 = 1; 2442 pub const USB_CAM_MIRROR: i32 = 0x100; 2443 2444 pub const THREAD_ATTR_VFPU: i32 = 0x00004000; 2445 pub const THREAD_ATTR_USER: i32 = 0x80000000; 2446 pub const THREAD_ATTR_USBWLAN: i32 = 0xa0000000; 2447 pub const THREAD_ATTR_VSH: i32 = 0xc0000000; 2448 pub const THREAD_ATTR_SCRATCH_SRAM: i32 = 0x00008000; 2449 pub const THREAD_ATTR_NO_FILLSTACK: i32 = 0x00100000; 2450 pub const THREAD_ATTR_CLEAR_STACK: i32 = 0x00200000; 2451 2452 pub const EVENT_WAIT_MULTIPLE: i32 = 0x200; 2453 2454 pub const EVENT_WAIT_AND: i32 = 0; 2455 pub const EVENT_WAIT_OR: i32 = 1; 2456 pub const EVENT_WAIT_CLEAR: i32 = 0x20; 2457 2458 pub const POWER_INFO_POWER_SWITCH: i32 = 0x80000000; 2459 pub const POWER_INFO_HOLD_SWITCH: i32 = 0x40000000; 2460 pub const POWER_INFO_STANDBY: i32 = 0x00080000; 2461 pub const POWER_INFO_RESUME_COMPLETE: i32 = 0x00040000; 2462 pub const POWER_INFO_RESUMING: i32 = 0x00020000; 2463 pub const POWER_INFO_SUSPENDING: i32 = 0x00010000; 2464 pub const POWER_INFO_AC_POWER: i32 = 0x00001000; 2465 pub const POWER_INFO_BATTERY_LOW: i32 = 0x00000100; 2466 pub const POWER_INFO_BATTERY_EXIST: i32 = 0x00000080; 2467 pub const POWER_INFO_BATTERY_POWER: i32 = 0x0000007; 2468 2469 pub const FIO_S_IFLNK: i32 = 0x4000; 2470 pub const FIO_S_IFDIR: i32 = 0x1000; 2471 pub const FIO_S_IFREG: i32 = 0x2000; 2472 pub const FIO_S_ISUID: i32 = 0x0800; 2473 pub const FIO_S_ISGID: i32 = 0x0400; 2474 pub const FIO_S_ISVTX: i32 = 0x0200; 2475 pub const FIO_S_IRUSR: i32 = 0x0100; 2476 pub const FIO_S_IWUSR: i32 = 0x0080; 2477 pub const FIO_S_IXUSR: i32 = 0x0040; 2478 pub const FIO_S_IRGRP: i32 = 0x0020; 2479 pub const FIO_S_IWGRP: i32 = 0x0010; 2480 pub const FIO_S_IXGRP: i32 = 0x0008; 2481 pub const FIO_S_IROTH: i32 = 0x0004; 2482 pub const FIO_S_IWOTH: i32 = 0x0002; 2483 pub const FIO_S_IXOTH: i32 = 0x0001; 2484 2485 pub const FIO_SO_IFLNK: i32 = 0x0008; 2486 pub const FIO_SO_IFDIR: i32 = 0x0010; 2487 pub const FIO_SO_IFREG: i32 = 0x0020; 2488 pub const FIO_SO_IROTH: i32 = 0x0004; 2489 pub const FIO_SO_IWOTH: i32 = 0x0002; 2490 pub const FIO_SO_IXOTH: i32 = 0x0001; 2491 2492 pub const PSP_O_RD_ONLY: i32 = 0x0001; 2493 pub const PSP_O_WR_ONLY: i32 = 0x0002; 2494 pub const PSP_O_RD_WR: i32 = 0x0003; 2495 pub const PSP_O_NBLOCK: i32 = 0x0004; 2496 pub const PSP_O_DIR: i32 = 0x0008; 2497 pub const PSP_O_APPEND: i32 = 0x0100; 2498 pub const PSP_O_CREAT: i32 = 0x0200; 2499 pub const PSP_O_TRUNC: i32 = 0x0400; 2500 pub const PSP_O_EXCL: i32 = 0x0800; 2501 pub const PSP_O_NO_WAIT: i32 = 0x8000; 2502 2503 pub const UMD_NOT_PRESENT: i32 = 0x01; 2504 pub const UMD_PRESENT: i32 = 0x02; 2505 pub const UMD_CHANGED: i32 = 0x04; 2506 pub const UMD_INITING: i32 = 0x08; 2507 pub const UMD_INITED: i32 = 0x10; 2508 pub const UMD_READY: i32 = 0x20; 2509 2510 pub const PLAY_PAUSE: i32 = 0x1; 2511 pub const FORWARD: i32 = 0x4; 2512 pub const BACK: i32 = 0x8; 2513 pub const VOL_UP: i32 = 0x10; 2514 pub const VOL_DOWN: i32 = 0x20; 2515 pub const HOLD: i32 = 0x80; 2516 2517 pub const GU_PI: f32 = 3.141593; 2518 2519 pub const GU_TEXTURE_8BIT: i32 = 1; 2520 pub const GU_TEXTURE_16BIT: i32 = 2; 2521 pub const GU_TEXTURE_32BITF: i32 = 3; 2522 pub const GU_COLOR_5650: i32 = 4 << 2; 2523 pub const GU_COLOR_5551: i32 = 5 << 2; 2524 pub const GU_COLOR_4444: i32 = 6 << 2; 2525 pub const GU_COLOR_8888: i32 = 7 << 2; 2526 pub const GU_NORMAL_8BIT: i32 = 1 << 5; 2527 pub const GU_NORMAL_16BIT: i32 = 2 << 5; 2528 pub const GU_NORMAL_32BITF: i32 = 3 << 5; 2529 pub const GU_VERTEX_8BIT: i32 = 1 << 7; 2530 pub const GU_VERTEX_16BIT: i32 = 2 << 7; 2531 pub const GU_VERTEX_32BITF: i32 = 3 << 7; 2532 pub const GU_WEIGHT_8BIT: i32 = 1 << 9; 2533 pub const GU_WEIGHT_16BIT: i32 = 2 << 9; 2534 pub const GU_WEIGHT_32BITF: i32 = 3 << 9; 2535 pub const GU_INDEX_8BIT: i32 = 1 << 11; 2536 pub const GU_INDEX_16BIT: i32 = 2 << 11; 2537 pub const GU_WEIGHTS1: i32 = (((1 - 1) & 7) << 14) as i32; 2538 pub const GU_WEIGHTS2: i32 = (((2 - 1) & 7) << 14) as i32; 2539 pub const GU_WEIGHTS3: i32 = (((3 - 1) & 7) << 14) as i32; 2540 pub const GU_WEIGHTS4: i32 = (((4 - 1) & 7) << 14) as i32; 2541 pub const GU_WEIGHTS5: i32 = (((5 - 1) & 7) << 14) as i32; 2542 pub const GU_WEIGHTS6: i32 = (((6 - 1) & 7) << 14) as i32; 2543 pub const GU_WEIGHTS7: i32 = (((7 - 1) & 7) << 14) as i32; 2544 pub const GU_WEIGHTS8: i32 = (((8 - 1) & 7) << 14) as i32; 2545 pub const GU_VERTICES1: i32 = (((1 - 1) & 7) << 18) as i32; 2546 pub const GU_VERTICES2: i32 = (((2 - 1) & 7) << 18) as i32; 2547 pub const GU_VERTICES3: i32 = (((3 - 1) & 7) << 18) as i32; 2548 pub const GU_VERTICES4: i32 = (((4 - 1) & 7) << 18) as i32; 2549 pub const GU_VERTICES5: i32 = (((5 - 1) & 7) << 18) as i32; 2550 pub const GU_VERTICES6: i32 = (((6 - 1) & 7) << 18) as i32; 2551 pub const GU_VERTICES7: i32 = (((7 - 1) & 7) << 18) as i32; 2552 pub const GU_VERTICES8: i32 = (((8 - 1) & 7) << 18) as i32; 2553 pub const GU_TRANSFORM_2D: i32 = 1 << 23; 2554 pub const GU_TRANSFORM_3D: i32 = 0; 2555 2556 pub const GU_COLOR_BUFFER_BIT: i32 = 1; 2557 pub const GU_STENCIL_BUFFER_BIT: i32 = 2; 2558 pub const GU_DEPTH_BUFFER_BIT: i32 = 4; 2559 pub const GU_FAST_CLEAR_BIT: i32 = 16; 2560 2561 pub const GU_AMBIENT: i32 = 1; 2562 pub const GU_DIFFUSE: i32 = 2; 2563 pub const GU_SPECULAR: i32 = 4; 2564 pub const GU_UNKNOWN_LIGHT_COMPONENT: i32 = 8; 2565 2566 pub const SYSTEM_REGISTRY: [u8; 7] = *b"/system"; 2567 pub const REG_KEYNAME_SIZE: u32 = 27; 2568 2569 pub const UTILITY_MSGDIALOG_ERROR: i32 = 0; 2570 pub const UTILITY_MSGDIALOG_TEXT: i32 = 1; 2571 pub const UTILITY_MSGDIALOG_YES_NO_BUTTONS: i32 = 0x10; 2572 pub const UTILITY_MSGDIALOG_DEFAULT_NO: i32 = 0x100; 2573 2574 pub const UTILITY_HTMLVIEWER_OPEN_SCE_START_PAGE: i32 = 0x000001; 2575 pub const UTILITY_HTMLVIEWER_DISABLE_STARTUP_LIMITS: i32 = 0x000002; 2576 pub const UTILITY_HTMLVIEWER_DISABLE_EXIT_DIALOG: i32 = 0x000004; 2577 pub const UTILITY_HTMLVIEWER_DISABLE_CURSOR: i32 = 0x000008; 2578 pub const UTILITY_HTMLVIEWER_DISABLE_DOWNLOAD_COMPLETE_DIALOG: i32 = 0x000010; 2579 pub const UTILITY_HTMLVIEWER_DISABLE_DOWNLOAD_START_DIALOG: i32 = 0x000020; 2580 pub const UTILITY_HTMLVIEWER_DISABLE_DOWNLOAD_DESTINATION_DIALOG: i32 = 0x000040; 2581 pub const UTILITY_HTMLVIEWER_LOCK_DOWNLOAD_DESTINATION_DIALOG: i32 = 0x000080; 2582 pub const UTILITY_HTMLVIEWER_DISABLE_TAB_DISPLAY: i32 = 0x000100; 2583 pub const UTILITY_HTMLVIEWER_ENABLE_ANALOG_HOLD: i32 = 0x000200; 2584 pub const UTILITY_HTMLVIEWER_ENABLE_FLASH: i32 = 0x000400; 2585 pub const UTILITY_HTMLVIEWER_DISABLE_LRTRIGGER: i32 = 0x000800; 2586 2587 extern "C" { 2588 pub fn sceAudioChReserve(channel: i32, sample_count: i32, format: AudioFormat) -> i32; 2589 pub fn sceAudioChRelease(channel: i32) -> i32; 2590 pub fn sceAudioOutput(channel: i32, vol: i32, buf: *mut c_void) -> i32; 2591 pub fn sceAudioOutputBlocking(channel: i32, vol: i32, buf: *mut c_void) -> i32; 2592 pub fn sceAudioOutputPanned( 2593 channel: i32, 2594 left_vol: i32, 2595 right_vol: i32, 2596 buf: *mut c_void, 2597 ) -> i32; 2598 pub fn sceAudioOutputPannedBlocking( 2599 channel: i32, 2600 left_vol: i32, 2601 right_vol: i32, 2602 buf: *mut c_void, 2603 ) -> i32; 2604 pub fn sceAudioGetChannelRestLen(channel: i32) -> i32; 2605 pub fn sceAudioGetChannelRestLength(channel: i32) -> i32; 2606 pub fn sceAudioSetChannelDataLen(channel: i32, sample_count: i32) -> i32; 2607 pub fn sceAudioChangeChannelConfig(channel: i32, format: AudioFormat) -> i32; 2608 pub fn sceAudioChangeChannelVolume(channel: i32, left_vol: i32, right_vol: i32) -> i32; 2609 pub fn sceAudioOutput2Reserve(sample_count: i32) -> i32; 2610 pub fn sceAudioOutput2Release() -> i32; 2611 pub fn sceAudioOutput2ChangeLength(sample_count: i32) -> i32; 2612 pub fn sceAudioOutput2OutputBlocking(vol: i32, buf: *mut c_void) -> i32; 2613 pub fn sceAudioOutput2GetRestSample() -> i32; 2614 pub fn sceAudioSRCChReserve( 2615 sample_count: i32, 2616 freq: AudioOutputFrequency, 2617 channels: i32, 2618 ) -> i32; 2619 pub fn sceAudioSRCChRelease() -> i32; 2620 pub fn sceAudioSRCOutputBlocking(vol: i32, buf: *mut c_void) -> i32; 2621 pub fn sceAudioInputInit(unknown1: i32, gain: i32, unknown2: i32) -> i32; 2622 pub fn sceAudioInputInitEx(params: *mut AudioInputParams) -> i32; 2623 pub fn sceAudioInputBlocking(sample_count: i32, freq: AudioInputFrequency, buf: *mut c_void); 2624 pub fn sceAudioInput(sample_count: i32, freq: AudioInputFrequency, buf: *mut c_void); 2625 pub fn sceAudioGetInputLength() -> i32; 2626 pub fn sceAudioWaitInputEnd() -> i32; 2627 pub fn sceAudioPollInputEnd() -> i32; 2628 2629 pub fn sceAtracGetAtracID(ui_codec_type: u32) -> i32; 2630 pub fn sceAtracSetDataAndGetID(buf: *mut c_void, bufsize: usize) -> i32; 2631 pub fn sceAtracDecodeData( 2632 atrac_id: i32, 2633 out_samples: *mut u16, 2634 out_n: *mut i32, 2635 out_end: *mut i32, 2636 out_remain_frame: *mut i32, 2637 ) -> i32; 2638 pub fn sceAtracGetRemainFrame(atrac_id: i32, out_remain_frame: *mut i32) -> i32; 2639 pub fn sceAtracGetStreamDataInfo( 2640 atrac_id: i32, 2641 write_pointer: *mut *mut u8, 2642 available_bytes: *mut u32, 2643 read_offset: *mut u32, 2644 ) -> i32; 2645 pub fn sceAtracAddStreamData(atrac_id: i32, bytes_to_add: u32) -> i32; 2646 pub fn sceAtracGetBitrate(atrac_id: i32, out_bitrate: *mut i32) -> i32; 2647 pub fn sceAtracSetLoopNum(atrac_id: i32, nloops: i32) -> i32; 2648 pub fn sceAtracReleaseAtracID(atrac_id: i32) -> i32; 2649 pub fn sceAtracGetNextSample(atrac_id: i32, out_n: *mut i32) -> i32; 2650 pub fn sceAtracGetMaxSample(atrac_id: i32, out_max: *mut i32) -> i32; 2651 pub fn sceAtracGetBufferInfoForReseting( 2652 atrac_id: i32, 2653 ui_sample: u32, 2654 pbuffer_info: *mut Atrac3BufferInfo, 2655 ) -> i32; 2656 pub fn sceAtracGetChannel(atrac_id: i32, pui_channel: *mut u32) -> i32; 2657 pub fn sceAtracGetInternalErrorInfo(atrac_id: i32, pi_result: *mut i32) -> i32; 2658 pub fn sceAtracGetLoopStatus( 2659 atrac_id: i32, 2660 pi_loop_num: *mut i32, 2661 pui_loop_status: *mut u32, 2662 ) -> i32; 2663 pub fn sceAtracGetNextDecodePosition(atrac_id: i32, pui_sample_position: *mut u32) -> i32; 2664 pub fn sceAtracGetSecondBufferInfo( 2665 atrac_id: i32, 2666 pui_position: *mut u32, 2667 pui_data_byte: *mut u32, 2668 ) -> i32; 2669 pub fn sceAtracGetSoundSample( 2670 atrac_id: i32, 2671 pi_end_sample: *mut i32, 2672 pi_loop_start_sample: *mut i32, 2673 pi_loop_end_sample: *mut i32, 2674 ) -> i32; 2675 pub fn sceAtracResetPlayPosition( 2676 atrac_id: i32, 2677 ui_sample: u32, 2678 ui_write_byte_first_buf: u32, 2679 ui_write_byte_second_buf: u32, 2680 ) -> i32; 2681 pub fn sceAtracSetData(atrac_id: i32, puc_buffer_addr: *mut u8, ui_buffer_byte: u32) -> i32; 2682 pub fn sceAtracSetHalfwayBuffer( 2683 atrac_id: i32, 2684 puc_buffer_addr: *mut u8, 2685 ui_read_byte: u32, 2686 ui_buffer_byte: u32, 2687 ) -> i32; 2688 pub fn sceAtracSetHalfwayBufferAndGetID( 2689 puc_buffer_addr: *mut u8, 2690 ui_read_byte: u32, 2691 ui_buffer_byte: u32, 2692 ) -> i32; 2693 pub fn sceAtracSetSecondBuffer( 2694 atrac_id: i32, 2695 puc_second_buffer_addr: *mut u8, 2696 ui_second_buffer_byte: u32, 2697 ) -> i32; 2698 2699 pub fn sceCtrlSetSamplingCycle(cycle: i32) -> i32; 2700 pub fn sceCtrlGetSamplingCycle(pcycle: *mut i32) -> i32; 2701 pub fn sceCtrlSetSamplingMode(mode: CtrlMode) -> i32; 2702 pub fn sceCtrlGetSamplingMode(pmode: *mut i32) -> i32; 2703 pub fn sceCtrlPeekBufferPositive(pad_data: *mut SceCtrlData, count: i32) -> i32; 2704 pub fn sceCtrlPeekBufferNegative(pad_data: *mut SceCtrlData, count: i32) -> i32; 2705 pub fn sceCtrlReadBufferPositive(pad_data: *mut SceCtrlData, count: i32) -> i32; 2706 pub fn sceCtrlReadBufferNegative(pad_data: *mut SceCtrlData, count: i32) -> i32; 2707 pub fn sceCtrlPeekLatch(latch_data: *mut SceCtrlLatch) -> i32; 2708 pub fn sceCtrlReadLatch(latch_data: *mut SceCtrlLatch) -> i32; 2709 pub fn sceCtrlSetIdleCancelThreshold(idlereset: i32, idleback: i32) -> i32; 2710 pub fn sceCtrlGetIdleCancelThreshold(idlereset: *mut i32, idleback: *mut i32) -> i32; 2711 2712 pub fn sceDisplaySetMode(mode: DisplayMode, width: usize, height: usize) -> u32; 2713 pub fn sceDisplayGetMode(pmode: *mut i32, pwidth: *mut i32, pheight: *mut i32) -> i32; 2714 pub fn sceDisplaySetFrameBuf( 2715 top_addr: *const u8, 2716 buffer_width: usize, 2717 pixel_format: DisplayPixelFormat, 2718 sync: DisplaySetBufSync, 2719 ) -> u32; 2720 pub fn sceDisplayGetFrameBuf( 2721 top_addr: *mut *mut c_void, 2722 buffer_width: *mut usize, 2723 pixel_format: *mut DisplayPixelFormat, 2724 sync: DisplaySetBufSync, 2725 ) -> i32; 2726 pub fn sceDisplayGetVcount() -> u32; 2727 pub fn sceDisplayWaitVblank() -> i32; 2728 pub fn sceDisplayWaitVblankCB() -> i32; 2729 pub fn sceDisplayWaitVblankStart() -> i32; 2730 pub fn sceDisplayWaitVblankStartCB() -> i32; 2731 pub fn sceDisplayGetAccumulatedHcount() -> i32; 2732 pub fn sceDisplayGetCurrentHcount() -> i32; 2733 pub fn sceDisplayGetFramePerSec() -> f32; 2734 pub fn sceDisplayIsForeground() -> i32; 2735 pub fn sceDisplayIsVblank() -> i32; 2736 2737 pub fn sceGeEdramGetSize() -> u32; 2738 pub fn sceGeEdramGetAddr() -> *mut u8; 2739 pub fn sceGeEdramSetAddrTranslation(width: i32) -> i32; 2740 pub fn sceGeGetCmd(cmd: i32) -> u32; 2741 pub fn sceGeGetMtx(type_: GeMatrixType, matrix: *mut c_void) -> i32; 2742 pub fn sceGeGetStack(stack_id: i32, stack: *mut GeStack) -> i32; 2743 pub fn sceGeSaveContext(context: *mut GeContext) -> i32; 2744 pub fn sceGeRestoreContext(context: *const GeContext) -> i32; 2745 pub fn sceGeListEnQueue( 2746 list: *const c_void, 2747 stall: *mut c_void, 2748 cbid: i32, 2749 arg: *mut GeListArgs, 2750 ) -> i32; 2751 pub fn sceGeListEnQueueHead( 2752 list: *const c_void, 2753 stall: *mut c_void, 2754 cbid: i32, 2755 arg: *mut GeListArgs, 2756 ) -> i32; 2757 pub fn sceGeListDeQueue(qid: i32) -> i32; 2758 pub fn sceGeListUpdateStallAddr(qid: i32, stall: *mut c_void) -> i32; 2759 pub fn sceGeListSync(qid: i32, sync_type: i32) -> GeListState; 2760 pub fn sceGeDrawSync(sync_type: i32) -> GeListState; 2761 pub fn sceGeBreak(mode: i32, p_param: *mut GeBreakParam) -> i32; 2762 pub fn sceGeContinue() -> i32; 2763 pub fn sceGeSetCallback(cb: *mut GeCallbackData) -> i32; 2764 pub fn sceGeUnsetCallback(cbid: i32) -> i32; 2765 2766 pub fn sceKernelExitGame(); 2767 pub fn sceKernelRegisterExitCallback(id: SceUid) -> i32; 2768 pub fn sceKernelLoadExec(file: *const u8, param: *mut SceKernelLoadExecParam) -> i32; 2769 2770 pub fn sceKernelAllocPartitionMemory( 2771 partition: SceSysMemPartitionId, 2772 name: *const u8, 2773 type_: SceSysMemBlockTypes, 2774 size: u32, 2775 addr: *mut c_void, 2776 ) -> SceUid; 2777 pub fn sceKernelGetBlockHeadAddr(blockid: SceUid) -> *mut c_void; 2778 pub fn sceKernelFreePartitionMemory(blockid: SceUid) -> i32; 2779 pub fn sceKernelTotalFreeMemSize() -> usize; 2780 pub fn sceKernelMaxFreeMemSize() -> usize; 2781 pub fn sceKernelDevkitVersion() -> u32; 2782 pub fn sceKernelSetCompiledSdkVersion(version: u32) -> i32; 2783 pub fn sceKernelGetCompiledSdkVersion() -> u32; 2784 2785 pub fn sceKernelLibcTime(t: *mut i32) -> i32; 2786 pub fn sceKernelLibcClock() -> u32; 2787 pub fn sceKernelLibcGettimeofday(tp: *mut timeval, tzp: *mut timezone) -> i32; 2788 pub fn sceKernelDcacheWritebackAll(); 2789 pub fn sceKernelDcacheWritebackInvalidateAll(); 2790 pub fn sceKernelDcacheWritebackRange(p: *const c_void, size: u32); 2791 pub fn sceKernelDcacheWritebackInvalidateRange(p: *const c_void, size: u32); 2792 pub fn sceKernelDcacheInvalidateRange(p: *const c_void, size: u32); 2793 pub fn sceKernelIcacheInvalidateAll(); 2794 pub fn sceKernelIcacheInvalidateRange(p: *const c_void, size: u32); 2795 pub fn sceKernelUtilsMt19937Init(ctx: *mut SceKernelUtilsMt19937Context, seed: u32) -> i32; 2796 pub fn sceKernelUtilsMt19937UInt(ctx: *mut SceKernelUtilsMt19937Context) -> u32; 2797 pub fn sceKernelUtilsMd5Digest(data: *mut u8, size: u32, digest: *mut u8) -> i32; 2798 pub fn sceKernelUtilsMd5BlockInit(ctx: *mut SceKernelUtilsMd5Context) -> i32; 2799 pub fn sceKernelUtilsMd5BlockUpdate( 2800 ctx: *mut SceKernelUtilsMd5Context, 2801 data: *mut u8, 2802 size: u32, 2803 ) -> i32; 2804 pub fn sceKernelUtilsMd5BlockResult(ctx: *mut SceKernelUtilsMd5Context, digest: *mut u8) 2805 -> i32; 2806 pub fn sceKernelUtilsSha1Digest(data: *mut u8, size: u32, digest: *mut u8) -> i32; 2807 pub fn sceKernelUtilsSha1BlockInit(ctx: *mut SceKernelUtilsSha1Context) -> i32; 2808 pub fn sceKernelUtilsSha1BlockUpdate( 2809 ctx: *mut SceKernelUtilsSha1Context, 2810 data: *mut u8, 2811 size: u32, 2812 ) -> i32; 2813 pub fn sceKernelUtilsSha1BlockResult( 2814 ctx: *mut SceKernelUtilsSha1Context, 2815 digest: *mut u8, 2816 ) -> i32; 2817 2818 pub fn sceKernelRegisterSubIntrHandler( 2819 int_no: i32, 2820 no: i32, 2821 handler: *mut c_void, 2822 arg: *mut c_void, 2823 ) -> i32; 2824 pub fn sceKernelReleaseSubIntrHandler(int_no: i32, no: i32) -> i32; 2825 pub fn sceKernelEnableSubIntr(int_no: i32, no: i32) -> i32; 2826 pub fn sceKernelDisableSubIntr(int_no: i32, no: i32) -> i32; 2827 pub fn QueryIntrHandlerInfo( 2828 intr_code: SceUid, 2829 sub_intr_code: SceUid, 2830 data: *mut IntrHandlerOptionParam, 2831 ) -> i32; 2832 2833 pub fn sceKernelCpuSuspendIntr() -> u32; 2834 pub fn sceKernelCpuResumeIntr(flags: u32); 2835 pub fn sceKernelCpuResumeIntrWithSync(flags: u32); 2836 pub fn sceKernelIsCpuIntrSuspended(flags: u32) -> i32; 2837 pub fn sceKernelIsCpuIntrEnable() -> i32; 2838 2839 pub fn sceKernelLoadModule( 2840 path: *const u8, 2841 flags: i32, 2842 option: *mut SceKernelLMOption, 2843 ) -> SceUid; 2844 pub fn sceKernelLoadModuleMs( 2845 path: *const u8, 2846 flags: i32, 2847 option: *mut SceKernelLMOption, 2848 ) -> SceUid; 2849 pub fn sceKernelLoadModuleByID( 2850 fid: SceUid, 2851 flags: i32, 2852 option: *mut SceKernelLMOption, 2853 ) -> SceUid; 2854 pub fn sceKernelLoadModuleBufferUsbWlan( 2855 buf_size: usize, 2856 buf: *mut c_void, 2857 flags: i32, 2858 option: *mut SceKernelLMOption, 2859 ) -> SceUid; 2860 pub fn sceKernelStartModule( 2861 mod_id: SceUid, 2862 arg_size: usize, 2863 argp: *mut c_void, 2864 status: *mut i32, 2865 option: *mut SceKernelSMOption, 2866 ) -> i32; 2867 pub fn sceKernelStopModule( 2868 mod_id: SceUid, 2869 arg_size: usize, 2870 argp: *mut c_void, 2871 status: *mut i32, 2872 option: *mut SceKernelSMOption, 2873 ) -> i32; 2874 pub fn sceKernelUnloadModule(mod_id: SceUid) -> i32; 2875 pub fn sceKernelSelfStopUnloadModule(unknown: i32, arg_size: usize, argp: *mut c_void) -> i32; 2876 pub fn sceKernelStopUnloadSelfModule( 2877 arg_size: usize, 2878 argp: *mut c_void, 2879 status: *mut i32, 2880 option: *mut SceKernelSMOption, 2881 ) -> i32; 2882 pub fn sceKernelQueryModuleInfo(mod_id: SceUid, info: *mut SceKernelModuleInfo) -> i32; 2883 pub fn sceKernelGetModuleIdList( 2884 read_buf: *mut SceUid, 2885 read_buf_size: i32, 2886 id_count: *mut i32, 2887 ) -> i32; 2888 2889 pub fn sceKernelVolatileMemLock(unk: i32, ptr: *mut *mut c_void, size: *mut i32) -> i32; 2890 pub fn sceKernelVolatileMemTryLock(unk: i32, ptr: *mut *mut c_void, size: *mut i32) -> i32; 2891 pub fn sceKernelVolatileMemUnlock(unk: i32) -> i32; 2892 2893 pub fn sceKernelStdin() -> SceUid; 2894 pub fn sceKernelStdout() -> SceUid; 2895 pub fn sceKernelStderr() -> SceUid; 2896 2897 pub fn sceKernelGetThreadmanIdType(uid: SceUid) -> SceKernelIdListType; 2898 pub fn sceKernelCreateThread( 2899 name: *const u8, 2900 entry: SceKernelThreadEntry, 2901 init_priority: i32, 2902 stack_size: i32, 2903 attr: i32, 2904 option: *mut SceKernelThreadOptParam, 2905 ) -> SceUid; 2906 pub fn sceKernelDeleteThread(thid: SceUid) -> i32; 2907 pub fn sceKernelStartThread(id: SceUid, arg_len: usize, arg_p: *mut c_void) -> i32; 2908 pub fn sceKernelExitThread(status: i32) -> i32; 2909 pub fn sceKernelExitDeleteThread(status: i32) -> i32; 2910 pub fn sceKernelTerminateThread(thid: SceUid) -> i32; 2911 pub fn sceKernelTerminateDeleteThread(thid: SceUid) -> i32; 2912 pub fn sceKernelSuspendDispatchThread() -> i32; 2913 pub fn sceKernelResumeDispatchThread(state: i32) -> i32; 2914 pub fn sceKernelSleepThread() -> i32; 2915 pub fn sceKernelSleepThreadCB() -> i32; 2916 pub fn sceKernelWakeupThread(thid: SceUid) -> i32; 2917 pub fn sceKernelCancelWakeupThread(thid: SceUid) -> i32; 2918 pub fn sceKernelSuspendThread(thid: SceUid) -> i32; 2919 pub fn sceKernelResumeThread(thid: SceUid) -> i32; 2920 pub fn sceKernelWaitThreadEnd(thid: SceUid, timeout: *mut u32) -> i32; 2921 pub fn sceKernelWaitThreadEndCB(thid: SceUid, timeout: *mut u32) -> i32; 2922 pub fn sceKernelDelayThread(delay: u32) -> i32; 2923 pub fn sceKernelDelayThreadCB(delay: u32) -> i32; 2924 pub fn sceKernelDelaySysClockThread(delay: *mut SceKernelSysClock) -> i32; 2925 pub fn sceKernelDelaySysClockThreadCB(delay: *mut SceKernelSysClock) -> i32; 2926 pub fn sceKernelChangeCurrentThreadAttr(unknown: i32, attr: i32) -> i32; 2927 pub fn sceKernelChangeThreadPriority(thid: SceUid, priority: i32) -> i32; 2928 pub fn sceKernelRotateThreadReadyQueue(priority: i32) -> i32; 2929 pub fn sceKernelReleaseWaitThread(thid: SceUid) -> i32; 2930 pub fn sceKernelGetThreadId() -> i32; 2931 pub fn sceKernelGetThreadCurrentPriority() -> i32; 2932 pub fn sceKernelGetThreadExitStatus(thid: SceUid) -> i32; 2933 pub fn sceKernelCheckThreadStack() -> i32; 2934 pub fn sceKernelGetThreadStackFreeSize(thid: SceUid) -> i32; 2935 pub fn sceKernelReferThreadStatus(thid: SceUid, info: *mut SceKernelThreadInfo) -> i32; 2936 pub fn sceKernelReferThreadRunStatus( 2937 thid: SceUid, 2938 status: *mut SceKernelThreadRunStatus, 2939 ) -> i32; 2940 pub fn sceKernelCreateSema( 2941 name: *const u8, 2942 attr: u32, 2943 init_val: i32, 2944 max_val: i32, 2945 option: *mut SceKernelSemaOptParam, 2946 ) -> SceUid; 2947 pub fn sceKernelDeleteSema(sema_id: SceUid) -> i32; 2948 pub fn sceKernelSignalSema(sema_id: SceUid, signal: i32) -> i32; 2949 pub fn sceKernelWaitSema(sema_id: SceUid, signal: i32, timeout: *mut u32) -> i32; 2950 pub fn sceKernelWaitSemaCB(sema_id: SceUid, signal: i32, timeout: *mut u32) -> i32; 2951 pub fn sceKernelPollSema(sema_id: SceUid, signal: i32) -> i32; 2952 pub fn sceKernelReferSemaStatus(sema_id: SceUid, info: *mut SceKernelSemaInfo) -> i32; 2953 pub fn sceKernelCreateEventFlag( 2954 name: *const u8, 2955 attr: i32, 2956 bits: i32, 2957 opt: *mut SceKernelEventFlagOptParam, 2958 ) -> SceUid; 2959 pub fn sceKernelSetEventFlag(ev_id: SceUid, bits: u32) -> i32; 2960 pub fn sceKernelClearEventFlag(ev_id: SceUid, bits: u32) -> i32; 2961 pub fn sceKernelPollEventFlag(ev_id: SceUid, bits: u32, wait: i32, out_bits: *mut u32) -> i32; 2962 pub fn sceKernelWaitEventFlag( 2963 ev_id: SceUid, 2964 bits: u32, 2965 wait: i32, 2966 out_bits: *mut u32, 2967 timeout: *mut u32, 2968 ) -> i32; 2969 pub fn sceKernelWaitEventFlagCB( 2970 ev_id: SceUid, 2971 bits: u32, 2972 wait: i32, 2973 out_bits: *mut u32, 2974 timeout: *mut u32, 2975 ) -> i32; 2976 pub fn sceKernelDeleteEventFlag(ev_id: SceUid) -> i32; 2977 pub fn sceKernelReferEventFlagStatus(event: SceUid, status: *mut SceKernelEventFlagInfo) 2978 -> i32; 2979 pub fn sceKernelCreateMbx( 2980 name: *const u8, 2981 attr: u32, 2982 option: *mut SceKernelMbxOptParam, 2983 ) -> SceUid; 2984 pub fn sceKernelDeleteMbx(mbx_id: SceUid) -> i32; 2985 pub fn sceKernelSendMbx(mbx_id: SceUid, message: *mut c_void) -> i32; 2986 pub fn sceKernelReceiveMbx(mbx_id: SceUid, message: *mut *mut c_void, timeout: *mut u32) 2987 -> i32; 2988 pub fn sceKernelReceiveMbxCB( 2989 mbx_id: SceUid, 2990 message: *mut *mut c_void, 2991 timeout: *mut u32, 2992 ) -> i32; 2993 pub fn sceKernelPollMbx(mbx_id: SceUid, pmessage: *mut *mut c_void) -> i32; 2994 pub fn sceKernelCancelReceiveMbx(mbx_id: SceUid, num: *mut i32) -> i32; 2995 pub fn sceKernelReferMbxStatus(mbx_id: SceUid, info: *mut SceKernelMbxInfo) -> i32; 2996 pub fn sceKernelSetAlarm( 2997 clock: u32, 2998 handler: SceKernelAlarmHandler, 2999 common: *mut c_void, 3000 ) -> SceUid; 3001 pub fn sceKernelSetSysClockAlarm( 3002 clock: *mut SceKernelSysClock, 3003 handler: *mut SceKernelAlarmHandler, 3004 common: *mut c_void, 3005 ) -> SceUid; 3006 pub fn sceKernelCancelAlarm(alarm_id: SceUid) -> i32; 3007 pub fn sceKernelReferAlarmStatus(alarm_id: SceUid, info: *mut SceKernelAlarmInfo) -> i32; 3008 pub fn sceKernelCreateCallback( 3009 name: *const u8, 3010 func: SceKernelCallbackFunction, 3011 arg: *mut c_void, 3012 ) -> SceUid; 3013 pub fn sceKernelReferCallbackStatus(cb: SceUid, status: *mut SceKernelCallbackInfo) -> i32; 3014 pub fn sceKernelDeleteCallback(cb: SceUid) -> i32; 3015 pub fn sceKernelNotifyCallback(cb: SceUid, arg2: i32) -> i32; 3016 pub fn sceKernelCancelCallback(cb: SceUid) -> i32; 3017 pub fn sceKernelGetCallbackCount(cb: SceUid) -> i32; 3018 pub fn sceKernelCheckCallback() -> i32; 3019 pub fn sceKernelGetThreadmanIdList( 3020 type_: SceKernelIdListType, 3021 read_buf: *mut SceUid, 3022 read_buf_size: i32, 3023 id_count: *mut i32, 3024 ) -> i32; 3025 pub fn sceKernelReferSystemStatus(status: *mut SceKernelSystemStatus) -> i32; 3026 pub fn sceKernelCreateMsgPipe( 3027 name: *const u8, 3028 part: i32, 3029 attr: i32, 3030 unk1: *mut c_void, 3031 opt: *mut c_void, 3032 ) -> SceUid; 3033 pub fn sceKernelDeleteMsgPipe(uid: SceUid) -> i32; 3034 pub fn sceKernelSendMsgPipe( 3035 uid: SceUid, 3036 message: *mut c_void, 3037 size: u32, 3038 unk1: i32, 3039 unk2: *mut c_void, 3040 timeout: *mut u32, 3041 ) -> i32; 3042 pub fn sceKernelSendMsgPipeCB( 3043 uid: SceUid, 3044 message: *mut c_void, 3045 size: u32, 3046 unk1: i32, 3047 unk2: *mut c_void, 3048 timeout: *mut u32, 3049 ) -> i32; 3050 pub fn sceKernelTrySendMsgPipe( 3051 uid: SceUid, 3052 message: *mut c_void, 3053 size: u32, 3054 unk1: i32, 3055 unk2: *mut c_void, 3056 ) -> i32; 3057 pub fn sceKernelReceiveMsgPipe( 3058 uid: SceUid, 3059 message: *mut c_void, 3060 size: u32, 3061 unk1: i32, 3062 unk2: *mut c_void, 3063 timeout: *mut u32, 3064 ) -> i32; 3065 pub fn sceKernelReceiveMsgPipeCB( 3066 uid: SceUid, 3067 message: *mut c_void, 3068 size: u32, 3069 unk1: i32, 3070 unk2: *mut c_void, 3071 timeout: *mut u32, 3072 ) -> i32; 3073 pub fn sceKernelTryReceiveMsgPipe( 3074 uid: SceUid, 3075 message: *mut c_void, 3076 size: u32, 3077 unk1: i32, 3078 unk2: *mut c_void, 3079 ) -> i32; 3080 pub fn sceKernelCancelMsgPipe(uid: SceUid, send: *mut i32, recv: *mut i32) -> i32; 3081 pub fn sceKernelReferMsgPipeStatus(uid: SceUid, info: *mut SceKernelMppInfo) -> i32; 3082 pub fn sceKernelCreateVpl( 3083 name: *const u8, 3084 part: i32, 3085 attr: i32, 3086 size: u32, 3087 opt: *mut SceKernelVplOptParam, 3088 ) -> SceUid; 3089 pub fn sceKernelDeleteVpl(uid: SceUid) -> i32; 3090 pub fn sceKernelAllocateVpl( 3091 uid: SceUid, 3092 size: u32, 3093 data: *mut *mut c_void, 3094 timeout: *mut u32, 3095 ) -> i32; 3096 pub fn sceKernelAllocateVplCB( 3097 uid: SceUid, 3098 size: u32, 3099 data: *mut *mut c_void, 3100 timeout: *mut u32, 3101 ) -> i32; 3102 pub fn sceKernelTryAllocateVpl(uid: SceUid, size: u32, data: *mut *mut c_void) -> i32; 3103 pub fn sceKernelFreeVpl(uid: SceUid, data: *mut c_void) -> i32; 3104 pub fn sceKernelCancelVpl(uid: SceUid, num: *mut i32) -> i32; 3105 pub fn sceKernelReferVplStatus(uid: SceUid, info: *mut SceKernelVplInfo) -> i32; 3106 pub fn sceKernelCreateFpl( 3107 name: *const u8, 3108 part: i32, 3109 attr: i32, 3110 size: u32, 3111 blocks: u32, 3112 opt: *mut SceKernelFplOptParam, 3113 ) -> i32; 3114 pub fn sceKernelDeleteFpl(uid: SceUid) -> i32; 3115 pub fn sceKernelAllocateFpl(uid: SceUid, data: *mut *mut c_void, timeout: *mut u32) -> i32; 3116 pub fn sceKernelAllocateFplCB(uid: SceUid, data: *mut *mut c_void, timeout: *mut u32) -> i32; 3117 pub fn sceKernelTryAllocateFpl(uid: SceUid, data: *mut *mut c_void) -> i32; 3118 pub fn sceKernelFreeFpl(uid: SceUid, data: *mut c_void) -> i32; 3119 pub fn sceKernelCancelFpl(uid: SceUid, pnum: *mut i32) -> i32; 3120 pub fn sceKernelReferFplStatus(uid: SceUid, info: *mut SceKernelFplInfo) -> i32; 3121 pub fn sceKernelUSec2SysClock(usec: u32, clock: *mut SceKernelSysClock) -> i32; 3122 pub fn sceKernelUSec2SysClockWide(usec: u32) -> i64; 3123 pub fn sceKernelSysClock2USec( 3124 clock: *mut SceKernelSysClock, 3125 low: *mut u32, 3126 high: *mut u32, 3127 ) -> i32; 3128 pub fn sceKernelSysClock2USecWide(clock: i64, low: *mut u32, high: *mut u32) -> i32; 3129 pub fn sceKernelGetSystemTime(time: *mut SceKernelSysClock) -> i32; 3130 pub fn sceKernelGetSystemTimeWide() -> i64; 3131 pub fn sceKernelGetSystemTimeLow() -> u32; 3132 pub fn sceKernelCreateVTimer(name: *const u8, opt: *mut SceKernelVTimerOptParam) -> SceUid; 3133 pub fn sceKernelDeleteVTimer(uid: SceUid) -> i32; 3134 pub fn sceKernelGetVTimerBase(uid: SceUid, base: *mut SceKernelSysClock) -> i32; 3135 pub fn sceKernelGetVTimerBaseWide(uid: SceUid) -> i64; 3136 pub fn sceKernelGetVTimerTime(uid: SceUid, time: *mut SceKernelSysClock) -> i32; 3137 pub fn sceKernelGetVTimerTimeWide(uid: SceUid) -> i64; 3138 pub fn sceKernelSetVTimerTime(uid: SceUid, time: *mut SceKernelSysClock) -> i32; 3139 pub fn sceKernelSetVTimerTimeWide(uid: SceUid, time: i64) -> i64; 3140 pub fn sceKernelStartVTimer(uid: SceUid) -> i32; 3141 pub fn sceKernelStopVTimer(uid: SceUid) -> i32; 3142 pub fn sceKernelSetVTimerHandler( 3143 uid: SceUid, 3144 time: *mut SceKernelSysClock, 3145 handler: SceKernelVTimerHandler, 3146 common: *mut c_void, 3147 ) -> i32; 3148 pub fn sceKernelSetVTimerHandlerWide( 3149 uid: SceUid, 3150 time: i64, 3151 handler: SceKernelVTimerHandlerWide, 3152 common: *mut c_void, 3153 ) -> i32; 3154 pub fn sceKernelCancelVTimerHandler(uid: SceUid) -> i32; 3155 pub fn sceKernelReferVTimerStatus(uid: SceUid, info: *mut SceKernelVTimerInfo) -> i32; 3156 pub fn sceKernelRegisterThreadEventHandler( 3157 name: *const u8, 3158 thread_id: SceUid, 3159 mask: i32, 3160 handler: SceKernelThreadEventHandler, 3161 common: *mut c_void, 3162 ) -> SceUid; 3163 pub fn sceKernelReleaseThreadEventHandler(uid: SceUid) -> i32; 3164 pub fn sceKernelReferThreadEventHandlerStatus( 3165 uid: SceUid, 3166 info: *mut SceKernelThreadEventHandlerInfo, 3167 ) -> i32; 3168 pub fn sceKernelReferThreadProfiler() -> *mut DebugProfilerRegs; 3169 pub fn sceKernelReferGlobalProfiler() -> *mut DebugProfilerRegs; 3170 3171 pub fn sceUsbStart(driver_name: *const u8, size: i32, args: *mut c_void) -> i32; 3172 pub fn sceUsbStop(driver_name: *const u8, size: i32, args: *mut c_void) -> i32; 3173 pub fn sceUsbActivate(pid: u32) -> i32; 3174 pub fn sceUsbDeactivate(pid: u32) -> i32; 3175 pub fn sceUsbGetState() -> i32; 3176 pub fn sceUsbGetDrvState(driver_name: *const u8) -> i32; 3177 } 3178 3179 extern "C" { 3180 pub fn sceUsbCamSetupStill(param: *mut UsbCamSetupStillParam) -> i32; 3181 pub fn sceUsbCamSetupStillEx(param: *mut UsbCamSetupStillExParam) -> i32; 3182 pub fn sceUsbCamStillInputBlocking(buf: *mut u8, size: usize) -> i32; 3183 pub fn sceUsbCamStillInput(buf: *mut u8, size: usize) -> i32; 3184 pub fn sceUsbCamStillWaitInputEnd() -> i32; 3185 pub fn sceUsbCamStillPollInputEnd() -> i32; 3186 pub fn sceUsbCamStillCancelInput() -> i32; 3187 pub fn sceUsbCamStillGetInputLength() -> i32; 3188 pub fn sceUsbCamSetupVideo( 3189 param: *mut UsbCamSetupVideoParam, 3190 work_area: *mut c_void, 3191 work_area_size: i32, 3192 ) -> i32; 3193 pub fn sceUsbCamSetupVideoEx( 3194 param: *mut UsbCamSetupVideoExParam, 3195 work_area: *mut c_void, 3196 work_area_size: i32, 3197 ) -> i32; 3198 pub fn sceUsbCamStartVideo() -> i32; 3199 pub fn sceUsbCamStopVideo() -> i32; 3200 pub fn sceUsbCamReadVideoFrameBlocking(buf: *mut u8, size: usize) -> i32; 3201 pub fn sceUsbCamReadVideoFrame(buf: *mut u8, size: usize) -> i32; 3202 pub fn sceUsbCamWaitReadVideoFrameEnd() -> i32; 3203 pub fn sceUsbCamPollReadVideoFrameEnd() -> i32; 3204 pub fn sceUsbCamGetReadVideoFrameSize() -> i32; 3205 pub fn sceUsbCamSetSaturation(saturation: i32) -> i32; 3206 pub fn sceUsbCamSetBrightness(brightness: i32) -> i32; 3207 pub fn sceUsbCamSetContrast(contrast: i32) -> i32; 3208 pub fn sceUsbCamSetSharpness(sharpness: i32) -> i32; 3209 pub fn sceUsbCamSetImageEffectMode(effect_mode: UsbCamEffectMode) -> i32; 3210 pub fn sceUsbCamSetEvLevel(exposure_level: UsbCamEvLevel) -> i32; 3211 pub fn sceUsbCamSetReverseMode(reverse_flags: i32) -> i32; 3212 pub fn sceUsbCamSetZoom(zoom: i32) -> i32; 3213 pub fn sceUsbCamGetSaturation(saturation: *mut i32) -> i32; 3214 pub fn sceUsbCamGetBrightness(brightness: *mut i32) -> i32; 3215 pub fn sceUsbCamGetContrast(contrast: *mut i32) -> i32; 3216 pub fn sceUsbCamGetSharpness(sharpness: *mut i32) -> i32; 3217 pub fn sceUsbCamGetImageEffectMode(effect_mode: *mut UsbCamEffectMode) -> i32; 3218 pub fn sceUsbCamGetEvLevel(exposure_level: *mut UsbCamEvLevel) -> i32; 3219 pub fn sceUsbCamGetReverseMode(reverse_flags: *mut i32) -> i32; 3220 pub fn sceUsbCamGetZoom(zoom: *mut i32) -> i32; 3221 pub fn sceUsbCamAutoImageReverseSW(on: i32) -> i32; 3222 pub fn sceUsbCamGetAutoImageReverseState() -> i32; 3223 pub fn sceUsbCamGetLensDirection() -> i32; 3224 3225 pub fn sceUsbstorBootRegisterNotify(event_flag: SceUid) -> i32; 3226 pub fn sceUsbstorBootUnregisterNotify(event_flag: u32) -> i32; 3227 pub fn sceUsbstorBootSetCapacity(size: u32) -> i32; 3228 3229 pub fn scePowerRegisterCallback(slot: i32, cbid: SceUid) -> i32; 3230 pub fn scePowerUnregisterCallback(slot: i32) -> i32; 3231 pub fn scePowerIsPowerOnline() -> i32; 3232 pub fn scePowerIsBatteryExist() -> i32; 3233 pub fn scePowerIsBatteryCharging() -> i32; 3234 pub fn scePowerGetBatteryChargingStatus() -> i32; 3235 pub fn scePowerIsLowBattery() -> i32; 3236 pub fn scePowerGetBatteryLifePercent() -> i32; 3237 pub fn scePowerGetBatteryLifeTime() -> i32; 3238 pub fn scePowerGetBatteryTemp() -> i32; 3239 pub fn scePowerGetBatteryElec() -> i32; 3240 pub fn scePowerGetBatteryVolt() -> i32; 3241 pub fn scePowerSetCpuClockFrequency(cpufreq: i32) -> i32; 3242 pub fn scePowerSetBusClockFrequency(busfreq: i32) -> i32; 3243 pub fn scePowerGetCpuClockFrequency() -> i32; 3244 pub fn scePowerGetCpuClockFrequencyInt() -> i32; 3245 pub fn scePowerGetCpuClockFrequencyFloat() -> f32; 3246 pub fn scePowerGetBusClockFrequency() -> i32; 3247 pub fn scePowerGetBusClockFrequencyInt() -> i32; 3248 pub fn scePowerGetBusClockFrequencyFloat() -> f32; 3249 pub fn scePowerSetClockFrequency(pllfreq: i32, cpufreq: i32, busfreq: i32) -> i32; 3250 pub fn scePowerLock(unknown: i32) -> i32; 3251 pub fn scePowerUnlock(unknown: i32) -> i32; 3252 pub fn scePowerTick(t: PowerTick) -> i32; 3253 pub fn scePowerGetIdleTimer() -> i32; 3254 pub fn scePowerIdleTimerEnable(unknown: i32) -> i32; 3255 pub fn scePowerIdleTimerDisable(unknown: i32) -> i32; 3256 pub fn scePowerRequestStandby() -> i32; 3257 pub fn scePowerRequestSuspend() -> i32; 3258 3259 pub fn sceWlanDevIsPowerOn() -> i32; 3260 pub fn sceWlanGetSwitchState() -> i32; 3261 pub fn sceWlanGetEtherAddr(ether_addr: *mut u8) -> i32; 3262 3263 pub fn sceWlanDevAttach() -> i32; 3264 pub fn sceWlanDevDetach() -> i32; 3265 3266 pub fn sceRtcGetTickResolution() -> u32; 3267 pub fn sceRtcGetCurrentTick(tick: *mut u64) -> i32; 3268 pub fn sceRtcGetCurrentClock(tm: *mut ScePspDateTime, tz: i32) -> i32; 3269 pub fn sceRtcGetCurrentClockLocalTime(tm: *mut ScePspDateTime) -> i32; 3270 pub fn sceRtcConvertUtcToLocalTime(tick_utc: *const u64, tick_local: *mut u64) -> i32; 3271 pub fn sceRtcConvertLocalTimeToUTC(tick_local: *const u64, tick_utc: *mut u64) -> i32; 3272 pub fn sceRtcIsLeapYear(year: i32) -> i32; 3273 pub fn sceRtcGetDaysInMonth(year: i32, month: i32) -> i32; 3274 pub fn sceRtcGetDayOfWeek(year: i32, month: i32, day: i32) -> i32; 3275 pub fn sceRtcCheckValid(date: *const ScePspDateTime) -> i32; 3276 pub fn sceRtcSetTick(date: *mut ScePspDateTime, tick: *const u64) -> i32; 3277 pub fn sceRtcGetTick(date: *const ScePspDateTime, tick: *mut u64) -> i32; 3278 pub fn sceRtcCompareTick(tick1: *const u64, tick2: *const u64) -> i32; 3279 pub fn sceRtcTickAddTicks(dest_tick: *mut u64, src_tick: *const u64, num_ticks: u64) -> i32; 3280 pub fn sceRtcTickAddMicroseconds(dest_tick: *mut u64, src_tick: *const u64, num_ms: u64) 3281 -> i32; 3282 pub fn sceRtcTickAddSeconds(dest_tick: *mut u64, src_tick: *const u64, num_seconds: u64) 3283 -> i32; 3284 pub fn sceRtcTickAddMinutes(dest_tick: *mut u64, src_tick: *const u64, num_minutes: u64) 3285 -> i32; 3286 pub fn sceRtcTickAddHours(dest_tick: *mut u64, src_tick: *const u64, num_hours: u64) -> i32; 3287 pub fn sceRtcTickAddDays(dest_tick: *mut u64, src_tick: *const u64, num_days: u64) -> i32; 3288 pub fn sceRtcTickAddWeeks(dest_tick: *mut u64, src_tick: *const u64, num_weeks: u64) -> i32; 3289 pub fn sceRtcTickAddMonths(dest_tick: *mut u64, src_tick: *const u64, num_months: u64) -> i32; 3290 pub fn sceRtcTickAddYears(dest_tick: *mut u64, src_tick: *const u64, num_years: u64) -> i32; 3291 pub fn sceRtcSetTime_t(date: *mut ScePspDateTime, time: u32) -> i32; 3292 pub fn sceRtcGetTime_t(date: *const ScePspDateTime, time: *mut u32) -> i32; 3293 pub fn sceRtcSetTime64_t(date: *mut ScePspDateTime, time: u64) -> i32; 3294 pub fn sceRtcGetTime64_t(date: *const ScePspDateTime, time: *mut u64) -> i32; 3295 pub fn sceRtcSetDosTime(date: *mut ScePspDateTime, dos_time: u32) -> i32; 3296 pub fn sceRtcGetDosTime(date: *mut ScePspDateTime, dos_time: u32) -> i32; 3297 pub fn sceRtcSetWin32FileTime(date: *mut ScePspDateTime, time: *mut u64) -> i32; 3298 pub fn sceRtcGetWin32FileTime(date: *mut ScePspDateTime, time: *mut u64) -> i32; 3299 pub fn sceRtcParseDateTime(dest_tick: *mut u64, date_string: *const u8) -> i32; 3300 pub fn sceRtcFormatRFC3339( 3301 psz_date_time: *mut char, 3302 p_utc: *const u64, 3303 time_zone_minutes: i32, 3304 ) -> i32; 3305 pub fn sceRtcFormatRFC3339LocalTime(psz_date_time: *mut char, p_utc: *const u64) -> i32; 3306 pub fn sceRtcParseRFC3339(p_utc: *mut u64, psz_date_time: *const u8) -> i32; 3307 pub fn sceRtcFormatRFC2822( 3308 psz_date_time: *mut char, 3309 p_utc: *const u64, 3310 time_zone_minutes: i32, 3311 ) -> i32; 3312 pub fn sceRtcFormatRFC2822LocalTime(psz_date_time: *mut char, p_utc: *const u64) -> i32; 3313 3314 pub fn sceIoOpen(file: *const u8, flags: i32, permissions: IoPermissions) -> SceUid; 3315 pub fn sceIoOpenAsync(file: *const u8, flags: i32, permissions: IoPermissions) -> SceUid; 3316 pub fn sceIoClose(fd: SceUid) -> i32; 3317 pub fn sceIoCloseAsync(fd: SceUid) -> i32; 3318 pub fn sceIoRead(fd: SceUid, data: *mut c_void, size: u32) -> i32; 3319 pub fn sceIoReadAsync(fd: SceUid, data: *mut c_void, size: u32) -> i32; 3320 pub fn sceIoWrite(fd: SceUid, data: *const c_void, size: usize) -> i32; 3321 pub fn sceIoWriteAsync(fd: SceUid, data: *const c_void, size: u32) -> i32; 3322 pub fn sceIoLseek(fd: SceUid, offset: i64, whence: IoWhence) -> i64; 3323 pub fn sceIoLseekAsync(fd: SceUid, offset: i64, whence: IoWhence) -> i32; 3324 pub fn sceIoLseek32(fd: SceUid, offset: i32, whence: IoWhence) -> i32; 3325 pub fn sceIoLseek32Async(fd: SceUid, offset: i32, whence: IoWhence) -> i32; 3326 pub fn sceIoRemove(file: *const u8) -> i32; 3327 pub fn sceIoMkdir(dir: *const u8, mode: IoPermissions) -> i32; 3328 pub fn sceIoRmdir(path: *const u8) -> i32; 3329 pub fn sceIoChdir(path: *const u8) -> i32; 3330 pub fn sceIoRename(oldname: *const u8, newname: *const u8) -> i32; 3331 pub fn sceIoDopen(dirname: *const u8) -> SceUid; 3332 pub fn sceIoDread(fd: SceUid, dir: *mut SceIoDirent) -> i32; 3333 pub fn sceIoDclose(fd: SceUid) -> i32; 3334 pub fn sceIoDevctl( 3335 dev: *const u8, 3336 cmd: u32, 3337 indata: *mut c_void, 3338 inlen: i32, 3339 outdata: *mut c_void, 3340 outlen: i32, 3341 ) -> i32; 3342 pub fn sceIoAssign( 3343 dev1: *const u8, 3344 dev2: *const u8, 3345 dev3: *const u8, 3346 mode: IoAssignPerms, 3347 unk1: *mut c_void, 3348 unk2: i32, 3349 ) -> i32; 3350 pub fn sceIoUnassign(dev: *const u8) -> i32; 3351 pub fn sceIoGetstat(file: *const u8, stat: *mut SceIoStat) -> i32; 3352 pub fn sceIoChstat(file: *const u8, stat: *mut SceIoStat, bits: i32) -> i32; 3353 pub fn sceIoIoctl( 3354 fd: SceUid, 3355 cmd: u32, 3356 indata: *mut c_void, 3357 inlen: i32, 3358 outdata: *mut c_void, 3359 outlen: i32, 3360 ) -> i32; 3361 pub fn sceIoIoctlAsync( 3362 fd: SceUid, 3363 cmd: u32, 3364 indata: *mut c_void, 3365 inlen: i32, 3366 outdata: *mut c_void, 3367 outlen: i32, 3368 ) -> i32; 3369 pub fn sceIoSync(device: *const u8, unk: u32) -> i32; 3370 pub fn sceIoWaitAsync(fd: SceUid, res: *mut i64) -> i32; 3371 pub fn sceIoWaitAsyncCB(fd: SceUid, res: *mut i64) -> i32; 3372 pub fn sceIoPollAsync(fd: SceUid, res: *mut i64) -> i32; 3373 pub fn sceIoGetAsyncStat(fd: SceUid, poll: i32, res: *mut i64) -> i32; 3374 pub fn sceIoCancel(fd: SceUid) -> i32; 3375 pub fn sceIoGetDevType(fd: SceUid) -> i32; 3376 pub fn sceIoChangeAsyncPriority(fd: SceUid, pri: i32) -> i32; 3377 pub fn sceIoSetAsyncCallback(fd: SceUid, cb: SceUid, argp: *mut c_void) -> i32; 3378 3379 pub fn sceJpegInitMJpeg() -> i32; 3380 pub fn sceJpegFinishMJpeg() -> i32; 3381 pub fn sceJpegCreateMJpeg(width: i32, height: i32) -> i32; 3382 pub fn sceJpegDeleteMJpeg() -> i32; 3383 pub fn sceJpegDecodeMJpeg(jpeg_buf: *mut u8, size: usize, rgba: *mut c_void, unk: u32) -> i32; 3384 3385 pub fn sceUmdCheckMedium() -> i32; 3386 pub fn sceUmdGetDiscInfo(info: *mut UmdInfo) -> i32; 3387 pub fn sceUmdActivate(unit: i32, drive: *const u8) -> i32; 3388 pub fn sceUmdDeactivate(unit: i32, drive: *const u8) -> i32; 3389 pub fn sceUmdWaitDriveStat(state: i32) -> i32; 3390 pub fn sceUmdWaitDriveStatWithTimer(state: i32, timeout: u32) -> i32; 3391 pub fn sceUmdWaitDriveStatCB(state: i32, timeout: u32) -> i32; 3392 pub fn sceUmdCancelWaitDriveStat() -> i32; 3393 pub fn sceUmdGetDriveStat() -> i32; 3394 pub fn sceUmdGetErrorStat() -> i32; 3395 pub fn sceUmdRegisterUMDCallBack(cbid: i32) -> i32; 3396 pub fn sceUmdUnRegisterUMDCallBack(cbid: i32) -> i32; 3397 pub fn sceUmdReplacePermit() -> i32; 3398 pub fn sceUmdReplaceProhibit() -> i32; 3399 3400 pub fn sceMpegInit() -> i32; 3401 pub fn sceMpegFinish(); 3402 pub fn sceMpegRingbufferQueryMemSize(packets: i32) -> i32; 3403 pub fn sceMpegRingbufferConstruct( 3404 ringbuffer: *mut SceMpegRingbuffer, 3405 packets: i32, 3406 data: *mut c_void, 3407 size: i32, 3408 callback: SceMpegRingbufferCb, 3409 cb_param: *mut c_void, 3410 ) -> i32; 3411 pub fn sceMpegRingbufferDestruct(ringbuffer: *mut SceMpegRingbuffer); 3412 pub fn sceMpegRingbufferAvailableSize(ringbuffer: *mut SceMpegRingbuffer) -> i32; 3413 pub fn sceMpegRingbufferPut( 3414 ringbuffer: *mut SceMpegRingbuffer, 3415 num_packets: i32, 3416 available: i32, 3417 ) -> i32; 3418 pub fn sceMpegQueryMemSize(unk: i32) -> i32; 3419 pub fn sceMpegCreate( 3420 handle: SceMpeg, 3421 data: *mut c_void, 3422 size: i32, 3423 ringbuffer: *mut SceMpegRingbuffer, 3424 frame_width: i32, 3425 unk1: i32, 3426 unk2: i32, 3427 ) -> i32; 3428 pub fn sceMpegDelete(handle: SceMpeg); 3429 pub fn sceMpegQueryStreamOffset(handle: SceMpeg, buffer: *mut c_void, offset: *mut i32) -> i32; 3430 pub fn sceMpegQueryStreamSize(buffer: *mut c_void, size: *mut i32) -> i32; 3431 pub fn sceMpegRegistStream(handle: SceMpeg, stream_id: i32, unk: i32) -> SceMpegStream; 3432 pub fn sceMpegUnRegistStream(handle: SceMpeg, stream: SceMpegStream); 3433 pub fn sceMpegFlushAllStream(handle: SceMpeg) -> i32; 3434 pub fn sceMpegMallocAvcEsBuf(handle: SceMpeg) -> *mut c_void; 3435 pub fn sceMpegFreeAvcEsBuf(handle: SceMpeg, buf: *mut c_void); 3436 pub fn sceMpegQueryAtracEsSize(handle: SceMpeg, es_size: *mut i32, out_size: *mut i32) -> i32; 3437 pub fn sceMpegInitAu(handle: SceMpeg, es_buffer: *mut c_void, au: *mut SceMpegAu) -> i32; 3438 pub fn sceMpegGetAvcAu( 3439 handle: SceMpeg, 3440 stream: SceMpegStream, 3441 au: *mut SceMpegAu, 3442 unk: *mut i32, 3443 ) -> i32; 3444 pub fn sceMpegAvcDecodeMode(handle: SceMpeg, mode: *mut SceMpegAvcMode) -> i32; 3445 pub fn sceMpegAvcDecode( 3446 handle: SceMpeg, 3447 au: *mut SceMpegAu, 3448 iframe_width: i32, 3449 buffer: *mut c_void, 3450 init: *mut i32, 3451 ) -> i32; 3452 pub fn sceMpegAvcDecodeStop( 3453 handle: SceMpeg, 3454 frame_width: i32, 3455 buffer: *mut c_void, 3456 status: *mut i32, 3457 ) -> i32; 3458 pub fn sceMpegGetAtracAu( 3459 handle: SceMpeg, 3460 stream: SceMpegStream, 3461 au: *mut SceMpegAu, 3462 unk: *mut c_void, 3463 ) -> i32; 3464 pub fn sceMpegAtracDecode( 3465 handle: SceMpeg, 3466 au: *mut SceMpegAu, 3467 buffer: *mut c_void, 3468 init: i32, 3469 ) -> i32; 3470 3471 pub fn sceMpegBaseYCrCbCopyVme(yuv_buffer: *mut c_void, buffer: *mut i32, type_: i32) -> i32; 3472 pub fn sceMpegBaseCscInit(width: i32) -> i32; 3473 pub fn sceMpegBaseCscVme( 3474 rgb_buffer: *mut c_void, 3475 rgb_buffer2: *mut c_void, 3476 width: i32, 3477 y_cr_cb_buffer: *mut SceMpegYCrCbBuffer, 3478 ) -> i32; 3479 pub fn sceMpegbase_BEA18F91(lli: *mut SceMpegLLI) -> i32; 3480 3481 pub fn sceHprmPeekCurrentKey(key: *mut i32) -> i32; 3482 pub fn sceHprmPeekLatch(latch: *mut [u32; 4]) -> i32; 3483 pub fn sceHprmReadLatch(latch: *mut [u32; 4]) -> i32; 3484 pub fn sceHprmIsHeadphoneExist() -> i32; 3485 pub fn sceHprmIsRemoteExist() -> i32; 3486 pub fn sceHprmIsMicrophoneExist() -> i32; 3487 3488 pub fn sceGuDepthBuffer(zbp: *mut c_void, zbw: i32); 3489 pub fn sceGuDispBuffer(width: i32, height: i32, dispbp: *mut c_void, dispbw: i32); 3490 pub fn sceGuDrawBuffer(psm: DisplayPixelFormat, fbp: *mut c_void, fbw: i32); 3491 pub fn sceGuDrawBufferList(psm: DisplayPixelFormat, fbp: *mut c_void, fbw: i32); 3492 pub fn sceGuDisplay(state: bool) -> bool; 3493 pub fn sceGuDepthFunc(function: DepthFunc); 3494 pub fn sceGuDepthMask(mask: i32); 3495 pub fn sceGuDepthOffset(offset: i32); 3496 pub fn sceGuDepthRange(near: i32, far: i32); 3497 pub fn sceGuFog(near: f32, far: f32, color: u32); 3498 pub fn sceGuInit(); 3499 pub fn sceGuTerm(); 3500 pub fn sceGuBreak(mode: i32); 3501 pub fn sceGuContinue(); 3502 pub fn sceGuSetCallback(signal: GuCallbackId, callback: GuCallback) -> GuCallback; 3503 pub fn sceGuSignal(behavior: SignalBehavior, signal: i32); 3504 pub fn sceGuSendCommandf(cmd: GeCommand, argument: f32); 3505 pub fn sceGuSendCommandi(cmd: GeCommand, argument: i32); 3506 pub fn sceGuGetMemory(size: i32) -> *mut c_void; 3507 pub fn sceGuStart(context_type: GuContextType, list: *mut c_void); 3508 pub fn sceGuFinish() -> i32; 3509 pub fn sceGuFinishId(id: u32) -> i32; 3510 pub fn sceGuCallList(list: *const c_void); 3511 pub fn sceGuCallMode(mode: i32); 3512 pub fn sceGuCheckList() -> i32; 3513 pub fn sceGuSendList(mode: GuQueueMode, list: *const c_void, context: *mut GeContext); 3514 pub fn sceGuSwapBuffers() -> *mut c_void; 3515 pub fn sceGuSync(mode: GuSyncMode, behavior: GuSyncBehavior) -> GeListState; 3516 pub fn sceGuDrawArray( 3517 prim: GuPrimitive, 3518 vtype: i32, 3519 count: i32, 3520 indices: *const c_void, 3521 vertices: *const c_void, 3522 ); 3523 pub fn sceGuBeginObject( 3524 vtype: i32, 3525 count: i32, 3526 indices: *const c_void, 3527 vertices: *const c_void, 3528 ); 3529 pub fn sceGuEndObject(); 3530 pub fn sceGuSetStatus(state: GuState, status: i32); 3531 pub fn sceGuGetStatus(state: GuState) -> bool; 3532 pub fn sceGuSetAllStatus(status: i32); 3533 pub fn sceGuGetAllStatus() -> i32; 3534 pub fn sceGuEnable(state: GuState); 3535 pub fn sceGuDisable(state: GuState); 3536 pub fn sceGuLight(light: i32, type_: LightType, components: i32, position: &ScePspFVector3); 3537 pub fn sceGuLightAtt(light: i32, atten0: f32, atten1: f32, atten2: f32); 3538 pub fn sceGuLightColor(light: i32, component: i32, color: u32); 3539 pub fn sceGuLightMode(mode: LightMode); 3540 pub fn sceGuLightSpot(light: i32, direction: &ScePspFVector3, exponent: f32, cutoff: f32); 3541 pub fn sceGuClear(flags: i32); 3542 pub fn sceGuClearColor(color: u32); 3543 pub fn sceGuClearDepth(depth: u32); 3544 pub fn sceGuClearStencil(stencil: u32); 3545 pub fn sceGuPixelMask(mask: u32); 3546 pub fn sceGuColor(color: u32); 3547 pub fn sceGuColorFunc(func: ColorFunc, color: u32, mask: u32); 3548 pub fn sceGuColorMaterial(components: i32); 3549 pub fn sceGuAlphaFunc(func: AlphaFunc, value: i32, mask: i32); 3550 pub fn sceGuAmbient(color: u32); 3551 pub fn sceGuAmbientColor(color: u32); 3552 pub fn sceGuBlendFunc(op: BlendOp, src: BlendSrc, dest: BlendDst, src_fix: u32, dest_fix: u32); 3553 pub fn sceGuMaterial(components: i32, color: u32); 3554 pub fn sceGuModelColor(emissive: u32, ambient: u32, diffuse: u32, specular: u32); 3555 pub fn sceGuStencilFunc(func: StencilFunc, ref_: i32, mask: i32); 3556 pub fn sceGuStencilOp(fail: StencilOperation, zfail: StencilOperation, zpass: StencilOperation); 3557 pub fn sceGuSpecular(power: f32); 3558 pub fn sceGuFrontFace(order: FrontFaceDirection); 3559 pub fn sceGuLogicalOp(op: LogicalOperation); 3560 pub fn sceGuSetDither(matrix: &ScePspIMatrix4); 3561 pub fn sceGuShadeModel(mode: ShadingModel); 3562 pub fn sceGuCopyImage( 3563 psm: DisplayPixelFormat, 3564 sx: i32, 3565 sy: i32, 3566 width: i32, 3567 height: i32, 3568 srcw: i32, 3569 src: *mut c_void, 3570 dx: i32, 3571 dy: i32, 3572 destw: i32, 3573 dest: *mut c_void, 3574 ); 3575 pub fn sceGuTexEnvColor(color: u32); 3576 pub fn sceGuTexFilter(min: TextureFilter, mag: TextureFilter); 3577 pub fn sceGuTexFlush(); 3578 pub fn sceGuTexFunc(tfx: TextureEffect, tcc: TextureColorComponent); 3579 pub fn sceGuTexImage( 3580 mipmap: MipmapLevel, 3581 width: i32, 3582 height: i32, 3583 tbw: i32, 3584 tbp: *const c_void, 3585 ); 3586 pub fn sceGuTexLevelMode(mode: TextureLevelMode, bias: f32); 3587 pub fn sceGuTexMapMode(mode: TextureMapMode, a1: u32, a2: u32); 3588 pub fn sceGuTexMode(tpsm: TexturePixelFormat, maxmips: i32, a2: i32, swizzle: i32); 3589 pub fn sceGuTexOffset(u: f32, v: f32); 3590 pub fn sceGuTexProjMapMode(mode: TextureProjectionMapMode); 3591 pub fn sceGuTexScale(u: f32, v: f32); 3592 pub fn sceGuTexSlope(slope: f32); 3593 pub fn sceGuTexSync(); 3594 pub fn sceGuTexWrap(u: GuTexWrapMode, v: GuTexWrapMode); 3595 pub fn sceGuClutLoad(num_blocks: i32, cbp: *const c_void); 3596 pub fn sceGuClutMode(cpsm: ClutPixelFormat, shift: u32, mask: u32, a3: u32); 3597 pub fn sceGuOffset(x: u32, y: u32); 3598 pub fn sceGuScissor(x: i32, y: i32, w: i32, h: i32); 3599 pub fn sceGuViewport(cx: i32, cy: i32, width: i32, height: i32); 3600 pub fn sceGuDrawBezier( 3601 v_type: i32, 3602 u_count: i32, 3603 v_count: i32, 3604 indices: *const c_void, 3605 vertices: *const c_void, 3606 ); 3607 pub fn sceGuPatchDivide(ulevel: u32, vlevel: u32); 3608 pub fn sceGuPatchFrontFace(a0: u32); 3609 pub fn sceGuPatchPrim(prim: PatchPrimitive); 3610 pub fn sceGuDrawSpline( 3611 v_type: i32, 3612 u_count: i32, 3613 v_count: i32, 3614 u_edge: i32, 3615 v_edge: i32, 3616 indices: *const c_void, 3617 vertices: *const c_void, 3618 ); 3619 pub fn sceGuSetMatrix(type_: MatrixMode, matrix: &ScePspFMatrix4); 3620 pub fn sceGuBoneMatrix(index: u32, matrix: &ScePspFMatrix4); 3621 pub fn sceGuMorphWeight(index: i32, weight: f32); 3622 pub fn sceGuDrawArrayN( 3623 primitive_type: GuPrimitive, 3624 v_type: i32, 3625 count: i32, 3626 a3: i32, 3627 indices: *const c_void, 3628 vertices: *const c_void, 3629 ); 3630 3631 pub fn sceGumDrawArray( 3632 prim: GuPrimitive, 3633 v_type: i32, 3634 count: i32, 3635 indices: *const c_void, 3636 vertices: *const c_void, 3637 ); 3638 pub fn sceGumDrawArrayN( 3639 prim: GuPrimitive, 3640 v_type: i32, 3641 count: i32, 3642 a3: i32, 3643 indices: *const c_void, 3644 vertices: *const c_void, 3645 ); 3646 pub fn sceGumDrawBezier( 3647 v_type: i32, 3648 u_count: i32, 3649 v_count: i32, 3650 indices: *const c_void, 3651 vertices: *const c_void, 3652 ); 3653 pub fn sceGumDrawSpline( 3654 v_type: i32, 3655 u_count: i32, 3656 v_count: i32, 3657 u_edge: i32, 3658 v_edge: i32, 3659 indices: *const c_void, 3660 vertices: *const c_void, 3661 ); 3662 pub fn sceGumFastInverse(); 3663 pub fn sceGumFullInverse(); 3664 pub fn sceGumLoadIdentity(); 3665 pub fn sceGumLoadMatrix(m: &ScePspFMatrix4); 3666 pub fn sceGumLookAt(eye: &ScePspFVector3, center: &ScePspFVector3, up: &ScePspFVector3); 3667 pub fn sceGumMatrixMode(mode: MatrixMode); 3668 pub fn sceGumMultMatrix(m: &ScePspFMatrix4); 3669 pub fn sceGumOrtho(left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32); 3670 pub fn sceGumPerspective(fovy: f32, aspect: f32, near: f32, far: f32); 3671 pub fn sceGumPopMatrix(); 3672 pub fn sceGumPushMatrix(); 3673 pub fn sceGumRotateX(angle: f32); 3674 pub fn sceGumRotateY(angle: f32); 3675 pub fn sceGumRotateZ(angle: f32); 3676 pub fn sceGumRotateXYZ(v: &ScePspFVector3); 3677 pub fn sceGumRotateZYX(v: &ScePspFVector3); 3678 pub fn sceGumScale(v: &ScePspFVector3); 3679 pub fn sceGumStoreMatrix(m: &mut ScePspFMatrix4); 3680 pub fn sceGumTranslate(v: &ScePspFVector3); 3681 pub fn sceGumUpdateMatrix(); 3682 3683 pub fn sceMp3ReserveMp3Handle(args: *mut SceMp3InitArg) -> i32; 3684 pub fn sceMp3ReleaseMp3Handle(handle: Mp3Handle) -> i32; 3685 pub fn sceMp3InitResource() -> i32; 3686 pub fn sceMp3TermResource() -> i32; 3687 pub fn sceMp3Init(handle: Mp3Handle) -> i32; 3688 pub fn sceMp3Decode(handle: Mp3Handle, dst: *mut *mut i16) -> i32; 3689 pub fn sceMp3GetInfoToAddStreamData( 3690 handle: Mp3Handle, 3691 dst: *mut *mut u8, 3692 to_write: *mut i32, 3693 src_pos: *mut i32, 3694 ) -> i32; 3695 pub fn sceMp3NotifyAddStreamData(handle: Mp3Handle, size: i32) -> i32; 3696 pub fn sceMp3CheckStreamDataNeeded(handle: Mp3Handle) -> i32; 3697 pub fn sceMp3SetLoopNum(handle: Mp3Handle, loop_: i32) -> i32; 3698 pub fn sceMp3GetLoopNum(handle: Mp3Handle) -> i32; 3699 pub fn sceMp3GetSumDecodedSample(handle: Mp3Handle) -> i32; 3700 pub fn sceMp3GetMaxOutputSample(handle: Mp3Handle) -> i32; 3701 pub fn sceMp3GetSamplingRate(handle: Mp3Handle) -> i32; 3702 pub fn sceMp3GetBitRate(handle: Mp3Handle) -> i32; 3703 pub fn sceMp3GetMp3ChannelNum(handle: Mp3Handle) -> i32; 3704 pub fn sceMp3ResetPlayPosition(handle: Mp3Handle) -> i32; 3705 3706 pub fn sceRegOpenRegistry(reg: *mut Key, mode: i32, handle: *mut RegHandle) -> i32; 3707 pub fn sceRegFlushRegistry(handle: RegHandle) -> i32; 3708 pub fn sceRegCloseRegistry(handle: RegHandle) -> i32; 3709 pub fn sceRegOpenCategory( 3710 handle: RegHandle, 3711 name: *const u8, 3712 mode: i32, 3713 dir_handle: *mut RegHandle, 3714 ) -> i32; 3715 pub fn sceRegRemoveCategory(handle: RegHandle, name: *const u8) -> i32; 3716 pub fn sceRegCloseCategory(dir_handle: RegHandle) -> i32; 3717 pub fn sceRegFlushCategory(dir_handle: RegHandle) -> i32; 3718 pub fn sceRegGetKeyInfo( 3719 dir_handle: RegHandle, 3720 name: *const u8, 3721 key_handle: *mut RegHandle, 3722 type_: *mut KeyType, 3723 size: *mut usize, 3724 ) -> i32; 3725 pub fn sceRegGetKeyInfoByName( 3726 dir_handle: RegHandle, 3727 name: *const u8, 3728 type_: *mut KeyType, 3729 size: *mut usize, 3730 ) -> i32; 3731 pub fn sceRegGetKeyValue( 3732 dir_handle: RegHandle, 3733 key_handle: RegHandle, 3734 buf: *mut c_void, 3735 size: usize, 3736 ) -> i32; 3737 pub fn sceRegGetKeyValueByName( 3738 dir_handle: RegHandle, 3739 name: *const u8, 3740 buf: *mut c_void, 3741 size: usize, 3742 ) -> i32; 3743 pub fn sceRegSetKeyValue( 3744 dir_handle: RegHandle, 3745 name: *const u8, 3746 buf: *const c_void, 3747 size: usize, 3748 ) -> i32; 3749 pub fn sceRegGetKeysNum(dir_handle: RegHandle, num: *mut i32) -> i32; 3750 pub fn sceRegGetKeys(dir_handle: RegHandle, buf: *mut u8, num: i32) -> i32; 3751 pub fn sceRegCreateKey(dir_handle: RegHandle, name: *const u8, type_: i32, size: usize) -> i32; 3752 pub fn sceRegRemoveRegistry(key: *mut Key) -> i32; 3753 3754 pub fn sceOpenPSIDGetOpenPSID(openpsid: *mut OpenPSID) -> i32; 3755 3756 pub fn sceUtilityMsgDialogInitStart(params: *mut UtilityMsgDialogParams) -> i32; 3757 pub fn sceUtilityMsgDialogShutdownStart(); 3758 pub fn sceUtilityMsgDialogGetStatus() -> i32; 3759 pub fn sceUtilityMsgDialogUpdate(n: i32); 3760 pub fn sceUtilityMsgDialogAbort() -> i32; 3761 pub fn sceUtilityNetconfInitStart(data: *mut UtilityNetconfData) -> i32; 3762 pub fn sceUtilityNetconfShutdownStart() -> i32; 3763 pub fn sceUtilityNetconfUpdate(unknown: i32) -> i32; 3764 pub fn sceUtilityNetconfGetStatus() -> i32; 3765 pub fn sceUtilityCheckNetParam(id: i32) -> i32; 3766 pub fn sceUtilityGetNetParam(conf: i32, param: NetParam, data: *mut UtilityNetData) -> i32; 3767 pub fn sceUtilitySavedataInitStart(params: *mut SceUtilitySavedataParam) -> i32; 3768 pub fn sceUtilitySavedataGetStatus() -> i32; 3769 pub fn sceUtilitySavedataShutdownStart() -> i32; 3770 pub fn sceUtilitySavedataUpdate(unknown: i32); 3771 pub fn sceUtilityGameSharingInitStart(params: *mut UtilityGameSharingParams) -> i32; 3772 pub fn sceUtilityGameSharingShutdownStart(); 3773 pub fn sceUtilityGameSharingGetStatus() -> i32; 3774 pub fn sceUtilityGameSharingUpdate(n: i32); 3775 pub fn sceUtilityHtmlViewerInitStart(params: *mut UtilityHtmlViewerParam) -> i32; 3776 pub fn sceUtilityHtmlViewerShutdownStart() -> i32; 3777 pub fn sceUtilityHtmlViewerUpdate(n: i32) -> i32; 3778 pub fn sceUtilityHtmlViewerGetStatus() -> i32; 3779 pub fn sceUtilitySetSystemParamInt(id: SystemParamId, value: i32) -> i32; 3780 pub fn sceUtilitySetSystemParamString(id: SystemParamId, str: *const u8) -> i32; 3781 pub fn sceUtilityGetSystemParamInt(id: SystemParamId, value: *mut i32) -> i32; 3782 pub fn sceUtilityGetSystemParamString(id: SystemParamId, str: *mut u8, len: i32) -> i32; 3783 pub fn sceUtilityOskInitStart(params: *mut SceUtilityOskParams) -> i32; 3784 pub fn sceUtilityOskShutdownStart() -> i32; 3785 pub fn sceUtilityOskUpdate(n: i32) -> i32; 3786 pub fn sceUtilityOskGetStatus() -> i32; 3787 pub fn sceUtilityLoadNetModule(module: NetModule) -> i32; 3788 pub fn sceUtilityUnloadNetModule(module: NetModule) -> i32; 3789 pub fn sceUtilityLoadAvModule(module: AvModule) -> i32; 3790 pub fn sceUtilityUnloadAvModule(module: AvModule) -> i32; 3791 pub fn sceUtilityLoadUsbModule(module: UsbModule) -> i32; 3792 pub fn sceUtilityUnloadUsbModule(module: UsbModule) -> i32; 3793 pub fn sceUtilityLoadModule(module: Module) -> i32; 3794 pub fn sceUtilityUnloadModule(module: Module) -> i32; 3795 pub fn sceUtilityCreateNetParam(conf: i32) -> i32; 3796 pub fn sceUtilitySetNetParam(param: NetParam, val: *const c_void) -> i32; 3797 pub fn sceUtilityCopyNetParam(src: i32, dest: i32) -> i32; 3798 pub fn sceUtilityDeleteNetParam(conf: i32) -> i32; 3799 3800 pub fn sceNetInit( 3801 poolsize: i32, 3802 calloutprio: i32, 3803 calloutstack: i32, 3804 netintrprio: i32, 3805 netintrstack: i32, 3806 ) -> i32; 3807 pub fn sceNetTerm() -> i32; 3808 pub fn sceNetFreeThreadinfo(thid: i32) -> i32; 3809 pub fn sceNetThreadAbort(thid: i32) -> i32; 3810 pub fn sceNetEtherStrton(name: *mut u8, mac: *mut u8); 3811 pub fn sceNetEtherNtostr(mac: *mut u8, name: *mut u8); 3812 pub fn sceNetGetLocalEtherAddr(mac: *mut u8) -> i32; 3813 pub fn sceNetGetMallocStat(stat: *mut SceNetMallocStat) -> i32; 3814 3815 pub fn sceNetAdhocctlInit( 3816 stacksize: i32, 3817 priority: i32, 3818 adhoc_id: *mut SceNetAdhocctlAdhocId, 3819 ) -> i32; 3820 pub fn sceNetAdhocctlTerm() -> i32; 3821 pub fn sceNetAdhocctlConnect(name: *const u8) -> i32; 3822 pub fn sceNetAdhocctlDisconnect() -> i32; 3823 pub fn sceNetAdhocctlGetState(event: *mut i32) -> i32; 3824 pub fn sceNetAdhocctlCreate(name: *const u8) -> i32; 3825 pub fn sceNetAdhocctlJoin(scaninfo: *mut SceNetAdhocctlScanInfo) -> i32; 3826 pub fn sceNetAdhocctlGetAdhocId(id: *mut SceNetAdhocctlAdhocId) -> i32; 3827 pub fn sceNetAdhocctlCreateEnterGameMode( 3828 name: *const u8, 3829 unknown: i32, 3830 num: i32, 3831 macs: *mut u8, 3832 timeout: u32, 3833 unknown2: i32, 3834 ) -> i32; 3835 pub fn sceNetAdhocctlJoinEnterGameMode( 3836 name: *const u8, 3837 hostmac: *mut u8, 3838 timeout: u32, 3839 unknown: i32, 3840 ) -> i32; 3841 pub fn sceNetAdhocctlGetGameModeInfo(gamemodeinfo: *mut SceNetAdhocctlGameModeInfo) -> i32; 3842 pub fn sceNetAdhocctlExitGameMode() -> i32; 3843 pub fn sceNetAdhocctlGetPeerList(length: *mut i32, buf: *mut c_void) -> i32; 3844 pub fn sceNetAdhocctlGetPeerInfo( 3845 mac: *mut u8, 3846 size: i32, 3847 peerinfo: *mut SceNetAdhocctlPeerInfo, 3848 ) -> i32; 3849 pub fn sceNetAdhocctlScan() -> i32; 3850 pub fn sceNetAdhocctlGetScanInfo(length: *mut i32, buf: *mut c_void) -> i32; 3851 pub fn sceNetAdhocctlAddHandler(handler: SceNetAdhocctlHandler, unknown: *mut c_void) -> i32; 3852 pub fn sceNetAdhocctlDelHandler(id: i32) -> i32; 3853 pub fn sceNetAdhocctlGetNameByAddr(mac: *mut u8, nickname: *mut u8) -> i32; 3854 pub fn sceNetAdhocctlGetAddrByName( 3855 nickname: *mut u8, 3856 length: *mut i32, 3857 buf: *mut c_void, 3858 ) -> i32; 3859 pub fn sceNetAdhocctlGetParameter(params: *mut SceNetAdhocctlParams) -> i32; 3860 3861 pub fn sceNetAdhocInit() -> i32; 3862 pub fn sceNetAdhocTerm() -> i32; 3863 pub fn sceNetAdhocPdpCreate(mac: *mut u8, port: u16, buf_size: u32, unk1: i32) -> i32; 3864 pub fn sceNetAdhocPdpDelete(id: i32, unk1: i32) -> i32; 3865 pub fn sceNetAdhocPdpSend( 3866 id: i32, 3867 dest_mac_addr: *mut u8, 3868 port: u16, 3869 data: *mut c_void, 3870 len: u32, 3871 timeout: u32, 3872 nonblock: i32, 3873 ) -> i32; 3874 pub fn sceNetAdhocPdpRecv( 3875 id: i32, 3876 src_mac_addr: *mut u8, 3877 port: *mut u16, 3878 data: *mut c_void, 3879 data_length: *mut c_void, 3880 timeout: u32, 3881 nonblock: i32, 3882 ) -> i32; 3883 pub fn sceNetAdhocGetPdpStat(size: *mut i32, stat: *mut SceNetAdhocPdpStat) -> i32; 3884 pub fn sceNetAdhocGameModeCreateMaster(data: *mut c_void, size: i32) -> i32; 3885 pub fn sceNetAdhocGameModeCreateReplica(mac: *mut u8, data: *mut c_void, size: i32) -> i32; 3886 pub fn sceNetAdhocGameModeUpdateMaster() -> i32; 3887 pub fn sceNetAdhocGameModeUpdateReplica(id: i32, unk1: i32) -> i32; 3888 pub fn sceNetAdhocGameModeDeleteMaster() -> i32; 3889 pub fn sceNetAdhocGameModeDeleteReplica(id: i32) -> i32; 3890 pub fn sceNetAdhocPtpOpen( 3891 srcmac: *mut u8, 3892 srcport: u16, 3893 destmac: *mut u8, 3894 destport: u16, 3895 buf_size: u32, 3896 delay: u32, 3897 count: i32, 3898 unk1: i32, 3899 ) -> i32; 3900 pub fn sceNetAdhocPtpConnect(id: i32, timeout: u32, nonblock: i32) -> i32; 3901 pub fn sceNetAdhocPtpListen( 3902 srcmac: *mut u8, 3903 srcport: u16, 3904 buf_size: u32, 3905 delay: u32, 3906 count: i32, 3907 queue: i32, 3908 unk1: i32, 3909 ) -> i32; 3910 pub fn sceNetAdhocPtpAccept( 3911 id: i32, 3912 mac: *mut u8, 3913 port: *mut u16, 3914 timeout: u32, 3915 nonblock: i32, 3916 ) -> i32; 3917 pub fn sceNetAdhocPtpSend( 3918 id: i32, 3919 data: *mut c_void, 3920 data_size: *mut i32, 3921 timeout: u32, 3922 nonblock: i32, 3923 ) -> i32; 3924 pub fn sceNetAdhocPtpRecv( 3925 id: i32, 3926 data: *mut c_void, 3927 data_size: *mut i32, 3928 timeout: u32, 3929 nonblock: i32, 3930 ) -> i32; 3931 pub fn sceNetAdhocPtpFlush(id: i32, timeout: u32, nonblock: i32) -> i32; 3932 pub fn sceNetAdhocPtpClose(id: i32, unk1: i32) -> i32; 3933 pub fn sceNetAdhocGetPtpStat(size: *mut i32, stat: *mut SceNetAdhocPtpStat) -> i32; 3934 } 3935 3936 extern "C" { 3937 pub fn sceNetAdhocMatchingInit(memsize: i32) -> i32; 3938 pub fn sceNetAdhocMatchingTerm() -> i32; 3939 pub fn sceNetAdhocMatchingCreate( 3940 mode: AdhocMatchingMode, 3941 max_peers: i32, 3942 port: u16, 3943 buf_size: i32, 3944 hello_delay: u32, 3945 ping_delay: u32, 3946 init_count: i32, 3947 msg_delay: u32, 3948 callback: AdhocMatchingCallback, 3949 ) -> i32; 3950 pub fn sceNetAdhocMatchingDelete(matching_id: i32) -> i32; 3951 pub fn sceNetAdhocMatchingStart( 3952 matching_id: i32, 3953 evth_pri: i32, 3954 evth_stack: i32, 3955 inth_pri: i32, 3956 inth_stack: i32, 3957 opt_len: i32, 3958 opt_data: *mut c_void, 3959 ) -> i32; 3960 pub fn sceNetAdhocMatchingStop(matching_id: i32) -> i32; 3961 pub fn sceNetAdhocMatchingSelectTarget( 3962 matching_id: i32, 3963 mac: *mut u8, 3964 opt_len: i32, 3965 opt_data: *mut c_void, 3966 ) -> i32; 3967 pub fn sceNetAdhocMatchingCancelTarget(matching_id: i32, mac: *mut u8) -> i32; 3968 pub fn sceNetAdhocMatchingCancelTargetWithOpt( 3969 matching_id: i32, 3970 mac: *mut u8, 3971 opt_len: i32, 3972 opt_data: *mut c_void, 3973 ) -> i32; 3974 pub fn sceNetAdhocMatchingSendData( 3975 matching_id: i32, 3976 mac: *mut u8, 3977 data_len: i32, 3978 data: *mut c_void, 3979 ) -> i32; 3980 pub fn sceNetAdhocMatchingAbortSendData(matching_id: i32, mac: *mut u8) -> i32; 3981 pub fn sceNetAdhocMatchingSetHelloOpt( 3982 matching_id: i32, 3983 opt_len: i32, 3984 opt_data: *mut c_void, 3985 ) -> i32; 3986 pub fn sceNetAdhocMatchingGetHelloOpt( 3987 matching_id: i32, 3988 opt_len: *mut i32, 3989 opt_data: *mut c_void, 3990 ) -> i32; 3991 pub fn sceNetAdhocMatchingGetMembers( 3992 matching_id: i32, 3993 length: *mut i32, 3994 buf: *mut c_void, 3995 ) -> i32; 3996 pub fn sceNetAdhocMatchingGetPoolMaxAlloc() -> i32; 3997 pub fn sceNetAdhocMatchingGetPoolStat(poolstat: *mut AdhocPoolStat) -> i32; 3998 } 3999 4000 extern "C" { 4001 pub fn sceNetApctlInit(stack_size: i32, init_priority: i32) -> i32; 4002 pub fn sceNetApctlTerm() -> i32; 4003 pub fn sceNetApctlGetInfo(code: ApctlInfo, pinfo: *mut SceNetApctlInfo) -> i32; 4004 pub fn sceNetApctlAddHandler(handler: SceNetApctlHandler, parg: *mut c_void) -> i32; 4005 pub fn sceNetApctlDelHandler(handler_id: i32) -> i32; 4006 pub fn sceNetApctlConnect(conn_index: i32) -> i32; 4007 pub fn sceNetApctlDisconnect() -> i32; 4008 pub fn sceNetApctlGetState(pstate: *mut ApctlState) -> i32; 4009 4010 pub fn sceNetInetInit() -> i32; 4011 pub fn sceNetInetTerm() -> i32; 4012 pub fn sceNetInetAccept(s: i32, addr: *mut sockaddr, addr_len: *mut socklen_t) -> i32; 4013 pub fn sceNetInetBind(s: i32, my_addr: *const sockaddr, addr_len: socklen_t) -> i32; 4014 pub fn sceNetInetConnect(s: i32, serv_addr: *const sockaddr, addr_len: socklen_t) -> i32; 4015 pub fn sceNetInetGetsockopt( 4016 s: i32, 4017 level: i32, 4018 opt_name: i32, 4019 opt_val: *mut c_void, 4020 optl_en: *mut socklen_t, 4021 ) -> i32; 4022 pub fn sceNetInetListen(s: i32, backlog: i32) -> i32; 4023 pub fn sceNetInetRecv(s: i32, buf: *mut c_void, len: usize, flags: i32) -> usize; 4024 pub fn sceNetInetRecvfrom( 4025 s: i32, 4026 buf: *mut c_void, 4027 flags: usize, 4028 arg1: i32, 4029 from: *mut sockaddr, 4030 from_len: *mut socklen_t, 4031 ) -> usize; 4032 pub fn sceNetInetSend(s: i32, buf: *const c_void, len: usize, flags: i32) -> usize; 4033 pub fn sceNetInetSendto( 4034 s: i32, 4035 buf: *const c_void, 4036 len: usize, 4037 flags: i32, 4038 to: *const sockaddr, 4039 to_len: socklen_t, 4040 ) -> usize; 4041 pub fn sceNetInetSetsockopt( 4042 s: i32, 4043 level: i32, 4044 opt_name: i32, 4045 opt_val: *const c_void, 4046 opt_len: socklen_t, 4047 ) -> i32; 4048 pub fn sceNetInetShutdown(s: i32, how: i32) -> i32; 4049 pub fn sceNetInetSocket(domain: i32, type_: i32, protocol: i32) -> i32; 4050 pub fn sceNetInetClose(s: i32) -> i32; 4051 pub fn sceNetInetGetErrno() -> i32; 4052 4053 pub fn sceSslInit(unknown1: i32) -> i32; 4054 pub fn sceSslEnd() -> i32; 4055 pub fn sceSslGetUsedMemoryMax(memory: *mut u32) -> i32; 4056 pub fn sceSslGetUsedMemoryCurrent(memory: *mut u32) -> i32; 4057 4058 pub fn sceHttpInit(unknown1: u32) -> i32; 4059 pub fn sceHttpEnd() -> i32; 4060 pub fn sceHttpCreateTemplate(agent: *mut u8, unknown1: i32, unknown2: i32) -> i32; 4061 pub fn sceHttpDeleteTemplate(templateid: i32) -> i32; 4062 pub fn sceHttpCreateConnection( 4063 templateid: i32, 4064 host: *mut u8, 4065 unknown1: *mut u8, 4066 port: u16, 4067 unknown2: i32, 4068 ) -> i32; 4069 pub fn sceHttpCreateConnectionWithURL(templateid: i32, url: *const u8, unknown1: i32) -> i32; 4070 pub fn sceHttpDeleteConnection(connection_id: i32) -> i32; 4071 pub fn sceHttpCreateRequest( 4072 connection_id: i32, 4073 method: HttpMethod, 4074 path: *mut u8, 4075 content_length: u64, 4076 ) -> i32; 4077 pub fn sceHttpCreateRequestWithURL( 4078 connection_id: i32, 4079 method: HttpMethod, 4080 url: *mut u8, 4081 content_length: u64, 4082 ) -> i32; 4083 pub fn sceHttpDeleteRequest(request_id: i32) -> i32; 4084 pub fn sceHttpSendRequest(request_id: i32, data: *mut c_void, data_size: u32) -> i32; 4085 pub fn sceHttpAbortRequest(request_id: i32) -> i32; 4086 pub fn sceHttpReadData(request_id: i32, data: *mut c_void, data_size: u32) -> i32; 4087 pub fn sceHttpGetContentLength(request_id: i32, content_length: *mut u64) -> i32; 4088 pub fn sceHttpGetStatusCode(request_id: i32, status_code: *mut i32) -> i32; 4089 pub fn sceHttpSetResolveTimeOut(id: i32, timeout: u32) -> i32; 4090 pub fn sceHttpSetResolveRetry(id: i32, count: i32) -> i32; 4091 pub fn sceHttpSetConnectTimeOut(id: i32, timeout: u32) -> i32; 4092 pub fn sceHttpSetSendTimeOut(id: i32, timeout: u32) -> i32; 4093 pub fn sceHttpSetRecvTimeOut(id: i32, timeout: u32) -> i32; 4094 pub fn sceHttpEnableKeepAlive(id: i32) -> i32; 4095 pub fn sceHttpDisableKeepAlive(id: i32) -> i32; 4096 pub fn sceHttpEnableRedirect(id: i32) -> i32; 4097 pub fn sceHttpDisableRedirect(id: i32) -> i32; 4098 pub fn sceHttpEnableCookie(id: i32) -> i32; 4099 pub fn sceHttpDisableCookie(id: i32) -> i32; 4100 pub fn sceHttpSaveSystemCookie() -> i32; 4101 pub fn sceHttpLoadSystemCookie() -> i32; 4102 pub fn sceHttpAddExtraHeader(id: i32, name: *mut u8, value: *mut u8, unknown1: i32) -> i32; 4103 pub fn sceHttpDeleteHeader(id: i32, name: *const u8) -> i32; 4104 pub fn sceHttpsInit(unknown1: i32, unknown2: i32, unknown3: i32, unknown4: i32) -> i32; 4105 pub fn sceHttpsEnd() -> i32; 4106 pub fn sceHttpsLoadDefaultCert(unknown1: i32, unknown2: i32) -> i32; 4107 pub fn sceHttpDisableAuth(id: i32) -> i32; 4108 pub fn sceHttpDisableCache(id: i32) -> i32; 4109 pub fn sceHttpEnableAuth(id: i32) -> i32; 4110 pub fn sceHttpEnableCache(id: i32) -> i32; 4111 pub fn sceHttpEndCache() -> i32; 4112 pub fn sceHttpGetAllHeader(request: i32, header: *mut *mut u8, header_size: *mut u32) -> i32; 4113 pub fn sceHttpGetNetworkErrno(request: i32, err_num: *mut i32) -> i32; 4114 pub fn sceHttpGetProxy( 4115 id: i32, 4116 activate_flag: *mut i32, 4117 mode: *mut i32, 4118 proxy_host: *mut u8, 4119 len: usize, 4120 proxy_port: *mut u16, 4121 ) -> i32; 4122 pub fn sceHttpInitCache(max_size: usize) -> i32; 4123 pub fn sceHttpSetAuthInfoCB(id: i32, cbfunc: HttpPasswordCB) -> i32; 4124 pub fn sceHttpSetProxy( 4125 id: i32, 4126 activate_flag: i32, 4127 mode: i32, 4128 new_proxy_host: *const u8, 4129 new_proxy_port: u16, 4130 ) -> i32; 4131 pub fn sceHttpSetResHeaderMaxSize(id: i32, header_size: u32) -> i32; 4132 pub fn sceHttpSetMallocFunction( 4133 malloc_func: HttpMallocFunction, 4134 free_func: HttpFreeFunction, 4135 realloc_func: HttpReallocFunction, 4136 ) -> i32; 4137 4138 pub fn sceNetResolverInit() -> i32; 4139 pub fn sceNetResolverCreate(rid: *mut i32, buf: *mut c_void, buf_length: u32) -> i32; 4140 pub fn sceNetResolverDelete(rid: i32) -> i32; 4141 pub fn sceNetResolverStartNtoA( 4142 rid: i32, 4143 hostname: *const u8, 4144 addr: *mut in_addr, 4145 timeout: u32, 4146 retry: i32, 4147 ) -> i32; 4148 pub fn sceNetResolverStartAtoN( 4149 rid: i32, 4150 addr: *const in_addr, 4151 hostname: *mut u8, 4152 hostname_len: u32, 4153 timeout: u32, 4154 retry: i32, 4155 ) -> i32; 4156 pub fn sceNetResolverStop(rid: i32) -> i32; 4157 pub fn sceNetResolverTerm() -> i32; 4158 } 4159