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