2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
26 #ifndef _SCPREFERENCESSETSPECIFIC_H
27 #define _SCPREFERENCESSETSPECIFIC_H
29 #include <sys/cdefs.h>
30 #include <CoreFoundation/CoreFoundation.h>
31 #include <SystemConfiguration/SCPreferences.h>
35 @header SCPreferencesSetSpecific
36 The following APIs allow an application to set specific
37 configuration information about the current system (e.g. the
38 computer/sharing name).
45 @function SCPreferencesSetComputerName
46 @discussion Updates the computer/host name in the system preferences.
48 Note: In order to commit these changes to permanent storage a call
49 must be made to SCPreferencesCommitChanges().
50 A call to SCPreferencesApplyChanges() is also required for the new
51 name to become active.
52 @param prefs An SCPreferencesRef that should be used for all API calls.
53 @param name The computer/host name to be set.
54 @param nameEncoding The encoding associated with the computer/host name.
55 @result A boolean indicating the success (or failure) of the call.
58 SCPreferencesSetComputerName (
59 SCPreferencesRef prefs
,
61 CFStringEncoding nameEncoding
65 @function SCPreferencesSetLocalHostName
66 @discussion Updates the local host name in the system preferences.
68 Note: In order to commit these changes to permanent storage a call
69 must be made to SCPreferencesCommitChanges().
70 A call to SCPreferencesApplyChanges() is also required for the new
71 name to become active.
72 @param prefs An SCPreferencesRef that should be used for all API calls.
73 @param name The local host name to be set.
75 Note: the string must conform to the naming conventions of a DNS host
76 name as specified in RFC 1034 (section 3.5).
77 @result A boolean indicating the success (or failure) of the call.
80 SCPreferencesSetLocalHostName (
81 SCPreferencesRef prefs
,
87 #endif /* _SCPREFERENCESSETSPECIFIC_H */