]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCPreferencesSetSpecific.h
7449ee06edb9680a06b2f63e43cc0a7d94e69180
[apple/configd.git] / SystemConfiguration.fproj / SCPreferencesSetSpecific.h
1 /*
2 * Copyright (c) 2000-2002, 2004, 2005 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 @discussion The functions in the SCPreferencesSetSpecific API allow
35 an application to set specific configuration information
36 about the current system (for example, the computer or
37 sharing name).
38
39 To access configuration preferences, you must first establish
40 a preferences session using the SCPreferencesCreate function.
41 */
42
43
44 __BEGIN_DECLS
45
46 /*!
47 @function SCPreferencesSetComputerName
48 @discussion Updates the computer name preference.
49
50 Note: To commit these changes to permanent storage you must
51 call the SCPreferencesCommitChanges function.
52 In addition, you must call the SCPreferencesApplyChanges
53 function for the new name to become active.
54 @param prefs The preferences session.
55 @param name The computer name to be set.
56 @param nameEncoding The encoding associated with the computer name.
57 @result Returns TRUE if successful; FALSE otherwise.
58 */
59 Boolean
60 SCPreferencesSetComputerName (
61 SCPreferencesRef prefs,
62 CFStringRef name,
63 CFStringEncoding nameEncoding
64 );
65
66 /*!
67 @function SCPreferencesSetLocalHostName
68 @discussion Updates the local host name.
69
70 Note: To commit these changes to permanent storage you must
71 call the SCPreferencesCommitChanges function.
72 In addition, you must call theSCPreferencesApplyChanges
73 function for the new name to become active.
74 @param prefs The preferences session.
75 @param name The local host name to be set.
76
77 Note: this string must conform to the naming conventions of a DNS host
78 name as specified in RFC 1034 (section 3.5).
79 @result Returns TRUE if successful; FALSE otherwise.
80 */
81 Boolean
82 SCPreferencesSetLocalHostName (
83 SCPreferencesRef prefs,
84 CFStringRef name
85 );
86
87 __END_DECLS
88
89 #endif /* _SCPREFERENCESSETSPECIFIC_H */