2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
26 #include <sys/cdefs.h>
27 #include <sys/types.h>
29 #include <sys/resource.h>
30 #include <CoreFoundation/CoreFoundation.h>
39 @define kSCBundleRequires
41 #define kSCBundleRequires CFSTR("Requires")
45 @define kSCBundleVerbose
47 #define kSCBundleVerbose CFSTR("Verbose")
51 @typedef SCDynamicStoreBundleLoadFunction
52 @discussion Type of the load() initialization function that will be
53 called when a plug-in is loaded. This function is called
54 before calling the start() function and can be uesd to
55 initialize any variables, open any sessions with "configd",
56 and register any needed notifications.
57 @param bundle The CFBundle being loaded.
58 @param verbose A boolean value indicating whether verbose logging has
59 been enabled for this bundle.
61 typedef void (*SCDynamicStoreBundleLoadFunction
) (CFBundleRef bundle
,
62 Boolean bundleVerbose
);
65 @typedef SCDynamicStoreBundleStartFunction
66 @discussion Type of the start() initialization function that will be
67 called after all plug-ins have been loaded and their load()
68 functions have been called. This function can initialize
69 variables, open sessions with "configd", and register any
71 @param bundleName The name of the plug-in / bundle.
72 @param bundlePath The path name associated with the plug-in / bundle.
74 typedef void (*SCDynamicStoreBundleStartFunction
) (const char *bundleName
,
75 const char *bundlePath
);
78 @typedef SCDynamicStoreBundlePrimeFunction
79 @discussion Type of the prime() initialization function that will be
80 called after all plug-ins have executed their start() function but
81 before the main plug-in run loop is started. This function should
82 be used to initialize any configuration information and/or state
85 typedef void (*SCDynamicStoreBundlePrimeFunction
) ();
89 @typedef SCDPluginExecCallBack
90 @discussion Type of the callback function used when a child process
91 started by a plug-in has exited.
92 @param pid The process id of the child which has exited.
93 @param status The exit status of the child which has exited.
94 @param rusage A summary of the resources used by the child process
96 @param context The callback argument specified on the call
97 to _SCDPluginExecCommand().
99 typedef void (*SCDPluginExecCallBack
) (pid_t pid
,
101 struct rusage
*rusage
,
108 @function _SCDPluginExecCommand
109 @discussion Starts a child process.
110 @param callout The function to be called when the child
111 process exits. A NULL value can be specified if no
112 callouts are desired.
113 @param context A argument which will be passed
114 to the callout function.
115 @param uid The desired user id of the child process.
116 @param gid The desired group id of the child process.
117 @param path The command to be executed.
118 @param argv The arguments to be passed to the child process.
119 @result The process ID of the child.
122 _SCDPluginExecCommand (
123 SCDPluginExecCallBack callout
,
133 #endif /* _SCDPLUGIN_H */