MobileGestalt.h 11 KB

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