]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCPreferencesSetSpecific.h
configd-84.6.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / SCPreferencesSetSpecific.h
1 /*
2 * Copyright (c) 2000-2002 Apple Computer, 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 _SCPREFERENCESSETSPECIFIC_H
25 #define _SCPREFERENCESSETSPECIFIC_H
26
27 #include <sys/cdefs.h>
28 #include <CoreFoundation/CoreFoundation.h>
29 #include <SystemConfiguration/SCPreferences.h>
30
31
32 /*!
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).
37 */
38
39
40 __BEGIN_DECLS
41
42 /*!
43 @function SCPreferencesSetComputerName
44 @discussion Updates the computer/host name in the system preferences.
45
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.
54 */
55 Boolean
56 SCPreferencesSetComputerName (
57 SCPreferencesRef prefs,
58 CFStringRef name,
59 CFStringEncoding nameEncoding
60 );
61
62 /*!
63 @function SCPreferencesSetLocalHostName
64 @discussion Updates the local host name in the system preferences.
65
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.
72
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.
76 */
77 Boolean
78 SCPreferencesSetLocalHostName (
79 SCPreferencesRef prefs,
80 CFStringRef name
81 );
82
83 __END_DECLS
84
85 #endif /* _SCPREFERENCESSETSPECIFIC_H */