]>
git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCDynamicStoreKey.h
2 * Copyright (c) 2000-2002, 2004, 2005, 2008 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
24 #ifndef _SCDYNAMICSTOREKEY_H
25 #ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS
26 #include <SystemConfiguration/_SCDynamicStoreKey.h>
27 #else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
28 #define _SCDYNAMICSTOREKEY_H
30 #include <Availability.h>
31 #include <sys/cdefs.h>
32 #include <CoreFoundation/CoreFoundation.h>
36 @header SCDynamicStoreKey
37 @discussion The SCDynamicStoreKey API provides convenience functions
38 that an application can use to create a correctly formatted
39 dynamic store key for accessing specific items in the dynamic
40 store. An application can then use the resulting string in
41 any function that requires a dynamic store key.
48 * SCDynamicStoreKeyCreate
49 * - convenience routines that create a CFString key for an item in the store
53 @function SCDynamicStoreKeyCreate
54 @discussion Creates a dynamic store key using the given format.
55 @param allocator The CFAllocator that should be used to allocate
57 This parameter may be NULL in which case the current
58 default CFAllocator is used. If this reference is not
59 a valid CFAllocator, the behavior is undefined.
60 @param fmt A CFStringRef describing the format for this key.
61 @result Returns a string containing the formatted key.
64 SCDynamicStoreKeyCreate (
65 CFAllocatorRef allocator
,
68 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_2_0
/*SPI*/);
71 @function SCDynamicStoreKeyCreateNetworkGlobalEntity
72 @discussion Creates a dynamic store key that can be used to access
73 a specific global (as opposed to a per-service or per-interface)
74 network configuration entity.
75 @param allocator The CFAllocator that should be used to allocate
77 This parameter may be NULL in which case the current
78 default CFAllocator is used. If this reference is not
79 a valid CFAllocator, the behavior is undefined.
80 @param domain A string specifying the desired domain, such as the
81 requested configuration (kSCDynamicStoreDomainSetup) or the
82 actual state (kSCDynamicStoreDomainState).
83 @param entity A string containing the specific global entity, such
84 as IPv4 (kSCEntNetIPv4) or DNS (kSCEntNetDNS).
85 @result Returns a string containing the formatted key.
89 SCDynamicStoreKeyCreateNetworkGlobalEntity (
90 CFAllocatorRef allocator
,
93 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_2_0
/*SPI*/);
96 @function SCDynamicStoreKeyCreateNetworkInterface
97 @discussion Creates a dynamic store key that can be used to access
98 the network interface configuration information stored in
100 @param allocator The CFAllocator that should be used to allocate
102 This parameter may be NULL in which case the current
103 default CFAllocator is used. If this reference is not
104 a valid CFAllocator, the behavior is undefined.
105 @param domain A string specifying the desired domain, such as the
106 requested configuration (kSCDynamicStoreDomainSetup) or the
107 actual state (kSCDynamicStoreDomainState).
108 @result Returns a string containing the formatted key.
112 SCDynamicStoreKeyCreateNetworkInterface (
113 CFAllocatorRef allocator
,
115 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_2_0
/*SPI*/);
118 @function SCDynamicStoreKeyCreateNetworkInterfaceEntity
119 @discussion Creates a dynamic store key that can be used to access
120 the per-interface network configuration information stored in
122 @param allocator The CFAllocator that should be used to allocate
124 This parameter may be NULL in which case the current
125 default CFAllocator is used. If this reference is not
126 a valid CFAllocator, the behavior is undefined.
127 @param domain A string specifying the desired domain, such as the
128 requested configuration (kSCDynamicStoreDomainSetup) or the
129 actual state (kSCDynamicStoreDomainState).
130 @param ifname A string containing the interface name or a regular
132 @param entity A string containing the specific global entity, such
133 as IPv4 (kSCEntNetIPv4) or DNS (kSCEntNetDNS).
134 @result Returns a string containing the formatted key.
138 SCDynamicStoreKeyCreateNetworkInterfaceEntity (
139 CFAllocatorRef allocator
,
143 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_2_0
/*SPI*/);
146 @function SCDynamicStoreKeyCreateNetworkServiceEntity
147 @discussion Creates a dynamic store key that can be used to access
148 the per-service network configuration information stored in
150 @param allocator The CFAllocator that should be used to allocate
152 This parameter may be NULL in which case the current
153 default CFAllocator is used. If this reference is not
154 a valid CFAllocator, the behavior is undefined.
155 @param domain A string specifying the desired domain, such as the
156 requested configuration (kSCDynamicStoreDomainSetup) or the
157 actual state (kSCDynamicStoreDomainState).
158 @param serviceID A string containing the service ID or a regular
160 @param entity A string containing the specific global entity, such
161 as IPv4 (kSCEntNetIPv4) or DNS (kSCEntNetDNS).
162 @result Returns a string containing the formatted key.
167 SCDynamicStoreKeyCreateNetworkServiceEntity (
168 CFAllocatorRef allocator
,
170 CFStringRef serviceID
,
172 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_2_0
/*SPI*/);
175 @function SCDynamicStoreKeyCreateComputerName
176 @discussion Creates a key that can be used in conjuntion with
177 SCDynamicStoreSetNotificationKeys function to receive
178 notifications when the current computer name changes.
179 @param allocator The CFAllocator that should be used to allocate
181 This parameter may be NULL in which case the current
182 default CFAllocator is used. If this reference is not
183 a valid CFAllocator, the behavior is undefined.
184 @result Returns a notification string for the current computer or
188 SCDynamicStoreKeyCreateComputerName (
189 CFAllocatorRef allocator
190 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_2_0
/*SPI*/);
193 @function SCDynamicStoreKeyCreateConsoleUser
194 @discussion Creates a key that can be used in conjunction with
195 SCDynamicStoreSetNotificationKeys function to receive
196 notifications when the current console user changes.
197 @param allocator The CFAllocator that should be used to allocate
199 This parameter may be NULL in which case the current
200 default CFAllocator is used. If this reference is not
201 a valid CFAllocator, the behavior is undefined.
202 @result Returns a notification string for the current console user.
205 SCDynamicStoreKeyCreateConsoleUser (
206 CFAllocatorRef allocator
207 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_NA
);
210 @function SCDynamicStoreKeyCreateHostNames
211 @discussion Creates a key that can be used in conjunction with the
212 SCDynamicStoreSetNotificationKeys function to receive
213 notifications when the HostNames entity changes. The
214 HostNames entity includes the local host name.
215 @param allocator The CFAllocator that should be used to allocate
217 This parameter may be NULL in which case the current
218 default CFAllocator is used. If this reference is not
219 a valid CFAllocator, the behavior is undefined.
220 @result Returns a notification string for the HostNames entity.
223 SCDynamicStoreKeyCreateHostNames (
224 CFAllocatorRef allocator
225 ) __OSX_AVAILABLE_STARTING(__MAC_10_2
,__IPHONE_2_0
/*SPI*/);
228 @function SCDynamicStoreKeyCreateLocation
229 @discussion Creates a key that can be used in conjunction with the
230 SCDynamicStoreSetNotificationKeys function to receive
231 notifications when the location identifier changes.
232 @param allocator The CFAllocator that should be used to allocate
234 This parameter may be NULL in which case the current
235 default CFAllocator is used. If this reference is not
236 a valid CFAllocator, the behavior is undefined.
237 @result Returns a notification string for the current location
241 SCDynamicStoreKeyCreateLocation (
242 CFAllocatorRef allocator
243 ) __OSX_AVAILABLE_STARTING(__MAC_10_2
,__IPHONE_2_0
/*SPI*/);
246 @function SCDynamicStoreKeyCreateProxies
247 @discussion Creates a key that can be used in conjunction with
248 the SCDynamicStoreSetNotificationKeys function to receive
249 notifications when the current network proxy settings
250 (such as HTTP or FTP) are changed.
251 @param allocator The CFAllocator that should be used to allocate
253 This parameter may be NULL in which case the current
254 default CFAllocator is used. If this reference is not
255 a valid CFAllocator, the behavior is undefined.
256 @result Returns a notification string for the current proxy settings.
259 SCDynamicStoreKeyCreateProxies (
260 CFAllocatorRef allocator
261 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_2_0
/*SPI*/);
265 #endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
266 #endif /* _SCDYNAMICSTOREKEY_H */