]> git.saurik.com Git - apple/xnu.git/blob - EXTERNAL_HEADERS/img4/environment.h
xnu-6153.11.26.tar.gz
[apple/xnu.git] / EXTERNAL_HEADERS / img4 / environment.h
1 /*!
2 * @header
3 * Image4 environments.
4 */
5 #ifndef __IMG4_ENVIRONMENT_H
6 #define __IMG4_ENVIRONMENT_H
7
8 #ifndef __IMG4_INDIRECT
9 #error "Please #include <img4/img4.h> instead of this file directly"
10 #endif // __IMG4_INDIRECT
11
12 #if IMG4_TAPI
13 #include "tapi.h"
14 #endif
15
16 /*!
17 * @typedef img4_environment_t
18 * An opaque type describing an Image4 environment.
19 */
20 typedef struct _img4_environment img4_environment_t;
21
22 /*!
23 * @const IMG4_ENVIRONMENT_PLATFORM
24 * The environment for the host that uses the default platform implementation to
25 * resolve the environment. This is the environment against which manifests are
26 * personalized.
27 */
28 #if !XNU_KERNEL_PRIVATE
29 IMG4_API_AVAILABLE_20180112
30 OS_EXPORT
31 const struct _img4_environment _img4_environment_platform;
32 #define IMG4_ENVIRONMENT_PLATFORM (&_img4_environment_platform)
33 #else
34 #define IMG4_ENVIRONMENT_PLATFORM (img4if->i4if_environment_platform)
35 #endif
36
37
38 /*!
39 * @const IMG4_ENVIRONMENT_TRUST_CACHE
40 * The software environment for globally-signed loadable trust caches. This
41 * environment should be used as a fallback when validation against the platform
42 * fails, and the caller is handling a loadable trust cache.
43 */
44 #if !XNU_KERNEL_PRIVATE
45 IMG4_API_AVAILABLE_20181004
46 OS_EXPORT
47 const struct _img4_environment _img4_environment_trust_cache;
48 #define IMG4_ENVIRONMENT_TRUST_CACHE (&_img4_environment_trust_cache)
49 #else
50 #define IMG4_ENVIRONMENT_TRUST_CACHE (img4if->i4if_environment_trust_cache)
51 #endif
52
53 #endif // __IMG4_ENVIRONMENT_H