c4f4fed47300b68638641d71f7091463a5cd60e5
[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 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
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
13 * file.
14 *
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.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25
26 #ifndef _SCPREFERENCESSETSPECIFIC_H
27 #define _SCPREFERENCESSETSPECIFIC_H
28
29 #include <sys/cdefs.h>
30 #include <CoreFoundation/CoreFoundation.h>
31 #include <SystemConfiguration/SCPreferences.h>
32
33
34 /*!
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).
39 */
40
41
42 __BEGIN_DECLS
43
44 /*!
45 @function SCPreferencesSetComputerName
46 @discussion Updates the computer/host name in the system preferences.
47
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.
56 */
57 Boolean
58 SCPreferencesSetComputerName (
59 SCPreferencesRef prefs,
60 CFStringRef name,
61 CFStringEncoding nameEncoding
62 );
63
64 /*!
65 @function SCPreferencesSetLocalHostName
66 @discussion Updates the local host name in the system preferences.
67
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.
74
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.
78 */
79 Boolean
80 SCPreferencesSetLocalHostName (
81 SCPreferencesRef prefs,
82 CFStringRef name
83 );
84
85 __END_DECLS
86
87 #endif /* _SCPREFERENCESSETSPECIFIC_H */