]> git.saurik.com Git - apple/configd.git/blobdiff - SystemConfiguration.fproj/helper/SCHelper_client.h
configd-204.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / helper / SCHelper_client.h
diff --git a/SystemConfiguration.fproj/helper/SCHelper_client.h b/SystemConfiguration.fproj/helper/SCHelper_client.h
new file mode 100644 (file)
index 0000000..3842793
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2005, 2006 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this
+ * file.
+ * 
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+
+#ifndef _SCHELPER_CLIENT_H
+#define _SCHELPER_CLIENT_H
+
+#include <sys/cdefs.h>
+#include <Security/Security.h>
+
+#define kSCKeychainOptionsAccount              CFSTR("Account")                // CFString
+#define kSCKeychainOptionsDescription          CFSTR("Description")            // CFString
+#define kSCKeychainOptionsLabel                        CFSTR("Label")                  // CFString
+#define kSCKeychainOptionsPassword             CFSTR("Password")               // CFData
+#define kSCKeychainOptionsUniqueID             CFSTR("UniqueID")               // CFString
+
+enum {
+       // authorization
+       SCHELPER_MSG_AUTH               = 1,
+
+       // SCPreferences
+       SCHELPER_MSG_PREFS_OPEN         = 100,
+       SCHELPER_MSG_PREFS_ACCESS,
+       SCHELPER_MSG_PREFS_LOCK,
+       SCHELPER_MSG_PREFS_LOCKWAIT,
+       SCHELPER_MSG_PREFS_COMMIT,
+       SCHELPER_MSG_PREFS_APPLY,
+       SCHELPER_MSG_PREFS_UNLOCK,
+       SCHELPER_MSG_PREFS_CLOSE,
+
+       // SCNetworkConfiguration
+       SCHELPER_MSG_INTERFACE_REFRESH  = 200,
+
+       // "System" Keychain
+       SCHELPER_MSG_KEYCHAIN_COPY      = 300,
+       SCHELPER_MSG_KEYCHAIN_EXISTS,
+       SCHELPER_MSG_KEYCHAIN_REMOVE,
+       SCHELPER_MSG_KEYCHAIN_SET,
+
+       // miscellaneous
+       SCHELPER_MSG_EXIT               = 9999
+};
+
+__BEGIN_DECLS
+
+int    _SCHelperOpen   (CFDataRef              authorizationData);
+
+Boolean        _SCHelperExec   (int                    helper,
+                        uint32_t               msgID,
+                        CFDataRef              data,
+                        uint32_t               *status,
+                        CFDataRef              *reply);
+
+void   _SCHelperClose  (int                    helper);
+
+__END_DECLS
+
+#endif /* _SCHELPER_CLIENT_H */
+