]>
git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h
2 * Copyright (c) 2000-2005, 2008 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
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
30 #include <Availability.h>
31 #include <sys/cdefs.h>
32 #include <sys/types.h>
33 #include <CoreFoundation/CoreFoundation.h>
34 #include <SystemConfiguration/SCDynamicStore.h>
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.).
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
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.
62 SCDynamicStoreCopyComputerName (
63 SCDynamicStoreRef store
,
64 CFStringEncoding
*nameEncoding
65 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_2_0
/*SPI*/);
68 @function SCDynamicStoreCopyConsoleUser
69 @discussion Gets the name, user ID, and group ID of the currently
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
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
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.
90 SCDynamicStoreCopyConsoleUser (
91 SCDynamicStoreRef store
,
94 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_NA
);
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.
107 SCDynamicStoreCopyLocalHostName (
108 SCDynamicStoreRef store
109 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_2_0
/*SPI*/);
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
120 You must release the returned value.
123 SCDynamicStoreCopyLocation (
124 SCDynamicStoreRef store
125 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_NA
);
128 @function SCDynamicStoreCopyProxies
129 @discussion Gets the current internet proxy settings.
130 The returned proxy settings dictionary includes:
139 <TD>kSCPropNetProxiesExceptionsList</TD>
140 <TD>CFArray[CFString]</TD>
141 <TD>Host name patterns which should bypass the proxy</TD>
144 <TD>kSCPropNetProxiesHTTPEnable</TD>
145 <TD>CFNumber (0 or 1)</TD>
146 <TD>Enables/disables the use of an HTTP proxy</TD>
149 <TD>kSCPropNetProxiesHTTPProxy</TD>
151 <TD>The proxy host</TD>
154 <TD>kSCPropNetProxiesHTTPPort</TD>
156 <TD>The proxy port number</TD>
159 <TD>kSCPropNetProxiesHTTPSEnable</TD>
160 <TD>CFNumber (0 or 1)</TD>
161 <TD>Enables/disables the use of an HTTPS proxy</TD>
164 <TD>kSCPropNetProxiesHTTPSProxy</TD>
166 <TD>The proxy host</TD>
169 <TD>kSCPropNetProxiesHTTPSPort</TD>
171 <TD>The proxy port number</TD>
174 <TD>kSCPropNetProxiesFTPEnable</TD>
175 <TD>CFNumber (0 or 1)</TD>
176 <TD>Enables/disables the use of an FTP proxy</TD>
179 <TD>kSCPropNetProxiesFTPProxy</TD>
181 <TD>The proxy host</TD>
184 <TD>kSCPropNetProxiesFTPPort</TD>
186 <TD>The proxy port number</TD>
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>
196 Other key-value pairs are defined in the SCSchemaDefinitions.h
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
205 You must release the returned value.
208 SCDynamicStoreCopyProxies (
209 SCDynamicStoreRef store
210 ) __OSX_AVAILABLE_STARTING(__MAC_10_1
,__IPHONE_2_0
/*SPI*/);
214 #endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */
215 #endif /* _SCDYNAMICSTORECOPYSPECIFIC_H */