GSCapability.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. /*
  2. GSCapability.h ... Graphics Service Capability.
  3. Copyright (c) 2009, KennyTM~
  4. All rights reserved.
  5. Redistribution and use in source and binary forms, with or without modification,
  6. are permitted provided that the following conditions are met:
  7. * Redistributions of source code must retain the above copyright notice, this
  8. list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright notice,
  10. this list of conditions and the following disclaimer in the documentation
  11. and/or other materials provided with the distribution.
  12. * Neither the name of the KennyTM~ nor the names of its contributors may be
  13. used to endorse or promote products derived from this software without
  14. specific prior written permission.
  15. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  16. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  17. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  18. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
  19. ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  20. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  21. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  22. ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  23. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  24. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25. */
  26. #ifndef GSCAPABILITY_H
  27. #define GSCAPABILITY_H
  28. #include <CoreFoundation/CoreFoundation.h>
  29. #include <Availability2.h>
  30. #if __cplusplus
  31. extern "C" {
  32. #endif
  33. /*! @brief Get the raw value of a key in the capability plist.
  34. The capability plist can be read from a shared memory region named "GSCapability"
  35. */
  36. CFPropertyListRef _getCapability(CFStringRef capability);
  37. CFStringRef GSGetLocalizedDeviceName(); ///< Get the localized device name (which is the "device-name-localized" capability).
  38. CFStringRef GSGetDeviceName(); ///< Get the device name (which is the "device-name" capability).
  39. Boolean GSSystemHasCapability(CFStringRef capability); ///< Check if the system has the specified capability.
  40. Boolean GSSystemCanTakePhoto(); ///< Returns if the device can take photos (i.e. have "still-camera" but not "cameraRestriction" capabilities).
  41. #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2
  42. Boolean GSSystemHasTelephonyCapability(); ///< Returns if the device has "telephony" capability.
  43. #endif
  44. #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2
  45. Boolean GSSystemGetCellularDataCapability(void); ///< Returns if the device has "cellular-data" capability.
  46. Boolean GSSystemGetTelephonyCapability(void); ///< Returns if the device has "telephony" capability.
  47. #endif
  48. /// If the capability is a dictionary (e.g. the "screen-dimensions" capability), copy the value of a key in that dictionary.
  49. CFPropertyListRef GSSystemCopySubcapability(CFStringRef capability, CFStringRef subcapability);
  50. CFPropertyListRef GSSystemCopyCapability(CFStringRef capability); ///< Copy the value of a capability.
  51. extern CFStringRef kGSCapabilityChangedNotification;
  52. extern CFStringRef kGSCameraRestriction;
  53. extern CFStringRef kGSInAppPurchasesRestriction;
  54. extern CFStringRef kGSVolumeLimitRestriction;
  55. extern CFStringRef kGSDeviceNameString;
  56. extern CFStringRef kGSLocalizedDeviceNameString;
  57. extern CFStringRef kGSTelephonyMaximumGeneration;
  58. #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_1
  59. extern CFStringRef kGSARMV6ExecutionCapability;
  60. extern CFStringRef kGSARMV7ExecutionCapability;
  61. #endif
  62. extern CFStringRef kGSAccelerometerCapability;
  63. extern CFStringRef kGSAccessibilityCapability;
  64. extern CFStringRef kGSAppleInternalInstallCapability;
  65. extern CFStringRef kGSApplicationInstallationCapability;
  66. extern CFStringRef kGSAutoFocusCameraCapability;
  67. extern CFStringRef kGSBluetoothCapability;
  68. extern CFStringRef kGSCameraCapability;
  69. extern CFStringRef kGSDelaySleepForHeadsetClickCapability;
  70. extern CFStringRef kGSDisplayFCCLogosViaSoftwareCapability;
  71. extern CFStringRef kGSDisplayIdentifiersCapability;
  72. extern CFStringRef kGSEncodeAACCapability;
  73. extern CFStringRef kGSEncryptedDataPartitionCapability;
  74. extern CFStringRef kGSExplicitContentRestriction;
  75. extern CFStringRef kGSGPSCapability;
  76. extern CFStringRef kGSGasGaugeBatteryCapability;
  77. extern CFStringRef kGSGreenTeaDeviceCapability;
  78. extern CFStringRef kGSHasAllFeaturesCapability;
  79. extern CFStringRef kGSInternationalSettingsCapability;
  80. extern CFStringRef kGSLaunchApplicationsWhileAnimatingCapability;
  81. extern CFStringRef kGSLoadThumbnailsWhileScrollingCapability;
  82. extern CFStringRef kGSLocationServicesCapability;
  83. extern CFStringRef kGSMMSCapability;
  84. extern CFStringRef kGSMagnetometerCapability;
  85. #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_1
  86. extern CFStringRef kGSMarketingNameString;
  87. #endif
  88. extern CFStringRef kGSMicrophoneCapability;
  89. extern CFStringRef kGSNikeIpodCapability;
  90. extern CFStringRef kGSNotGreenTeaDeviceCapability;
  91. extern CFStringRef kGSOpenGLES1Capability;
  92. extern CFStringRef kGSOpenGLES2Capability;
  93. #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_1
  94. extern CFStringRef kGSPeer2PeerCapability;
  95. #endif
  96. extern CFStringRef kGSPiezoClickerCapability;
  97. extern CFStringRef kGSPlatformStandAloneContactsCapability;
  98. extern CFStringRef kGSProximitySensorCapability;
  99. extern CFStringRef kGSRingerSwitchCapability;
  100. extern CFStringRef kGSSMSCapability;
  101. extern CFStringRef kGSScreenDimensionsCapability;
  102. extern CFStringRef kGSSensitiveUICapability;
  103. extern CFStringRef kGSTVOutSettingsCapability;
  104. extern CFStringRef kGSTelephonyCapability;
  105. extern CFStringRef kGSUnifiedIPodCapability;
  106. extern CFStringRef kGSVideoCameraCapability;
  107. extern CFStringRef kGSVoiceControlCapability;
  108. extern CFStringRef kGSVolumeButtonCapability;
  109. extern CFStringRef kGSWiFiCapability;
  110. extern CFStringRef kGSYouTubeCapability;
  111. extern CFStringRef kGSYouTubePluginCapability;
  112. #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2
  113. extern CFStringRef kGS720pPlaybackCapability;
  114. extern CFStringRef kGSCellularDataCapability;
  115. extern CFStringRef kGSContainsCellularRadioCapability;
  116. extern CFStringRef kGSDataPlanCapability;
  117. extern CFStringRef kGSDisplayPortCapability;
  118. extern CFStringRef kGSH264EncoderCapability;
  119. extern CFStringRef kGSHideNonDefaultApplicationsCapability;
  120. extern CFStringRef kGSWildcatCapability;
  121. #endif
  122. #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
  123. extern CFStringRef kGSCameraFlashCapability;
  124. extern CFStringRef kGSCanRasterizeEfficientlyCapability;
  125. extern CFStringRef kGSFrontFacingCameraCapability;
  126. extern CFStringRef kGSHiDPICapability;
  127. extern CFStringRef kGSIOSurfaceBackedImagesCapability;
  128. extern CFStringRef kGSMultitaskingCapability;
  129. extern CFStringRef kGSVeniceCapability;
  130. #endif
  131. /// Subcapabilities
  132. extern CFStringRef kGSMainScreenHeight;
  133. extern CFStringRef kGSMainScreenOrientation;
  134. extern CFStringRef kGSMainScreenScale;
  135. extern CFStringRef kGSMainScreenWidth;
  136. extern CFStringRef kGSEnforceGoogleMail;
  137. #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2
  138. extern CFStringRef kGSEnforceCameraShutterClick;
  139. #endif
  140. #if __cplusplus
  141. }
  142. #endif
  143. #endif