2 * Copyright (c) 2005-2007, 2010, 2011, 2018 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
24 #ifndef _SCHELPER_CLIENT_H
25 #define _SCHELPER_CLIENT_H
27 #include <sys/cdefs.h>
28 #include <os/availability.h>
29 #include <TargetConditionals.h>
30 #include <CoreFoundation/CoreFoundation.h>
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
38 #define kSCHelperAuthAuthorization CFSTR("Authorization") // CFData[AuthorizationExternalForm]
39 #define kSCHelperAuthCallerInfo CFSTR("CallerInfo") // CFString
43 SCHELPER_MSG_AUTH
= 1,
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
,
56 // SCNetworkConfiguration
57 SCHELPER_MSG_INTERFACE_REFRESH
= 200,
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
68 SCHELPER_MSG_EXIT
= 9999
73 Boolean
_SCHelperOpen (CFDataRef authorizationData
,
74 mach_port_t
*helper_port
);
76 Boolean
_SCHelperExec (mach_port_t helper_port
,
82 void _SCHelperClose (mach_port_t
*helper_port
);
86 #endif /* _SCHELPER_CLIENT_H */