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