1/*
2 * Copyright (c) 2001, 2004, 2005, 2008 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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
11 * file.
12 *
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.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24#ifndef _DHCPCLIENTPREFERENCES_H
25#ifdef	USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS
26#include <SystemConfiguration/_DHCPClientPreferences.h>
27#else	/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
28#define _DHCPCLIENTPREFERENCES_H
29
30#include <Availability.h>
31#include <sys/cdefs.h>
32#include <CoreFoundation/CFString.h>
33
34/*!
35	@header DHCPClientPreferences
36	@discussion The DHCPClientPreferences API allows applications to get and update DHCP preferences.
37		DHCP preferences are in the form of DHCP option codes, which are defined in RFC 2132.
38 */
39
40__BEGIN_DECLS
41
42/*!
43	@function DHCPClientPreferencesSetApplicationOptions
44	@discussion Updates the DHCP client preferences to include the
45		given list of options for the given application ID.
46	@param applicationID The application's preference ID, for example:
47		"com.apple.SystemPreferences".
48	@param options An array of 8-bit values containing the
49		DHCP option codes (see RFC 2132) for this application ID.
50		A NULL value will clear the list of options for this
51		application ID.
52	@param count The number of elements in the options parameter.
53	@result Returns TRUE if the operation succeeded, FALSE otherwise.
54 */
55
56Boolean
57DHCPClientPreferencesSetApplicationOptions	(CFStringRef	applicationID,
58						 UInt8		*options,
59						 CFIndex	count)		__OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/);
60
61/*!
62	@function DHCPClientPreferencesCopyApplicationOptions
63	@discussion Copies the requested DHCP options for the
64		given application ID.
65	@param applicationID The application's preference ID, for example
66		"com.apple.SystemPreferences".
67	@param count The number of elements in the returned array.
68	@result Returns the list of options for the given application ID, or
69		NULL if no options are defined or an error occurred.
70
71		When you are finished, use free() to release a non-NULL return value.
72 */
73
74UInt8 *
75DHCPClientPreferencesCopyApplicationOptions	(CFStringRef	applicationID,
76						 CFIndex	*count)		__OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/);
77
78__END_DECLS
79
80#endif	/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
81#endif	/* _DHCPCLIENTPREFERENCES_H */
82