]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCPreferencesSetSpecific.h
configd-53.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 * 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.
11 *
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
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22
23 #ifndef _SCPREFERENCESSETSPECIFIC_H
24 #define _SCPREFERENCESSETSPECIFIC_H
25
26 #include <sys/cdefs.h>
27 #include <CoreFoundation/CoreFoundation.h>
28 #include <SystemConfiguration/SCPreferences.h>
29
30
31 /*!
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).
36 */
37
38
39 __BEGIN_DECLS
40
41 /*!
42 @function SCPreferencesSetComputerName
43 @discussion Updates the computer/host name in the system preferences.
44
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.
53 */
54 Boolean
55 SCPreferencesSetComputerName (
56 SCPreferencesRef prefs,
57 CFStringRef name,
58 CFStringEncoding nameEncoding
59 );
60
61 /*!
62 @function SCPreferencesSetLocalHostName
63 @discussion Updates the local host name in the system preferences.
64
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.
71
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.
75 */
76 Boolean
77 SCPreferencesSetLocalHostName (
78 SCPreferencesRef prefs,
79 CFStringRef name
80 );
81
82 __END_DECLS
83
84 #endif /* _SCPREFERENCESSETSPECIFIC_H */