2 * Copyright (c) 2000-2002 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@
23 #ifndef _SCPREFERENCESSETSPECIFIC_H
24 #define _SCPREFERENCESSETSPECIFIC_H
26 #include <sys/cdefs.h>
27 #include <CoreFoundation/CoreFoundation.h>
28 #include <SystemConfiguration/SCPreferences.h>
32 @header SCPreferencesSetSpecific
33 The following APIs allow an application to set specific
34 configuration information about the current system (e.g. the
35 computer/sharing name).
42 @function SCPreferencesSetComputerName
43 @discussion Updates the computer/host name in the system preferences.
45 Note: In order to commit these changes to permanent storage a call
46 must be made to SCPreferencesCommitChanges().
47 A call to SCPreferencesApplyChanges() is also required for the new
48 name to become active.
49 @param prefs An SCPreferencesRef that should be used for all API calls.
50 @param name The computer/host name to be set.
51 @param nameEncoding The encoding associated with the computer/host name.
52 @result A boolean indicating the success (or failure) of the call.
55 SCPreferencesSetComputerName (
56 SCPreferencesRef prefs
,
58 CFStringEncoding nameEncoding
62 @function SCPreferencesSetLocalHostName
63 @discussion Updates the local host name in the system preferences.
65 Note: In order to commit these changes to permanent storage a call
66 must be made to SCPreferencesCommitChanges().
67 A call to SCPreferencesApplyChanges() is also required for the new
68 name to become active.
69 @param prefs An SCPreferencesRef that should be used for all API calls.
70 @param name The local host name to be set.
72 Note: the string must conform to the naming conventions of a DNS host
73 name as specified in RFC 1034 (section 3.5).
74 @result A boolean indicating the success (or failure) of the call.
77 SCPreferencesSetLocalHostName (
78 SCPreferencesRef prefs
,
84 #endif /* _SCPREFERENCESSETSPECIFIC_H */