2 * Copyright (c) 2001, 2004, 2005 Apple Computer, 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@
25 * Modification History
27 * October 29, 2001 Allan Nathanson <ajn@apple.com>
31 #include <SystemConfiguration/SystemConfiguration.h>
35 __private_extern__ CFStringRef
36 SCPreferencesPathKeyCreate(CFAllocatorRef allocator
,
42 return (CFStringCreateWithFormatAndArguments(allocator
,
49 __private_extern__ CFStringRef
50 SCPreferencesPathKeyCreateNetworkServices(CFAllocatorRef allocator
)
53 * create "/NetworkServices"
55 return CFStringCreateWithFormat(allocator
,
58 kSCPrefNetworkServices
);
62 __private_extern__ CFStringRef
63 SCPreferencesPathKeyCreateNetworkServiceEntity(CFAllocatorRef allocator
,
71 * create "/NetworkServices/service-id"
73 path
= CFStringCreateWithFormat(allocator
,
76 kSCPrefNetworkServices
,
80 * create "/NetworkServices/service-id/entity"
82 path
= CFStringCreateWithFormat(allocator
,
85 kSCPrefNetworkServices
,
94 __private_extern__ CFStringRef
95 SCPreferencesPathKeyCreateSets(CFAllocatorRef allocator
)
100 return (CFStringCreateWithFormat(allocator
,
107 __private_extern__ CFStringRef
108 SCPreferencesPathKeyCreateSet(CFAllocatorRef allocator
,
112 * create "/Sets/set-id"
114 return (CFStringCreateWithFormat(allocator
,
122 __private_extern__ CFStringRef
123 SCPreferencesPathKeyCreateSetNetworkGlobalEntity(CFAllocatorRef allocator
,
128 * create "/Sets/set-id/Network/Global/entity"
130 return CFStringCreateWithFormat(allocator
,
132 CFSTR("/%@/%@/%@/%@/%@"),
141 __private_extern__ CFStringRef
142 SCPreferencesPathKeyCreateSetNetworkInterfaceEntity(CFAllocatorRef allocator
,
148 * create "/Sets/set-id/Network/Interface/interface-name/entity"
150 return CFStringCreateWithFormat(allocator
,
152 CFSTR("/%@/%@/%@/%@/%@/%@"),
162 __private_extern__ CFStringRef
163 SCPreferencesPathKeyCreateSetNetworkService(CFAllocatorRef allocator
,
169 if (service
== NULL
) {
171 * create "/Sets/set-id/Network/Service"
173 path
= CFStringCreateWithFormat(allocator
,
175 CFSTR("/%@/%@/%@/%@"),
182 * create "/Sets/set-id/Network/Service/service-id"
184 path
= CFStringCreateWithFormat(allocator
,
186 CFSTR("/%@/%@/%@/%@/%@"),
198 __private_extern__ CFStringRef
199 SCPreferencesPathKeyCreateSetNetworkServiceEntity(CFAllocatorRef allocator
,
206 if (entity
== NULL
) {
208 * create "/Sets/set-id/Network/Service/service-id"
210 path
= CFStringCreateWithFormat(allocator
,
212 CFSTR("/%@/%@/%@/%@/%@"),
220 * create "/Sets/set-id/Network/Service/service-id/entity"
222 path
= CFStringCreateWithFormat(allocator
,
224 CFSTR("/%@/%@/%@/%@/%@/%@"),