]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCPreferencesSetSpecific.h
configd-888.51.2.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / SCPreferencesSetSpecific.h
1 /*
2 * Copyright (c) 2000-2002, 2004, 2005, 2008, 2015 Apple 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 #ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS
26 #include <SystemConfiguration/_SCPreferencesSetSpecific.h>
27 #else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
28 #define _SCPREFERENCESSETSPECIFIC_H
29
30 #include <Availability.h>
31 #include <sys/cdefs.h>
32 #include <CoreFoundation/CoreFoundation.h>
33 #include <SystemConfiguration/SCPreferences.h>
34
35 CF_IMPLICIT_BRIDGING_ENABLED
36 CF_ASSUME_NONNULL_BEGIN
37
38 /*!
39 @header SCPreferencesSetSpecific
40 @discussion The functions in the SCPreferencesSetSpecific API allow
41 an application to set specific configuration information
42 about the current system (for example, the computer or
43 sharing name).
44
45 To access configuration preferences, you must first establish
46 a preferences session using the SCPreferencesCreate function.
47 */
48
49
50 __BEGIN_DECLS
51
52 /*!
53 @function SCPreferencesSetComputerName
54 @discussion Updates the computer name preference.
55
56 Note: To commit these changes to permanent storage you must
57 call the SCPreferencesCommitChanges function.
58 In addition, you must call the SCPreferencesApplyChanges
59 function for the new name to become active.
60 @param prefs The preferences session.
61 @param name The computer name to be set.
62 @param nameEncoding The encoding associated with the computer name.
63 @result Returns TRUE if successful; FALSE otherwise.
64 */
65 Boolean
66 SCPreferencesSetComputerName (
67 SCPreferencesRef prefs,
68 CFStringRef __nullable name,
69 CFStringEncoding nameEncoding
70 ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/);
71
72 /*!
73 @function SCPreferencesSetLocalHostName
74 @discussion Updates the local host name.
75
76 Note: To commit these changes to permanent storage you must
77 call the SCPreferencesCommitChanges function.
78 In addition, you must call the SCPreferencesApplyChanges
79 function for the new name to become active.
80 @param prefs The preferences session.
81 @param name The local host name to be set.
82
83 Note: this string must conform to the naming conventions of a DNS host
84 name as specified in RFC 1034 (section 3.5).
85 @result Returns TRUE if successful; FALSE otherwise.
86 */
87 Boolean
88 SCPreferencesSetLocalHostName (
89 SCPreferencesRef prefs,
90 CFStringRef __nullable name
91 ) __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/);
92
93 __END_DECLS
94
95 CF_ASSUME_NONNULL_END
96 CF_IMPLICIT_BRIDGING_DISABLED
97
98 #endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
99 #endif /* _SCPREFERENCESSETSPECIFIC_H */