]> git.saurik.com Git - apple/mdnsresponder.git/blame - mDNSMacOSX/utilities/system_utilities.h
mDNSResponder-1310.80.1.tar.gz
[apple/mdnsresponder.git] / mDNSMacOSX / utilities / system_utilities.h
CommitLineData
19fa75a9
A
1/*
2 * Copyright (c) 2019-2020 Apple Inc. All rights reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
f0cc3e7b
A
16
17#ifndef SYSTEM_UTILITIES_H
18#define SYSTEM_UTILITIES_H
19
19fa75a9
A
20#include <stdbool.h>
21#include <stdint.h>
22#include <os/base.h>
23
24__BEGIN_DECLS
25OS_ASSUME_NONNULL_BEGIN
26
27bool IsAppleInternalBuild(void);
28
29OS_CLOSED_ENUM(util_enclosure_color, int,
30 util_enclosure_color_none = 0, // No enclosure color available
31 util_enclosure_color_rgb = 1, // Enclosure color is rgb value "int,int,int"
32 util_enclosure_color_index = 2 // Enclosure color is index value "int"
33);
34
35/**
36 \brief Get the enclosure color of the current device, if available.
37
38 \param out_str On success, the enclosure color of the current
39 device as a string. On failure, the value is unspecified.
40
41 \param len The available length of out_str.
42
43 \result The util_enclosure_color_t of color string returned.
44 \a *out_str.
45*/
46
47util_enclosure_color_t
48util_get_enclosure_color_str(char * const out_str, uint8_t len, uint8_t *out_size);
49
50OS_ASSUME_NONNULL_END
f0cc3e7b
A
51
52#endif /* SYSTEM_UTILITIES_H */