]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/helper/SCHelper_client.h
configd-395.6.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / helper / SCHelper_client.h
1 /*
2 * Copyright (c) 2005-2007, 2010 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 <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 enum {
39 // authorization
40 SCHELPER_MSG_AUTH = 1,
41
42 // SCPreferences
43 SCHELPER_MSG_PREFS_OPEN = 100,
44 SCHELPER_MSG_PREFS_ACCESS,
45 SCHELPER_MSG_PREFS_LOCK,
46 SCHELPER_MSG_PREFS_LOCKWAIT,
47 SCHELPER_MSG_PREFS_COMMIT,
48 SCHELPER_MSG_PREFS_APPLY,
49 SCHELPER_MSG_PREFS_UNLOCK,
50 SCHELPER_MSG_PREFS_CLOSE,
51 SCHELPER_MSG_PREFS_SYNCHRONIZE,
52
53 // SCNetworkConfiguration
54 SCHELPER_MSG_INTERFACE_REFRESH = 200,
55
56 #if !TARGET_OS_IPHONE
57 // "System" Keychain
58 SCHELPER_MSG_KEYCHAIN_COPY = 300,
59 SCHELPER_MSG_KEYCHAIN_EXISTS,
60 SCHELPER_MSG_KEYCHAIN_REMOVE,
61 SCHELPER_MSG_KEYCHAIN_SET,
62 #endif // !TARGET_OS_IPHONE
63
64 // miscellaneous
65 SCHELPER_MSG_EXIT = 9999
66 };
67
68 __BEGIN_DECLS
69
70 Boolean _SCHelperOpen (CFDataRef authorizationData,
71 mach_port_t *helper_port);
72
73 Boolean _SCHelperExec (mach_port_t helper_port,
74 uint32_t msgID,
75 CFDataRef data,
76 uint32_t *status,
77 CFDataRef *reply);
78
79 void _SCHelperClose (mach_port_t *helper_port);
80
81 __END_DECLS
82
83 #endif /* _SCHELPER_CLIENT_H */
84