]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/helper/SCHelper_client.h
configd-963.250.1.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / helper / SCHelper_client.h
1 /*
2 * Copyright (c) 2005-2007, 2010, 2011, 2018 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24 #ifndef _SCHELPER_CLIENT_H
25 #define _SCHELPER_CLIENT_H
26
27 #include <sys/cdefs.h>
28 #include <os/availability.h>
29 #include <TargetConditionals.h>
30 #include <CoreFoundation/CoreFoundation.h>
31
32 #define kSCKeychainOptionsAccount CFSTR("Account") // CFString
33 #define kSCKeychainOptionsDescription CFSTR("Description") // CFString
34 #define kSCKeychainOptionsLabel CFSTR("Label") // CFString
35 #define kSCKeychainOptionsPassword CFSTR("Password") // CFData
36 #define kSCKeychainOptionsUniqueID CFSTR("UniqueID") // CFString
37
38 #define kSCHelperAuthAuthorization CFSTR("Authorization") // CFData[AuthorizationExternalForm]
39 #define kSCHelperAuthCallerInfo CFSTR("CallerInfo") // CFString
40
41 enum {
42 // authorization
43 SCHELPER_MSG_AUTH = 1,
44
45 // SCPreferences
46 SCHELPER_MSG_PREFS_OPEN = 100,
47 SCHELPER_MSG_PREFS_ACCESS,
48 SCHELPER_MSG_PREFS_LOCK,
49 SCHELPER_MSG_PREFS_LOCKWAIT,
50 SCHELPER_MSG_PREFS_COMMIT,
51 SCHELPER_MSG_PREFS_APPLY,
52 SCHELPER_MSG_PREFS_UNLOCK,
53 SCHELPER_MSG_PREFS_CLOSE,
54 SCHELPER_MSG_PREFS_SYNCHRONIZE,
55
56 // SCNetworkConfiguration
57 SCHELPER_MSG_INTERFACE_REFRESH = 200,
58
59 #if !TARGET_OS_IPHONE
60 // "System" Keychain
61 SCHELPER_MSG_KEYCHAIN_COPY = 300,
62 SCHELPER_MSG_KEYCHAIN_EXISTS,
63 SCHELPER_MSG_KEYCHAIN_REMOVE,
64 SCHELPER_MSG_KEYCHAIN_SET,
65 #endif // !TARGET_OS_IPHONE
66
67 // miscellaneous
68 SCHELPER_MSG_EXIT = 9999
69 };
70
71 __BEGIN_DECLS
72
73 Boolean _SCHelperOpen (CFDataRef authorizationData,
74 mach_port_t *helper_port);
75
76 Boolean _SCHelperExec (mach_port_t helper_port,
77 uint32_t msgID,
78 CFDataRef data,
79 uint32_t *status,
80 CFDataRef *reply);
81
82 void _SCHelperClose (mach_port_t *helper_port);
83
84 __END_DECLS
85
86 #endif /* _SCHELPER_CLIENT_H */
87