Device battery indicators on your Lock Screen
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

187 lines
11KB

  1. /*
  2. * libMobileGestalt header.
  3. * Mobile gestalt functions as a QA system. You ask it a question, and it gives you the answer! :)
  4. *
  5. * Copyright (c) 2013-2014 Cykey (David Murray)
  6. * Improved by @PoomSmart (2020)
  7. * All rights reserved.
  8. */
  9. #ifndef LIBMOBILEGESTALT_H_
  10. #define LIBMOBILEGESTALT_H_
  11. #include <CoreFoundation/CoreFoundation.h>
  12. #if __cplusplus
  13. extern "C" {
  14. #endif
  15. #pragma mark - API
  16. CFPropertyListRef MGCopyAnswer(CFStringRef property);
  17. CFPropertyListRef MGCopyAnswerWithError(CFStringRef property, int *error);
  18. CFPropertyListRef MGCopyMultipleAnswers(CFArrayRef properties, CFDictionaryRef unk);
  19. bool MGGetBoolAnswer(CFStringRef property);
  20. /*
  21. * Not all questions are assignable.
  22. * For example, kMGUserAssignedDeviceName is assignable but
  23. * kMGProductType is not.
  24. */
  25. int MGSetAnswer(CFStringRef property, CFTypeRef answer);
  26. #pragma mark - Identifying Information
  27. static const CFStringRef kMGDiskUsage = CFSTR("DiskUsage");
  28. static const CFStringRef kMGModelNumber = CFSTR("ModelNumber");
  29. static const CFStringRef kMGSIMTrayStatus = CFSTR("SIMTrayStatus");
  30. static const CFStringRef kMGSerialNumber = CFSTR("SerialNumber");
  31. static const CFStringRef kMGMLBSerialNumber = CFSTR("MLBSerialNumber");
  32. static const CFStringRef kMGUniqueDeviceID = CFSTR("UniqueDeviceID");
  33. static const CFStringRef kMGUniqueDeviceIDData = CFSTR("UniqueDeviceIDData");
  34. static const CFStringRef kMGUniqueChipID = CFSTR("UniqueChipID");
  35. static const CFStringRef kMGInverseDeviceID = CFSTR("InverseDeviceID");
  36. static const CFStringRef kMGDiagnosticsData = CFSTR("DiagData");
  37. static const CFStringRef kMGDieID = CFSTR("DieId");
  38. static const CFStringRef kMGCPUArchitecture = CFSTR("CPUArchitecture");
  39. static const CFStringRef kMGPartitionType = CFSTR("PartitionType");
  40. static const CFStringRef kMGUserAssignedDeviceName = CFSTR("UserAssignedDeviceName");
  41. #pragma mark - Bluetooth Information
  42. static const CFStringRef kMGBluetoothAddress = CFSTR("BluetoothAddress");
  43. #pragma mark - Battery Information
  44. static const CFStringRef kMGRequiredBatteryLevelForSoftwareUpdate = CFSTR("RequiredBatteryLevelForSoftwareUpdate");
  45. static const CFStringRef kMGBatteryIsFullyCharged = CFSTR("BatteryIsFullyCharged");
  46. static const CFStringRef kMGBatteryIsCharging = CFSTR("BatteryIsCharging");
  47. static const CFStringRef kMGBatteryCurrentCapacity = CFSTR("BatteryCurrentCapacity");
  48. static const CFStringRef kMGExternalPowerSourceConnected = CFSTR("ExternalPowerSourceConnected");
  49. #pragma mark - Baseband Information
  50. static const CFStringRef kMGBasebandSerialNumber = CFSTR("BasebandSerialNumber");
  51. static const CFStringRef kMGBasebandCertId = CFSTR("BasebandCertId");
  52. static const CFStringRef kMGBasebandChipId = CFSTR("BasebandChipId");
  53. static const CFStringRef kMGBasebandFirmwareManifestData = CFSTR("BasebandFirmwareManifestData");
  54. static const CFStringRef kMGBasebandFirmwareVersion = CFSTR("BasebandFirmwareVersion");
  55. static const CFStringRef kMGBasebandKeyHashInformation = CFSTR("BasebandKeyHashInformation");
  56. #pragma mark - Telephony Information
  57. static const CFStringRef kMGCarrierBundleInfo = CFSTR("CarrierBundleInfoArray");
  58. static const CFStringRef kMGCarrierInstallCapability = CFSTR("CarrierInstallCapability");
  59. static const CFStringRef kMGInternationalMobileEquipmentIdentity = CFSTR("InternationalMobileEquipmentIdentity");
  60. static const CFStringRef kMGMobileSubscriberCountryCode = CFSTR("MobileSubscriberCountryCode");
  61. static const CFStringRef kMGMobileSubscriberNetworkCode = CFSTR("MobileSubscriberNetworkCode");
  62. #pragma mark - Device Information
  63. static const CFStringRef kMGChipID = CFSTR("ChipID");
  64. static const CFStringRef kMGComputerName = CFSTR("ComputerName");
  65. static const CFStringRef kMGDeviceVariant = CFSTR("DeviceVariant");
  66. static const CFStringRef kMGHWModel = CFSTR("HWModelStr");
  67. static const CFStringRef kMGBoardId = CFSTR("BoardId");
  68. static const CFStringRef kMGHardwarePlatform = CFSTR("HardwarePlatform");
  69. static const CFStringRef kMGDeviceName = CFSTR("DeviceName");
  70. static const CFStringRef kMGDeviceColor = CFSTR("DeviceColor");
  71. static const CFStringRef kMGDeviceClassNumber = CFSTR("DeviceClassNumber");
  72. static const CFStringRef kMGDeviceClass = CFSTR("DeviceClass");
  73. static const CFStringRef kMGBuildVersion = CFSTR("BuildVersion");
  74. static const CFStringRef kMGProductName = CFSTR("ProductName");
  75. static const CFStringRef kMGProductType = CFSTR("ProductType");
  76. static const CFStringRef kMGProductVersion = CFSTR("ProductVersion");
  77. static const CFStringRef kMGFirmwareNonce = CFSTR("FirmwareNonce");
  78. static const CFStringRef kMGFirmwareVersion = CFSTR("FirmwareVersion");
  79. static const CFStringRef kMGFirmwarePreflightInfo = CFSTR("FirmwarePreflightInfo");
  80. static const CFStringRef kMGIntegratedCircuitCardIdentifier = CFSTR("IntegratedCircuitCardIdentifier");
  81. static const CFStringRef kMGAirplaneMode = CFSTR("AirplaneMode");
  82. static const CFStringRef kMGAllowYouTube = CFSTR("AllowYouTube");
  83. static const CFStringRef kMGAllowYouTubePlugin = CFSTR("AllowYouTubePlugin");
  84. static const CFStringRef kMGMinimumSupportediTunesVersion = CFSTR("MinimumSupportediTunesVersion");
  85. static const CFStringRef kMGProximitySensorCalibration = CFSTR("ProximitySensorCalibration");
  86. static const CFStringRef kMGRegionCode = CFSTR("RegionCode");
  87. static const CFStringRef kMGRegionInfo = CFSTR("RegionInfo");
  88. static const CFStringRef kMGRegulatoryIdentifiers = CFSTR("RegulatoryIdentifiers");
  89. static const CFStringRef kMGSBAllowSensitiveUI = CFSTR("SBAllowSensitiveUI");
  90. static const CFStringRef kMGSBCanForceDebuggingInfo = CFSTR("SBCanForceDebuggingInfo");
  91. static const CFStringRef kMGSDIOManufacturerTuple = CFSTR("SDIOManufacturerTuple");
  92. static const CFStringRef kMGSDIOProductInfo = CFSTR("SDIOProductInfo");
  93. static const CFStringRef kMGShouldHactivate = CFSTR("ShouldHactivate");
  94. static const CFStringRef kMGSigningFuse = CFSTR("SigningFuse");
  95. static const CFStringRef kMGSoftwareBehavior = CFSTR("SoftwareBehavior");
  96. static const CFStringRef kMGSoftwareBundleVersion = CFSTR("SoftwareBundleVersion");
  97. static const CFStringRef kMGSupportedDeviceFamilies = CFSTR("SupportedDeviceFamilies");
  98. static const CFStringRef kMSupportedKeyboards = CFSTR("SupportedKeyboards");
  99. static const CFStringRef kMGTotalSystemAvailable = CFSTR("TotalSystemAvailable");
  100. #pragma mark - Capability Information
  101. static const CFStringRef kMGAllDeviceCapabilities = CFSTR("AllDeviceCapabilities");
  102. static const CFStringRef kMGAppleInternalInstallCapability = CFSTR("AppleInternalInstallCapability");
  103. static const CFStringRef kMGExternalChargeCapability = CFSTR("ExternalChargeCapability");
  104. static const CFStringRef kMGForwardCameraCapability = CFSTR("ForwardCameraCapability");
  105. static const CFStringRef kMGPanoramaCameraCapability = CFSTR("PanoramaCameraCapability");
  106. static const CFStringRef kMGRearCameraCapability = CFSTR("RearCameraCapability");
  107. static const CFStringRef kMGHasAllFeaturesCapability = CFSTR("HasAllFeaturesCapability");
  108. static const CFStringRef kMGHasBaseband = CFSTR("HasBaseband");
  109. static const CFStringRef kMGHasInternalSettingsBundle = CFSTR("HasInternalSettingsBundle");
  110. static const CFStringRef kMGHasSpringBoard = CFSTR("HasSpringBoard");
  111. static const CFStringRef kMGInternalBuild = CFSTR("InternalBuild");
  112. static const CFStringRef kMGIsSimulator = CFSTR("IsSimulator");
  113. static const CFStringRef kMGIsThereEnoughBatteryLevelForSoftwareUpdate = CFSTR("IsThereEnoughBatteryLevelForSoftwareUpdate");
  114. static const CFStringRef kMGIsUIBuild = CFSTR("IsUIBuild");
  115. #pragma mark - Regional Behaviour
  116. static const CFStringRef kMGRegionalBehaviorAll = CFSTR("RegionalBehaviorAll");
  117. static const CFStringRef kMGRegionalBehaviorChinaBrick = CFSTR("RegionalBehaviorChinaBrick");
  118. static const CFStringRef kMGRegionalBehaviorEUVolumeLimit = CFSTR("RegionalBehaviorEUVolumeLimit");
  119. static const CFStringRef kMGRegionalBehaviorGB18030 = CFSTR("RegionalBehaviorGB18030");
  120. static const CFStringRef kMGRegionalBehaviorGoogleMail = CFSTR("RegionalBehaviorGoogleMail");
  121. static const CFStringRef kMGRegionalBehaviorNTSC = CFSTR("RegionalBehaviorNTSC");
  122. static const CFStringRef kMGRegionalBehaviorNoPasscodeLocationTiles = CFSTR("RegionalBehaviorNoPasscodeLocationTiles");
  123. static const CFStringRef kMGRegionalBehaviorNoVOIP = CFSTR("RegionalBehaviorNoVOIP");
  124. static const CFStringRef kMGRegionalBehaviorNoWiFi = CFSTR("RegionalBehaviorNoWiFi");
  125. static const CFStringRef kMGRegionalBehaviorShutterClick = CFSTR("RegionalBehaviorShutterClick");
  126. static const CFStringRef kMGRegionalBehaviorVolumeLimit = CFSTR("RegionalBehaviorVolumeLimit");
  127. #pragma mark - Wireless Information
  128. static const CFStringRef kMGActiveWirelessTechnology = CFSTR("ActiveWirelessTechnology");
  129. static const CFStringRef kMGWifiAddress = CFSTR("WifiAddress");
  130. static const CFStringRef kMGWifiAddressData = CFSTR("WifiAddressData");
  131. static const CFStringRef kMGWifiVendor = CFSTR("WifiVendor");
  132. #pragma mark - FaceTime Information
  133. static const CFStringRef kMGFaceTimeBitRate2G = CFSTR("FaceTimeBitRate2G");
  134. static const CFStringRef kMGFaceTimeBitRate3G = CFSTR("FaceTimeBitRate3G");
  135. static const CFStringRef kMGFaceTimeBitRateLTE = CFSTR("FaceTimeBitRateLTE");
  136. static const CFStringRef kMGFaceTimeBitRateWiFi = CFSTR("FaceTimeBitRateWiFi");
  137. static const CFStringRef kMGFaceTimeDecodings = CFSTR("FaceTimeDecodings");
  138. static const CFStringRef kMGFaceTimeEncodings = CFSTR("FaceTimeEncodings");
  139. static const CFStringRef kMGFaceTimePreferredDecoding = CFSTR("FaceTimePreferredDecoding");
  140. static const CFStringRef kMGFaceTimePreferredEncoding = CFSTR("FaceTimePreferredEncoding");
  141. #pragma mark - More Device Capabilities
  142. static const CFStringRef kMGDeviceSupportsFaceTime = CFSTR("DeviceSupportsFaceTime");
  143. static const CFStringRef kMGDeviceSupportsTethering = CFSTR("DeviceSupportsTethering");
  144. static const CFStringRef kMGDeviceSupportsSimplisticRoadMesh = CFSTR("DeviceSupportsSimplisticRoadMesh");
  145. static const CFStringRef kMGDeviceSupportsNavigation = CFSTR("DeviceSupportsNavigation");
  146. static const CFStringRef kMGDeviceSupportsLineIn = CFSTR("DeviceSupportsLineIn");
  147. static const CFStringRef kMGDeviceSupports9Pin = CFSTR("DeviceSupports9Pin");
  148. static const CFStringRef kMGDeviceSupports720p = CFSTR("DeviceSupports720p");
  149. static const CFStringRef kMGDeviceSupports4G = CFSTR("DeviceSupports4G");
  150. static const CFStringRef kMGDeviceSupports3DMaps = CFSTR("DeviceSupports3DMaps");
  151. static const CFStringRef kMGDeviceSupports3DImagery = CFSTR("DeviceSupports3DImagery");
  152. static const CFStringRef kMGDeviceSupports1080p = CFSTR("DeviceSupports1080p");
  153. #if __cplusplus
  154. }
  155. #endif
  156. #endif /* LIBMOBILEGESTALT_H_ */