]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/helper/SCHelper_client.h
384279345c7459b46dd91827b7f7db3cfe6d35a4
[apple/configd.git] / SystemConfiguration.fproj / helper / SCHelper_client.h
1 /*
2 * Copyright (c) 2005, 2006 Apple Computer, 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 <Security/Security.h>
29
30 #define kSCKeychainOptionsAccount CFSTR("Account") // CFString
31 #define kSCKeychainOptionsDescription CFSTR("Description") // CFString
32 #define kSCKeychainOptionsLabel CFSTR("Label") // CFString
33 #define kSCKeychainOptionsPassword CFSTR("Password") // CFData
34 #define kSCKeychainOptionsUniqueID CFSTR("UniqueID") // CFString
35
36 enum {
37 // authorization
38 SCHELPER_MSG_AUTH = 1,
39
40 // SCPreferences
41 SCHELPER_MSG_PREFS_OPEN = 100,
42 SCHELPER_MSG_PREFS_ACCESS,
43 SCHELPER_MSG_PREFS_LOCK,
44 SCHELPER_MSG_PREFS_LOCKWAIT,
45 SCHELPER_MSG_PREFS_COMMIT,
46 SCHELPER_MSG_PREFS_APPLY,
47 SCHELPER_MSG_PREFS_UNLOCK,
48 SCHELPER_MSG_PREFS_CLOSE,
49
50 // SCNetworkConfiguration
51 SCHELPER_MSG_INTERFACE_REFRESH = 200,
52
53 // "System" Keychain
54 SCHELPER_MSG_KEYCHAIN_COPY = 300,
55 SCHELPER_MSG_KEYCHAIN_EXISTS,
56 SCHELPER_MSG_KEYCHAIN_REMOVE,
57 SCHELPER_MSG_KEYCHAIN_SET,
58
59 // miscellaneous
60 SCHELPER_MSG_EXIT = 9999
61 };
62
63 __BEGIN_DECLS
64
65 int _SCHelperOpen (CFDataRef authorizationData);
66
67 Boolean _SCHelperExec (int helper,
68 uint32_t msgID,
69 CFDataRef data,
70 uint32_t *status,
71 CFDataRef *reply);
72
73 void _SCHelperClose (int helper);
74
75 __END_DECLS
76
77 #endif /* _SCHELPER_CLIENT_H */
78