]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/helper/SCHelper_client.h
configd-212.2.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / helper / SCHelper_client.h
1 /*
2 * Copyright (c) 2005-2007 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 <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 SCHELPER_MSG_PREFS_SYNCHRONIZE,
50
51 // SCNetworkConfiguration
52 SCHELPER_MSG_INTERFACE_REFRESH = 200,
53
54 // "System" Keychain
55 SCHELPER_MSG_KEYCHAIN_COPY = 300,
56 SCHELPER_MSG_KEYCHAIN_EXISTS,
57 SCHELPER_MSG_KEYCHAIN_REMOVE,
58 SCHELPER_MSG_KEYCHAIN_SET,
59
60 // miscellaneous
61 SCHELPER_MSG_EXIT = 9999
62 };
63
64 __BEGIN_DECLS
65
66 int _SCHelperOpen (CFDataRef authorizationData);
67
68 Boolean _SCHelperExec (int helper,
69 uint32_t msgID,
70 CFDataRef data,
71 uint32_t *status,
72 CFDataRef *reply);
73
74 void _SCHelperClose (int helper);
75
76 __END_DECLS
77
78 #endif /* _SCHELPER_CLIENT_H */
79