├── .gitignore ├── IOPMKeyChecker ├── LICENSE ├── README.md ├── bin │ └── iopmcheck ├── iopmkeychecker │ ├── .theos │ │ ├── _ │ │ │ ├── DEBIAN │ │ │ │ └── control │ │ │ └── usr │ │ │ │ └── local │ │ │ │ └── bin │ │ │ │ └── IOPMKeyChecker │ │ ├── build_session │ │ ├── fakeroot │ │ ├── last_package │ │ ├── obj │ │ │ └── debug │ │ │ │ ├── .stamp │ │ │ │ ├── IOPMKeyChecker │ │ │ │ ├── arm64 │ │ │ │ ├── IOPMKeyChecker │ │ │ │ ├── IOPMKeyChecker.dSYM │ │ │ │ │ └── Contents │ │ │ │ │ │ ├── Info.plist │ │ │ │ │ │ └── Resources │ │ │ │ │ │ └── DWARF │ │ │ │ │ │ └── IOPMKeyChecker │ │ │ │ ├── main.m.3f502f38.Td │ │ │ │ └── main.m.3f502f38.o │ │ │ │ ├── arm64e │ │ │ │ ├── IOPMKeyChecker │ │ │ │ ├── IOPMKeyChecker.dSYM │ │ │ │ │ └── Contents │ │ │ │ │ │ ├── Info.plist │ │ │ │ │ │ └── Resources │ │ │ │ │ │ └── DWARF │ │ │ │ │ │ └── IOPMKeyChecker │ │ │ │ ├── main.m.17f35531.Td │ │ │ │ └── main.m.17f35531.o │ │ │ │ └── armv7 │ │ │ │ ├── IOPMKeyChecker │ │ │ │ ├── IOPMKeyChecker.dSYM │ │ │ │ └── Contents │ │ │ │ │ ├── Info.plist │ │ │ │ │ └── Resources │ │ │ │ │ └── DWARF │ │ │ │ │ └── IOPMKeyChecker │ │ │ │ ├── main.m.2b89d702.Td │ │ │ │ └── main.m.2b89d702.o │ │ └── packages │ │ │ └── com.kurrtandsquiddy.iopmkeychecker-0.0.1 │ ├── Makefile │ ├── build.sh │ ├── control │ ├── entitlements.plist │ └── main.m └── screenshot.png ├── LICENSE ├── PowerUp ├── Makefile ├── NSTask.h ├── PowerUp.plist ├── Tweak.h ├── Tweak.xm ├── control ├── global.h ├── headers │ ├── .DS_Store │ ├── Foundation │ │ ├── Foundation.apinotes │ │ ├── Foundation.h │ │ ├── FoundationErrors.h │ │ ├── FoundationLegacySwiftCompatibility.h │ │ ├── NSArray.h │ │ ├── NSAttributedString.h │ │ ├── NSAutoreleasePool.h │ │ ├── NSBundle.h │ │ ├── NSByteCountFormatter.h │ │ ├── NSByteOrder.h │ │ ├── NSCache.h │ │ ├── NSCalendar.h │ │ ├── NSCharacterSet.h │ │ ├── NSCoder.h │ │ ├── NSComparisonPredicate.h │ │ ├── NSCompoundPredicate.h │ │ ├── NSData.h │ │ ├── NSDate.h │ │ ├── NSDateComponentsFormatter.h │ │ ├── NSDateFormatter.h │ │ ├── NSDateInterval.h │ │ ├── NSDateIntervalFormatter.h │ │ ├── NSDecimal.h │ │ ├── NSDecimalNumber.h │ │ ├── NSDictionary.h │ │ ├── NSEnergyFormatter.h │ │ ├── NSEnumerator.h │ │ ├── NSError.h │ │ ├── NSException.h │ │ ├── NSExpression.h │ │ ├── NSExtensionContext.h │ │ ├── NSExtensionItem.h │ │ ├── NSExtensionRequestHandling.h │ │ ├── NSFileCoordinator.h │ │ ├── NSFileHandle.h │ │ ├── NSFileManager.h │ │ ├── NSFilePresenter.h │ │ ├── NSFileVersion.h │ │ ├── NSFileWrapper.h │ │ ├── NSFormatter.h │ │ ├── NSHTTPCookie.h │ │ ├── NSHTTPCookieStorage.h │ │ ├── NSHashTable.h │ │ ├── NSISO8601DateFormatter.h │ │ ├── NSIndexPath.h │ │ ├── NSIndexSet.h │ │ ├── NSInvocation.h │ │ ├── NSItemProvider.h │ │ ├── NSItemProviderReadingWriting.h │ │ ├── NSJSONSerialization.h │ │ ├── NSKeyValueCoding.h │ │ ├── NSKeyValueObserving.h │ │ ├── NSKeyedArchiver.h │ │ ├── NSLengthFormatter.h │ │ ├── NSLinguisticTagger.h │ │ ├── NSListFormatter.h │ │ ├── NSLocale.h │ │ ├── NSLock.h │ │ ├── NSMapTable.h │ │ ├── NSMassFormatter.h │ │ ├── NSMeasurement.h │ │ ├── NSMeasurementFormatter.h │ │ ├── NSMetadata.h │ │ ├── NSMetadataAttributes.h │ │ ├── NSMethodSignature.h │ │ ├── NSNetServices.h │ │ ├── NSNotification.h │ │ ├── NSNotificationQueue.h │ │ ├── NSNull.h │ │ ├── NSNumberFormatter.h │ │ ├── NSObjCRuntime.h │ │ ├── NSObject.h │ │ ├── NSOperation.h │ │ ├── NSOrderedCollectionChange.h │ │ ├── NSOrderedCollectionDifference.h │ │ ├── NSOrderedSet.h │ │ ├── NSOrthography.h │ │ ├── NSPathUtilities.h │ │ ├── NSPersonNameComponents.h │ │ ├── NSPersonNameComponentsFormatter.h │ │ ├── NSPointerArray.h │ │ ├── NSPointerFunctions.h │ │ ├── NSPort.h │ │ ├── NSPredicate.h │ │ ├── NSProcessInfo.h │ │ ├── NSProgress.h │ │ ├── NSPropertyList.h │ │ ├── NSProxy.h │ │ ├── NSRange.h │ │ ├── NSRegularExpression.h │ │ ├── NSRelativeDateTimeFormatter.h │ │ ├── NSRunLoop.h │ │ ├── NSScanner.h │ │ ├── NSSet.h │ │ ├── NSSortDescriptor.h │ │ ├── NSStream.h │ │ ├── NSString.h │ │ ├── NSTextCheckingResult.h │ │ ├── NSThread.h │ │ ├── NSTimeZone.h │ │ ├── NSTimer.h │ │ ├── NSURL.h │ │ ├── NSURLAuthenticationChallenge.h │ │ ├── NSURLCache.h │ │ ├── NSURLConnection.h │ │ ├── NSURLCredential.h │ │ ├── NSURLCredentialStorage.h │ │ ├── NSURLError.h │ │ ├── NSURLProtectionSpace.h │ │ ├── NSURLProtocol.h │ │ ├── NSURLRequest.h │ │ ├── NSURLResponse.h │ │ ├── NSURLSession.h │ │ ├── NSUUID.h │ │ ├── NSUbiquitousKeyValueStore.h │ │ ├── NSUndoManager.h │ │ ├── NSUnit.h │ │ ├── NSUserActivity.h │ │ ├── NSUserDefaults.h │ │ ├── NSValue.h │ │ ├── NSValueTransformer.h │ │ ├── NSXMLParser.h │ │ ├── NSXPCConnection.h │ │ └── NSZone.h │ ├── IOKit │ │ ├── .DS_Store │ │ ├── IOBSD.h │ │ ├── IOCFBundle.h │ │ ├── IOCFPlugIn.h │ │ ├── IOCFSerialize.h │ │ ├── IOCFURLAccess.h │ │ ├── IOCFUnserialize.h │ │ ├── IODataQueue.h │ │ ├── IODataQueueClient.h │ │ ├── IODataQueueShared.h │ │ ├── IOHibernatePrivate.h │ │ ├── IOKit.h │ │ ├── IOKitKeys.h │ │ ├── IOKitKeysPrivate.h │ │ ├── IOKitLib.h │ │ ├── IOKitServer.h │ │ ├── IOMessage.h │ │ ├── IORPC.h │ │ ├── IOReportTypes.h │ │ ├── IOReturn.h │ │ ├── IOSharedLock.h │ │ ├── IOTypes.h │ │ ├── IOUserServer.h │ │ ├── OSKext.h │ │ ├── OSMessageNotification.h │ │ ├── audio │ │ │ ├── IOAudioDefines.h │ │ │ ├── IOAudioLib.h │ │ │ └── IOAudioTypes.h │ │ ├── avc │ │ │ ├── IOFireWireAVCConsts.h │ │ │ └── IOFireWireAVCLib.h │ │ ├── firewire │ │ │ ├── IOFWIsoch.h │ │ │ ├── IOFireWireFamilyCommon.h │ │ │ ├── IOFireWireLib.h │ │ │ └── IOFireWireLibIsoch.h │ │ ├── graphics │ │ │ ├── IOAccelClientConnect.h │ │ │ ├── IOAccelSurfaceConnect.h │ │ │ ├── IOAccelTypes.h │ │ │ ├── IOFramebufferShared.h │ │ │ ├── IOGraphicsEngine.h │ │ │ ├── IOGraphicsInterface.h │ │ │ ├── IOGraphicsInterfaceTypes.h │ │ │ ├── IOGraphicsLib.h │ │ │ └── IOGraphicsTypes.h │ │ ├── hid │ │ │ ├── IOHIDDisplay.h │ │ │ ├── IOHIDEvent.h │ │ │ ├── IOHIDEventData.h │ │ │ ├── IOHIDEventQueue.h │ │ │ ├── IOHIDEventSystem.h │ │ │ ├── IOHIDEventSystemClient.h │ │ │ ├── IOHIDEventTypes.h │ │ │ ├── IOHIDNotification.h │ │ │ ├── IOHIDService.h │ │ │ ├── IOHIDSession.h │ │ │ ├── IOHIDUserDevice.h │ │ │ └── OSTypes.h │ │ ├── hidsystem │ │ │ ├── IOHIDEventSystemClient.h │ │ │ ├── IOHIDLib.h │ │ │ ├── IOHIDParameter.h │ │ │ ├── IOHIDServiceClient.h │ │ │ ├── IOHIDShared.h │ │ │ ├── IOHIDTypes.h │ │ │ ├── IOHIDUserDevice.h │ │ │ ├── IOLLEvent.h │ │ │ ├── ev_keymap.h │ │ │ └── event_status_driver.h │ │ ├── i2c │ │ │ └── IOI2CInterface.h │ │ ├── kext │ │ │ └── KextManager.h │ │ ├── ndrvsupport │ │ │ ├── IOMacOSTypes.h │ │ │ └── IOMacOSVideo.h │ │ ├── network │ │ │ ├── IOEthernetController.h │ │ │ ├── IOEthernetInterface.h │ │ │ ├── IOEthernetStats.h │ │ │ ├── IONetworkController.h │ │ │ ├── IONetworkData.h │ │ │ ├── IONetworkInterface.h │ │ │ ├── IONetworkLib.h │ │ │ ├── IONetworkMedium.h │ │ │ ├── IONetworkStack.h │ │ │ ├── IONetworkStats.h │ │ │ └── IONetworkUserClient.h │ │ ├── ps │ │ │ ├── IOPSKeys.h │ │ │ ├── IOPowerSources.h │ │ │ ├── IOPowerSourcesPrivate.h │ │ │ └── IOUPSPlugIn.h │ │ ├── pwr_mgt │ │ │ ├── IOPM.h │ │ │ ├── IOPMKeys.h │ │ │ ├── IOPMLib.h │ │ │ ├── IOPMLibDefs.h │ │ │ ├── IOPMLibPrivate.h │ │ │ ├── IOPMPrivate.h │ │ │ └── IOPMUPSPrivate.h │ │ ├── sbp2 │ │ │ └── IOFireWireSBP2Lib.h │ │ ├── scsi │ │ │ ├── IOSCSIMultimediaCommandsDevice.h │ │ │ ├── SCSICmds_INQUIRY_Definitions.h │ │ │ ├── SCSICmds_MODE_Definitions.h │ │ │ ├── SCSICmds_READ_CAPACITY_Definitions.h │ │ │ ├── SCSICmds_REPORT_LUNS_Definitions.h │ │ │ ├── SCSICmds_REQUEST_SENSE_Defs.h │ │ │ ├── SCSICommandDefinitions.h │ │ │ ├── SCSICommandOperationCodes.h │ │ │ ├── SCSITask.h │ │ │ └── SCSITaskLib.h │ │ ├── serial │ │ │ ├── IOSerialKeys.h │ │ │ └── ioss.h │ │ ├── storage │ │ │ ├── IOAppleLabelScheme.h │ │ │ ├── IOApplePartitionScheme.h │ │ │ ├── IOBDBlockStorageDevice.h │ │ │ ├── IOBDMedia.h │ │ │ ├── IOBDMediaBSDClient.h │ │ │ ├── IOBDTypes.h │ │ │ ├── IOBlockStorageDevice.h │ │ │ ├── IOBlockStorageDriver.h │ │ │ ├── IOCDBlockStorageDevice.h │ │ │ ├── IOCDMedia.h │ │ │ ├── IOCDMediaBSDClient.h │ │ │ ├── IOCDPartitionScheme.h │ │ │ ├── IOCDTypes.h │ │ │ ├── IODVDBlockStorageDevice.h │ │ │ ├── IODVDMedia.h │ │ │ ├── IODVDMediaBSDClient.h │ │ │ ├── IODVDTypes.h │ │ │ ├── IOFDiskPartitionScheme.h │ │ │ ├── IOFilterScheme.h │ │ │ ├── IOFireWireStorageCharacteristics.h │ │ │ ├── IOGUIDPartitionScheme.h │ │ │ ├── IOMedia.h │ │ │ ├── IOMediaBSDClient.h │ │ │ ├── IOPartitionScheme.h │ │ │ ├── IOStorage.h │ │ │ ├── IOStorageCardCharacteristics.h │ │ │ ├── IOStorageControllerCharacteristics.h │ │ │ ├── IOStorageDeviceCharacteristics.h │ │ │ ├── IOStorageProtocolCharacteristics.h │ │ │ └── ata │ │ │ │ ├── ATASMARTLib.h │ │ │ │ └── IOATAStorageDefines.h │ │ ├── stream │ │ │ ├── IOStreamLib.h │ │ │ └── IOStreamShared.h │ │ ├── usb │ │ │ ├── AppleUSBDefinitions.h │ │ │ ├── IOUSBHostFamilyDefinitions.h │ │ │ ├── IOUSBLib.h │ │ │ ├── USB.h │ │ │ └── USBSpec.h │ │ └── video │ │ │ ├── IOVideoControlDictionary.h │ │ │ ├── IOVideoDevice.h │ │ │ ├── IOVideoDeviceClientInit.h │ │ │ ├── IOVideoDeviceLib.h │ │ │ ├── IOVideoDeviceShared.h │ │ │ ├── IOVideoDeviceUserClient.h │ │ │ ├── IOVideoStream.h │ │ │ ├── IOVideoStreamDictionary.h │ │ │ ├── IOVideoStreamFormatDictionary.h │ │ │ └── IOVideoTypes.h │ ├── signal.h │ └── types.h ├── layout │ ├── .DS_Store │ └── Library │ │ ├── .DS_Store │ │ └── Application Support │ │ ├── .DS_Store │ │ └── PowerUp.bundle │ │ ├── PowerUp_RootMePls │ │ ├── bolt.png │ │ ├── bolt@2x.png │ │ ├── bolt@3x.png │ │ ├── bolt_fill.png │ │ ├── bolt_fill@2x.png │ │ ├── bolt_fill@3x.png │ │ └── nukeprocs.sh ├── powerupprefs │ ├── .DS_Store │ ├── Makefile │ ├── PUPCreditsListController.h │ ├── PUPCreditsListController.m │ ├── PUPRootListController.h │ ├── PUPRootListController.m │ ├── Resources │ │ ├── .DS_Store │ │ ├── Info.plist │ │ ├── Root.plist │ │ ├── credits.plist │ │ └── icons │ │ │ ├── .DS_Store │ │ │ ├── settings@2x.png │ │ │ ├── settings@2x.png.old.png │ │ │ ├── settings@3x.png │ │ │ └── settings@3x.png.old.png │ └── entry.plist ├── rootmepls │ ├── .DS_Store │ ├── Makefile │ ├── control │ ├── entitlements.plist │ └── main.m ├── ux.h └── ux.m ├── README.md └── rawAssets ├── bolt.svg └── boltfill.svg /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | PowerUp/.theos/ 3 | 4 | PowerUp/.DS_Store 5 | 6 | *.deb 7 | -------------------------------------------------------------------------------- /IOPMKeyChecker/LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /IOPMKeyChecker/README.md: -------------------------------------------------------------------------------- 1 | # IOPMKeyChecker 2 | This is a simple tool to test if IOPMPreferences keys exist for the current device. 3 | 4 | ![Screenshot](https://github.com/Kurrt/IOPMKeyChecker/blob/master/screenshot.png) 5 | 6 | #### Note: Built for and tested on iOS. MacOS may work but may need some adjustments 7 | 8 | In MacOS and iOS the IOPMPreferences dictionary allows you to manage how the device responds to power management changes through IOKit. Personal testing has shown that iOS completely ignores the values set, but this acts as a helper to check if the keys can be set and help reduce time wasted when testing these keys. 9 | 10 | ## How it works 11 | This tool simply attempts to set the dictionary values for the provided key. It first attempts to set the key in the root dictionary, followed by the subdictionaries. Each attempt sets the value to 0, checks if the key is set to 0 in the saved result, then attempts again with 1. (This helps avoid false positives if the key already exists and the value is 0). 12 | 13 | Once all tests are complete the original settings are restored to reset the state. 14 | 15 | If a key succeeds you can then perform further testing on that key to ensure it is used and works in the expected way. 16 | 17 | ## "But IOKit contains a method to retrieve unsupported keys from IOPMPreferences" 18 | This is correct. Internal methods exist to retrieve the keys even when not supported on the current device. It is possible IOKit uses these keys at some point but this would be unusual and testing has shown they are not used in any significant way. This tool cannot clarify that and should only be used as part of your testing. 19 | 20 | ## Usage 21 | 1. Copy the binary from the bin folder or release onto your device. 22 | 2. Navigate to the location of the binary. 23 | 3. Execute the program. To see the help menu use the flag ```--help``` 24 | 25 | ## Examples 26 | - A working key on iPhone 11 Pro Max iOS 13.5 is ```PrioritizeNetworkReachabilityOverSleep```: 27 | ``` 28 | iopmcheck -c PrioritizeNetworkReachabilityOverSleep 29 | ``` 30 | - An **invalid** key on iPhone 11 Pro Max iOS 13.5 is ```Hibernate Mode```: 31 | ``` 32 | iopmcheck -c "Hibernate Mode" 33 | ``` 34 | 35 | ## Quick Tests 36 | 2 keys are built in to check for "hibernation" and "deep sleep" (AKA stand by). 37 | - To check for hibernation use the flag ```-h``` or ```--hibernation``` 38 | - To check for deep sleep use the flag ```-d``` or ```--deepsleep``` 39 | 40 | ## Custom Keys 41 | To check other keys use the flag ```-c``` or ```--custom``` followed by your desired key. 42 | 43 | ## Us 44 | This tool was built by [Kurrt](https://github.com/Kurrt "Kurrt's Github") and [Squiddy](https://github.com/Squidkingdom "Squiddy's Github") 45 | -------------------------------------------------------------------------------- /IOPMKeyChecker/bin/iopmcheck: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/bin/iopmcheck -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/_/DEBIAN/control: -------------------------------------------------------------------------------- 1 | Package: com.kurrtandsquiddy.iopmkeychecker 2 | Name: IOPMKeyChecker 3 | Architecture: iphoneos-arm 4 | Description: Check if IOPM preference keys are valid on the current device. 5 | Maintainer: Kurrt+Squiddy 6 | Author: Kurrt+Squiddy 7 | Section: System 8 | Tag: role::hacker 9 | Version: 0.0.1-74+debug 10 | Installed-Size: 196 11 | -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/_/usr/local/bin/IOPMKeyChecker: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/_/usr/local/bin/IOPMKeyChecker -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/build_session: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/build_session -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/fakeroot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/fakeroot -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/last_package: -------------------------------------------------------------------------------- 1 | ./packages/com.kurrtandsquiddy.iopmkeychecker_0.0.1-74+debug_iphoneos-arm.deb 2 | -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/.stamp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/.stamp -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/IOPMKeyChecker: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/IOPMKeyChecker -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64/IOPMKeyChecker: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64/IOPMKeyChecker -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64/IOPMKeyChecker.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.IOPMKeyChecker 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64/IOPMKeyChecker.dSYM/Contents/Resources/DWARF/IOPMKeyChecker: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64/IOPMKeyChecker.dSYM/Contents/Resources/DWARF/IOPMKeyChecker -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64/main.m.3f502f38.Td: -------------------------------------------------------------------------------- 1 | /Volumes/Business/TWEAKS/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64/main.m.3f502f38.o: \ 2 | main.m /Users/Kurt/theos/Prefix.pch \ 3 | /Users/Kurt/theos/vendor/include/theos/BackwardsCompat.h \ 4 | /Users/Kurt/theos/vendor/include/theos/IOSMacros.h \ 5 | /Users/Kurt/theos/vendor/include/HBLog.h \ 6 | /Users/Kurt/theos/vendor/include/CoreFoundation/CFLogUtilities.h \ 7 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLibPrivate.h \ 8 | /Users/Kurt/theos/include/IOKit/IOKitLib.h \ 9 | /Users/Kurt/theos/include/IOKit/IOTypes.h \ 10 | /Users/Kurt/theos/include/IOKit/IOReturn.h \ 11 | /Users/Kurt/theos/include/IOKit/IOKitKeys.h \ 12 | /Users/Kurt/theos/include/IOKit/OSMessageNotification.h \ 13 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLibDefs.h \ 14 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPM.h \ 15 | /Users/Kurt/theos/include/IOKit/IOMessage.h \ 16 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLib.h \ 17 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMKeys.h 18 | 19 | /Users/Kurt/theos/Prefix.pch: 20 | 21 | /Users/Kurt/theos/vendor/include/theos/BackwardsCompat.h: 22 | 23 | /Users/Kurt/theos/vendor/include/theos/IOSMacros.h: 24 | 25 | /Users/Kurt/theos/vendor/include/HBLog.h: 26 | 27 | /Users/Kurt/theos/vendor/include/CoreFoundation/CFLogUtilities.h: 28 | 29 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLibPrivate.h: 30 | 31 | /Users/Kurt/theos/include/IOKit/IOKitLib.h: 32 | 33 | /Users/Kurt/theos/include/IOKit/IOTypes.h: 34 | 35 | /Users/Kurt/theos/include/IOKit/IOReturn.h: 36 | 37 | /Users/Kurt/theos/include/IOKit/IOKitKeys.h: 38 | 39 | /Users/Kurt/theos/include/IOKit/OSMessageNotification.h: 40 | 41 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLibDefs.h: 42 | 43 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPM.h: 44 | 45 | /Users/Kurt/theos/include/IOKit/IOMessage.h: 46 | 47 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLib.h: 48 | 49 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMKeys.h: 50 | -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64/main.m.3f502f38.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64/main.m.3f502f38.o -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64e/IOPMKeyChecker: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64e/IOPMKeyChecker -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64e/IOPMKeyChecker.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.IOPMKeyChecker 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64e/IOPMKeyChecker.dSYM/Contents/Resources/DWARF/IOPMKeyChecker: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64e/IOPMKeyChecker.dSYM/Contents/Resources/DWARF/IOPMKeyChecker -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64e/main.m.17f35531.Td: -------------------------------------------------------------------------------- 1 | /Volumes/Business/TWEAKS/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64e/main.m.17f35531.o: \ 2 | main.m /Users/Kurt/theos/Prefix.pch \ 3 | /Users/Kurt/theos/vendor/include/theos/BackwardsCompat.h \ 4 | /Users/Kurt/theos/vendor/include/theos/IOSMacros.h \ 5 | /Users/Kurt/theos/vendor/include/HBLog.h \ 6 | /Users/Kurt/theos/vendor/include/CoreFoundation/CFLogUtilities.h \ 7 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLibPrivate.h \ 8 | /Users/Kurt/theos/include/IOKit/IOKitLib.h \ 9 | /Users/Kurt/theos/include/IOKit/IOTypes.h \ 10 | /Users/Kurt/theos/include/IOKit/IOReturn.h \ 11 | /Users/Kurt/theos/include/IOKit/IOKitKeys.h \ 12 | /Users/Kurt/theos/include/IOKit/OSMessageNotification.h \ 13 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLibDefs.h \ 14 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPM.h \ 15 | /Users/Kurt/theos/include/IOKit/IOMessage.h \ 16 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLib.h \ 17 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMKeys.h 18 | 19 | /Users/Kurt/theos/Prefix.pch: 20 | 21 | /Users/Kurt/theos/vendor/include/theos/BackwardsCompat.h: 22 | 23 | /Users/Kurt/theos/vendor/include/theos/IOSMacros.h: 24 | 25 | /Users/Kurt/theos/vendor/include/HBLog.h: 26 | 27 | /Users/Kurt/theos/vendor/include/CoreFoundation/CFLogUtilities.h: 28 | 29 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLibPrivate.h: 30 | 31 | /Users/Kurt/theos/include/IOKit/IOKitLib.h: 32 | 33 | /Users/Kurt/theos/include/IOKit/IOTypes.h: 34 | 35 | /Users/Kurt/theos/include/IOKit/IOReturn.h: 36 | 37 | /Users/Kurt/theos/include/IOKit/IOKitKeys.h: 38 | 39 | /Users/Kurt/theos/include/IOKit/OSMessageNotification.h: 40 | 41 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLibDefs.h: 42 | 43 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPM.h: 44 | 45 | /Users/Kurt/theos/include/IOKit/IOMessage.h: 46 | 47 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLib.h: 48 | 49 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMKeys.h: 50 | -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64e/main.m.17f35531.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/arm64e/main.m.17f35531.o -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/armv7/IOPMKeyChecker: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/armv7/IOPMKeyChecker -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/armv7/IOPMKeyChecker.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.IOPMKeyChecker 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/armv7/IOPMKeyChecker.dSYM/Contents/Resources/DWARF/IOPMKeyChecker: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/armv7/IOPMKeyChecker.dSYM/Contents/Resources/DWARF/IOPMKeyChecker -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/armv7/main.m.2b89d702.Td: -------------------------------------------------------------------------------- 1 | /Volumes/Business/TWEAKS/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/armv7/main.m.2b89d702.o: \ 2 | main.m /Users/Kurt/theos/Prefix.pch \ 3 | /Users/Kurt/theos/vendor/include/theos/BackwardsCompat.h \ 4 | /Users/Kurt/theos/vendor/include/theos/IOSMacros.h \ 5 | /Users/Kurt/theos/vendor/include/HBLog.h \ 6 | /Users/Kurt/theos/vendor/include/CoreFoundation/CFLogUtilities.h \ 7 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLibPrivate.h \ 8 | /Users/Kurt/theos/include/IOKit/IOKitLib.h \ 9 | /Users/Kurt/theos/include/IOKit/IOTypes.h \ 10 | /Users/Kurt/theos/include/IOKit/IOReturn.h \ 11 | /Users/Kurt/theos/include/IOKit/IOKitKeys.h \ 12 | /Users/Kurt/theos/include/IOKit/OSMessageNotification.h \ 13 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLibDefs.h \ 14 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPM.h \ 15 | /Users/Kurt/theos/include/IOKit/IOMessage.h \ 16 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLib.h \ 17 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMKeys.h 18 | 19 | /Users/Kurt/theos/Prefix.pch: 20 | 21 | /Users/Kurt/theos/vendor/include/theos/BackwardsCompat.h: 22 | 23 | /Users/Kurt/theos/vendor/include/theos/IOSMacros.h: 24 | 25 | /Users/Kurt/theos/vendor/include/HBLog.h: 26 | 27 | /Users/Kurt/theos/vendor/include/CoreFoundation/CFLogUtilities.h: 28 | 29 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLibPrivate.h: 30 | 31 | /Users/Kurt/theos/include/IOKit/IOKitLib.h: 32 | 33 | /Users/Kurt/theos/include/IOKit/IOTypes.h: 34 | 35 | /Users/Kurt/theos/include/IOKit/IOReturn.h: 36 | 37 | /Users/Kurt/theos/include/IOKit/IOKitKeys.h: 38 | 39 | /Users/Kurt/theos/include/IOKit/OSMessageNotification.h: 40 | 41 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLibDefs.h: 42 | 43 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPM.h: 44 | 45 | /Users/Kurt/theos/include/IOKit/IOMessage.h: 46 | 47 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMLib.h: 48 | 49 | /Users/Kurt/theos/include/IOKit/pwr_mgt/IOPMKeys.h: 50 | -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/armv7/main.m.2b89d702.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/iopmkeychecker/.theos/obj/debug/armv7/main.m.2b89d702.o -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/.theos/packages/com.kurrtandsquiddy.iopmkeychecker-0.0.1: -------------------------------------------------------------------------------- 1 | 74 -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/Makefile: -------------------------------------------------------------------------------- 1 | 2 | TARGET := iphone:clang:latest:7.0 3 | 4 | include $(THEOS)/makefiles/common.mk 5 | 6 | TOOL_NAME = IOPMKeyChecker 7 | 8 | ${TOOL_NAME}_FILES = main.m 9 | ${TOOL_NAME}_CFLAGS = -fobjc-arc 10 | ${TOOL_NAME}_CODESIGN_FLAGS = -Sentitlements.plist 11 | ${TOOL_NAME}_INSTALL_PATH = /usr/local/bin 12 | ${TOOL_NAME}_FRAMEWORKS = IOKit 13 | 14 | include $(THEOS_MAKE_PATH)/tool.mk 15 | -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm $(<.theos/last_package) 4 | make package 5 | cp .theos/_/usr/local/bin/IOPMKeyChecker ../bin/iopmcheck -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/control: -------------------------------------------------------------------------------- 1 | Package: com.kurrtandsquiddy.iopmkeychecker 2 | Name: IOPMKeyChecker 3 | Version: 0.0.1 4 | Architecture: iphoneos-arm 5 | Description: Check if IOPM preference keys are valid on the current device. 6 | Maintainer: Kurrt+Squiddy 7 | Author: Kurrt+Squiddy 8 | Section: System 9 | Tag: role::hacker 10 | -------------------------------------------------------------------------------- /IOPMKeyChecker/iopmkeychecker/entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | platform-application 5 | 6 | com.apple.private.security.container-required 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /IOPMKeyChecker/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/IOPMKeyChecker/screenshot.png -------------------------------------------------------------------------------- /PowerUp/Makefile: -------------------------------------------------------------------------------- 1 | # THEOS_DEVICE_IP = localhost 2 | # THEOS_DEVICE_PORT = 2222 3 | FOR_RELEASE= 1 4 | export ARCHS = arm64 arm64e 5 | export TARGET := iphone:clang:11.2 6 | export INSTALL_TARGET_PROCESSES = thermalmonitord backboardd SpringBoard 7 | 8 | 9 | 10 | include $(THEOS)/makefiles/common.mk 11 | 12 | # GO_EASY_ON_ME = 1 13 | 14 | TWEAK_NAME = PowerUp 15 | 16 | ${TWEAK_NAME}_FRAMEWORKS = Foundation IOKit MobileCoreServices 17 | ${TWEAK_NAME}_EXTRA_FRAMEWORKS += Cephei 18 | ${TWEAK_NAME}_CFLAGS = -fobjc-arc 19 | ${TWEAK_NAME}_FILES = Tweak.xm ux.m 20 | 21 | include $(THEOS_MAKE_PATH)/tweak.mk 22 | 23 | SUBPROJECTS += powerupprefs rootmepls 24 | include $(THEOS_MAKE_PATH)/aggregate.mk 25 | 26 | before-stage:: 27 | cp .theos/obj/debug/PowerUp_RootMePls "./layout/Library/Application Support/PowerUp.bundle/"; 28 | chmod 6755 "./layout/Library/Application Support/PowerUp.bundle/PowerUp_RootMePls"; -------------------------------------------------------------------------------- /PowerUp/NSTask.h: -------------------------------------------------------------------------------- 1 | 2 | /* NSTask.h 3 | Copyright (c) 1996-2007, Apple Inc. All rights reserved. 4 | */ 5 | 6 | #import 7 | 8 | @class NSString, NSArray, NSDictionary; 9 | 10 | @interface NSTask : NSObject 11 | 12 | // Create an NSTask which can be run at a later time 13 | // An NSTask can only be run once. Subsequent attempts to 14 | // run an NSTask will raise. 15 | // Upon task death a notification will be sent 16 | // { Name = NSTaskDidTerminateNotification; object = task; } 17 | // 18 | 19 | - (instancetype)init; 20 | 21 | // set parameters 22 | // these methods can only be done before a launch 23 | - (void)setLaunchPath:(NSString *)path; 24 | - (void)setArguments:(NSArray *)arguments; 25 | - (void)setEnvironment:(NSDictionary *)dict; 26 | // if not set, use current 27 | - (void)setCurrentDirectoryPath:(NSString *)path; 28 | // if not set, use current 29 | 30 | // set standard I/O channels; may be either an NSFileHandle or an NSPipe 31 | - (void)setStandardInput:(id)input; 32 | - (void)setStandardOutput:(id)output; 33 | - (void)setStandardError:(id)error; 34 | 35 | // get parameters 36 | - (NSString *)launchPath; 37 | - (NSArray *)arguments; 38 | - (NSDictionary *)environment; 39 | - (NSString *)currentDirectoryPath; 40 | 41 | // get standard I/O channels; could be either an NSFileHandle or an NSPipe 42 | - (id)standardInput; 43 | - (id)standardOutput; 44 | - (id)standardError; 45 | 46 | // actions 47 | - (void)launch; 48 | 49 | - (void)interrupt; // Not always possible. Sends SIGINT. 50 | - (void)terminate; // Not always possible. Sends SIGTERM. 51 | 52 | - (BOOL)suspend; 53 | - (BOOL)resume; 54 | 55 | // status 56 | - (int)processIdentifier; 57 | - (BOOL)isRunning; 58 | 59 | - (int)terminationStatus; 60 | 61 | @end 62 | 63 | @interface NSTask (NSTaskConveniences) 64 | 65 | + (NSTask *)launchedTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments; 66 | // convenience; create and launch 67 | 68 | - (void)waitUntilExit; 69 | // poll the runLoop in defaultMode until task completes 70 | 71 | @end 72 | 73 | FOUNDATION_EXPORT NSString * const NSTaskDidTerminateNotification; 74 | -------------------------------------------------------------------------------- /PowerUp/PowerUp.plist: -------------------------------------------------------------------------------- 1 | { 2 | Filter = { 3 | 4 | Bundles = ( 5 | "com.apple.springboard", 6 | "com.apple.backboardd" 7 | ); 8 | 9 | Executables = ( 10 | "thermalmonitord", 11 | ); 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /PowerUp/control: -------------------------------------------------------------------------------- 1 | Package: com.kurrtandsquiddy.powerup 2 | Name: PowerUp 3 | Depends: mobilesubstrate, ws.hbang.common (>= 1.11), preferenceloader, grep 4 | Version: 1.1 5 | Architecture: iphoneos-arm 6 | Description: Speed up charging. 7 | Icon: https://kurrt.com/repoassets/img/powerup.png 8 | Depiction: https://kurrt.com/repo/PowerUp/ 9 | Homepage: https://kurrt.com/repo/PowerUp/ 10 | Maintainer: Kurrt, Squiddy 11 | Author: Kurrt, Squiddy 12 | Section: Tweaks 13 | -------------------------------------------------------------------------------- /PowerUp/global.h: -------------------------------------------------------------------------------- 1 | // Global header file 2 | 3 | // Avoid duplicate 4 | #ifndef GLOBAL_LOADED 5 | #define GLOBAL_LOADED // Flag that this has been used 6 | 7 | // Bring in required headers 8 | #import "NSTask.h" 9 | #import 10 | #include 11 | #import 12 | #include 13 | #include 14 | 15 | 16 | // Constants 17 | #define TWEAK_ABBR "PUP" 18 | #define BUNDLE_ID "com.kurrtandsquiddy.powerup" 19 | #define ENABLE_NOTIF BUNDLE_ID"/enable" 20 | #define DISABLE_NOTIF BUNDLE_ID"/disable" 21 | #define WAKE_NOTIF BUNDLE_ID"/wakescreen" 22 | #define LOCK_NOTIF BUNDLE_ID"/lockscreen" 23 | #define KEEP_AWAKE_REASON @"com.kurrtandsquiddy.keepawake" 24 | #define WAKE_HOLD_POWER_SECS 2 25 | #define IOHID_POWER_BUTTON_USAGE_ID 48 26 | #define ROOT_ME_PLS_BIN "/Library/Application Support/PowerUp.bundle/PowerUp_RootMePls" 27 | #define PLIST_PATH "/System/Library/LaunchDaemons/" 28 | #define SB_PLIST PLIST_PATH"com.apple.SpringBoard.plist" 29 | #define DEFAULT_AUTO_WAKE_PERC 20 30 | 31 | 32 | 33 | // Convenience Macros 34 | #define POST_NOTIF(_name) CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(),\ 35 | CFSTR(_name), NULL, NULL, YES); 36 | #define LISTEN_NOTIF(_call, _name) CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(),\ 37 | NULL, (CFNotificationCallback)_call, CFSTR(_name), NULL, CFNotificationSuspensionBehaviorCoalesce); 38 | #define ROOT_ME_PLS(_cmd) pid_t pid;\ 39 | const char* args[] = {""ROOT_ME_PLS_BIN, #_cmd, NULL};\ 40 | posix_spawn(&pid, args[0], NULL, NULL, (char* const*)args, NULL); 41 | #define KILL_RMP pid_t pid;\ 42 | const char* args[] = {""ROOT_ME_PLS_BIN, "die", NULL};\ 43 | posix_spawn(&pid, args[0], NULL, NULL, (char* const*)args, NULL); 44 | 45 | #define PREFS(_boolVal) [[prefs objectForKey:@#_boolVal] boolValue] 46 | 47 | #endif -------------------------------------------------------------------------------- /PowerUp/headers/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/headers/.DS_Store -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/FoundationLegacySwiftCompatibility.h: -------------------------------------------------------------------------------- 1 | #import 2 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSAttributedString.h: -------------------------------------------------------------------------------- 1 | /* NSAttributedString.h 2 | Copyright (c) 1994-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | 6 | #import 7 | #import 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | typedef NSString * NSAttributedStringKey NS_EXTENSIBLE_STRING_ENUM; 12 | 13 | API_AVAILABLE(macos(10.0), ios(3.2), watchos(2.0), tvos(9.0)) 14 | @interface NSAttributedString : NSObject 15 | 16 | @property (readonly, copy) NSString *string; 17 | - (NSDictionary *)attributesAtIndex:(NSUInteger)location effectiveRange:(nullable NSRangePointer)range; 18 | 19 | @end 20 | 21 | @interface NSAttributedString (NSExtendedAttributedString) 22 | 23 | @property (readonly) NSUInteger length; 24 | - (nullable id)attribute:(NSAttributedStringKey)attrName atIndex:(NSUInteger)location effectiveRange:(nullable NSRangePointer)range; 25 | - (NSAttributedString *)attributedSubstringFromRange:(NSRange)range; 26 | 27 | - (NSDictionary *)attributesAtIndex:(NSUInteger)location longestEffectiveRange:(nullable NSRangePointer)range inRange:(NSRange)rangeLimit; 28 | - (nullable id)attribute:(NSAttributedStringKey)attrName atIndex:(NSUInteger)location longestEffectiveRange:(nullable NSRangePointer)range inRange:(NSRange)rangeLimit; 29 | 30 | - (BOOL)isEqualToAttributedString:(NSAttributedString *)other; 31 | 32 | - (instancetype)initWithString:(NSString *)str; 33 | - (instancetype)initWithString:(NSString *)str attributes:(nullable NSDictionary *)attrs; 34 | - (instancetype)initWithAttributedString:(NSAttributedString *)attrStr; 35 | 36 | typedef NS_OPTIONS(NSUInteger, NSAttributedStringEnumerationOptions) { 37 | NSAttributedStringEnumerationReverse = (1UL << 1), 38 | NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = (1UL << 20) 39 | }; 40 | 41 | - (void)enumerateAttributesInRange:(NSRange)enumerationRange options:(NSAttributedStringEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(NSDictionary *attrs, NSRange range, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 42 | - (void)enumerateAttribute:(NSAttributedStringKey)attrName inRange:(NSRange)enumerationRange options:(NSAttributedStringEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(id _Nullable value, NSRange range, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 43 | 44 | @end 45 | 46 | API_AVAILABLE(macos(10.0), ios(3.2), watchos(2.0), tvos(9.0)) 47 | @interface NSMutableAttributedString : NSAttributedString 48 | 49 | - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str; 50 | - (void)setAttributes:(nullable NSDictionary *)attrs range:(NSRange)range; 51 | 52 | @end 53 | 54 | @interface NSMutableAttributedString (NSExtendedMutableAttributedString) 55 | 56 | @property (readonly, retain) NSMutableString *mutableString; 57 | 58 | - (void)addAttribute:(NSAttributedStringKey)name value:(id)value range:(NSRange)range; 59 | - (void)addAttributes:(NSDictionary *)attrs range:(NSRange)range; 60 | - (void)removeAttribute:(NSAttributedStringKey)name range:(NSRange)range; 61 | 62 | - (void)replaceCharactersInRange:(NSRange)range withAttributedString:(NSAttributedString *)attrString; 63 | - (void)insertAttributedString:(NSAttributedString *)attrString atIndex:(NSUInteger)loc; 64 | - (void)appendAttributedString:(NSAttributedString *)attrString; 65 | - (void)deleteCharactersInRange:(NSRange)range; 66 | - (void)setAttributedString:(NSAttributedString *)attrString; 67 | 68 | - (void)beginEditing; 69 | - (void)endEditing; 70 | 71 | @end 72 | 73 | NS_ASSUME_NONNULL_END 74 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSAutoreleasePool.h: -------------------------------------------------------------------------------- 1 | /* NSAutoreleasePool.h 2 | Copyright (c) 1994-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | NS_AUTOMATED_REFCOUNT_UNAVAILABLE 10 | @interface NSAutoreleasePool : NSObject { 11 | @private 12 | void *_token; 13 | void *_reserved3; 14 | void *_reserved2; 15 | void *_reserved; 16 | } 17 | 18 | + (void)addObject:(id)anObject; 19 | 20 | - (void)addObject:(id)anObject; 21 | 22 | - (void)drain; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSCache.h: -------------------------------------------------------------------------------- 1 | /* NSCache.h 2 | Copyright (c) 2008-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | @class NSString; 8 | @protocol NSCacheDelegate; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)) 13 | @interface NSCache : NSObject { 14 | @private 15 | id _delegate; 16 | void *_private[5]; 17 | void *_reserved; 18 | } 19 | 20 | @property (copy) NSString *name; 21 | 22 | @property (nullable, assign) id delegate; 23 | 24 | - (nullable ObjectType)objectForKey:(KeyType)key; 25 | - (void)setObject:(ObjectType)obj forKey:(KeyType)key; // 0 cost 26 | - (void)setObject:(ObjectType)obj forKey:(KeyType)key cost:(NSUInteger)g; 27 | - (void)removeObjectForKey:(KeyType)key; 28 | 29 | - (void)removeAllObjects; 30 | 31 | @property NSUInteger totalCostLimit; // limits are imprecise/not strict 32 | @property NSUInteger countLimit; // limits are imprecise/not strict 33 | @property BOOL evictsObjectsWithDiscardedContent; 34 | 35 | @end 36 | 37 | @protocol NSCacheDelegate 38 | @optional 39 | - (void)cache:(NSCache *)cache willEvictObject:(id)obj; 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSCompoundPredicate.h: -------------------------------------------------------------------------------- 1 | /* NSCompoundPredicate.h 2 | Copyright (c) 2004-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | @class NSArray; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | // Compound predicates are predicates which act on the results of evaluating other operators. We provide the basic boolean operators: AND, OR, and NOT. 12 | 13 | typedef NS_ENUM(NSUInteger, NSCompoundPredicateType) { 14 | NSNotPredicateType = 0, 15 | NSAndPredicateType, 16 | NSOrPredicateType, 17 | }; 18 | 19 | API_AVAILABLE(macos(10.4), ios(3.0), watchos(2.0), tvos(9.0)) 20 | @interface NSCompoundPredicate : NSPredicate { 21 | @private 22 | void *_reserved2; 23 | NSUInteger _type; 24 | NSArray *_subpredicates; 25 | } 26 | 27 | - (instancetype)initWithType:(NSCompoundPredicateType)type subpredicates:(NSArray *)subpredicates NS_DESIGNATED_INITIALIZER; 28 | - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; 29 | 30 | @property (readonly) NSCompoundPredicateType compoundPredicateType; 31 | @property (readonly, copy) NSArray *subpredicates; 32 | 33 | /*** Convenience Methods ***/ 34 | + (NSCompoundPredicate *)andPredicateWithSubpredicates:(NSArray *)subpredicates NS_SWIFT_NAME(init(andPredicateWithSubpredicates:)); 35 | + (NSCompoundPredicate *)orPredicateWithSubpredicates:(NSArray *)subpredicates NS_SWIFT_NAME(init(orPredicateWithSubpredicates:)); 36 | + (NSCompoundPredicate *)notPredicateWithSubpredicate:(NSPredicate *)predicate NS_SWIFT_NAME(init(notPredicateWithSubpredicate:)); 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSDate.h: -------------------------------------------------------------------------------- 1 | /* NSDate.h 2 | Copyright (c) 1994-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #import 7 | 8 | @class NSString; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | FOUNDATION_EXPORT NSNotificationName const NSSystemClockDidChangeNotification API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 13 | 14 | typedef double NSTimeInterval; 15 | 16 | #define NSTimeIntervalSince1970 978307200.0 17 | 18 | @interface NSDate : NSObject 19 | 20 | @property (readonly) NSTimeInterval timeIntervalSinceReferenceDate; 21 | 22 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 23 | - (instancetype)initWithTimeIntervalSinceReferenceDate:(NSTimeInterval)ti NS_DESIGNATED_INITIALIZER; 24 | - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; 25 | 26 | @end 27 | 28 | @interface NSDate (NSExtendedDate) 29 | 30 | - (NSTimeInterval)timeIntervalSinceDate:(NSDate *)anotherDate; 31 | @property (readonly) NSTimeInterval timeIntervalSinceNow; 32 | @property (readonly) NSTimeInterval timeIntervalSince1970; 33 | 34 | - (id)addTimeInterval:(NSTimeInterval)seconds API_DEPRECATED("Use dateByAddingTimeInterval instead", macos(10.0,10.6), ios(2.0,4.0), watchos(2.0,2.0), tvos(9.0,9.0)); 35 | - (instancetype)dateByAddingTimeInterval:(NSTimeInterval)ti API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0)); 36 | 37 | - (NSDate *)earlierDate:(NSDate *)anotherDate; 38 | - (NSDate *)laterDate:(NSDate *)anotherDate; 39 | - (NSComparisonResult)compare:(NSDate *)other; 40 | - (BOOL)isEqualToDate:(NSDate *)otherDate; 41 | 42 | @property (readonly, copy) NSString *description; 43 | - (NSString *)descriptionWithLocale:(nullable id)locale; 44 | 45 | @property (class, readonly) NSTimeInterval timeIntervalSinceReferenceDate; 46 | 47 | @end 48 | 49 | @interface NSDate (NSDateCreation) 50 | 51 | + (instancetype)date; 52 | + (instancetype)dateWithTimeIntervalSinceNow:(NSTimeInterval)secs; 53 | + (instancetype)dateWithTimeIntervalSinceReferenceDate:(NSTimeInterval)ti; 54 | + (instancetype)dateWithTimeIntervalSince1970:(NSTimeInterval)secs; 55 | + (instancetype)dateWithTimeInterval:(NSTimeInterval)secsToBeAdded sinceDate:(NSDate *)date; 56 | 57 | @property (class, readonly, copy) NSDate *distantFuture; 58 | @property (class, readonly, copy) NSDate *distantPast; 59 | 60 | @property (class, readonly, copy) NSDate *now API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0)); 61 | 62 | - (instancetype)initWithTimeIntervalSinceNow:(NSTimeInterval)secs; 63 | - (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)secs; 64 | - (instancetype)initWithTimeInterval:(NSTimeInterval)secsToBeAdded sinceDate:(NSDate *)date; 65 | 66 | @end 67 | 68 | NS_ASSUME_NONNULL_END 69 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSDateInterval.h: -------------------------------------------------------------------------------- 1 | /* NSDateInterval.h 2 | Copyright (c) 2015-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #import 7 | #import 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)) 12 | @interface NSDateInterval : NSObject 13 | 14 | /* 15 | NSDateInterval represents a closed date interval in the form of [startDate, endDate]. It is possible for the start and end dates to be the same with a duration of 0. NSDateInterval does not support reverse intervals i.e. intervals where the duration is less than 0 and the end date occurs earlier in time than the start date. 16 | */ 17 | 18 | @property (readonly, copy) NSDate *startDate; 19 | @property (readonly, copy) NSDate *endDate; 20 | @property (readonly) NSTimeInterval duration; 21 | 22 | // This method initializes an NSDateInterval object with start and end dates set to the current date and the duration set to 0. 23 | - (instancetype)init; 24 | 25 | - (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; 26 | 27 | // This method will throw an exception if the duration is less than 0. 28 | - (instancetype)initWithStartDate:(NSDate *)startDate duration:(NSTimeInterval)duration NS_DESIGNATED_INITIALIZER; 29 | 30 | // This method will throw an exception if the end date comes before the start date. 31 | - (instancetype)initWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate; 32 | 33 | /* 34 | (NSComparisonResult)compare:(NSDateInterval *) prioritizes ordering by start date. If the start dates are equal, then it will order by duration. 35 | e.g. 36 | Given intervals a and b 37 | a. |-----| 38 | b. |-----| 39 | [a compare:b] would return NSOrderAscending because a's startDate is earlier in time than b's start date. 40 | 41 | In the event that the start dates are equal, the compare method will attempt to order by duration. 42 | e.g. 43 | Given intervals c and d 44 | c. |-----| 45 | d. |---| 46 | [c compare:d] would result in NSOrderDescending because c is longer than d. 47 | 48 | If both the start dates and the durations are equal, then the intervals are considered equal and NSOrderedSame is returned as the result. 49 | */ 50 | - (NSComparisonResult)compare:(NSDateInterval *)dateInterval; 51 | 52 | - (BOOL)isEqualToDateInterval:(NSDateInterval *)dateInterval; 53 | - (BOOL)intersectsDateInterval:(NSDateInterval *)dateInterval; 54 | 55 | /* 56 | This method returns an NSDateInterval object that represents the interval where the given date interval and the current instance intersect. In the event that there is no intersection, the method returns nil. 57 | */ 58 | - (nullable NSDateInterval *)intersectionWithDateInterval:(NSDateInterval *)dateInterval; 59 | 60 | - (BOOL)containsDate:(NSDate *)date; 61 | 62 | @end 63 | 64 | NS_ASSUME_NONNULL_END 65 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSDateIntervalFormatter.h: -------------------------------------------------------------------------------- 1 | /* NSDateIntervalFormatter.h 2 | Copyright (c) 2013-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #import 7 | #include 8 | @class NSLocale, NSCalendar, NSTimeZone, NSDate; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | typedef NS_ENUM(NSUInteger, NSDateIntervalFormatterStyle) { 13 | NSDateIntervalFormatterNoStyle = 0, 14 | NSDateIntervalFormatterShortStyle = 1, 15 | NSDateIntervalFormatterMediumStyle = 2, 16 | NSDateIntervalFormatterLongStyle = 3, 17 | NSDateIntervalFormatterFullStyle = 4 18 | } API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); 19 | 20 | // NSDateIntervalFormatter is used to format the range between two NSDates in a locale-sensitive way. 21 | // NSDateIntervalFormatter returns nil and NO for all methods in NSFormatter. 22 | 23 | API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) 24 | @interface NSDateIntervalFormatter : NSFormatter 25 | { 26 | @private 27 | NSLocale *_locale; 28 | NSCalendar *_calendar; 29 | NSTimeZone *_timeZone; 30 | NSString *_dateTemplate; 31 | NSString *_dateTemplateFromStyles; 32 | void *_formatter; 33 | NSDateIntervalFormatterStyle _dateStyle; 34 | NSDateIntervalFormatterStyle _timeStyle; 35 | BOOL _modified; 36 | BOOL _useTemplate; 37 | dispatch_semaphore_t _lock; 38 | void *_reserved[4]; 39 | } 40 | 41 | @property (null_resettable, copy) NSLocale *locale; // default is [NSLocale currentLocale] 42 | @property (null_resettable, copy) NSCalendar *calendar; // default is the calendar of the locale 43 | @property (null_resettable, copy) NSTimeZone *timeZone; // default is [NSTimeZone defaultTimeZone] 44 | @property (null_resettable, copy) NSString *dateTemplate; // default is an empty string 45 | @property NSDateIntervalFormatterStyle dateStyle; // default is NSDateIntervalFormatterNoStyle 46 | @property NSDateIntervalFormatterStyle timeStyle; // default is NSDateIntervalFormatterNoStyle 47 | 48 | /* 49 | If the range smaller than the resolution specified by the dateTemplate, a single date format will be produced. If the range is larger than the format specified by the dateTemplate, a locale-specific fallback will be used to format the items missing from the pattern. 50 | 51 | For example, if the range is 2010-03-04 07:56 - 2010-03-04 19:56 (12 hours) 52 | - The pattern jm will produce 53 | for en_US, "7:56 AM - 7:56 PM" 54 | for en_GB, "7:56 - 19:56" 55 | - The pattern MMMd will produce 56 | for en_US, "Mar 4" 57 | for en_GB, "4 Mar" 58 | If the range is 2010-03-04 07:56 - 2010-03-08 16:11 (4 days, 8 hours, 15 minutes) 59 | - The pattern jm will produce 60 | for en_US, "3/4/2010 7:56 AM - 3/8/2010 4:11 PM" 61 | for en_GB, "4/3/2010 7:56 - 8/3/2010 16:11" 62 | - The pattern MMMd will produce 63 | for en_US, "Mar 4-8" 64 | for en_GB, "4-8 Mar" 65 | */ 66 | - (NSString *)stringFromDate:(NSDate *)fromDate toDate:(NSDate *)toDate; 67 | 68 | - (nullable NSString *)stringFromDateInterval:(NSDateInterval *)dateInterval API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)); 69 | 70 | @end 71 | 72 | NS_ASSUME_NONNULL_END 73 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSEnergyFormatter.h: -------------------------------------------------------------------------------- 1 | /* NSEnergyFormatter.h 2 | Copyright (c) 2014-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | typedef NS_ENUM(NSInteger, NSEnergyFormatterUnit) { 10 | NSEnergyFormatterUnitJoule = 11, 11 | NSEnergyFormatterUnitKilojoule = 14, 12 | NSEnergyFormatterUnitCalorie = (7 << 8) + 1, // chemistry "calories", abbr "cal" 13 | NSEnergyFormatterUnitKilocalorie = (7 << 8) + 2, // kilocalories in general, abbr “kcal”, or “C” in some locales (e.g. US) when usesFoodEnergy is set to YES 14 | } API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); 15 | 16 | API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) 17 | @interface NSEnergyFormatter : NSFormatter { 18 | @private 19 | void *_formatter; 20 | BOOL _isForFoodEnergyUse; 21 | void *_reserved[2]; 22 | } 23 | @property (null_resettable, copy) NSNumberFormatter *numberFormatter; // default is NSNumberFormatter with NSNumberFormatterDecimalStyle 24 | @property NSFormattingUnitStyle unitStyle; // default is NSFormattingUnitStyleMedium 25 | @property (getter = isForFoodEnergyUse) BOOL forFoodEnergyUse; // default is NO; if it is set to YES, NSEnergyFormatterUnitKilocalorie may be “C” instead of “kcal" 26 | 27 | // Format a combination of a number and an unit to a localized string. 28 | - (NSString *)stringFromValue:(double)value unit:(NSEnergyFormatterUnit)unit; 29 | 30 | // Format a number in joules to a localized string with the locale-appropriate unit and an appropriate scale (e.g. 10.3J = 2.46cal in the US locale). 31 | - (NSString *)stringFromJoules:(double)numberInJoules; 32 | 33 | // Return a localized string of the given unit, and if the unit is singular or plural is based on the given number. 34 | - (NSString *)unitStringFromValue:(double)value unit:(NSEnergyFormatterUnit)unit; 35 | 36 | // Return the locale-appropriate unit, the same unit used by -stringFromJoules:. 37 | - (NSString *)unitStringFromJoules:(double)numberInJoules usedUnit:(nullable NSEnergyFormatterUnit *)unitp; 38 | 39 | // No parsing is supported. This method will return NO. 40 | - (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string errorDescription:(out NSString * _Nullable * _Nullable)error; 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSEnumerator.h: -------------------------------------------------------------------------------- 1 | /* NSEnumerator.h 2 | Copyright (c) 1995-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | @class NSArray; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /* 12 | * The fast enumeration protocol NSFastEnumeration is adopted and 13 | * implemented by objects wishing to make use of a fast and safe 14 | * enumeration style. The language "foreach" construct then can 15 | * be used with such objects. 16 | * 17 | * The abstract class NSEnumerator itself is taught how to do this 18 | * for convenience by using -nextObject to return items one at a time. 19 | */ 20 | 21 | typedef struct { 22 | unsigned long state; 23 | id __unsafe_unretained _Nullable * _Nullable itemsPtr; 24 | unsigned long * _Nullable mutationsPtr; 25 | unsigned long extra[5]; 26 | } NSFastEnumerationState; 27 | 28 | @protocol NSFastEnumeration 29 | 30 | - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id __unsafe_unretained _Nullable [_Nonnull])buffer count:(NSUInteger)len; 31 | 32 | @end 33 | 34 | @interface NSEnumerator : NSObject 35 | 36 | - (nullable ObjectType)nextObject; 37 | 38 | @end 39 | 40 | @interface NSEnumerator (NSExtendedEnumerator) 41 | 42 | @property (readonly, copy) NSArray *allObjects; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSExtensionContext.h: -------------------------------------------------------------------------------- 1 | /* NSExtensionContext.h 2 | Copyright (c) 2013-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | #if __OBJC2__ 8 | 9 | // Class representing the extension request's context 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) 13 | @interface NSExtensionContext : NSObject 14 | 15 | // The list of input NSExtensionItems associated with the context. If the context has no input items, this array will be empty. 16 | @property(readonly, copy, NS_NONATOMIC_IOSONLY) NSArray *inputItems; 17 | 18 | // Signals the host to complete the app extension request with the supplied result items. The completion handler optionally contains any work which the extension may need to perform after the request has been completed, as a background-priority task. The `expired` parameter will be YES if the system decides to prematurely terminate a previous non-expiration invocation of the completionHandler. Note: calling this method will eventually dismiss the associated view controller. 19 | - (void)completeRequestReturningItems:(nullable NSArray *)items completionHandler:(void(^ _Nullable)(BOOL expired))completionHandler; 20 | 21 | // Signals the host to cancel the app extension request, with the supplied error, which should be non-nil. The userInfo of the NSError will contain a key NSExtensionItemsAndErrorsKey which will have as its value a dictionary of NSExtensionItems and associated NSError instances. 22 | - (void)cancelRequestWithError:(NSError *)error; 23 | 24 | // Asks the host to open an URL on the extension's behalf 25 | - (void)openURL:(NSURL *)URL completionHandler:(void (^ _Nullable)(BOOL success))completionHandler; 26 | 27 | @end 28 | 29 | // Key in userInfo. Value is a dictionary of NSExtensionItems and associated NSError instances. 30 | FOUNDATION_EXTERN NSString * __null_unspecified const NSExtensionItemsAndErrorsKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); 31 | 32 | // The host process will enter the foreground 33 | FOUNDATION_EXTERN NSString * __null_unspecified const NSExtensionHostWillEnterForegroundNotification API_AVAILABLE(ios(8.2), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos); 34 | 35 | // The host process did enter the background 36 | FOUNDATION_EXTERN NSString * __null_unspecified const NSExtensionHostDidEnterBackgroundNotification API_AVAILABLE(ios(8.2), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos); 37 | 38 | // The host process will resign active status (stop receiving events), the extension may be suspended 39 | FOUNDATION_EXTERN NSString * __null_unspecified const NSExtensionHostWillResignActiveNotification API_AVAILABLE(ios(8.2), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos); 40 | 41 | // The host process did become active (begin receiving events) 42 | FOUNDATION_EXTERN NSString * __null_unspecified const NSExtensionHostDidBecomeActiveNotification API_AVAILABLE(ios(8.2), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macos); 43 | 44 | NS_ASSUME_NONNULL_END 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSExtensionItem.h: -------------------------------------------------------------------------------- 1 | /* NSExtensionItem.h 2 | Copyright (c) 2013-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #import 7 | 8 | #if __OBJC2__ 9 | // A NSExtensionItem is an immutable collection of values representing different aspects of an item for the extension to act upon. 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) 13 | @interface NSExtensionItem : NSObject 14 | 15 | // (optional) title for the item 16 | @property(nullable, copy, NS_NONATOMIC_IOSONLY) NSAttributedString *attributedTitle; 17 | 18 | // (optional) content text 19 | @property(nullable, copy, NS_NONATOMIC_IOSONLY) NSAttributedString *attributedContentText; 20 | 21 | // (optional) Contains images, videos, URLs, etc. This is not meant to be an array of alternate data formats/types, but instead a collection to include in a social media post for example. 22 | @property(nullable, copy, NS_NONATOMIC_IOSONLY) NSArray *attachments; 23 | 24 | // (optional) dictionary of key-value data. The key/value pairs accepted by the service are expected to be specified in the extension's Info.plist. The values of NSExtensionItem's properties will be reflected into the dictionary. 25 | @property(nullable, copy, NS_NONATOMIC_IOSONLY) NSDictionary *userInfo; 26 | 27 | @end 28 | 29 | // Keys corresponding to properties exposed on the NSExtensionItem interface 30 | FOUNDATION_EXTERN NSString * _Null_unspecified const NSExtensionItemAttributedTitleKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); 31 | FOUNDATION_EXTERN NSString * _Null_unspecified const NSExtensionItemAttributedContentTextKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); 32 | FOUNDATION_EXTERN NSString * _Null_unspecified const NSExtensionItemAttachmentsKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); 33 | 34 | NS_ASSUME_NONNULL_END 35 | #endif 36 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSExtensionRequestHandling.h: -------------------------------------------------------------------------------- 1 | /* NSExtensionRequestHandling.h 2 | Copyright (c) 2013-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | #if __OBJC2__ 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | @class NSExtensionContext; 11 | 12 | // The basic NSExtensionRequestHandling protocol defines a lifecycle hook into the extension. Non view-controller-based services might keep track of the current request using this method. Implemented by the principal object of the extension. 13 | @protocol NSExtensionRequestHandling 14 | 15 | @required 16 | 17 | // Tells the extension to prepare its interface for the requesting context, and request related data items. At this point [(NS|UI)ViewController extensionContext] returns a non-nil value. This message is delivered after initialization, but before the conforming object will be asked to "do something" with the context (i.e. before -[(NS|UI)ViewController loadView]). Subclasses of classes conforming to this protocol are expected to call [super beginRequestWithExtensionContext:] if this method is overridden. 18 | - (void)beginRequestWithExtensionContext:(NSExtensionContext *)context; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | #endif 24 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSIndexPath.h: -------------------------------------------------------------------------------- 1 | /* NSIndexPath.h 2 | Copyright (c) 2003-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #import 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | @interface NSIndexPath : NSObject { 11 | @private 12 | NSUInteger *_indexes; 13 | #if !__OBJC2__ 14 | NSUInteger _hash; 15 | #endif 16 | NSUInteger _length; 17 | void *_reserved; 18 | } 19 | 20 | + (instancetype)indexPathWithIndex:(NSUInteger)index; 21 | + (instancetype)indexPathWithIndexes:(const NSUInteger [_Nullable])indexes length:(NSUInteger)length; 22 | 23 | - (instancetype)initWithIndexes:(const NSUInteger [_Nullable])indexes length:(NSUInteger)length NS_DESIGNATED_INITIALIZER; 24 | 25 | - (instancetype)initWithIndex:(NSUInteger)index; 26 | 27 | 28 | - (NSIndexPath *)indexPathByAddingIndex:(NSUInteger)index; 29 | - (NSIndexPath *)indexPathByRemovingLastIndex; 30 | 31 | - (NSUInteger)indexAtPosition:(NSUInteger)position; 32 | @property (readonly) NSUInteger length; 33 | 34 | /*! 35 | @abstract Copies the indexes stored in this index path from the positions specified by positionRange into indexes. 36 | @param indexes Buffer of at least as many NSUIntegers as specified by the length of positionRange. On return, this memory will hold the index path's indexes. 37 | @param positionRange A range of valid positions within this index path. If the location plus the length of positionRange is greater than the length of this index path, this method raises an NSRangeException. 38 | @discussion 39 | It is the developer’s responsibility to allocate the memory for the C array. 40 | */ 41 | - (void)getIndexes:(NSUInteger *)indexes range:(NSRange)positionRange API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0)); 42 | 43 | // comparison support 44 | - (NSComparisonResult)compare:(NSIndexPath *)otherObject; // sorting an array of indexPaths using this comparison results in an array representing nodes in depth-first traversal order 45 | 46 | @end 47 | 48 | @interface NSIndexPath (NSDeprecated) 49 | /// This method is unsafe because it could potentially cause buffer overruns. You should use -getIndexes:range: instead. 50 | - (void)getIndexes:(NSUInteger *)indexes API_DEPRECATED_WITH_REPLACEMENT("getIndexes:range:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)); // use -getIndexes:range: instead 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSInvocation.h: -------------------------------------------------------------------------------- 1 | /* NSInvocation.h 2 | Copyright (c) 1994-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #include 7 | 8 | @class NSMethodSignature; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | NS_SWIFT_UNAVAILABLE("NSInvocation and related APIs not available") 13 | @interface NSInvocation : NSObject { 14 | @private 15 | void *_frame; 16 | void *_retdata; 17 | id _signature; 18 | id _container; 19 | uint8_t _retainedArgs; 20 | uint8_t _reserved[15]; 21 | } 22 | 23 | + (NSInvocation *)invocationWithMethodSignature:(NSMethodSignature *)sig; 24 | 25 | @property (readonly, retain) NSMethodSignature *methodSignature; 26 | 27 | - (void)retainArguments; 28 | @property (readonly) BOOL argumentsRetained; 29 | 30 | @property (nullable, assign) id target; 31 | @property SEL selector; 32 | 33 | - (void)getReturnValue:(void *)retLoc; 34 | - (void)setReturnValue:(void *)retLoc; 35 | 36 | - (void)getArgument:(void *)argumentLocation atIndex:(NSInteger)idx; 37 | - (void)setArgument:(void *)argumentLocation atIndex:(NSInteger)idx; 38 | 39 | - (void)invoke; 40 | - (void)invokeWithTarget:(id)target; 41 | 42 | @end 43 | 44 | 45 | #if TARGET_OS_OSX 46 | #if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5 47 | 48 | enum _NSObjCValueType { 49 | NSObjCNoType = 0, 50 | NSObjCVoidType = 'v', 51 | NSObjCCharType = 'c', 52 | NSObjCShortType = 's', 53 | NSObjCLongType = 'l', 54 | NSObjCLonglongType = 'q', 55 | NSObjCFloatType = 'f', 56 | NSObjCDoubleType = 'd', 57 | NSObjCBoolType = 'B', 58 | NSObjCSelectorType = ':', 59 | NSObjCObjectType = '@', 60 | NSObjCStructType = '{', 61 | NSObjCPointerType = '^', 62 | NSObjCStringType = '*', 63 | NSObjCArrayType = '[', 64 | NSObjCUnionType = '(', 65 | NSObjCBitfield = 'b' 66 | } API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0)); 67 | 68 | typedef struct { 69 | NSInteger type API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0)); 70 | union { 71 | char charValue; 72 | short shortValue; 73 | long longValue; 74 | long long longlongValue; 75 | float floatValue; 76 | double doubleValue; 77 | bool boolValue; 78 | SEL selectorValue; 79 | id objectValue; 80 | void *pointerValue; 81 | void *structLocation; 82 | char *cStringLocation; 83 | } value API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0)); 84 | } NSObjCValue API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0)); 85 | 86 | #endif 87 | #endif 88 | 89 | NS_ASSUME_NONNULL_END 90 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSItemProviderReadingWriting.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSItemProviderReadingWriting.h 3 | // Foundation 4 | // 5 | // Copyright (c) 2017-2019, Apple Inc. All rights reserved. 6 | // 7 | 8 | #import 9 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSLengthFormatter.h: -------------------------------------------------------------------------------- 1 | /* NSLengthFormatter.h 2 | Copyright (c) 2014-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | typedef NS_ENUM(NSInteger, NSLengthFormatterUnit) { 10 | NSLengthFormatterUnitMillimeter = 8, 11 | NSLengthFormatterUnitCentimeter = 9, 12 | NSLengthFormatterUnitMeter = 11, 13 | NSLengthFormatterUnitKilometer = 14, 14 | NSLengthFormatterUnitInch = (5 << 8) + 1, 15 | NSLengthFormatterUnitFoot = (5 << 8) + 2, 16 | NSLengthFormatterUnitYard = (5 << 8) + 3, 17 | NSLengthFormatterUnitMile = (5 << 8) + 4, 18 | } API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); 19 | 20 | API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) 21 | @interface NSLengthFormatter : NSFormatter { 22 | @private 23 | void *_formatter; 24 | BOOL _isForPersonHeight; 25 | void *_reserved[2]; 26 | } 27 | @property (null_resettable, copy) NSNumberFormatter *numberFormatter; // default is NSNumberFormatter with NSNumberFormatterDecimalStyle 28 | @property NSFormattingUnitStyle unitStyle; // default is NSFormattingUnitStyleMedium 29 | 30 | @property (getter = isForPersonHeightUse) BOOL forPersonHeightUse; // default is NO; if it is set to YES, the number argument for -stringFromMeters: and -unitStringFromMeters: is considered as a person's height 31 | 32 | // Format a combination of a number and an unit to a localized string. 33 | - (NSString *)stringFromValue:(double)value unit:(NSLengthFormatterUnit)unit; 34 | 35 | // Format a number in meters to a localized string with the locale-appropriate unit and an appropriate scale (e.g. 4.3m = 14.1ft in the US locale). 36 | - (NSString *)stringFromMeters:(double)numberInMeters; 37 | 38 | // Return a localized string of the given unit, and if the unit is singular or plural is based on the given number. 39 | - (NSString *)unitStringFromValue:(double)value unit:(NSLengthFormatterUnit)unit; 40 | 41 | // Return the locale-appropriate unit, the same unit used by -stringFromMeters:. 42 | - (NSString *)unitStringFromMeters:(double)numberInMeters usedUnit:(nullable NSLengthFormatterUnit *)unitp; 43 | 44 | // No parsing is supported. This method will return NO. 45 | - (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string errorDescription:(out NSString * _Nullable * _Nullable)error; 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSListFormatter.h: -------------------------------------------------------------------------------- 1 | /* NSListFormatter.h 2 | Copyright (c) 2018-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #import 7 | #import 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /* NSListFormatter provides locale-correct formatting of a list of items using the appropriate separator and conjunction. Note that the list formatter is unaware of the context where the joined string will be used, e.g., in the beginning of the sentence or used as a standalone string in the UI, so it will not provide any sort of capitalization customization on the given items, but merely join them as-is. The string joined this way may not be grammatically correct when placed in a sentence, and it should only be used in a standalone manner. 12 | */ 13 | API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0)) 14 | @interface NSListFormatter : NSFormatter 15 | #if !__OBJC2__ 16 | { 17 | @private 18 | void * _listFormatter; 19 | NSLocale *_locale; 20 | NSFormatter *_itemFormatter; 21 | } 22 | #endif // !__OBJC2__ 23 | 24 | /* Specifies the locale to format the items. Defaults to autoupdatingCurrentLocale. Also resets to autoupdatingCurrentLocale on assignment of nil. 25 | */ 26 | @property (null_resettable, copy) NSLocale *locale; 27 | 28 | /* Specifies how each object should be formatted. If not set, the object is formatted using its instance method in the following order: -descriptionWithLocale:, -localizedDescription, and -description. 29 | */ 30 | @property (nullable, copy) NSFormatter *itemFormatter; 31 | 32 | /* Convenience method to return a string constructed from an array of strings using the list format specific to the current locale. It is recommended to join only disjointed strings that are ready to display in a bullet-point list. Sentences, phrases with punctuations, and appositions may not work well when joined together. 33 | */ 34 | + (NSString *)localizedStringByJoiningStrings:(NSArray *)strings; 35 | 36 | /* Convenience method for -stringForObjectValue:. Returns a string constructed from an array in the locale-aware format. Each item is formatted using the itemFormatter. If the itemFormatter does not apply to a particular item, the method will fall back to the item's -descriptionWithLocale: or -localizedDescription if implemented, or -description if not. 37 | 38 | Returns nil if `items` is nil or if the list formatter cannot generate a string representation for all items in the array. 39 | */ 40 | - (nullable NSString *)stringFromItems:(NSArray *)items; 41 | 42 | /* Inherited from NSFormatter. `obj` must be an instance of NSArray. Returns nil if `obj` is nil, not an instance of NSArray, or if the list formatter cannot generate a string representation for all objects in the array. 43 | */ 44 | - (nullable NSString *)stringForObjectValue:(nullable id)obj; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSLock.h: -------------------------------------------------------------------------------- 1 | /* NSLock.h 2 | Copyright (c) 1994-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | @class NSDate; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | @protocol NSLocking 12 | 13 | - (void)lock; 14 | - (void)unlock; 15 | 16 | @end 17 | 18 | @interface NSLock : NSObject { 19 | @private 20 | void *_priv; 21 | } 22 | 23 | - (BOOL)tryLock; 24 | - (BOOL)lockBeforeDate:(NSDate *)limit; 25 | 26 | @property (nullable, copy) NSString *name API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); 27 | 28 | @end 29 | 30 | @interface NSConditionLock : NSObject { 31 | @private 32 | void *_priv; 33 | } 34 | 35 | - (instancetype)initWithCondition:(NSInteger)condition NS_DESIGNATED_INITIALIZER; 36 | 37 | @property (readonly) NSInteger condition; 38 | - (void)lockWhenCondition:(NSInteger)condition; 39 | - (BOOL)tryLock; 40 | - (BOOL)tryLockWhenCondition:(NSInteger)condition; 41 | - (void)unlockWithCondition:(NSInteger)condition; 42 | - (BOOL)lockBeforeDate:(NSDate *)limit; 43 | - (BOOL)lockWhenCondition:(NSInteger)condition beforeDate:(NSDate *)limit; 44 | 45 | @property (nullable, copy) NSString *name API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); 46 | 47 | @end 48 | 49 | @interface NSRecursiveLock : NSObject { 50 | @private 51 | void *_priv; 52 | } 53 | 54 | - (BOOL)tryLock; 55 | - (BOOL)lockBeforeDate:(NSDate *)limit; 56 | 57 | @property (nullable, copy) NSString *name API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); 58 | 59 | @end 60 | 61 | 62 | 63 | API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) 64 | @interface NSCondition : NSObject { 65 | @private 66 | void *_priv; 67 | } 68 | 69 | - (void)wait; 70 | - (BOOL)waitUntilDate:(NSDate *)limit; 71 | - (void)signal; 72 | - (void)broadcast; 73 | 74 | @property (nullable, copy) NSString *name API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); 75 | 76 | @end 77 | 78 | NS_ASSUME_NONNULL_END 79 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSMassFormatter.h: -------------------------------------------------------------------------------- 1 | /* NSMassFormatter.h 2 | Copyright (c) 2014-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | @class NSNumberFormatter; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | typedef NS_ENUM(NSInteger, NSMassFormatterUnit) { 12 | NSMassFormatterUnitGram = 11, 13 | NSMassFormatterUnitKilogram = 14, 14 | NSMassFormatterUnitOunce = (6 << 8) + 1, 15 | NSMassFormatterUnitPound = (6 << 8) + 2, 16 | NSMassFormatterUnitStone = (6 << 8) + 3, 17 | } API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); 18 | 19 | API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) 20 | @interface NSMassFormatter : NSFormatter { 21 | @private 22 | void *_formatter; 23 | BOOL _isForPersonMassUse; 24 | void *_reserved[2]; 25 | } 26 | 27 | @property (null_resettable, copy) NSNumberFormatter *numberFormatter; // default is NSNumberFormatter with NSNumberFormatterDecimalStyle 28 | @property NSFormattingUnitStyle unitStyle; // default is NSFormattingUnitStyleMedium 29 | @property (getter = isForPersonMassUse) BOOL forPersonMassUse; // default is NO; if it is set to YES, the number argument for -stringFromKilograms: and -unitStringFromKilograms: is considered as a person’s mass 30 | 31 | // Format a combination of a number and an unit to a localized string. 32 | - (NSString *)stringFromValue:(double)value unit:(NSMassFormatterUnit)unit; 33 | 34 | // Format a number in kilograms to a localized string with the locale-appropriate unit and an appropriate scale (e.g. 1.2kg = 2.64lb in the US locale). 35 | - (NSString *)stringFromKilograms:(double)numberInKilograms; 36 | 37 | // Return a localized string of the given unit, and if the unit is singular or plural is based on the given number. 38 | - (NSString *)unitStringFromValue:(double)value unit:(NSMassFormatterUnit)unit; 39 | 40 | // Return the locale-appropriate unit, the same unit used by -stringFromKilograms:. 41 | - (NSString *)unitStringFromKilograms:(double)numberInKilograms usedUnit:(nullable NSMassFormatterUnit *)unitp; 42 | 43 | // No parsing is supported. This method will return NO. 44 | - (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string errorDescription:(out NSString * _Nullable * _Nullable)error; 45 | @end 46 | 47 | NS_ASSUME_NONNULL_END 48 | 49 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSMeasurement.h: -------------------------------------------------------------------------------- 1 | /* 2 | NSMeasurement.h 3 | Copyright (c) 2015-2019, Apple Inc. 4 | All rights reserved. 5 | */ 6 | 7 | #import 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0)) 13 | @interface NSMeasurement : NSObject { 14 | @private 15 | UnitType _unit; 16 | double _doubleValue; 17 | } 18 | 19 | @property (readonly, copy) UnitType unit; 20 | @property (readonly) double doubleValue; 21 | 22 | - (instancetype)init API_UNAVAILABLE(macos, ios, watchos, tvos); 23 | - (instancetype)initWithDoubleValue:(double)doubleValue unit:(UnitType)unit NS_DESIGNATED_INITIALIZER; 24 | 25 | /* 26 | Given an NSUnit object, canBeConvertedToUnit: will check for dimensionality i.e. check the unit type (NSUnitAngle, NSUnitLength, NSUnitCustom, etc.) of the NSUnit object. It will return YES if the unit type of the given unit is the same as the unit type of the unit within the NSMeasurement object and NO if not. 27 | Note: This method will return NO if given or called on a dimensionless unit. 28 | */ 29 | - (BOOL)canBeConvertedToUnit:(NSUnit *)unit; 30 | 31 | /* 32 | Given an NSUnit object, measurementByConvertingUnit: will first check for dimensionality i.e. check the unit type (NSUnitAngle, NSUnitLength, NSUnitCustom, etc.) of the NSUnit object. If the unit type of the given unit is not the same as the unit type of the unit within the NSMeasurement object (i.e. the units are of differing dimensionalities), measurementByConvertingToUnit: will throw an InvalidArgumentException. 33 | 34 | @return A new NSMeasurement object with the given unit and converted value. 35 | */ 36 | - (NSMeasurement *)measurementByConvertingToUnit:(NSUnit *)unit; 37 | 38 | /* 39 | Given an NSMeasurement object, these methods will first check for dimensionality i.e. check the unit type (NSUnitAngle, NSUnitLength, NSUnitCustom, etc.) of the unit contained in that object. If the unit type of the unit in the given NSMeasurement object is not the same as the unit type of the unit within the current NSMeasurement instance (i.e. the units are of differing dimensionalities), these methods will throw an InvalidArgumentException. 40 | 41 | @return A new NSMeasurement object with the adjusted value and a unit that is the same type as the current NSMeasurement instance. 42 | */ 43 | - (NSMeasurement *)measurementByAddingMeasurement:(NSMeasurement *)measurement; 44 | - (NSMeasurement *)measurementBySubtractingMeasurement:(NSMeasurement *)measurement; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSMethodSignature.h: -------------------------------------------------------------------------------- 1 | /* NSMethodSignature.h 2 | Copyright (c) 1994-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | NS_SWIFT_UNAVAILABLE("NSInvocation and related APIs not available") 10 | @interface NSMethodSignature : NSObject 11 | #if !__OBJC2__ 12 | { 13 | @private 14 | void *_private; 15 | void *_reserved[5]; 16 | unsigned long _flags; 17 | } 18 | #endif 19 | 20 | + (nullable NSMethodSignature *)signatureWithObjCTypes:(const char *)types; 21 | 22 | @property (readonly) NSUInteger numberOfArguments; 23 | - (const char *)getArgumentTypeAtIndex:(NSUInteger)idx NS_RETURNS_INNER_POINTER; 24 | 25 | @property (readonly) NSUInteger frameLength; 26 | 27 | - (BOOL)isOneway; 28 | 29 | @property (readonly) const char *methodReturnType NS_RETURNS_INNER_POINTER; 30 | @property (readonly) NSUInteger methodReturnLength; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSNotification.h: -------------------------------------------------------------------------------- 1 | /* NSNotification.h 2 | Copyright (c) 1994-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | typedef NSString *NSNotificationName NS_EXTENSIBLE_STRING_ENUM; 8 | 9 | @class NSString, NSDictionary, NSOperationQueue; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | /**************** Notifications ****************/ 14 | 15 | @interface NSNotification : NSObject 16 | 17 | @property (readonly, copy) NSNotificationName name; 18 | @property (nullable, readonly, retain) id object; 19 | @property (nullable, readonly, copy) NSDictionary *userInfo; 20 | 21 | - (instancetype)initWithName:(NSNotificationName)name object:(nullable id)object userInfo:(nullable NSDictionary *)userInfo API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER; 22 | - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; 23 | 24 | @end 25 | 26 | @interface NSNotification (NSNotificationCreation) 27 | 28 | + (instancetype)notificationWithName:(NSNotificationName)aName object:(nullable id)anObject; 29 | + (instancetype)notificationWithName:(NSNotificationName)aName object:(nullable id)anObject userInfo:(nullable NSDictionary *)aUserInfo; 30 | 31 | - (instancetype)init /*API_UNAVAILABLE(macos, ios, watchos, tvos)*/; /* do not invoke; not a valid initializer for this class */ 32 | 33 | @end 34 | 35 | /**************** Notification Center ****************/ 36 | 37 | @interface NSNotificationCenter : NSObject { 38 | @package 39 | void *_impl; 40 | void *_callback; 41 | void *_pad[11]; 42 | } 43 | 44 | @property (class, readonly, strong) NSNotificationCenter *defaultCenter; 45 | 46 | - (void)addObserver:(id)observer selector:(SEL)aSelector name:(nullable NSNotificationName)aName object:(nullable id)anObject; 47 | 48 | - (void)postNotification:(NSNotification *)notification; 49 | - (void)postNotificationName:(NSNotificationName)aName object:(nullable id)anObject; 50 | - (void)postNotificationName:(NSNotificationName)aName object:(nullable id)anObject userInfo:(nullable NSDictionary *)aUserInfo; 51 | 52 | - (void)removeObserver:(id)observer; 53 | - (void)removeObserver:(id)observer name:(nullable NSNotificationName)aName object:(nullable id)anObject; 54 | 55 | - (id )addObserverForName:(nullable NSNotificationName)name object:(nullable id)obj queue:(nullable NSOperationQueue *)queue usingBlock:(void (^)(NSNotification *note))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 56 | // The return value is retained by the system, and should be held onto by the caller in 57 | // order to remove the observer with removeObserver: later, to stop observation. 58 | 59 | @end 60 | 61 | NS_ASSUME_NONNULL_END 62 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSNotificationQueue.h: -------------------------------------------------------------------------------- 1 | /* NSNotificationQueue.h 2 | Copyright (c) 1994-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #import 7 | 8 | @class NSNotification, NSNotificationCenter, NSArray, NSString; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | typedef NS_ENUM(NSUInteger, NSPostingStyle) { 13 | NSPostWhenIdle = 1, 14 | NSPostASAP = 2, 15 | NSPostNow = 3 16 | }; 17 | 18 | typedef NS_OPTIONS(NSUInteger, NSNotificationCoalescing) { 19 | NSNotificationNoCoalescing = 0, 20 | NSNotificationCoalescingOnName = 1, 21 | NSNotificationCoalescingOnSender = 2 22 | }; 23 | 24 | @interface NSNotificationQueue : NSObject { 25 | @private 26 | id _notificationCenter; 27 | id _asapQueue; 28 | id _asapObs; 29 | id _idleQueue; 30 | id _idleObs; 31 | } 32 | @property (class, readonly, strong) NSNotificationQueue *defaultQueue; 33 | 34 | - (instancetype)initWithNotificationCenter:(NSNotificationCenter *)notificationCenter NS_DESIGNATED_INITIALIZER; 35 | 36 | - (void)enqueueNotification:(NSNotification *)notification postingStyle:(NSPostingStyle)postingStyle; 37 | - (void)enqueueNotification:(NSNotification *)notification postingStyle:(NSPostingStyle)postingStyle coalesceMask:(NSNotificationCoalescing)coalesceMask forModes:(nullable NSArray *)modes; 38 | 39 | - (void)dequeueNotificationsMatching:(NSNotification *)notification coalesceMask:(NSUInteger)coalesceMask; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSNull.h: -------------------------------------------------------------------------------- 1 | /* NSNull.h 2 | Copyright (c) 1994-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface NSNull : NSObject 10 | 11 | + (NSNull *)null; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSOrderedCollectionChange.h: -------------------------------------------------------------------------------- 1 | /* NSOrderedCollectionChange.h 2 | Copyright (c) 2017-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | typedef NS_ENUM(NSInteger, NSCollectionChangeType) { 10 | NSCollectionChangeInsert, 11 | NSCollectionChangeRemove 12 | } API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0)); 13 | 14 | API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0)) 15 | @interface NSOrderedCollectionChange : NSObject 16 | #ifndef __OBJC2__ 17 | { 18 | @private 19 | id _object; 20 | NSCollectionChangeType _changeType; 21 | NSUInteger _index; 22 | NSUInteger _associatedIndex; 23 | } 24 | #endif // !__OBJC2__ 25 | 26 | + (NSOrderedCollectionChange *)changeWithObject:(nullable ObjectType)anObject 27 | type:(NSCollectionChangeType)type 28 | index:(NSUInteger)index; 29 | 30 | + (NSOrderedCollectionChange *)changeWithObject:(nullable ObjectType)anObject 31 | type:(NSCollectionChangeType)type 32 | index:(NSUInteger)index 33 | associatedIndex:(NSUInteger)associatedIndex; 34 | 35 | // The object that was inserted or removed, if recorded 36 | @property (readonly, strong, nullable) ObjectType object; 37 | 38 | // The change type: insert or remove 39 | @property (readonly) NSCollectionChangeType changeType; 40 | 41 | // For removes, the index of the object in the original state. 42 | // For inserts, the index of the object in the final state. 43 | @property (readonly) NSUInteger index; 44 | 45 | // When non-NSNotFound, indicates that this change is one half of a move, with 46 | // this value referring to the index of the other change that completes it. 47 | // For differences produced by identity comparison (instead of equality), each 48 | // change representing a move operation may store different objects. 49 | @property (readonly) NSUInteger associatedIndex; 50 | 51 | - (id)init API_UNAVAILABLE(macos, ios, watchos, tvos); 52 | 53 | - (instancetype)initWithObject:(nullable ObjectType)anObject 54 | type:(NSCollectionChangeType)type 55 | index:(NSUInteger)index; 56 | 57 | - (instancetype)initWithObject:(nullable ObjectType)anObject 58 | type:(NSCollectionChangeType)type 59 | index:(NSUInteger)index 60 | associatedIndex:(NSUInteger)associatedIndex NS_DESIGNATED_INITIALIZER; 61 | @end 62 | 63 | NS_ASSUME_NONNULL_END 64 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSOrthography.h: -------------------------------------------------------------------------------- 1 | /* NSOrthography.h 2 | Copyright (c) 2008-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | @class NSString, NSArray, NSDictionary; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /* NSOrthography is a class used to describe the linguistic content of a piece of text, especially for the purposes of spelling and grammar checking. It describes (a) which scripts the text contains, (b) a dominant language and possibly other languages for each of these scripts, and (c) a dominant script and language for the text as a whole. Scripts are uniformly described by standard four-letter tags (Latn, Grek, Cyrl, etc.) with the supertags Jpan and Kore typically used for Japanese and Korean text, Hans and Hant for Chinese text; the tag Zyyy is used if a specific script cannot be identified. Languages are uniformly described by BCP-47 tags, preferably in canonical form; the tag und is used if a specific language cannot be determined. */ 12 | 13 | API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)) 14 | @interface NSOrthography : NSObject 15 | 16 | /* These are the primitive properties which a subclass must implement. The dominantScript should be a script tag (such as Latn, Cyrl, and so forth) and the languageMap should be a dictionary whose keys are script tags and whose values are arrays of language tags (such as en, fr, de, and so forth). */ 17 | @property (readonly, copy) NSString *dominantScript; 18 | @property (readonly, copy) NSDictionary *> *languageMap; 19 | - (instancetype)initWithDominantScript:(NSString *)script languageMap:(NSDictionary *> *)map API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER; 20 | - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER; 21 | 22 | @end 23 | 24 | @interface NSOrthography (NSOrthographyExtended) 25 | 26 | /* languagesForScript: returns the list of languages for the specified script, and dominantLanguageForScript: returns the first item on that list. */ 27 | - (nullable NSArray *)languagesForScript:(NSString *)script API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 28 | - (nullable NSString *)dominantLanguageForScript:(NSString *)script API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 29 | 30 | /* The dominantLanguage is the first in the list of languages for the dominant script, allScripts includes the dominant script and all others appearing as keys in the language map, and allLanguages includes all languages appearing in the values of the language map. */ 31 | @property (readonly, copy) NSString *dominantLanguage API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 32 | @property (readonly, copy) NSArray *allScripts API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 33 | @property (readonly, copy) NSArray *allLanguages API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 34 | 35 | + (instancetype)defaultOrthographyForLanguage:(NSString *)language API_AVAILABLE(macosx(10.13), ios(11.0), watchos(4.0), tvos(11.0)); 36 | 37 | @end 38 | 39 | @interface NSOrthography (NSOrthographyCreation) 40 | 41 | + (instancetype)orthographyWithDominantScript:(NSString *)script languageMap:(NSDictionary *> *)map API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSPersonNameComponents.h: -------------------------------------------------------------------------------- 1 | /* NSPersonNameComponents.h 2 | Copyright (c) 2015-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #import 7 | #import 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) 11 | @interface NSPersonNameComponents : NSObject { 12 | @private 13 | id _private; 14 | } 15 | 16 | /* The below examples all assume the full name Dr. Johnathan Maple Appleseed Esq., nickname "Johnny" */ 17 | 18 | /* Pre-nominal letters denoting title, salutation, or honorific, e.g. Dr., Mr. */ 19 | @property (copy, nullable) NSString *namePrefix; 20 | 21 | /* Name bestowed upon an individual by one's parents, e.g. Johnathan */ 22 | @property (copy, nullable) NSString *givenName; 23 | 24 | /* Secondary given name chosen to differentiate those with the same first name, e.g. Maple */ 25 | @property (copy, nullable) NSString *middleName; 26 | 27 | /* Name passed from one generation to another to indicate lineage, e.g. Appleseed */ 28 | @property (copy, nullable) NSString *familyName; 29 | 30 | /* Post-nominal letters denoting degree, accreditation, or other honor, e.g. Esq., Jr., Ph.D. */ 31 | @property (copy, nullable) NSString *nameSuffix; 32 | 33 | /* Name substituted for the purposes of familiarity, e.g. "Johnny"*/ 34 | @property (copy, nullable) NSString *nickname; 35 | 36 | /* Each element of the phoneticRepresentation should correspond to an element of the original PersonNameComponents instance. 37 | The phoneticRepresentation of the phoneticRepresentation object itself will be ignored. nil by default, must be instantiated. 38 | */ 39 | @property (copy, nullable) NSPersonNameComponents *phoneticRepresentation; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSPointerArray.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NSPointerArray.h 3 | * Copyright (c) 2005-2019, Apple Inc. All rights reserved. 4 | * 5 | */ 6 | 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /* 15 | NSPointerArray.h 16 | 17 | A PointerArray acts like a traditional array that slides elements on insertion or deletion. 18 | Unlike traditional arrays, it holds NULLs, which can be inserted or extracted (and contribute to count). 19 | Also unlike traditional arrays, the 'count' of the array may be set directly. 20 | Using NSPointerFunctionsWeakMemory object references will turn to NULL on last release. 21 | 22 | The copying and archiving protocols are applicable only when NSPointerArray is configured for Object uses. 23 | The fast enumeration protocol (supporting the for..in statement) will yield NULLs if present. It is defined for all types of pointers although the language syntax doesn't directly support this. 24 | */ 25 | 26 | API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) 27 | @interface NSPointerArray : NSObject 28 | // construction 29 | - (instancetype)initWithOptions:(NSPointerFunctionsOptions)options NS_DESIGNATED_INITIALIZER; 30 | - (instancetype)initWithPointerFunctions:(NSPointerFunctions *)functions NS_DESIGNATED_INITIALIZER; 31 | 32 | + (NSPointerArray *)pointerArrayWithOptions:(NSPointerFunctionsOptions)options; 33 | + (NSPointerArray *)pointerArrayWithPointerFunctions:(NSPointerFunctions *)functions; 34 | 35 | /* return an NSPointerFunctions object reflecting the functions in use. This is a new autoreleased object that can be subsequently modified and/or used directly in the creation of other pointer "collections". */ 36 | @property (readonly, copy) NSPointerFunctions *pointerFunctions; 37 | 38 | - (nullable void *)pointerAtIndex:(NSUInteger)index; 39 | 40 | // Array like operations that slide or grow contents, including NULLs 41 | - (void)addPointer:(nullable void *)pointer; // add pointer at index 'count' 42 | - (void)removePointerAtIndex:(NSUInteger)index; // everything above index, including holes, slide lower 43 | - (void)insertPointer:(nullable void *)item atIndex:(NSUInteger)index; // everything at & above index, including holes, slide higher 44 | 45 | - (void)replacePointerAtIndex:(NSUInteger)index withPointer:(nullable void *)item; // O(1); NULL item is okay; index must be < count 46 | 47 | - (void)compact; // eliminate NULLs 48 | 49 | // Getter: the number of elements in the array, including NULLs 50 | // Setter: sets desired number of elements, adding NULLs or removing items as necessary. 51 | @property NSUInteger count; 52 | 53 | @end 54 | 55 | 56 | @interface NSPointerArray (NSPointerArrayConveniences) 57 | 58 | // construction 59 | #if TARGET_OS_OSX 60 | + (id) pointerArrayWithStrongObjects API_DEPRECATED("GC no longer supported", macos(10.5,10.8)) API_UNAVAILABLE(ios, watchos, tvos); // strong objects 61 | + (id) pointerArrayWithWeakObjects API_DEPRECATED("GC no longer supported", macos(10.5,10.8)) API_UNAVAILABLE(ios, watchos, tvos); // weak objects 62 | #endif 63 | 64 | + (NSPointerArray *)strongObjectsPointerArray API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)); 65 | + (NSPointerArray *)weakObjectsPointerArray API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)); 66 | 67 | @property (readonly, copy) NSArray *allObjects; 68 | 69 | @end 70 | 71 | NS_ASSUME_NONNULL_END 72 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSProxy.h: -------------------------------------------------------------------------------- 1 | /* NSProxy.h 2 | Copyright (c) 1994-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | 7 | @class NSMethodSignature, NSInvocation; 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | NS_ROOT_CLASS 12 | @interface NSProxy { 13 | Class isa; 14 | } 15 | 16 | + (id)alloc; 17 | + (id)allocWithZone:(nullable NSZone *)zone NS_AUTOMATED_REFCOUNT_UNAVAILABLE; 18 | + (Class)class; 19 | 20 | - (void)forwardInvocation:(NSInvocation *)invocation; 21 | - (nullable NSMethodSignature *)methodSignatureForSelector:(SEL)sel NS_SWIFT_UNAVAILABLE("NSInvocation and related APIs not available"); 22 | - (void)dealloc; 23 | - (void)finalize; 24 | @property (readonly, copy) NSString *description; 25 | @property (readonly, copy) NSString *debugDescription; 26 | + (BOOL)respondsToSelector:(SEL)aSelector; 27 | 28 | - (BOOL)allowsWeakReference API_UNAVAILABLE(macos, ios, watchos, tvos); 29 | - (BOOL)retainWeakReference API_UNAVAILABLE(macos, ios, watchos, tvos); 30 | 31 | // - (id)forwardingTargetForSelector:(SEL)aSelector; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSRange.h: -------------------------------------------------------------------------------- 1 | /* NSRange.h 2 | Copyright (c) 1994-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #import 7 | 8 | @class NSString; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | typedef struct _NSRange { 13 | NSUInteger location; 14 | NSUInteger length; 15 | } NSRange; 16 | 17 | typedef NSRange *NSRangePointer; 18 | 19 | NS_INLINE NSRange NSMakeRange(NSUInteger loc, NSUInteger len) { 20 | NSRange r; 21 | r.location = loc; 22 | r.length = len; 23 | return r; 24 | } 25 | 26 | NS_INLINE NSUInteger NSMaxRange(NSRange range) { 27 | return (range.location + range.length); 28 | } 29 | 30 | NS_INLINE BOOL NSLocationInRange(NSUInteger loc, NSRange range) { 31 | return (!(loc < range.location) && (loc - range.location) < range.length) ? YES : NO; 32 | } 33 | 34 | NS_INLINE BOOL NSEqualRanges(NSRange range1, NSRange range2) { 35 | return (range1.location == range2.location && range1.length == range2.length); 36 | } 37 | 38 | FOUNDATION_EXPORT NSRange NSUnionRange(NSRange range1, NSRange range2); 39 | FOUNDATION_EXPORT NSRange NSIntersectionRange(NSRange range1, NSRange range2); 40 | FOUNDATION_EXPORT NSString *NSStringFromRange(NSRange range); 41 | FOUNDATION_EXPORT NSRange NSRangeFromString(NSString *aString); 42 | 43 | @interface NSValue (NSValueRangeExtensions) 44 | 45 | + (NSValue *)valueWithRange:(NSRange)range; 46 | @property (readonly) NSRange rangeValue; 47 | 48 | @end 49 | 50 | NS_ASSUME_NONNULL_END 51 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSRunLoop.h: -------------------------------------------------------------------------------- 1 | /* NSRunLoop.h 2 | Copyright (c) 1994-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #import 7 | #import 8 | 9 | @class NSTimer, NSPort, NSArray, NSString; 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | FOUNDATION_EXPORT NSRunLoopMode const NSDefaultRunLoopMode; 14 | FOUNDATION_EXPORT NSRunLoopMode const NSRunLoopCommonModes API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); 15 | 16 | @interface NSRunLoop : NSObject { 17 | @private 18 | id _rl; 19 | id _dperf; 20 | id _perft; 21 | id _info; 22 | id _ports; 23 | void *_reserved[6]; 24 | } 25 | 26 | @property (class, readonly, strong) NSRunLoop *currentRunLoop; 27 | @property (class, readonly, strong) NSRunLoop *mainRunLoop API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); 28 | 29 | @property (nullable, readonly, copy) NSRunLoopMode currentMode; 30 | 31 | - (CFRunLoopRef)getCFRunLoop CF_RETURNS_NOT_RETAINED; 32 | 33 | - (void)addTimer:(NSTimer *)timer forMode:(NSRunLoopMode)mode; 34 | 35 | - (void)addPort:(NSPort *)aPort forMode:(NSRunLoopMode)mode; 36 | - (void)removePort:(NSPort *)aPort forMode:(NSRunLoopMode)mode; 37 | 38 | - (nullable NSDate *)limitDateForMode:(NSRunLoopMode)mode; 39 | - (void)acceptInputForMode:(NSRunLoopMode)mode beforeDate:(NSDate *)limitDate; 40 | 41 | @end 42 | 43 | @interface NSRunLoop (NSRunLoopConveniences) 44 | 45 | - (void)run; 46 | - (void)runUntilDate:(NSDate *)limitDate; 47 | - (BOOL)runMode:(NSRunLoopMode)mode beforeDate:(NSDate *)limitDate; 48 | 49 | #if TARGET_OS_OSX 50 | - (void)configureAsServer API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0)); 51 | #endif 52 | 53 | /// Schedules the execution of a block on the target run loop in given modes. 54 | /// - parameter: modes An array of input modes for which the block may be executed. 55 | /// - parameter: block The block to execute 56 | - (void)performInModes:(NSArray *)modes block:(void (^)(void))block API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)); 57 | 58 | /// Schedules the execution of a block on the target run loop. 59 | /// - parameter: block The block to execute 60 | - (void)performBlock:(void (^)(void))block API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)); 61 | 62 | @end 63 | 64 | /**************** Delayed perform ******************/ 65 | 66 | @interface NSObject (NSDelayedPerforming) 67 | 68 | - (void)performSelector:(SEL)aSelector withObject:(nullable id)anArgument afterDelay:(NSTimeInterval)delay inModes:(NSArray *)modes; 69 | - (void)performSelector:(SEL)aSelector withObject:(nullable id)anArgument afterDelay:(NSTimeInterval)delay; 70 | + (void)cancelPreviousPerformRequestsWithTarget:(id)aTarget selector:(SEL)aSelector object:(nullable id)anArgument; 71 | + (void)cancelPreviousPerformRequestsWithTarget:(id)aTarget; 72 | 73 | @end 74 | 75 | @interface NSRunLoop (NSOrderedPerform) 76 | 77 | - (void)performSelector:(SEL)aSelector target:(id)target argument:(nullable id)arg order:(NSUInteger)order modes:(NSArray *)modes; 78 | - (void)cancelPerformSelector:(SEL)aSelector target:(id)target argument:(nullable id)arg; 79 | - (void)cancelPerformSelectorsWithTarget:(id)target; 80 | 81 | @end 82 | 83 | NS_ASSUME_NONNULL_END 84 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSSortDescriptor.h: -------------------------------------------------------------------------------- 1 | /* 2 | NSSortDescriptor.h 3 | Foundation 4 | Copyright (c) 2002-2019, Apple Inc. All rights reserved. 5 | */ 6 | 7 | #import 8 | #import 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NSSortDescriptor : NSObject { 14 | @private 15 | NSUInteger _sortDescriptorFlags; 16 | NSString *_key; 17 | SEL _selector; 18 | id _selectorOrBlock; 19 | } 20 | 21 | + (instancetype)sortDescriptorWithKey:(nullable NSString *)key ascending:(BOOL)ascending API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 22 | + (instancetype)sortDescriptorWithKey:(nullable NSString *)key ascending:(BOOL)ascending selector:(nullable SEL)selector API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 23 | 24 | // keys may be key paths 25 | - (instancetype)initWithKey:(nullable NSString *)key ascending:(BOOL)ascending; 26 | - (instancetype)initWithKey:(nullable NSString *)key ascending:(BOOL)ascending selector:(nullable SEL)selector; 27 | - (nullable instancetype)initWithCoder:(NSCoder *)coder; 28 | 29 | @property (nullable, readonly, copy) NSString *key; 30 | @property (readonly) BOOL ascending; 31 | @property (nullable, readonly) SEL selector; 32 | 33 | - (void)allowEvaluation API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0)); // Force a sort descriptor which was securely decoded to allow evaluation 34 | 35 | + (instancetype)sortDescriptorWithKey:(nullable NSString *)key ascending:(BOOL)ascending comparator:(NSComparator)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 36 | 37 | - (instancetype)initWithKey:(nullable NSString *)key ascending:(BOOL)ascending comparator:(NSComparator)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 38 | 39 | @property (readonly) NSComparator comparator API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); 40 | 41 | - (NSComparisonResult)compareObject:(id)object1 toObject:(id)object2; // primitive - override this method if you want to perform comparisons differently (not key based for example) 42 | @property (readonly, retain) id reversedSortDescriptor; // primitive - override this method to return a sort descriptor instance with reversed sort order 43 | 44 | @end 45 | 46 | @interface NSSet (NSSortDescriptorSorting) 47 | 48 | - (NSArray *)sortedArrayUsingDescriptors:(NSArray *)sortDescriptors API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); // returns a new array by sorting the objects of the receiver 49 | 50 | @end 51 | 52 | @interface NSArray (NSSortDescriptorSorting) 53 | 54 | - (NSArray *)sortedArrayUsingDescriptors:(NSArray *)sortDescriptors; // returns a new array by sorting the objects of the receiver 55 | 56 | @end 57 | 58 | @interface NSMutableArray (NSSortDescriptorSorting) 59 | 60 | - (void)sortUsingDescriptors:(NSArray *)sortDescriptors; // sorts the array itself 61 | 62 | @end 63 | 64 | @interface NSOrderedSet (NSKeyValueSorting) 65 | 66 | // returns a new array by sorting the objects of the receiver 67 | - (NSArray *)sortedArrayUsingDescriptors:(NSArray *)sortDescriptors API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)); 68 | 69 | @end 70 | 71 | @interface NSMutableOrderedSet (NSKeyValueSorting) 72 | 73 | // sorts the ordered set itself 74 | - (void)sortUsingDescriptors:(NSArray *)sortDescriptors API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)); 75 | 76 | @end 77 | 78 | NS_ASSUME_NONNULL_END 79 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSUUID.h: -------------------------------------------------------------------------------- 1 | /* NSUUID.h 2 | Copyright (c) 2011-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #include 7 | #include 8 | 9 | /* Note: NSUUID is not toll-free bridged with CFUUID. Use UUID strings to convert between CFUUID and NSUUID, if needed. NSUUIDs are not guaranteed to be comparable by pointer value (as CFUUIDRef is); use isEqual: to compare two NSUUIDs. */ 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)) 14 | @interface NSUUID : NSObject 15 | 16 | /* Create a new autoreleased NSUUID with RFC 4122 version 4 random bytes */ 17 | + (instancetype)UUID; 18 | 19 | /* Create a new NSUUID with RFC 4122 version 4 random bytes */ 20 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 21 | 22 | /* Create an NSUUID from a string such as "E621E1F8-C36C-495A-93FC-0C247A3E6E5F". Returns nil for invalid strings. */ 23 | - (nullable instancetype)initWithUUIDString:(NSString *)string; 24 | 25 | /* Create an NSUUID with the given bytes */ 26 | - (instancetype)initWithUUIDBytes:(const uuid_t _Nullable)bytes; 27 | 28 | /* Get the individual bytes of the receiver */ 29 | - (void)getUUIDBytes:(uuid_t _Nonnull)uuid; 30 | 31 | /* Return a string description of the UUID, such as "E621E1F8-C36C-495A-93FC-0C247A3E6E5F" */ 32 | @property (readonly, copy) NSString *UUIDString; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /PowerUp/headers/Foundation/NSUbiquitousKeyValueStore.h: -------------------------------------------------------------------------------- 1 | /* NSUbiquitousKeyValueStore.h 2 | Copyright (c) 2011-2019, Apple Inc. All rights reserved. 3 | */ 4 | 5 | #import 6 | #import 7 | 8 | @class NSArray, NSDictionary, NSData, NSString; 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | API_AVAILABLE(macos(10.7), ios(5.0), tvos(9.0)) API_UNAVAILABLE(watchos) 13 | @interface NSUbiquitousKeyValueStore : NSObject { 14 | @private 15 | id _private1; 16 | id _private2; 17 | id _private3; 18 | void *_private4; 19 | void *_reserved[3]; 20 | int _daemonWakeToken; 21 | #if TARGET_OS_OSX || TARGET_OS_MACCATALYST 22 | BOOL _disabledSuddenTermination; 23 | #endif 24 | } 25 | 26 | @property (class, readonly, strong) NSUbiquitousKeyValueStore *defaultStore; 27 | 28 | - (nullable id)objectForKey:(NSString *)aKey; 29 | - (void)setObject:(nullable id)anObject forKey:(NSString *)aKey; 30 | - (void)removeObjectForKey:(NSString *)aKey; 31 | 32 | - (nullable NSString *)stringForKey:(NSString *)aKey; 33 | - (nullable NSArray *)arrayForKey:(NSString *)aKey; 34 | - (nullable NSDictionary *)dictionaryForKey:(NSString *)aKey; 35 | - (nullable NSData *)dataForKey:(NSString *)aKey; 36 | - (long long)longLongForKey:(NSString *)aKey; 37 | - (double)doubleForKey:(NSString *)aKey; 38 | - (BOOL)boolForKey:(NSString *)aKey; 39 | 40 | - (void)setString:(nullable NSString *)aString forKey:(NSString *)aKey; 41 | - (void)setData:(nullable NSData *)aData forKey:(NSString *)aKey; 42 | - (void)setArray:(nullable NSArray *)anArray forKey:(NSString *)aKey; 43 | - (void)setDictionary:(nullable NSDictionary *)aDictionary forKey:(NSString *)aKey; 44 | - (void)setLongLong:(long long)value forKey:(NSString *)aKey; 45 | - (void)setDouble:(double)value forKey:(NSString *)aKey; 46 | - (void)setBool:(BOOL)value forKey:(NSString *)aKey; 47 | 48 | @property (readonly, copy) NSDictionary *dictionaryRepresentation; 49 | 50 | - (BOOL)synchronize; 51 | 52 | @end 53 | 54 | FOUNDATION_EXPORT NSNotificationName const NSUbiquitousKeyValueStoreDidChangeExternallyNotification API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)); 55 | FOUNDATION_EXPORT NSString * const NSUbiquitousKeyValueStoreChangeReasonKey API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)); 56 | FOUNDATION_EXPORT NSString * const NSUbiquitousKeyValueStoreChangedKeysKey API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)); 57 | 58 | NS_ENUM(NSInteger) { 59 | NSUbiquitousKeyValueStoreServerChange API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)), 60 | NSUbiquitousKeyValueStoreInitialSyncChange API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)), 61 | NSUbiquitousKeyValueStoreQuotaViolationChange API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)), 62 | NSUbiquitousKeyValueStoreAccountChange API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)) 63 | }; 64 | 65 | NS_ASSUME_NONNULL_END 66 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/headers/IOKit/.DS_Store -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/IOBSD.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | #ifndef _IOBSD_H 29 | #define _IOBSD_H 30 | 31 | /* 32 | * bsd-related registry properties 33 | */ 34 | 35 | #define kIOBSDKey "IOBSD" // (BSD subsystem resource) 36 | #define kIOBSDNameKey "BSD Name" // (an OSString) 37 | #define kIOBSDNamesKey "BSD Names" // (an OSDictionary of OSString's, for links) 38 | #define kIOBSDMajorKey "BSD Major" // (an OSNumber) 39 | #define kIOBSDMinorKey "BSD Minor" // (an OSNumber) 40 | #define kIOBSDUnitKey "BSD Unit" // (an OSNumber) 41 | 42 | 43 | 44 | #endif /* !_IOBSD_H */ 45 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/IOCFBundle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #ifndef __IOKIT_IOCFBUNDLE_H 24 | #define __IOKIT_IOCFBUNDLE_H 25 | 26 | #include 27 | 28 | #define kIOBundleInfoDictionaryVersionKey CFSTR("CFBundleInfoDictionaryVersion") 29 | #define kIOBundleExecutableKey CFSTR("CFBundleExecutable") 30 | #define kIOBundleIdentifierKey CFSTR("CFBundleIdentifier") 31 | #define kIOBundleVersionKey CFSTR("CFBundleVersion") 32 | #define kIOBundleDevelopmentRegionKey CFSTR("CFBundleDevelopmentRegion") 33 | #define kIOBundleNameKey CFSTR("CFBundleName") 34 | 35 | #endif /* __IOKIT_IOCFBUNDLE_H */ 36 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/IOCFPlugIn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | #ifndef _IOKIT_IOCFPLUGIN_H_ 24 | #define _IOKIT_IOCFPLUGIN_H_ 25 | 26 | /* IOCFPlugIn.h 27 | */ 28 | #include 29 | 30 | __BEGIN_DECLS 31 | 32 | #include 33 | #if COREFOUNDATION_CFPLUGINCOM_SEPARATE 34 | #include 35 | #endif 36 | 37 | #include 38 | 39 | /* C244E858-109C-11D4-91D4-0050E4C6426F */ 40 | #define kIOCFPlugInInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL, \ 41 | 0xC2, 0x44, 0xE8, 0x58, 0x10, 0x9C, 0x11, 0xD4, \ 42 | 0x91, 0xD4, 0x00, 0x50, 0xE4, 0xC6, 0x42, 0x6F) 43 | 44 | 45 | #define IOCFPLUGINBASE \ 46 | UInt16 version; \ 47 | UInt16 revision; \ 48 | IOReturn (*Probe)(void *thisPointer, CFDictionaryRef propertyTable, \ 49 | io_service_t service, SInt32 * order); \ 50 | IOReturn (*Start)(void *thisPointer, CFDictionaryRef propertyTable, \ 51 | io_service_t service); \ 52 | IOReturn (*Stop)(void *thisPointer) 53 | 54 | typedef struct IOCFPlugInInterfaceStruct { 55 | IUNKNOWN_C_GUTS; 56 | IOCFPLUGINBASE; 57 | } IOCFPlugInInterface; 58 | 59 | 60 | kern_return_t 61 | IOCreatePlugInInterfaceForService(io_service_t service, 62 | CFUUIDRef pluginType, CFUUIDRef interfaceType, 63 | IOCFPlugInInterface *** theInterface, SInt32 * theScore); 64 | 65 | kern_return_t 66 | IODestroyPlugInInterface(IOCFPlugInInterface ** interface); 67 | 68 | __END_DECLS 69 | 70 | #endif /* !_IOKIT_IOCFPLUGIN_H_ */ 71 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/IOCFSerialize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1999-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | /* 24 | * HISTORY 25 | * 26 | */ 27 | 28 | /* IOCFSerialize serializes CFObjects to a format suitable for passing 29 | * to the kernel. */ 30 | 31 | #ifndef __IOKIT_IOCFSERIALIZE_H 32 | #define __IOKIT_IOCFSERIALIZE_H 33 | 34 | #include 35 | #include 36 | 37 | #if defined(__cplusplus) 38 | extern "C" { 39 | #endif 40 | 41 | enum { 42 | kIOCFSerializeToBinary = 0x00000001 43 | }; 44 | 45 | CF_RETURNS_RETAINED 46 | CFDataRef 47 | IOCFSerialize( CFTypeRef object, CFOptionFlags options ); 48 | 49 | #if defined(__cplusplus) 50 | } 51 | #endif 52 | 53 | #endif /* __IOKIT_IOCFSERIALIZE_H */ 54 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/IOCFUnserialize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | /* IOUnserialize.h created by rsulack on Mon 23-Nov-1998 */ 23 | /* IOCFUnserialize.h creates CF collections Mon 30-Aug-1999 */ 24 | 25 | #ifndef __IOKIT_IOCFUNSERIALIZE_H 26 | #define __IOKIT_IOCFUNSERIALIZE_H 27 | 28 | #include 29 | #include 30 | 31 | #if defined(__cplusplus) 32 | extern "C" { 33 | #endif 34 | 35 | // on success IOCFUnserialize sets errorString to 0 and returns 36 | // the unserialized object. 37 | 38 | // on failure IOCFUnserialize sets errorString to a CFString object 39 | // containing a error message suitable for logging and returns 0 40 | 41 | CFTypeRef 42 | IOCFUnserialize(const char *buffer, 43 | CFAllocatorRef allocator, 44 | CFOptionFlags options, 45 | CFStringRef *errorString); 46 | 47 | #if defined(__cplusplus) 48 | } 49 | #endif 50 | 51 | #endif /* __IOKIT_IOCFUNSERIALIZE_H */ 52 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/IOKit.h: -------------------------------------------------------------------------------- 1 | IOKitLib.h -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/IOKitKeysPrivate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | 23 | #ifndef _IOKIT_IOKITKEYSPRIVATE_H 24 | #define _IOKIT_IOKITKEYSPRIVATE_H 25 | 26 | #include 27 | 28 | // properties found in the registry root 29 | #define kIOConsoleUsersKey "IOConsoleUsers" /* value is OSArray */ 30 | #define kIOMaximumMappedIOByteCountKey "IOMaximumMappedIOByteCount" /* value is OSNumber */ 31 | 32 | // properties found in the console user dict 33 | 34 | #define kIOConsoleSessionIDKey "kCGSSessionIDKey" /* value is OSNumber */ 35 | 36 | #define kIOConsoleSessionUserNameKey "kCGSSessionUserNameKey" /* value is OSString */ 37 | #define kIOConsoleSessionUIDKey "kCGSSessionUserIDKey" /* value is OSNumber */ 38 | #define kIOConsoleSessionConsoleSetKey "kCGSSessionConsoleSetKey" /* value is OSNumber */ 39 | #define kIOConsoleSessionOnConsoleKey "kCGSSessionOnConsoleKey" /* value is OSBoolean */ 40 | 41 | // IOResources property 42 | #define kIOConsoleUsersSeedKey "IOConsoleUsersSeed" /* value is OSNumber */ 43 | 44 | #define kIOKernelHasSafeSleep 1 45 | 46 | #endif /* ! _IOKIT_IOKITKEYSPRIVATE_H */ 47 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/IOSharedLock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2010 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | #ifndef _IOKIT_IOSHAREDLOCK_H 25 | #define _IOKIT_IOSHAREDLOCK_H 26 | 27 | #include 28 | 29 | #define IOSharedLockData OSSpinLock 30 | #define ev_lock_data_t OSSpinLock 31 | 32 | 33 | #endif /* ! _IOKIT_IOSHAREDLOCK_H */ 34 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/IOUserServer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | 29 | 30 | #ifndef _IOUSERSERVER_H 31 | #define _IOUSERSERVER_H 32 | 33 | #include 34 | 35 | #define kIOUserClassKey "IOUserClass" 36 | #define kIOUserServerClassKey "IOUserServer" 37 | #define kIOUserServerNameKey "IOUserServerName" 38 | #define kIOUserServerTagKey "IOUserServerTag" 39 | // the expected cdhash value of the userspace driver executable 40 | #define kIOUserServerCDHashKey "IOUserServerCDHash" 41 | 42 | #if DRIVERKIT_PRIVATE 43 | 44 | enum{ 45 | kIOKitUserServerClientType = 0x99000003, 46 | }; 47 | 48 | enum{ 49 | kIOUserServerMethodRegisterClass = 0x0001000, 50 | kIOUserServerMethodStart = 0x0001001, 51 | kIOUserServerMethodRegister = 0x0001002, 52 | }; 53 | 54 | 55 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 56 | 57 | class OSObject; 58 | 59 | #define OSObject_Instantiate_ID 0x0000000100000001ULL 60 | 61 | enum { 62 | kOSObjectRPCRemote = 0x00000001, 63 | kOSObjectRPCKernel = 0x00000002, 64 | }; 65 | 66 | struct OSObject_Instantiate_Msg_Content { 67 | IORPCMessage __hdr; 68 | OSObjectRef __object; 69 | }; 70 | 71 | struct OSObject_Instantiate_Rpl_Content { 72 | IORPCMessage __hdr; 73 | kern_return_t __result; 74 | uint32_t __pad; 75 | uint64_t flags; 76 | char classname[64]; 77 | uint64_t methods[0]; 78 | }; 79 | 80 | #pragma pack(4) 81 | struct OSObject_Instantiate_Msg { 82 | IORPCMessageMach mach; 83 | mach_msg_port_descriptor_t __object__descriptor; 84 | OSObject_Instantiate_Msg_Content content; 85 | }; 86 | struct OSObject_Instantiate_Rpl { 87 | IORPCMessageMach mach; 88 | OSObject_Instantiate_Rpl_Content content; 89 | }; 90 | #pragma pack() 91 | 92 | typedef uint64_t IOTrapMessageBuffer[256]; 93 | 94 | #endif /* DRIVERKIT_PRIVATE */ 95 | 96 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 97 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 98 | 99 | #endif /* _IOUSERSERVER_H */ 100 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/audio/IOAudioLib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | /* 24 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 25 | */ 26 | 27 | /*! 28 | * @header IOAudioLib 29 | * C interface to IOAudio functions 30 | */ 31 | 32 | #ifndef _IOAUDIOLIB_H 33 | #define _IOAUDIOLIB_H 34 | 35 | #include 36 | 37 | #if 0 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | /*! 44 | * @function IOAudioIsOutput 45 | * @abstract Determines if the audio stream is an output stream 46 | * @param service 47 | * @param out 48 | * @result kern_return_t 49 | */ 50 | kern_return_t IOAudioIsOutput(io_service_t service, int *out); 51 | 52 | /*! 53 | * @function IOAudioFlush 54 | * @abstract Indicate the position at which the audio stream can be stopped. 55 | * @param connect the audio stream 56 | * @param end the position 57 | * @result kern_return_t 58 | */ 59 | kern_return_t IOAudioFlush(io_connect_t connect, IOAudioStreamPosition *end); 60 | 61 | /*! 62 | * @function IOAudioSetErase 63 | * @abstract Set autoerase flag, returns old value 64 | * @param connect the audio stream 65 | * @param erase true to turn off, false otherwise 66 | * @param oldVal previous value 67 | * @result kern_return_t 68 | */ 69 | kern_return_t IOAudioSetErase(io_connect_t connect, int erase, int *oldVal); 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | 75 | #endif /* 0 */ 76 | 77 | #endif /* ! _IOAUDIOLIB_H */ 78 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/firewire/IOFWIsoch.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/headers/IOKit/firewire/IOFWIsoch.h -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/firewire/IOFireWireFamilyCommon.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/headers/IOKit/firewire/IOFireWireFamilyCommon.h -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/graphics/IOAccelClientConnect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | 23 | #ifndef _IOACCEL_CLIENT_CONNECT_H 24 | #define _IOACCEL_CLIENT_CONNECT_H 25 | 26 | 27 | /* 28 | ** The IOAccelerator service name 29 | */ 30 | #define kIOAcceleratorClassName "IOAccelerator" 31 | 32 | 33 | /* 34 | ** IOAccelerator public client types. Private client types start with 35 | ** kIOAccelNumClientTypes. 36 | */ 37 | enum eIOAcceleratorClientTypes { 38 | kIOAccelSurfaceClientType, 39 | kIOAccelNumClientTypes, 40 | #ifndef _OPEN_SOURCE_ 41 | kIOAccelSurface2ClientType = 0x20 42 | #endif /* _OPEN_SOURCE_ */ 43 | }; 44 | 45 | 46 | #endif /* _IOACCEL_CLIENT_CONNECT_H */ 47 | 48 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/graphics/IOAccelTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | 23 | #ifndef _IOACCEL_TYPES_H 24 | #define _IOACCEL_TYPES_H 25 | 26 | #include 27 | #include 28 | 29 | #define IOACCEL_TYPES_REV 12 30 | 31 | #if !defined(OSTYPES_K64_REV) && !defined(MAC_OS_X_VERSION_10_6) 32 | #define IOACCELTYPES_10_5 1 33 | #endif 34 | 35 | /* Integer rectangle in device coordinates */ 36 | typedef struct 37 | { 38 | SInt16 x; 39 | SInt16 y; 40 | SInt16 w; 41 | SInt16 h; 42 | } IOAccelBounds; 43 | 44 | typedef struct 45 | { 46 | SInt16 w; 47 | SInt16 h; 48 | } IOAccelSize; 49 | 50 | /* Surface information */ 51 | 52 | enum { 53 | kIOAccelVolatileSurface = 0x00000001 54 | }; 55 | 56 | typedef struct 57 | { 58 | #if IOACCELTYPES_10_5 59 | vm_address_t address[4]; 60 | #else 61 | mach_vm_address_t address[4]; 62 | #endif /* IOACCELTYPES_10_5 */ 63 | UInt32 rowBytes; 64 | UInt32 width; 65 | UInt32 height; 66 | UInt32 pixelFormat; 67 | IOOptionBits flags; 68 | IOFixed colorTemperature[4]; 69 | UInt32 typeDependent[4]; 70 | } IOAccelSurfaceInformation; 71 | 72 | typedef struct 73 | { 74 | #if IOACCELTYPES_10_5 75 | long x, y, w, h; 76 | void *client_addr; 77 | unsigned long client_row_bytes; 78 | #else 79 | SInt32 x, y, w, h; 80 | mach_vm_address_t client_addr; 81 | UInt32 client_row_bytes; 82 | #endif /* IOACCELTYPES_10_5 */ 83 | } IOAccelSurfaceReadData; 84 | 85 | typedef struct { 86 | IOAccelBounds buffer; 87 | IOAccelSize source; 88 | UInt32 reserved[8]; 89 | } IOAccelSurfaceScaling; 90 | 91 | 92 | typedef SInt32 IOAccelID; 93 | 94 | enum { 95 | kIOAccelPrivateID = 0x00000001 96 | }; 97 | 98 | 99 | #endif /* _IOACCEL_TYPES_H */ 100 | 101 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/graphics/IOGraphicsEngine.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | /* 23 | * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. 24 | * 25 | * HISTORY 26 | * 27 | * 10 Mar 99 sdouglas created. 28 | */ 29 | 30 | 31 | struct IOGraphicsEngineContext { 32 | OSSpinLock contextLock; 33 | IOOptionBits state; 34 | void * owner; 35 | UInt32 version; 36 | IOByteCount structSize; 37 | UInt32 reserved[ 8 ]; 38 | }; 39 | #ifndef __cplusplus 40 | typedef volatile struct IOGraphicsEngineContext IOGraphicsEngineContext; 41 | #endif 42 | 43 | enum { 44 | // memory type for IOMapMemory 45 | kIOGraphicsEngineContext = 100 46 | }; 47 | 48 | enum { 49 | // version 50 | kIOGraphicsEngineContextVersion = 1 51 | }; 52 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/hid/IOHIDEventQueue.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IOHIDEventQueue.h ... Header for IOHIDEventQueue*** functions. 4 | 5 | Copyright (c) 2009 KennyTM~ 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, 9 | are permitted provided that the following conditions are met: 10 | 11 | * Redistributions of source code must retain the above copyright notice, this 12 | list of conditions and the following disclaimer. 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | * Neither the name of the KennyTM~ nor the names of its contributors may be 17 | used to endorse or promote products derived from this software without 18 | specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 21 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 24 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 27 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | */ 32 | 33 | #ifndef IOKIT_HID_IOHIDEVENTQUEUE_H 34 | #define IOKIT_HID_IOHIDEVENTQUEUE_H 1 35 | 36 | #include 37 | #include "IOHIDEvent.h" 38 | 39 | #if __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | typedef struct __IOHIDEventQueue 44 | #if 0 45 | { 46 | CFRuntimeBase base; // 0, 4 47 | IODataQueueMemory* queue; // 8 48 | size_t queueSize; // c 49 | int notificationPortType; // 10, 0 -> associate to hidSystem, 1 -> associate to data queue. 50 | uint32_t token; // 14 51 | int topBitOfToken; // 18, = token >> 31 52 | } 53 | #endif 54 | * IOHIDEventQueueRef; 55 | 56 | #pragma mark - 57 | #pragma mark Creators 58 | 59 | CFTypeID IOHIDEventQueueGetTypeID(void); 60 | 61 | // Token must be nonzero. 62 | IOHIDEventQueueRef IOHIDEventQueueCreateWithToken(CFAllocatorRef allocator, uint32_t token); 63 | IOHIDEventQueueRef IOHIDEventQueueCreate(CFAllocatorRef allocator, int notificationPortType, uint32_t token); 64 | 65 | #pragma mark - 66 | #pragma mark Accessors 67 | 68 | uint32_t IOHIDEventQueueGetToken(IOHIDEventQueueRef queue); 69 | 70 | void IOHIDEventQueueSetNotificationPort(IOHIDEventQueueRef queue, mach_port_t port); 71 | 72 | #pragma mark - 73 | #pragma mark Actions 74 | 75 | IOHIDEventRef IOHIDEventQueueDequeueCopy(IOHIDEventQueueRef queue); 76 | void IOHIDEventQueueEnqueue(IOHIDEventQueueRef queue, IOHIDEventRef event); // will send a message to the "tickle port" as well. 77 | 78 | #if __cplusplus 79 | } 80 | #endif 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/hid/IOHIDEventSystemClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IOHIDEventSystemClient.h ... I/O Kit HID Event System Client 4 | 5 | Copyright (c) 2010 KennyTM~ 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, 9 | are permitted provided that the following conditions are met: 10 | 11 | * Redistributions of source code must retain the above copyright notice, this 12 | list of conditions and the following disclaimer. 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | * Neither the name of the KennyTM~ nor the names of its contributors may be 17 | used to endorse or promote products derived from this software without 18 | specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 21 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 24 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 27 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | */ 32 | 33 | // With reference to http://www.opensource.apple.com/source/IOHIDFamily/IOHIDFamily-258.1/IOHIDLib/IOHIDEventServiceClass.h 34 | 35 | #ifndef IOHID_EVENT_SYSTEM_CLIENT_H 36 | #define IOHID_EVENT_SYSTEM_CLIENT_H 37 | 38 | #include 39 | #include "IOHIDEventQueue.h" 40 | #include "IOHIDEvent.h" 41 | 42 | #if __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | typedef struct __IOHIDEventSystemClient 47 | #if 0 48 | { 49 | void* x00; 50 | CFMachPortRef serverPort; // 4 51 | CFRunLoopSourceRef serverSource; // 8 52 | IOHIDEventSystemClientEventCallback callback; // c 53 | void* target; // 10 54 | void* refcon; // 14 55 | CFMachPortRef queuePort; // 18 56 | CFRunLoopSourceRef queueSource; // 1c 57 | CFRunLoopSourceRef source2; // 24 58 | CFRunLoopTimerRef timer; // 28 59 | IOHIDEventQueueRef queue; // 2c 60 | CFRunLoopRef runloop; // 34 61 | CFStringRef mode; // 38 62 | } 63 | #endif 64 | * IOHIDEventSystemClientRef; 65 | 66 | typedef void(*IOHIDEventSystemClientEventCallback)(void* target, void* refcon, IOHIDEventQueueRef queue, IOHIDEventRef event); 67 | 68 | void IOHIDEventSystemClientRegisterEventCallback(IOHIDEventSystemClientRef client, IOHIDEventSystemClientEventCallback callback, void* target, void* refcon); 69 | void IOHIDEventSystemClientUnregisterEventCallback(IOHIDEventSystemClientRef client); 70 | 71 | void IOHIDEventSystemClientUnscheduleWithRunLoop(IOHIDEventSystemClientRef client, CFRunLoopRef runloop, CFStringRef mode); 72 | void IOHIDEventSystemClientScheduleWithRunLoop(IOHIDEventSystemClientRef client, CFRunLoopRef runloop, CFStringRef mode); 73 | 74 | CFPropertyListRef IOHIDEventSystemClientCopyProperty(IOHIDEventSystemClientRef client, CFStringRef property); 75 | Boolean IOHIDEventSystemClientSetProperty(IOHIDEventSystemClientRef client, CFStringRef property, CFPropertyListRef value); 76 | 77 | IOHIDEventSystemClientRef IOHIDEventSystemClient(void); 78 | 79 | #if __cplusplus 80 | } 81 | #endif 82 | 83 | #endif 84 | 85 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/hid/IOHIDNotification.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IOHIDNotification ... I/O Kit HID Notifications 4 | 5 | Copyright (c) 2009 KennyTM~ 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, 9 | are permitted provided that the following conditions are met: 10 | 11 | * Redistributions of source code must retain the above copyright notice, this 12 | list of conditions and the following disclaimer. 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | * Neither the name of the KennyTM~ nor the names of its contributors may be 17 | used to endorse or promote products derived from this software without 18 | specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 21 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 24 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 27 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | */ 32 | 33 | #ifndef IOHID_NOTIFICATION_H 34 | #define IOHID_NOTIFICATION_H 35 | 36 | #include 37 | 38 | #if __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | typedef void(*IOHIDNotificationCallback)(void* target, void* refcon); 43 | 44 | typedef struct __IOHIDNotification 45 | #if 0 46 | { 47 | CFRuntimeBase _base; // 0, 4 48 | IOHIDNotificationCallback clientCallback; // 8 49 | void* clientTarget; // c 50 | void* clientRefcon; // 10 51 | IOHIDNotificationCallback ownerCallback; // 14 52 | void* ownerTarget; // 18 53 | void* ownerRefcon; // 1c 54 | } 55 | #endif 56 | * IOHIDNotificationRef; 57 | 58 | #pragma mark - 59 | #pragma mark Creators 60 | 61 | CFTypeID IOHIDNotificationGetTypeID(); 62 | 63 | IOHIDNotificationRef IOHIDNotificationCreate(CFAllocatorRef allocator, 64 | IOHIDNotificationCallback ownerCallback, void* ownerTarget, void* ownerRefcon, 65 | IOHIDNotificationCallback clientCallback, void* clientTarget, void* clientRefcon); 66 | 67 | #pragma mark - 68 | #pragma mark Accessors 69 | 70 | IOHIDNotificationCallback IOHIDNotificationGetClientCallback(IOHIDNotificationRef notification); 71 | void* IOHIDNotificationGetClientTarget(IOHIDNotificationRef notification); 72 | void* IOHIDNotificationGetClientRefcon(IOHIDNotificationRef notification); 73 | IOHIDNotificationCallback IOHIDNotificationGetOwnerCallback(IOHIDNotificationRef notification); 74 | void* IOHIDNotificationGetOwnerTarget(IOHIDNotificationRef notification); 75 | void* IOHIDNotificationGetOwnerRefcon(IOHIDNotificationRef notification); 76 | 77 | #if __cplusplus 78 | } 79 | #endif 80 | 81 | #endif 82 | 83 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/hid/IOHIDUserDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * @APPLE_LICENSE_HEADER_START@ 4 | * 5 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. 6 | * 7 | * This file contains Original Code and/or Modifications of Original Code 8 | * as defined in and that are subject to the Apple Public Source License 9 | * Version 2.0 (the 'License'). You may not use this file except in 10 | * compliance with the License. Please obtain a copy of the License at 11 | * http://www.opensource.apple.com/apsl/ and read it before using this 12 | * file. 13 | * 14 | * The Original Code and all software distributed under the License are 15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 19 | * Please see the License for the specific language governing rights and 20 | * limitations under the License. 21 | * 22 | * @APPLE_LICENSE_HEADER_END@ 23 | */ 24 | 25 | #ifndef _IOKIT_HID_IOHIDUSERDEVICE_USER_H 26 | #define _IOKIT_HID_IOHIDUSERDEVICE_USER_H 27 | 28 | #include 29 | #include 30 | 31 | __BEGIN_DECLS 32 | 33 | typedef struct __IOHIDUserDevice * IOHIDUserDeviceRef; 34 | 35 | /*! 36 | @function IOHIDUserDeviceGetTypeID 37 | @abstract Returns the type identifier of all IOHIDUserDevice instances. 38 | */ 39 | CF_EXPORT 40 | CFTypeID IOHIDUserDeviceGetTypeID(void); 41 | 42 | /*! 43 | @function IOHIDUserDeviceCreate 44 | @abstract Creates an virtual IOHIDDevice in the kernel. 45 | @discussion The io_service_t passed in this method must reference an object 46 | in the kernel of type IOHIDUserDevice. 47 | @param allocator Allocator to be used during creation. 48 | @param properties CFDictionaryRef containing device properties index by keys defined in IOHIDKeys.h. 49 | @result Returns a new IOHIDUserDeviceRef. 50 | */ 51 | CF_EXPORT 52 | IOHIDUserDeviceRef IOHIDUserDeviceCreate( 53 | CFAllocatorRef allocator, 54 | CFDictionaryRef properties); 55 | 56 | 57 | /*! 58 | @function IOHIDUserDeviceHandleReport 59 | @abstract Dispatch a report to the IOHIDUserDevice. 60 | */ 61 | CF_EXPORT 62 | IOReturn IOHIDUserDeviceHandleReport( 63 | IOHIDUserDeviceRef device, 64 | uint8_t * report, 65 | CFIndex reportLength); 66 | 67 | __END_DECLS 68 | 69 | #endif /* _IOKIT_HID_IOHIDUSERDEVICE_USER_H */ 70 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/hid/OSTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | /* 23 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 24 | * 25 | * HISTORY 26 | * 27 | */ 28 | 29 | #ifndef _OS_OSTYPES_H 30 | #define _OS_OSTYPES_H 31 | 32 | typedef unsigned int UInt; 33 | typedef signed int SInt; 34 | 35 | #ifndef __MACTYPES__ /* CF MacTypes.h */ 36 | #ifndef __TYPES__ /* guess... Mac Types.h */ 37 | 38 | typedef unsigned char UInt8; 39 | typedef unsigned short UInt16; 40 | typedef unsigned long UInt32; 41 | typedef unsigned long long UInt64; 42 | #if defined(__BIG_ENDIAN__) 43 | typedef struct UnsignedWide { 44 | UInt32 hi; 45 | UInt32 lo; 46 | } UnsignedWide; 47 | #elif defined(__LITTLE_ENDIAN__) 48 | typedef struct UnsignedWide { 49 | UInt32 lo; 50 | UInt32 hi; 51 | } UnsignedWide; 52 | #else 53 | #error Unknown endianess. 54 | #endif 55 | 56 | typedef signed char SInt8; 57 | typedef signed short SInt16; 58 | typedef signed long SInt32; 59 | typedef signed long long SInt64; 60 | #if defined(__BIG_ENDIAN__) 61 | typedef struct wide { 62 | SInt32 hi; 63 | UInt32 lo; 64 | } wide; 65 | #elif defined(__LITTLE_ENDIAN__) 66 | typedef struct wide { 67 | UInt32 lo; 68 | SInt32 hi; 69 | } wide; 70 | #else 71 | #error Unknown endianess. 72 | #endif 73 | 74 | typedef SInt32 OSStatus; 75 | typedef UnsignedWide AbsoluteTime; 76 | typedef UInt32 OptionBits; 77 | 78 | typedef unsigned char Boolean; 79 | 80 | #endif /* __TYPES__ */ 81 | #endif /* __MACTYPES__ */ 82 | 83 | #endif /* _OS_OSTYPES_H */ 84 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/hidsystem/event_status_driver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/headers/IOKit/hidsystem/event_status_driver.h -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/network/IOEthernetInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2008 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | 23 | #ifndef _IOETHERNETINTERFACE_H 24 | #define _IOETHERNETINTERFACE_H 25 | 26 | /*! @defined kIOEthernetInterfaceClass 27 | @abstract The name of the 28 | IOEthernetInterface class. 29 | */ 30 | 31 | #define kIOEthernetInterfaceClass "IOEthernetInterface" 32 | 33 | /*! @defined kIOActivePacketFilters 34 | @abstract A property of IOEthernetInterface objects. 35 | @discussion The kIOActivePacketFilters property has an OSDictionary value that describes the current 36 | set of packet filters that have been successfully activated. Each 37 | entry in the dictionary is a key/value pair consisting of the filter 38 | group name, and an OSNumber describing the set of active filters for 39 | that group. Entries in this dictionary will mirror those in 40 | kIORequiredPacketFilters if the controller has reported success for 41 | all filter change requests from the IOEthernetInterface object. 42 | */ 43 | 44 | #define kIOActivePacketFilters "IOActivePacketFilters" 45 | 46 | /*! @defined kIORequiredPacketFilters 47 | @abstract A property of IOEthernetInterface objects. 48 | @discussion The kIORequiredPacketFilters property has an OSDictionary value that describes the current 49 | set of required packet filters. Each entry in the dictionary is a 50 | key/value pair consisting of the filter group name, and an OSNumber 51 | describing the set of required filters for that group. 52 | */ 53 | 54 | #define kIORequiredPacketFilters "IORequiredPacketFilters" 55 | 56 | /*! @defined kIOMulticastAddressList 57 | @abstract A property of IOEthernetInterface objects. 58 | @discussion The kIOMulticastAddressList property is an OSData object that describes the 59 | list of multicast addresses that are being used by the 60 | controller to match against the destination address of an 61 | incoming frame. 62 | */ 63 | 64 | #define kIOMulticastAddressList "IOMulticastAddressList" 65 | #define kIOMulticastFilterData kIOMulticastAddressList 66 | 67 | #endif /* !_IOETHERNETINTERFACE_H */ 68 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/network/IONetworkStack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2011 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | 23 | #ifndef _IONETWORKSTACK_H 24 | #define _IONETWORKSTACK_H 25 | 26 | // User-client keys 27 | // 28 | #define kIONetworkStackUserCommandKey "IONetworkStackUserCommand" 29 | #define kIONetworkStackUserCommand "IONetworkStackUserCommand" 30 | 31 | enum { 32 | kIONetworkStackRegisterInterfaceWithUnit = 0, 33 | kIONetworkStackRegisterInterfaceWithLowestUnit = 1, 34 | kIONetworkStackRegisterInterfaceAll = 2 35 | }; 36 | 37 | #endif /* !_IONETWORKSTACK_H */ 38 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/network/IONetworkStats.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2008 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | 23 | #ifndef _IONETWORKSTATS_H 24 | #define _IONETWORKSTATS_H 25 | 26 | #include 27 | 28 | /*! @header IONetworkStats.h 29 | @discussion Generic network statistics. */ 30 | 31 | //------------------------------------------------------------------------ 32 | // Generic network statistics. Common to all network interfaces. 33 | // 34 | // WARNING: This structure must match the statistics field in 35 | // ifnet->if_data. This structure will overlay a portion of ifnet. 36 | 37 | /*! @typedef IONetworkStats 38 | @discussion Generic network statistics structure. 39 | @field inputPackets count input packets. 40 | @field inputErrors count input errors. 41 | @field outputPackets count output packets. 42 | @field outputErrors count output errors. 43 | @field collisions count collisions on CDMA networks. */ 44 | 45 | typedef struct { 46 | UInt32 inputPackets; 47 | UInt32 inputErrors; 48 | UInt32 outputPackets; 49 | UInt32 outputErrors; 50 | UInt32 collisions; 51 | } IONetworkStats; 52 | 53 | /*! @defined kIONetworkStatsKey 54 | @discussion Defines the name of an IONetworkData that contains 55 | an IONetworkStats. */ 56 | 57 | #define kIONetworkStatsKey "IONetworkStatsKey" 58 | 59 | //------------------------------------------------------------------------ 60 | // Output queue statistics. 61 | 62 | /*! @typedef IOOutputQueueStats 63 | @discussion Statistics recorded by IOOutputQueue objects. 64 | @field capacity queue capacity. 65 | @field size current size of the queue. 66 | @field peakSize peak size of the queue. 67 | @field dropCount number of packets dropped. 68 | @field outputCount number of output packets. 69 | @field retryCount number of retries. 70 | @field stallCount number of queue stalls. */ 71 | 72 | typedef struct { 73 | UInt32 capacity; 74 | UInt32 size; 75 | UInt32 peakSize; 76 | UInt32 dropCount; 77 | UInt32 outputCount; 78 | UInt32 retryCount; 79 | UInt32 stallCount; 80 | UInt32 reserved[4]; 81 | } IOOutputQueueStats; 82 | 83 | /*! @defined kIOOutputQueueStatsKey 84 | @discussion Defines the name of an IONetworkData that contains 85 | an IOOutputQueueStats. */ 86 | 87 | #define kIOOutputQueueStatsKey "IOOutputQueueStatsKey" 88 | 89 | #endif /* !_IONETWORKSTATS_H */ 90 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/network/IONetworkUserClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2008 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | 23 | #ifndef _IONETWORKUSERCLIENT_H 24 | #define _IONETWORKUSERCLIENT_H 25 | 26 | // IONetworkUserClient type ID. 27 | // 28 | #define kIONetworkUserClientTypeID 0xff000001 29 | #define kIONUCType 0xff000001 // FIXME 30 | 31 | // IONetworkUserClient call structure definitions. 32 | // 33 | enum { 34 | kIONUCResetNetworkDataIndex = 0, 35 | kIONUCWriteNetworkDataIndex = 1, 36 | kIONUCReadNetworkDataIndex = 2, 37 | kIONUCGetNetworkDataCapacityIndex = 3, 38 | kIONUCGetNetworkDataHandleIndex = 4, 39 | kIONUCLastIndex 40 | }; 41 | 42 | 43 | #endif /* !_IONETWORKUSERCLIENT_H */ 44 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/pwr_mgt/IOPMLibDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. The rights granted to you under the License 10 | * may not be used to create, or enable the creation or redistribution of, 11 | * unlawful or unlicensed copies of an Apple operating system, or to 12 | * circumvent, violate, or enable the circumvention or violation of, any 13 | * terms of an Apple operating system software license agreement. 14 | * 15 | * Please obtain a copy of the License at 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 | * 18 | * The Original Code and all software distributed under the License are 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 | * Please see the License for the specific language governing rights and 24 | * limitations under the License. 25 | * 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 | */ 28 | 29 | 30 | #define kPMSetAggressiveness 0 31 | #define kPMGetAggressiveness 1 32 | #define kPMSleepSystem 2 33 | #define kPMAllowPowerChange 3 34 | #define kPMCancelPowerChange 4 35 | #define kPMShutdownSystem 5 36 | #define kPMRestartSystem 6 37 | #define kPMSleepSystemOptions 7 38 | #define kPMSetMaintenanceWakeCalendar 8 39 | #define kPMSetUserAssertionLevels 9 40 | 41 | #define kNumPMMethods 10 42 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/serial/IOSerialKeys.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | /* 23 | * IOSerialKeys.h 24 | * 25 | * 2000-10-21 gvdl Initial real change to IOKit serial family. 26 | * 27 | */ 28 | 29 | /* 30 | Sample Matching dictionary 31 | { 32 | IOProviderClass = kIOSerialBSDServiceValue; 33 | kIOSerialBSDTypeKey = kIOSerialBSDAllTypes 34 | | kIOSerialBSDModemType 35 | | kIOSerialBSDRS232Type; 36 | kIOTTYDeviceKey = ; 37 | kIOTTYBaseNameKey = ; 38 | kIOTTYSuffixKey = ; 39 | kIOCalloutDeviceKey = ; 40 | kIODialinDeviceKey = ; 41 | } 42 | 43 | Note only the IOProviderClass is mandatory. The other keys allow the searcher to reduce the size of the set of matching devices. 44 | */ 45 | 46 | /* Service Matching That is the 'IOProviderClass' */ 47 | #define kIOSerialBSDServiceValue "IOSerialBSDClient" 48 | 49 | /* Matching keys */ 50 | #define kIOSerialBSDTypeKey "IOSerialBSDClientType" 51 | 52 | /* Currently possible kIOSerialBSDTypeKey values. */ 53 | #define kIOSerialBSDAllTypes "IOSerialStream" 54 | #define kIOSerialBSDModemType "IOModemSerialStream" 55 | #define kIOSerialBSDRS232Type "IORS232SerialStream" 56 | 57 | // Properties that resolve to a /dev device node to open for 58 | // a particular service 59 | #define kIOTTYDeviceKey "IOTTYDevice" 60 | #define kIOTTYBaseNameKey "IOTTYBaseName" 61 | #define kIOTTYSuffixKey "IOTTYSuffix" 62 | 63 | #define kIOCalloutDeviceKey "IOCalloutDevice" 64 | #define kIODialinDeviceKey "IODialinDevice" 65 | 66 | // Property 'ioctl' wait for the tty device to go idle. 67 | #define kIOTTYWaitForIdleKey "IOTTYWaitForIdle" 68 | 69 | #if KERNEL 70 | extern const OSSymbol *gIOSerialBSDServiceValue; 71 | extern const OSSymbol *gIOSerialBSDTypeKey; 72 | extern const OSSymbol *gIOSerialBSDAllTypes; 73 | extern const OSSymbol *gIOSerialBSDModemType; 74 | extern const OSSymbol *gIOSerialBSDRS232Type; 75 | extern const OSSymbol *gIOTTYDeviceKey; 76 | extern const OSSymbol *gIOTTYBaseNameKey; 77 | extern const OSSymbol *gIOTTYSuffixKey; 78 | extern const OSSymbol *gIOCalloutDeviceKey; 79 | extern const OSSymbol *gIODialinDeviceKey; 80 | #endif /* KERNEL */ 81 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/serial/ioss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * The contents of this file constitute Original Code as defined in and 7 | * are subject to the Apple Public Source License Version 1.1 (the 8 | * "License"). You may not use this file except in compliance with the 9 | * License. Please obtain a copy of the License at 10 | * http://www.apple.com/publicsource and read it before using this file. 11 | * 12 | * This Original Code and all software distributed under the License are 13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 | * License for the specific language governing rights and limitations 18 | * under the License. 19 | * 20 | * @APPLE_LICENSE_HEADER_END@ 21 | */ 22 | /* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */ 23 | 24 | /* ioctl's for all Apple IOSerialStream based streaming serial ports */ 25 | 26 | #ifndef _SYS_IOSS_H 27 | #define _SYS_IOSS_H 28 | 29 | #ifndef _POSIX_SOURCE 30 | 31 | #include 32 | #include 33 | 34 | /* 35 | * External clock baud rates, for use with cfsetospeed 36 | */ 37 | #define _MAKE_EXT(x) (((x) << 1) | 1) 38 | #define BEXT1 _MAKE_EXT(1) 39 | #define BEXT2 _MAKE_EXT(2) 40 | #define BEXT4 _MAKE_EXT(4) 41 | #define BEXT8 _MAKE_EXT(8) 42 | #define BEXT16 _MAKE_EXT(16) 43 | #define BEXT32 _MAKE_EXT(32) 44 | #define BEXT64 _MAKE_EXT(64) 45 | #define BEXT128 _MAKE_EXT(128) 46 | #define BEXT256 _MAKE_EXT(256) 47 | 48 | // ul - unsigned long for x86_64 49 | // us - unsigned long for i386 50 | // speed and shspeed correspondingly 51 | typedef __uint64_t user_ul_t; 52 | typedef __uint64_t user_speed_t; 53 | typedef __uint32_t user_us_t; 54 | typedef __uint32_t user_shspeed_t; 55 | 56 | /* 57 | * Sets the receive latency (in microseconds) with the default 58 | * value of 0 meaning a 256 / 3 character delay latency. 59 | */ 60 | #define IOSSDATALAT _IOW('T', 0, unsigned long) 61 | #define IOSSDATALAT_32 _IOW('T', 0, user_us_t) 62 | #define IOSSDATALAT_64 _IOW('T', 0, user_ul_t) 63 | 64 | /* 65 | * Controls the pre-emptible status of IOSS based serial dial in devices 66 | * (i.e. /dev/tty.* devices). If true an open tty.* device is pre-emptible by 67 | * a dial out call. Once a dial in call is established then setting pre-empt 68 | * to false will halt any further call outs on the cu device. 69 | */ 70 | #define IOSSPREEMPT _IOW('T', 1, int) 71 | 72 | /* 73 | * Sets the input speed and output speed to a non-traditional baud rate 74 | */ 75 | #define IOSSIOSPEED _IOW('T', 2, speed_t) 76 | #define IOSSIOSPEED_32 _IOW('T', 2, user_shspeed_t) 77 | #define IOSSIOSPEED_64 _IOW('T', 2, user_speed_t) 78 | 79 | #endif /*_POSIX_SOURCE */ 80 | 81 | /* 82 | * END OF PROTECTED INCLUDE. 83 | */ 84 | #endif /* !_SYS_IOSS_H */ 85 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IOAppleLabelScheme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2014 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /* 25 | * This header contains the IOAppleLabelScheme class definition. 26 | */ 27 | 28 | #ifndef _IOAPPLELABELSCHEME_H 29 | #define _IOAPPLELABELSCHEME_H 30 | 31 | #include 32 | 33 | /* 34 | * kIOAppleLabelSchemeClass is the name of the IOAppleLabelScheme class. 35 | */ 36 | 37 | #define kIOAppleLabelSchemeClass "IOAppleLabelScheme" 38 | 39 | /* 40 | * Apple Label Scheme Definitions 41 | */ 42 | 43 | #pragma pack(push, 1) /* (enable 8-bit struct packing) */ 44 | 45 | /* Label scheme. */ 46 | 47 | struct applelabel 48 | { 49 | uint8_t al_boot0[416]; /* (reserved for boot area) */ 50 | uint16_t al_magic; /* (the magic number) */ 51 | uint16_t al_type; /* (label type) */ 52 | uint32_t al_flags; /* (generic flags) */ 53 | uint64_t al_offset; /* (offset of property area, bytes) */ 54 | uint32_t al_size; /* (size of property area, bytes) */ 55 | uint32_t al_checksum; /* (checksum of property area) */ 56 | uint8_t al_boot1[72]; /* (reserved for boot area) */ 57 | }; 58 | 59 | /* Label scheme signature (al_magic). */ 60 | 61 | #define AL_MAGIC 0x414C 62 | 63 | /* Label scheme version (al_type). */ 64 | 65 | #define AL_TYPE_DEFAULT 0x0000 66 | 67 | /* Label scheme flags (al_flags). */ 68 | 69 | #define AL_FLAG_DEFAULT 0x00000000 70 | 71 | #pragma pack(pop) /* (reset to default struct packing) */ 72 | 73 | #endif /* !_IOAPPLELABELSCHEME_H */ 74 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IOBDBlockStorageDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2014 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOBDBlockStorageDevice 26 | * @abstract 27 | * This header contains the IOBDBlockStorageDevice class definition. 28 | */ 29 | 30 | #ifndef _IOBDBLOCKSTORAGEDEVICE_H 31 | #define _IOBDBLOCKSTORAGEDEVICE_H 32 | 33 | #include 34 | 35 | /*! 36 | * @defined kIOBDBlockStorageDeviceClass 37 | * @abstract 38 | * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class. 39 | * @discussion 40 | * kIOBDBlockStorageDeviceClass is the name of the IOBDBlockStorageDevice class. 41 | */ 42 | 43 | #define kIOBDBlockStorageDeviceClass "IOBDBlockStorageDevice" 44 | 45 | #endif /* !_IOBDBLOCKSTORAGEDEVICE_H */ 46 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IOBDMedia.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2014 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOBDMedia 26 | * @abstract 27 | * This header contains the IOBDMedia class definition. 28 | */ 29 | 30 | #ifndef _IOBDMEDIA_H 31 | #define _IOBDMEDIA_H 32 | 33 | /*! 34 | * @defined kIOBDMediaClass 35 | * @abstract 36 | * kIOBDMediaClass is the name of the IOBDMedia class. 37 | * @discussion 38 | * kIOBDMediaClass is the name of the IOBDMedia class. 39 | */ 40 | 41 | #define kIOBDMediaClass "IOBDMedia" 42 | 43 | /*! 44 | * @defined kIOBDMediaTypeKey 45 | * @abstract 46 | * kIOBDMediaTypeKey is a property of IOBDMedia objects. It has an OSString 47 | * value. 48 | * @discussion 49 | * The kIOBDMediaTypeKey property identifies the BD media type (BD-ROM, BD-R, 50 | * BD-RE, etc). See the kIOBDMediaType contants for possible values. 51 | */ 52 | 53 | #define kIOBDMediaTypeKey "Type" 54 | 55 | /*! 56 | * @defined kIOBDMediaTypeROM 57 | * The kIOBDMediaTypeKey constant for BD-ROM media. 58 | */ 59 | 60 | #define kIOBDMediaTypeROM "BD-ROM" 61 | 62 | /*! 63 | * @defined kIOBDMediaTypeR 64 | * The kIOBDMediaTypeKey constant for BD-R media. 65 | */ 66 | 67 | #define kIOBDMediaTypeR "BD-R" 68 | 69 | /*! 70 | * @defined kIOBDMediaTypeRE 71 | * The kIOBDMediaTypeKey constant for BD-RE media. 72 | */ 73 | 74 | #define kIOBDMediaTypeRE "BD-RE" 75 | 76 | #endif /* !_IOBDMEDIA_H */ 77 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IOBlockStorageDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2015 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOBlockStorageDevice 26 | * @abstract 27 | * This header contains the IOBlockStorageDevice class definition. 28 | */ 29 | 30 | #ifndef _IOBLOCKSTORAGEDEVICE_H 31 | #define _IOBLOCKSTORAGEDEVICE_H 32 | 33 | #include 34 | #include 35 | 36 | /*! 37 | * @defined kIOBlockStorageDeviceClass 38 | * @abstract 39 | * The name of the IOBlockStorageDevice class. 40 | */ 41 | 42 | #define kIOBlockStorageDeviceClass "IOBlockStorageDevice" 43 | 44 | /*! 45 | * @defined kIOBlockStorageDeviceWriteCacheStateKey 46 | * @abstract 47 | * The name of the property used to get or set the write cache state of the 48 | * block storage device. 49 | */ 50 | #define kIOBlockStorageDeviceWriteCacheStateKey "WriteCacheState" 51 | 52 | #endif /* !_IOBLOCKSTORAGEDEVICE_H */ 53 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IOCDBlockStorageDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2014 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOCDBlockStorageDevice 26 | * @abstract 27 | * This header contains the IOCDBlockStorageDevice class definition. 28 | */ 29 | 30 | #ifndef _IOCDBLOCKSTORAGEDEVICE_H 31 | #define _IOCDBLOCKSTORAGEDEVICE_H 32 | 33 | #include 34 | 35 | /*! 36 | * @defined kIOCDBlockStorageDeviceClass 37 | * @abstract 38 | * kIOCDBlockStorageDeviceClass is the name of the IOCDBlockStorageDevice class. 39 | * @discussion 40 | * kIOCDBlockStorageDeviceClass is the name of the IOCDBlockStorageDevice class. 41 | */ 42 | 43 | #define kIOCDBlockStorageDeviceClass "IOCDBlockStorageDevice" 44 | 45 | #endif /* !_IOCDBLOCKSTORAGEDEVICE_H */ 46 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IOCDMedia.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2014 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOCDMedia 26 | * @abstract 27 | * This header contains the IOCDMedia class definition. 28 | */ 29 | 30 | #ifndef _IOCDMEDIA_H 31 | #define _IOCDMEDIA_H 32 | 33 | /*! 34 | * @defined kIOCDMediaClass 35 | * @abstract 36 | * kIOCDMediaClass is the name of the IOCDMedia class. 37 | * @discussion 38 | * kIOCDMediaClass is the name of the IOCDMedia class. 39 | */ 40 | 41 | #define kIOCDMediaClass "IOCDMedia" 42 | 43 | /*! 44 | * @defined kIOCDMediaTOCKey 45 | * @abstract 46 | * kIOCDMediaTOCKey is a property of IOCDMedia objects. It has an OSData value 47 | * and a CDTOC structure. 48 | * @discussion 49 | * The kIOCDMediaTOCKey property contains the CD's full table of contents, 50 | * formatted as a CDTOC structure. The CDTOC structure is same as what is 51 | * returned by a READ TOC command, format 0x02. All fields in the TOC are 52 | * guaranteed to be binary-encoded (no BCD-encoded numbers are ever passed). 53 | */ 54 | 55 | #define kIOCDMediaTOCKey "TOC" 56 | 57 | /*! 58 | * @defined kIOCDMediaTypeKey 59 | * @abstract 60 | * kIOCDMediaTypeKey is a property of IOCDMedia objects. It has an OSString 61 | * value. 62 | * @discussion 63 | * The kIOCDMediaTypeKey property identifies the CD media type (CD-ROM, CD-R, 64 | * CD-RW, etc). See the kIOCDMediaType contants for possible values. 65 | */ 66 | 67 | #define kIOCDMediaTypeKey "Type" 68 | 69 | /*! 70 | * @defined kIOCDMediaTypeROM 71 | * The kIOCDMediaTypeKey constant for CD-ROM media (inclusive of the CD-I, 72 | * CD-ROM XA, and CD Audio standards, and mixed mode combinations thereof). 73 | */ 74 | 75 | #define kIOCDMediaTypeROM "CD-ROM" 76 | 77 | /*! 78 | * @defined kIOCDMediaTypeR 79 | * The kIOCDMediaTypeKey constant for CD Recordable (CD-R) media. 80 | */ 81 | 82 | #define kIOCDMediaTypeR "CD-R" 83 | 84 | /*! 85 | * @defined kIOCDMediaTypeRW 86 | * The kIOCDMediaTypeKey constant for CD ReWritable (CD-RW) media. 87 | */ 88 | 89 | #define kIOCDMediaTypeRW "CD-RW" 90 | 91 | #endif /* !_IOCDMEDIA_H */ 92 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IOCDPartitionScheme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2014 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /* 25 | * @header IOCDPartitionScheme 26 | * @abstract 27 | * This header contains the IOCDPartitionScheme class definition. 28 | */ 29 | 30 | #ifndef _IOCDPARTITIONSCHEME_H 31 | #define _IOCDPARTITIONSCHEME_H 32 | 33 | #include 34 | 35 | /* 36 | * @defined kIOCDPartitionSchemeClass 37 | * @abstract 38 | * kIOCDPartitionSchemeClass is the name of the IOCDPartitionScheme class. 39 | * @discussion 40 | * kIOCDPartitionSchemeClass is the name of the IOCDPartitionScheme class. 41 | */ 42 | 43 | #define kIOCDPartitionSchemeClass "IOCDPartitionScheme" 44 | 45 | /* 46 | * @defined kIOMediaSessionIDKey 47 | * @abstract 48 | * kIOMediaSessionIDKey is property of IOMedia objects. It has an OSNumber 49 | * value. 50 | * @discussion 51 | * The kIOMediaSessionIDKey property is placed into each IOMedia instance 52 | * created by the CD partition scheme. It identifies the session number 53 | * the track was recorded on. 54 | */ 55 | 56 | #define kIOMediaSessionIDKey "Session ID" 57 | 58 | #endif /* !_IOCDPARTITIONSCHEME_H */ 59 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IODVDBlockStorageDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2014 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IODVDBlockStorageDevice 26 | * @abstract 27 | * This header contains the IODVDBlockStorageDevice class definition. 28 | */ 29 | 30 | #ifndef _IODVDBLOCKSTORAGEDEVICE_H 31 | #define _IODVDBLOCKSTORAGEDEVICE_H 32 | 33 | #include 34 | 35 | /*! 36 | * @defined kIODVDBlockStorageDeviceClass 37 | * @abstract 38 | * kIODVDBlockStorageDeviceClass is the name of the IODVDBlockStorageDevice class. 39 | * @discussion 40 | * kIODVDBlockStorageDeviceClass is the name of the IODVDBlockStorageDevice class. 41 | */ 42 | 43 | #define kIODVDBlockStorageDeviceClass "IODVDBlockStorageDevice" 44 | 45 | #endif /* !_IODVDBLOCKSTORAGEDEVICE_H */ 46 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IOFilterScheme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2014 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOFilterScheme 26 | * @abstract 27 | * This header contains the IOFilterScheme class definition. 28 | */ 29 | 30 | #ifndef _IOFILTERSCHEME_H 31 | #define _IOFILTERSCHEME_H 32 | 33 | /*! 34 | * @defined kIOFilterSchemeClass 35 | * @abstract 36 | * The name of the IOFilterScheme class. 37 | * @discussion 38 | * kIOFilterSchemeClass is the name of the IOFilterScheme class. 39 | */ 40 | 41 | #define kIOFilterSchemeClass "IOFilterScheme" 42 | 43 | #endif /* !_IOFILTERSCHEME_H */ 44 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IOFireWireStorageCharacteristics.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2009 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | 25 | #ifndef _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ 26 | #define _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ 27 | 28 | // 29 | // Bridge Characteristics - Characteristics defined for FireWire bridges. 30 | // 31 | 32 | /*! 33 | @defined kIOPropertyBridgeCharacteristicsKey 34 | @discussion This key is used to define Bridge Characteristics for a particular 35 | devices's bridge chipset. It has an associated dictionary which lists the 36 | bridge characteristics. 37 | 38 | Requirement: Optional 39 | 40 | Example: 41 |
42 | @textblock
43 | 
44 | 	Bridge Characteristics
45 | 	
46 | 		Bridge Vendor Name
47 | 		Oxford Semiconductor
48 | 		Bridge Model Name
49 | 		FW911
50 | 		Bridge Revision Level
51 | 		3.7
52 | 	
53 | 
54 | @/textblock
55 | 
56 | */ 57 | 58 | #define kIOPropertyBridgeCharacteristicsKey "Bridge Characteristics" 59 | #define kIOPropertyBridgeVendorNameKey "Bridge Vendor Name" 60 | #define kIOPropertyBridgeModelNameKey "Bridge Model Name" 61 | #define kIOPropertyBridgeRevisionLevelKey "Bridge Revision Level" 62 | 63 | #endif /* _IOKIT_IO_FIREWIRE_STORAGE_DEVICE_CHARACTERISTICS_H_ */ -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IOGUIDPartitionScheme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2014 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /* 25 | * This header contains the IOGUIDPartitionScheme class definition. 26 | */ 27 | 28 | #ifndef _IOGUIDPARTITIONSCHEME_H 29 | #define _IOGUIDPARTITIONSCHEME_H 30 | 31 | #include 32 | 33 | /* 34 | * kIOGUIDPartitionSchemeClass is the name of the IOGUIDPartitionScheme class. 35 | */ 36 | 37 | #define kIOGUIDPartitionSchemeClass "IOGUIDPartitionScheme" 38 | 39 | /* 40 | * GUID Partition Map Definitions 41 | */ 42 | 43 | #include 44 | 45 | #pragma pack(push, 1) /* (enable 8-bit struct packing) */ 46 | 47 | /* Partition map. */ 48 | 49 | struct gpt_hdr 50 | { 51 | uint8_t hdr_sig[8]; 52 | uint32_t hdr_revision; 53 | uint32_t hdr_size; 54 | uint32_t hdr_crc_self; 55 | uint32_t __reserved; 56 | uint64_t hdr_lba_self; 57 | uint64_t hdr_lba_alt; 58 | uint64_t hdr_lba_start; 59 | uint64_t hdr_lba_end; 60 | uuid_t hdr_uuid; 61 | uint64_t hdr_lba_table; 62 | uint32_t hdr_entries; 63 | uint32_t hdr_entsz; 64 | uint32_t hdr_crc_table; 65 | uint32_t padding; 66 | }; 67 | 68 | /* Partition map entry. */ 69 | 70 | struct gpt_ent 71 | { 72 | uuid_t ent_type; 73 | uuid_t ent_uuid; 74 | uint64_t ent_lba_start; 75 | uint64_t ent_lba_end; 76 | uint64_t ent_attr; 77 | uint16_t ent_name[36]; 78 | }; 79 | 80 | /* Partition map signature (hdr_sig). */ 81 | 82 | #define GPT_HDR_SIG "EFI PART" 83 | 84 | /* Partition map version (hdr_revision). */ 85 | 86 | #define GPT_HDR_REVISION 0x00010000 87 | 88 | /* Partition map entry flags (ent_attr). */ 89 | 90 | #define GPT_ENT_ATTR_PLATFORM 0x00000001 91 | 92 | /*! 93 | * @defined kIOGUIDPartitionSchemeUUIDKey 94 | * @abstract 95 | * A property of IOGUIDPartitionSchemeGUID objects 96 | * @discussion 97 | * The kIOGUIDPartitionSchemeUUIDKey property has an OSString value and contains 98 | * a persistent GUID for the disk define in GPT header 99 | */ 100 | #define kIOGUIDPartitionSchemeUUIDKey "UUID" 101 | 102 | /*! 103 | * @defined kIOMediaGPTPartitionAttributesKey 104 | * @abstrat 105 | * A property of IOMedia objects for GPT partitions 106 | * @discussion 107 | * The kIOMediaGPTPartitionAttributesKey property has an OSNumber value of 64bit 108 | * GPT partition attributes 109 | */ 110 | #define kIOMediaGPTPartitionAttributesKey "GPT Attributes" 111 | 112 | #pragma pack(pop) /* (reset to default struct packing) */ 113 | 114 | #endif /* !_IOGUIDPARTITIONSCHEME_H */ 115 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IOMediaBSDClient.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2014 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | #ifndef _IOMEDIABSDCLIENT_H 25 | #define _IOMEDIABSDCLIENT_H 26 | 27 | #include 28 | 29 | #endif /* !_IOMEDIABSDCLIENT_H */ 30 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/storage/IOPartitionScheme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998-2014 Apple Inc. All rights reserved. 3 | * 4 | * @APPLE_LICENSE_HEADER_START@ 5 | * 6 | * This file contains Original Code and/or Modifications of Original Code 7 | * as defined in and that are subject to the Apple Public Source License 8 | * Version 2.0 (the 'License'). You may not use this file except in 9 | * compliance with the License. Please obtain a copy of the License at 10 | * http://www.opensource.apple.com/apsl/ and read it before using this 11 | * file. 12 | * 13 | * The Original Code and all software distributed under the License are 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 | * Please see the License for the specific language governing rights and 19 | * limitations under the License. 20 | * 21 | * @APPLE_LICENSE_HEADER_END@ 22 | */ 23 | 24 | /*! 25 | * @header IOPartitionScheme 26 | * @abstract 27 | * This header contains the IOPartitionScheme class definition. 28 | */ 29 | 30 | #ifndef _IOPARTITIONSCHEME_H 31 | #define _IOPARTITIONSCHEME_H 32 | 33 | /*! 34 | * @defined kIOPartitionSchemeClass 35 | * @abstract 36 | * The name of the IOPartitionScheme class. 37 | * @discussion 38 | * kIOPartitionSchemeClass is the name of the IOPartitionScheme class. 39 | */ 40 | 41 | #define kIOPartitionSchemeClass "IOPartitionScheme" 42 | 43 | /*! 44 | * @defined kIOMediaBaseKey 45 | * @abstract 46 | * A property of IOMedia objects. 47 | * @discussion 48 | * The kIOMediaBaseKey property has an OSNumber value and is placed into an 49 | * IOMedia instance created via the partition scheme. It describes the byte 50 | * offset of the partition relative to the provider media. 51 | */ 52 | 53 | #define kIOMediaBaseKey "Base" 54 | 55 | /*! 56 | * @defined kIOMediaLiveKey 57 | * @abstract 58 | * A property of IOMedia objects. 59 | * @discussion 60 | * The kIOMediaLiveKey property has an OSBoolean 61 | * value and is placed into an IOMedia instance 62 | * created via the partition scheme. It describes whether the 63 | * partition is live, that is, it is up-to-date with respect 64 | * to the on-disk partition table. 65 | */ 66 | 67 | #define kIOMediaLiveKey "Live" 68 | 69 | /*! 70 | * @defined kIOMediaPartitionIDKey 71 | * @abstract 72 | * A property of IOMedia objects. 73 | * @discussion 74 | * The kIOMediaPartitionIDKey property has an OSNumber 75 | * value and is placed into an IOMedia instance 76 | * created via the partition scheme. It is an ID that differentiates one 77 | * partition from the other (within a given scheme). It is typically an index 78 | * into the on-disk partition table. 79 | */ 80 | 81 | #define kIOMediaPartitionIDKey "Partition ID" 82 | 83 | #endif /* !_IOPARTITIONSCHEME_H */ 84 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/usb/IOUSBLib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/headers/IOKit/usb/IOUSBLib.h -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/usb/USB.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/headers/IOKit/usb/USB.h -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/video/IOVideoControlDictionary.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: IOVideoControlDictionary.h 3 | 4 | Contains: 5 | 6 | Copyright: © 2006-2012 by Apple Inc., all rights reserved. 7 | */ 8 | 9 | #if !defined(__IOVideoControlDictionary_h__) 10 | #define __IOVideoControlDictionary_h__ 11 | 12 | // System Includes 13 | #include 14 | 15 | class OSArray; 16 | class OSDictionary; 17 | class OSString; 18 | 19 | class IOVideoControlDictionary 20 | { 21 | // Construction/Destruction 22 | public: 23 | static OSDictionary* create(UInt32 controlID, UInt32 baseClass, UInt32 derivedClass, UInt32 scope, UInt32 element, bool isReadOnly = false, UInt32 variant = 0, OSString* name = NULL); 24 | static OSDictionary* createBooleanControl(UInt32 controlID, UInt32 baseClass, UInt32 derivedClass, UInt32 scope, UInt32 element, bool value, bool isReadOnly = false, UInt32 variant = 0, OSString* name = NULL); 25 | static OSDictionary* createSelectorControl(UInt32 controlID, UInt32 baseClass, UInt32 derivedClass, UInt32 scope, UInt32 element, UInt32 value, OSArray* selectorMap, bool isReadOnly = false, UInt32 variant = 0, OSString* name = NULL); 26 | 27 | // General Attributes 28 | public: 29 | static OSDictionary* getControlByID(OSArray* controlList, UInt32 controlID); 30 | 31 | static UInt32 getControlID(const OSDictionary* dictionary); 32 | static void setControlID(OSDictionary* dictionary, UInt32 controlID); 33 | 34 | static UInt32 getBaseClass(const OSDictionary* dictionary); 35 | static void setBaseClass(OSDictionary* dictionary, UInt32 baseClass); 36 | 37 | static UInt32 getClass(const OSDictionary* dictionary); 38 | static void setClass(OSDictionary* dictionary, UInt32 derivedClass); 39 | 40 | static UInt32 getScope(const OSDictionary* dictionary); 41 | static void setScope(OSDictionary* dictionary, UInt32 scope); 42 | 43 | static UInt32 getElement(const OSDictionary* dictionary); 44 | static void setElement(OSDictionary* dictionary, UInt32 element); 45 | 46 | static bool isReadOnly(const OSDictionary* dictionary); 47 | static void setIsReadOnly(OSDictionary* dictionary, bool isReadOnly); 48 | 49 | static UInt32 getVariant(const OSDictionary* dictionary); 50 | static void setVariant(OSDictionary* dictionary, UInt32 variant); 51 | 52 | static OSString* copyName(const OSDictionary* dictionary); 53 | static void setName(OSDictionary* dictionary, const OSString* name); 54 | 55 | // Boolean Control Attributes 56 | public: 57 | static bool getBooleanControlValue(const OSDictionary* dictionary); 58 | static void setBooleanControlValue(OSDictionary* dictionary, bool value); 59 | 60 | // Selector Control Attributes 61 | public: 62 | static UInt32 getSelectorControlValue(const OSDictionary* dictionary); 63 | static void setSelectorControlValue(OSDictionary* dictionary, UInt32 value); 64 | 65 | static OSArray* copySelectorControlSelectorMap(const OSDictionary* dictionary); 66 | static void setSelectorControlSelectorMap(OSDictionary* dictionary, const OSArray* selectorMap); 67 | 68 | // Selector Control Selector Map Item Support 69 | public: 70 | static OSDictionary* createSelectorControlSelectorMapItem(UInt32 value, const OSString* name); 71 | static OSDictionary* createSelectorControlSelectorMapItem(UInt32 value, const OSString* name, UInt32 kind); 72 | }; 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/video/IOVideoDeviceClientInit.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: IOVideoDeviceClientInit.h 3 | 4 | Contains: This class is used to add an IOProviderMergeProperties dictionary entry to a provider's property list, thus providing a tie between hardware and a CFBundle at hardware 5 | load time. This property usually contains the user client class name and the CFPlugInTypes UUID's but it can contain other properties. 6 | 7 | 8 | Copyright: © 2006-2012 by Apple Inc., all rights reserved. 9 | */ 10 | 11 | #ifndef __IOVIDEODEVICECLIENTINIT_H 12 | #define __IOVIDEODEVICECLIENTINIT_H 13 | 14 | #include 15 | 16 | class IOVideoDeviceUserClientInit : public IOService 17 | { 18 | OSDeclareDefaultStructors(IOVideoDeviceUserClientInit); 19 | 20 | public: 21 | virtual bool start(IOService* provider) ; 22 | virtual bool MergeDictionaryIntoProvider(IOService* provider, OSDictionary* mergeDicttionary); 23 | virtual bool MergeDictionaryIntoDictionary(OSDictionary* sourceDictionary, OSDictionary* targetDictionary); 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/video/IOVideoDeviceShared.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: IOVideoDeviceShared.h 3 | 4 | Contains: 5 | 6 | Copyright: © 2006-2012 by Apple Inc., all rights reserved. 7 | */ 8 | 9 | #if !defined(__IOKIT_IOVIDEODEVICESHARED_H) 10 | #define __IOKIT_IOVIDEODEVICESHARED_H 11 | 12 | #include 13 | #include 14 | 15 | /*! 16 | @header IOVideoDeviceShared.h 17 | IOVideoDevice definitions shared between kernel and user space. 18 | */ 19 | 20 | __BEGIN_DECLS 21 | 22 | /*! 23 | @enum Mach port types 24 | @constant kIOVideoDevicePortTypeNotification 25 | @constant kIOVideoDevicePortTypeOutput 26 | @constant kIOVideoDevicePortTypeInput 27 | @abstract Port types used with IOConnectSetNotificationPort(). 28 | */ 29 | enum 30 | { 31 | kIOVideoDevicePortTypeNotification, 32 | kIOVideoDevicePortTypeOutput, 33 | kIOVideoDevicePortTypeInput 34 | }; 35 | 36 | __END_DECLS 37 | 38 | #endif /* ! __IOKIT_IOVIDEODEVICESHARED_H */ 39 | 40 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/video/IOVideoStreamDictionary.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: IOVideoStreamDictionary.h 3 | 4 | Contains: 5 | 6 | Copyright: © 2006-2012 by Apple Inc., all rights reserved. 7 | */ 8 | 9 | #if !defined(__IOVideoStreamDictionary_h__) 10 | #define __IOVideoStreamDictionary_h__ 11 | 12 | // System Includes 13 | #include 14 | 15 | class OSArray; 16 | class OSDictionary; 17 | 18 | class IOVideoStreamDictionary 19 | { 20 | 21 | // Construction/Destruction 22 | public: 23 | static OSDictionary* create(UInt32 streamID, UInt32 startingDeviceChannelNumber, const OSDictionary* currentFormat, OSArray* availableFormats = NULL); 24 | 25 | // Attributes 26 | public: 27 | static UInt32 getStreamID(const OSDictionary* dictionary); 28 | static void setStreamID(OSDictionary* dictionary, UInt32 streamID); 29 | 30 | static UInt32 getStartingDeviceChannelNumber(const OSDictionary* dictionary); 31 | static void setStartingDeviceChannelNumber(OSDictionary* dictionary, UInt32 startingDeviceChannelNumber); 32 | 33 | static IOOptionBits getBufferMappingOptions(const OSDictionary* dictionary); 34 | static void setBufferMappingOptions(OSDictionary* dictionary, IOOptionBits bufferMappingOptions); 35 | 36 | static bool getCurrentFormat(const OSDictionary* dictionary, IOVideoStreamDescription& format); 37 | static void setCurrentFormat(OSDictionary* dictionary, const IOVideoStreamDescription& format); 38 | static OSDictionary* copyCurrentFormatDictionary(const OSDictionary* dictionary); 39 | static void setCurrentFormatDictionary(OSDictionary* dictionary, const OSDictionary* format); 40 | 41 | static OSArray* copyAvailableFormats(const OSDictionary* dictionary); 42 | static void setAvailableFormats(OSDictionary* dictionary, OSArray* availableFormats); 43 | 44 | static void printDictionary(const OSDictionary* dictionary); 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /PowerUp/headers/IOKit/video/IOVideoStreamFormatDictionary.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: IOVideoStreamFormat.h 3 | 4 | Contains: 5 | 6 | Copyright: © 2006-2012 by Apple Inc., all rights reserved. 7 | */ 8 | 9 | #if !defined(__IOVideoStreamFormat_h__) 10 | #define __IOVideoStreamFormat_h__ 11 | 12 | // System Includes 13 | #include 14 | 15 | class OSDictionary; 16 | 17 | class IOVideoStreamFormatDictionary 18 | { 19 | public: 20 | static OSDictionary* create(UInt32 codecType, UInt32 codecFlags, UInt32 width, UInt32 height); 21 | static OSDictionary* createWithDescription(const IOVideoStreamDescription& format); 22 | 23 | // Attributes 24 | public: 25 | static UInt32 getCodecType(const OSDictionary* dictionary); 26 | static void setCodecType(OSDictionary* dictionary, UInt32 codecType); 27 | 28 | static UInt32 getCodecFlags(const OSDictionary* dictionary); 29 | static void setCodecFlags(OSDictionary* dictionary, UInt32 codecFlags); 30 | 31 | static UInt32 getWidth(const OSDictionary* dictionary); 32 | static void setWidth(OSDictionary* dictionary, UInt32 width); 33 | 34 | static UInt32 getHeight(const OSDictionary* dictionary); 35 | static void setHeight(OSDictionary* dictionary, UInt32 height); 36 | 37 | static void getDescription(const OSDictionary* dictionary, IOVideoStreamDescription& format); 38 | static void printDescription(const IOVideoStreamDescription& format); 39 | static void printDictionary(const OSDictionary* dictionary); 40 | 41 | static bool isSameSampleFormat(const IOVideoStreamDescription& format1, const IOVideoStreamDescription& format2); 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /PowerUp/headers/signal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2009 Apple, Inc. All rights reserved. 3 | */ 4 | /* 5 | * Copyright (c) 1992 NeXT Computer, Inc. 6 | * 7 | */ 8 | 9 | #ifndef _ARM_SIGNAL_ 10 | #define _ARM_SIGNAL_ 1 11 | 12 | #include 13 | 14 | #ifndef _ANSI_SOURCE 15 | typedef int sig_atomic_t; 16 | #endif /* ! _ANSI_SOURCE */ 17 | 18 | #endif /* _ARM_SIGNAL_ */ 19 | 20 | -------------------------------------------------------------------------------- /PowerUp/layout/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/layout/.DS_Store -------------------------------------------------------------------------------- /PowerUp/layout/Library/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/layout/Library/.DS_Store -------------------------------------------------------------------------------- /PowerUp/layout/Library/Application Support/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/layout/Library/Application Support/.DS_Store -------------------------------------------------------------------------------- /PowerUp/layout/Library/Application Support/PowerUp.bundle/PowerUp_RootMePls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/layout/Library/Application Support/PowerUp.bundle/PowerUp_RootMePls -------------------------------------------------------------------------------- /PowerUp/layout/Library/Application Support/PowerUp.bundle/bolt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/layout/Library/Application Support/PowerUp.bundle/bolt.png -------------------------------------------------------------------------------- /PowerUp/layout/Library/Application Support/PowerUp.bundle/bolt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/layout/Library/Application Support/PowerUp.bundle/bolt@2x.png -------------------------------------------------------------------------------- /PowerUp/layout/Library/Application Support/PowerUp.bundle/bolt@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/layout/Library/Application Support/PowerUp.bundle/bolt@3x.png -------------------------------------------------------------------------------- /PowerUp/layout/Library/Application Support/PowerUp.bundle/bolt_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/layout/Library/Application Support/PowerUp.bundle/bolt_fill.png -------------------------------------------------------------------------------- /PowerUp/layout/Library/Application Support/PowerUp.bundle/bolt_fill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/layout/Library/Application Support/PowerUp.bundle/bolt_fill@2x.png -------------------------------------------------------------------------------- /PowerUp/layout/Library/Application Support/PowerUp.bundle/bolt_fill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/layout/Library/Application Support/PowerUp.bundle/bolt_fill@3x.png -------------------------------------------------------------------------------- /PowerUp/layout/Library/Application Support/PowerUp.bundle/nukeprocs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | read -r -a array <<< $(ps ax -o pid= -o comm= | grep "/var/containers/Bundle/Application/\\|/Applications/" | grep -v grep | xargs | sed -r 's/ [^ ]*( |$)/\1/g'); 3 | for element in "${array[@]}"; 4 | do kill -9 $element; 5 | done; 6 | unset array; -------------------------------------------------------------------------------- /PowerUp/powerupprefs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/powerupprefs/.DS_Store -------------------------------------------------------------------------------- /PowerUp/powerupprefs/Makefile: -------------------------------------------------------------------------------- 1 | include $(THEOS)/makefiles/common.mk 2 | TARGET := iphone:clang:13.0:7.0 3 | BUNDLE_NAME = powerupprefs 4 | 5 | powerupprefs_FILES = $(wildcard *.m) 6 | powerupprefs_INSTALL_PATH = /Library/PreferenceBundles 7 | powerupprefs_FRAMEWORKS = UIKit 8 | powerupprefs_EXTRA_FRAMEWORKS += Cephei CepheiPrefs 9 | powerupprefs_PRIVATE_FRAMEWORKS = Preferences 10 | powerupprefs_CFLAGS = -fobjc-arc 11 | 12 | include $(THEOS_MAKE_PATH)/bundle.mk 13 | 14 | internal-stage:: 15 | $(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END) 16 | $(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/powerupprefs.plist$(ECHO_END) 17 | -------------------------------------------------------------------------------- /PowerUp/powerupprefs/PUPCreditsListController.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | #import 4 | #import 5 | #import 6 | 7 | 8 | 9 | @interface PUPCreditsListController : HBRootListController 10 | 11 | @end 12 | 13 | 14 | -------------------------------------------------------------------------------- /PowerUp/powerupprefs/PUPCreditsListController.m: -------------------------------------------------------------------------------- 1 | #include "PUPCreditsListController.h" 2 | 3 | #import 4 | #import 5 | #import 6 | #import 7 | #import 8 | 9 | @implementation PUPCreditsListController 10 | 11 | + (NSString *)hb_specifierPlist { 12 | return @"credits"; 13 | } 14 | @end 15 | 16 | @interface PUPTwitterCell : HBTwitterCell 17 | @end 18 | 19 | @implementation PUPTwitterCell : HBTwitterCell 20 | 21 | 22 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier specifier:(PSSpecifier *)specifier { 23 | 24 | 25 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier specifier:specifier]; 26 | 27 | 28 | 29 | if (self) { 30 | if(specifier.properties[@"smallText"] != nil){ 31 | NSString *subtitle = [specifier.properties[@"smallText"] copy]; 32 | self.detailTextLabel.text = [@"" stringByAppendingString:subtitle]; 33 | } 34 | 35 | 36 | } 37 | 38 | return self; 39 | } 40 | 41 | @end -------------------------------------------------------------------------------- /PowerUp/powerupprefs/PUPRootListController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import 5 | #import 6 | 7 | @interface PUPRootListController : HBRootListController 8 | @end 9 | -------------------------------------------------------------------------------- /PowerUp/powerupprefs/PUPRootListController.m: -------------------------------------------------------------------------------- 1 | #include "PUPRootListController.h" 2 | 3 | @implementation PUPRootListController 4 | 5 | + (NSString *)hb_specifierPlist { 6 | return @"Root"; 7 | } 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /PowerUp/powerupprefs/Resources/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/powerupprefs/Resources/.DS_Store -------------------------------------------------------------------------------- /PowerUp/powerupprefs/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | powerupprefs 9 | CFBundleIdentifier 10 | com.kurrtandsquiddy.powerupprefs 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSPrincipalClass 22 | PUPRootListController 23 | 24 | 25 | -------------------------------------------------------------------------------- /PowerUp/powerupprefs/Resources/credits.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | label 11 | Developers 12 | 13 | 14 | big 15 | 16 | cellClass 17 | PUPTwitterCell 18 | height 19 | 56 20 | label 21 | Kurrt 22 | user 23 | KurrtDev 24 | smallText 25 | Developer 26 | subtitle 27 | IDK MAN 28 | 29 | 30 | 31 | big 32 | 33 | cellClass 34 | PUPTwitterCell 35 | height 36 | 56 37 | label 38 | Squiddy 39 | user 40 | Squidkingdom 41 | smallText 42 | Developer 43 | 44 | 45 | 46 | cell 47 | PSGroupCell 48 | label 49 | Contributions From 50 | 51 | 52 | big 53 | 54 | cellClass 55 | PUPTwitterCell 56 | height 57 | 56 58 | label 59 | Ryan Petrich 60 | user 61 | rpetrich 62 | smallText 63 | CPU Throttling 64 | 65 | 66 | big 67 | 68 | cellClass 69 | PUPTwitterCell 70 | height 71 | 56 72 | label 73 | UserlandKernel 74 | user 75 | userlandkernel 76 | smallText 77 | Original Deepsleep 78 | 79 | 80 | big 81 | 82 | cellClass 83 | PUPTwitterCell 84 | height 85 | 56 86 | label 87 | Code2K 88 | user 89 | code2klabs 90 | smallText 91 | Deepsleep Reference 92 | 93 | 94 | 95 | 96 | 97 | 98 | title 99 | Credits 100 | 101 | 102 | -------------------------------------------------------------------------------- /PowerUp/powerupprefs/Resources/icons/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/powerupprefs/Resources/icons/.DS_Store -------------------------------------------------------------------------------- /PowerUp/powerupprefs/Resources/icons/settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/powerupprefs/Resources/icons/settings@2x.png -------------------------------------------------------------------------------- /PowerUp/powerupprefs/Resources/icons/settings@2x.png.old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/powerupprefs/Resources/icons/settings@2x.png.old.png -------------------------------------------------------------------------------- /PowerUp/powerupprefs/Resources/icons/settings@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/powerupprefs/Resources/icons/settings@3x.png -------------------------------------------------------------------------------- /PowerUp/powerupprefs/Resources/icons/settings@3x.png.old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/powerupprefs/Resources/icons/settings@3x.png.old.png -------------------------------------------------------------------------------- /PowerUp/powerupprefs/entry.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | entry 6 | 7 | bundle 8 | powerupprefs 9 | cell 10 | PSLinkCell 11 | detail 12 | PUPRootListController 13 | icon 14 | icons/settings.png 15 | isController 16 | 17 | label 18 | PowerUp 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /PowerUp/rootmepls/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JB-NSStudio/PowerUp/570b8f30bebdb411ce911ba0fcdaac0543863812/PowerUp/rootmepls/.DS_Store -------------------------------------------------------------------------------- /PowerUp/rootmepls/Makefile: -------------------------------------------------------------------------------- 1 | export ARCHS = arm64 arm64e 2 | TARGET := iphone:clang:13.0:7.0 3 | 4 | include $(THEOS)/makefiles/common.mk 5 | 6 | TOOL_NAME = PowerUp_RootMePls 7 | 8 | ${TOOL_NAME}_FILES = main.m 9 | ${TOOL_NAME}_CFLAGS = -fobjc-arc 10 | ${TOOL_NAME}_CODESIGN_FLAGS = -Sentitlements.plist 11 | ${TOOL_NAME}_INSTALL_PATH = /usr/local/bin 12 | ${TOOL_NAME}_FRAMEWORKS = IOKit 13 | 14 | include $(THEOS_MAKE_PATH)/tool.mk 15 | -------------------------------------------------------------------------------- /PowerUp/rootmepls/control: -------------------------------------------------------------------------------- 1 | Package: com.kurrtandsquiddy.powerup.rootmepls 2 | Name: RootMePls 3 | Version: 0.0.1 4 | Architecture: iphoneos-arm 5 | Description: An awesome tool of some sort!! 6 | Maintainer: Kurrt+Squiddy 7 | Author: Kurrt+Squiddy 8 | Section: System 9 | Tag: role::hacker 10 | -------------------------------------------------------------------------------- /PowerUp/rootmepls/entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | platform-application 5 | 6 | com.apple.private.security.container-required 7 | 8 | 9 | -------------------------------------------------------------------------------- /PowerUp/ux.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "global.h" 3 | 4 | @interface ux : NSObject { 5 | @public 6 | UIWindow *__strong welcomeWindow; 7 | UIButton *__strong introNextButton; 8 | UIView *__strong currentIntroStepView; 9 | UIView *__strong welcomeView; 10 | UILabel *__strong percentageLabel; 11 | int intro_current_step; 12 | int intro_set_percentage; 13 | UIView *confirmAlertView; 14 | UIView *dateView; 15 | UIView *oledView; 16 | UIView *curtainView; 17 | UIWindow *__strong curtainWindow; 18 | UIWindow *__strong confirmWindow; 19 | UIView *__strong backgroundView; 20 | UIView *__strong SBDateViewRef; 21 | UIView *__strong SBDateViewParentRef; 22 | UIWindow *__strong oledWindow; 23 | UIView *__strong slidingView; // For displaying battery perc in OLED mode 24 | UIView *__strong slidingView2; // For displaying battery perc in OLED mode 25 | UILabel *__strong batteryPercLabel; // For displaying battery perc in OLED mode 26 | UIImageView *__strong o_boltView; // For displaying battery perc in OLED mode 27 | UIImageView *__strong o_boltView2; // For displaying battery perc in OLED mode 28 | UIView *__strong underlineView; // For displaying hold lock animation in OLED mode 29 | UIView *__strong underlineSlideView;// For displaying hold lock animation in OLED mode 30 | } 31 | +(instancetype)sharedInstance; 32 | + (UIImage *)imageWithColor:(UIColor *)color; 33 | -(void)confirmAlert; 34 | -(void)hideOLED; 35 | -(void)hideCurtain; 36 | -(void)showCurtain; 37 | -(void)hide_confirmAlert:(UIButton *)sender; 38 | -(void)setSBDateViewRef:(UIView *)ref; 39 | -(void)showOLEDwithPerc:(int)perc; 40 | -(void)updateOLEDBattery:(int)perc; 41 | @end 42 | 43 | @interface UIWindow (tweaked) 44 | -(void)_setSecure:(BOOL)arg; 45 | @end 46 | 47 | 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PowerUp 2 | Speed up charging by entering a super low power state while plugged in. 3 |

4 | ## What does the low power state do? 5 | - Sleeps the system using built in IOKit methods. (We refer to this as deepsleep in settings for user clarity) 6 | - Turns on aeroplane plane mode. 7 | - Enables low power mode. 8 | - Throttles the system using methods in thermalmonitord. 9 | - Stops and saves screen recordings. 10 | - Turns off flashlight. 11 | - Kills all open applications. 12 | - Blocks input passthrough. 13 | - Turns off display. 14 |

15 | 16 | ## Does this tweak use hibernation? 17 | This tweak uses the same process other tweaks that claim to use hibernation do but hibernation and deep sleep do not exist in iOS in the same way they do in MacOS. We have built a tool that can be run on an iOS device to confirm what IOPM Preferences can be set within iOS [here](https://github.com/Kurrt/IOPMKeyChecker). Currently all devices we have tested do no support either of these options so setting them would be reckless as they require writing to disk. If iOS begins to make use of these settings, deep sleep and or hibernation will be added at a later date. 18 |

19 | ## Repo 20 | PowerUp can currently be found on the following repos: 21 | - https://kurrt.com/repo 22 | - https://repo.squiddy.dev 23 | - https://repo.community 24 |

25 | ## Credits 26 | - [UserlandKernel](https://github.com/userlandkernel) for sharing the project [DeepSleep](https://github.com/userlandkernel/deepsleep) 27 | - [Code2K](https://github.com/code2k) for sharing the project [Deep Sleep Widget](https://github.com/code2k/Deep-Sleep.wdgt) 28 | - [Ryan Petrich](https://github.com/rpetrich) for sharing the project [Powercuff](https://github.com/rpetrich/Powercuff) 29 |

30 | ## PowerUp creators 31 | - [Kurrt](https://github.com/Kurrt) (Twitter: [@KurrtDev](https://twitter.com/KurrtDev)) 32 | - [Squiddy](https://github.com/Squidkingdom) (Twitter: [@Squidkingdom](https://twitter.com/squidkingdom)) 33 | --------------------------------------------------------------------------------