]> git.saurik.com Git - apple/libc.git/blobdiff - include/libkern/OSThermalNotification.h
Libc-1439.100.3.tar.gz
[apple/libc.git] / include / libkern / OSThermalNotification.h
index 02b2823a8b7452bd95aeb0d220a1ed69727ca4f6..beeed587d196fcc72a4c9a2a44ba730e2029eae9 100644 (file)
 
 __BEGIN_DECLS
 
+/* Define pressure levels usable by OSThermalPressureLevel */
+typedef enum {
+#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
+       kOSThermalPressureLevelNominal = 0,
+       kOSThermalPressureLevelModerate,
+       kOSThermalPressureLevelHeavy,
+       kOSThermalPressureLevelTrapping,
+       kOSThermalPressureLevelSleeping
+#else
+       kOSThermalPressureLevelNominal = 0,
+       kOSThermalPressureLevelLight = 10,
+       kOSThermalPressureLevelModerate = 20,
+       kOSThermalPressureLevelHeavy = 30,
+       kOSThermalPressureLevelTrapping = 40,
+       kOSThermalPressureLevelSleeping = 50
+#endif
+} OSThermalPressureLevel;
+
+/*
+ ** External notify(3) string for thermal pressure level notification
+ */
+__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_7_0)
+extern const char * const kOSThermalNotificationPressureLevelName;
+
+
+#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && \
+       __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_2_0
+
 typedef enum {
        OSThermalNotificationLevelAny      = -1,
        OSThermalNotificationLevelNormal   =  0,
@@ -57,6 +85,7 @@ enum {
        kOSThermalMitigationDisableMapsHalo,
        kOSThermalMitigationAppTerminate,
        kOSThermalMitigationDeviceRestart,
+       kOSThermalMitigationThermalTableReady,
        kOSThermalMitigationCount
 };
 
@@ -78,14 +107,28 @@ enum {
 /*
 ** Simple polling interface to detect current thermal level
 */
-
-extern OSThermalNotificationLevel OSThermalNotificationCurrentLevel(void) __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_0);
+__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_0)
+extern OSThermalNotificationLevel OSThermalNotificationCurrentLevel(void);
 
 /*
 ** External notify(3) string for manual notification setup
 */
+__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_0)
+extern const char * const kOSThermalNotificationName;
+
+/*
+** External notify(3) string for alerting user of a thermal condition
+*/
+__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_6_0)
+extern const char * const kOSThermalNotificationAlert;
+
+/*
+** External notify(3) string for notifying system the options taken to resolve thermal condition
+*/
+__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_6_0)
+extern const char * const kOSThermalNotificationDecision;
 
-extern const char * const kOSThermalNotificationName __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_2_0);
+#endif // __IPHONE_OS_VERSION_MIN_REQUIRED
 
 __END_DECLS