]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h
configd-801.1.1.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / SCDynamicStoreCopySpecific.h
1 /*
2 * Copyright (c) 2000-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 _SCDYNAMICSTORECOPYSPECIFIC_H
25 #ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS
26 #include <SystemConfiguration/_SCDynamicStoreCopySpecific.h>
27 #else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
28 #define _SCDYNAMICSTORECOPYSPECIFIC_H
29
30 #include <Availability.h>
31 #include <sys/cdefs.h>
32 #include <sys/types.h>
33 #include <CoreFoundation/CoreFoundation.h>
34 #include <SystemConfiguration/SCDynamicStore.h>
35
36 CF_IMPLICIT_BRIDGING_ENABLED
37 CF_ASSUME_NONNULL_BEGIN
38
39 /*!
40 @header SCDynamicStoreCopySpecific
41 @discussion The functions of the SCDynamicStoreCopySpecific API
42 allow an application to determine specific configuration
43 information about the current system (for example, the
44 computer or sharing name, the currently logged-in user, etc.).
45 */
46
47
48 __BEGIN_DECLS
49
50 /*!
51 @function SCDynamicStoreCopyComputerName
52 @discussion Gets the current computer name.
53 @param store An SCDynamicStoreRef representing the dynamic store
54 session that should be used for communication with the server.
55 If NULL, a temporary session will be used.
56 @param nameEncoding A pointer to memory that, if non-NULL, will be
57 filled with the encoding associated with the computer or
58 host name.
59 @result Returns the current computer name;
60 NULL if the name has not been set or if an error was encountered.
61 You must release the returned value.
62 */
63 CFStringRef __nullable
64 SCDynamicStoreCopyComputerName (
65 SCDynamicStoreRef __nullable store,
66 CFStringEncoding * __nullable nameEncoding
67 ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/);
68
69 /*!
70 @function SCDynamicStoreCopyConsoleUser
71 @discussion Gets the name, user ID, and group ID of the currently
72 logged-in user.
73
74 Note: this function only provides information about the
75 primary console. It does not provide any details
76 about console sessions that have fast user switched
77 out or about other consoles.
78 @param store An SCDynamicStoreRef representing the dynamic store
79 session that should be used for communication with the server.
80 If NULL, a temporary session will be used.
81 @param uid A pointer to memory that will be filled with the user ID
82 of the current console user. If NULL, this value will not
83 be returned.
84 @param gid A pointer to memory that will be filled with the group ID
85 of the current console user. If NULL, this value will not be
86 returned.
87 @result Returns the user currently logged into the system;
88 NULL if no user is logged in or if an error was encountered.
89 You must release the returned value.
90 */
91 CFStringRef __nullable
92 SCDynamicStoreCopyConsoleUser (
93 SCDynamicStoreRef __nullable store,
94 uid_t * __nullable uid,
95 gid_t * __nullable gid
96 ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_NA);
97
98 /*!
99 @function SCDynamicStoreCopyLocalHostName
100 @discussion Gets the current local host name.
101 @param store An SCDynamicStoreRef representing the dynamic store
102 session that should be used for communication with the server.
103 If NULL, a temporary session will be used.
104 @result Returns the current local host name;
105 NULL if the name has not been set or if an error was encountered.
106 You must release the returned value.
107 */
108 CFStringRef __nullable
109 SCDynamicStoreCopyLocalHostName (
110 SCDynamicStoreRef __nullable store
111 ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/);
112
113 /*!
114 @function SCDynamicStoreCopyLocation
115 @discussion Gets the current location identifier.
116 @param store An SCDynamicStoreRef representing the dynamic store
117 session that should be used for communication with the server.
118 If NULL, a temporary session will be used.
119 @result Returns a string representing the current location identifier;
120 NULL if no location identifier has been defined or if an error
121 was encountered.
122 You must release the returned value.
123 */
124 CFStringRef __nullable
125 SCDynamicStoreCopyLocation (
126 SCDynamicStoreRef __nullable store
127 ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_NA);
128
129 /*!
130 @function SCDynamicStoreCopyProxies
131 @discussion Gets the current internet proxy settings.
132 The returned proxy settings dictionary includes:
133
134 <TABLE BORDER>
135 <TR>
136 <TH>key</TD>
137 <TH>type</TD>
138 <TH>description</TD>
139 </TR>
140 <TR>
141 <TD>kSCPropNetProxiesExceptionsList</TD>
142 <TD>CFArray[CFString]</TD>
143 <TD>Host name patterns which should bypass the proxy</TD>
144 </TR>
145 <TR>
146 <TD>kSCPropNetProxiesHTTPEnable</TD>
147 <TD>CFNumber (0 or 1)</TD>
148 <TD>Enables/disables the use of an HTTP proxy</TD>
149 </TR>
150 <TR>
151 <TD>kSCPropNetProxiesHTTPProxy</TD>
152 <TD>CFString</TD>
153 <TD>The proxy host</TD>
154 </TR>
155 <TR>
156 <TD>kSCPropNetProxiesHTTPPort</TD>
157 <TD>CFNumber</TD>
158 <TD>The proxy port number</TD>
159 </TR>
160 <TR>
161 <TD>kSCPropNetProxiesHTTPSEnable</TD>
162 <TD>CFNumber (0 or 1)</TD>
163 <TD>Enables/disables the use of an HTTPS proxy</TD>
164 </TR>
165 <TR>
166 <TD>kSCPropNetProxiesHTTPSProxy</TD>
167 <TD>CFString</TD>
168 <TD>The proxy host</TD>
169 </TR>
170 <TR>
171 <TD>kSCPropNetProxiesHTTPSPort</TD>
172 <TD>CFNumber</TD>
173 <TD>The proxy port number</TD>
174 </TR>
175 <TR>
176 <TD>kSCPropNetProxiesFTPEnable</TD>
177 <TD>CFNumber (0 or 1)</TD>
178 <TD>Enables/disables the use of an FTP proxy</TD>
179 </TR>
180 <TR>
181 <TD>kSCPropNetProxiesFTPProxy</TD>
182 <TD>CFString</TD>
183 <TD>The proxy host</TD>
184 </TR>
185 <TR>
186 <TD>kSCPropNetProxiesFTPPort</TD>
187 <TD>CFNumber</TD>
188 <TD>The proxy port number</TD>
189 </TR>
190 <TR>
191 <TD>kSCPropNetProxiesFTPPassive</TD>
192 <TD>CFNumber (0 or 1)</TD>
193 <TD>Enable passive mode operation for use behind connection
194 filter-ing firewalls.</TD>
195 </TR>
196 </TABLE>
197
198 Other key-value pairs are defined in the SCSchemaDefinitions.h
199 header file.
200 @param store An SCDynamicStoreRef representing the dynamic store
201 session that should be used for communication with the server.
202 If NULL, a temporary session will be used.
203 @result Returns a dictionary containing key-value pairs that represent
204 the current internet proxy settings;
205 NULL if no proxy settings have been defined or if an error
206 was encountered.
207 You must release the returned value.
208 */
209 CFDictionaryRef __nullable
210 SCDynamicStoreCopyProxies (
211 SCDynamicStoreRef __nullable store
212 ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/);
213
214 __END_DECLS
215
216 CF_ASSUME_NONNULL_END
217 CF_IMPLICIT_BRIDGING_DISABLED
218
219 #endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
220 #endif /* _SCDYNAMICSTORECOPYSPECIFIC_H */