]>
git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCPPath.h
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 <CoreFoundation/CoreFoundation.h>
27 #include <sys/cdefs.h>
31 The SystemConfiguration framework provides access to the data used
32 to configure a running system.
34 Specifically, the SCPPathXXX() API's allow an application to
35 load and store XML configuration data in a controlled
36 manner and provides the necessary notifications to other
37 applications which need to be aware of configuration
40 The SCPPathXXX() API's make certain assumptions about the layout
41 of the preferences data. These APIs view the data as a
42 collection of dictionaries of key/value pairs and an
43 associated path name. The root path ("/") identifies
44 the top-level dictionary. Additional path components
45 specify the keys for sub-dictionaries.
47 For example, the following dictionary can be access via
48 two paths. The root ("/") path would return a property
49 list with all keys and values. The path "/path1" would
50 only return the dictionary with the "key3" and "key4"
67 The APIs provided by this framework communicate with the "configd"
68 daemon for any tasks requiring synchronization and/or
76 @function SCPPathCreateUniqueChild
77 @discussion Creates a new path component within the dictionary
79 @param session Pass the SCPSessionRef handle which should be used to
80 communicate with the APIs.
81 @param prefix Pass a string which represents the parent path.
82 @param newPath A pointer to memory which will be filled with an
83 string representing the new child path.
84 @result A constant of type SCPStatus indicating the success (or
85 failure) of the call. Possible return values include: SCP_OK,
88 SCPStatus
SCPPathCreateUniqueChild (SCPSessionRef session
,
90 CFStringRef
*newPath
);
93 @function SCPPathGetValue
94 @discussion Returns the dictionary associated with the specified
96 @param session Pass the SCPSessionRef handle which should be used to
97 communicate with the APIs.
98 @param path Pass a string whcih represents the path to be returned.
99 @param value A pointer to memory which will be filled with an
100 dictionary associated with the specified path.
101 @result A constant of type SCPStatus indicating the success (or
102 failure) of the call. Possible return values include: SCP_OK,
105 SCPStatus
SCPPathGetValue (SCPSessionRef session
,
107 CFDictionaryRef
*value
);
110 @function SCPPathGetLink
111 @discussion Returns the link (if one exists) associatd with the
113 @param session Pass the SCPSessionRef handle which should be used to
114 communicate with the APIs.
115 @param path Pass a string whcih represents the path to be returned.
116 @param link A pointer to memory which will be filled with a
117 string reflecting the link found at the specified path.
118 If no link was present at the specified path a status
119 value of SCP_NOKEY will be returned.
120 @result A constant of type SCPStatus indicating the success (or
121 failure) of the call. Possible return values include: SCP_OK,
124 SCPStatus
SCPPathGetLink (SCPSessionRef session
,
129 @function SCPPathSetValue
130 @discussion Associates a dictionary with the specified path.
131 @param session Pass the SCPSessionRef handle which should be used to
132 communicate with the APIs.
133 @param path Pass a string whcih represents the path to be returned.
134 @param value Pass a dictionary which represents the data to be
135 stored at the specified path.
136 @result A constant of type SCPStatus indicating the success (or
137 failure) of the call. Possible return values include: SCP_OK.
139 SCPStatus
SCPPathSetValue (SCPSessionRef session
,
141 CFDictionaryRef value
);
144 @function SCPPathSetLink
145 @discussion Associates a link to a second dictionary at the
147 @param session Pass the SCPSessionRef handle which should be used to
148 communicate with the APIs.
149 @param path Pass a string whcih represents the path to be returned.
150 @param value Pass a string which represents the path to be stored
151 at the specified path.
152 @result A constant of type SCPStatus indicating the success (or
153 failure) of the call. Possible return values include: SCP_OK,
156 SCPStatus
SCPPathSetLink (SCPSessionRef session
,
161 @function SCPPathRemove
162 @discussion Removes the data associated with the specified path.
163 @param session Pass the SCPSessionRef handle which should be used to
164 communicate with the APIs.
165 @param path Pass a string whcih represents the path to be returned.
166 @result A constant of type SCPStatus indicating the success (or
167 failure) of the call. Possible return values include: SCP_OK,
170 SCPStatus
SCPPathRemove (SCPSessionRef session
,
175 #endif /* _SCPPATH_H */