]>
git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h
2 * Copyright (c) 2000-2005 Apple Computer, 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 #define _SCDYNAMICSTORECOPYSPECIFIC_H
27 #include <sys/cdefs.h>
28 #include <sys/types.h>
29 #include <CoreFoundation/CoreFoundation.h>
30 #include <SystemConfiguration/SCDynamicStore.h>
34 @header SCDynamicStoreCopySpecific
35 @discussion The functions of the SCDynamicStoreCopySpecific API
36 allow an application to determine specific configuration
37 information about the current system (for example, the
38 computer or sharing name, the currently logged-in user, etc.).
45 @function SCDynamicStoreCopyComputerName
46 @discussion Gets the current computer name.
47 @param store An SCDynamicStoreRef representing the dynamic store
48 session that should be used for communication with the server.
49 If NULL, a temporary session will be used.
50 @param nameEncoding A pointer to memory that, if non-NULL, will be
51 filled with the encoding associated with the computer or
53 @result Returns the current computer name;
54 NULL if the name has not been set or if an error was encountered.
55 You must release the returned value.
58 SCDynamicStoreCopyComputerName (
59 SCDynamicStoreRef store
,
60 CFStringEncoding
*nameEncoding
64 @function SCDynamicStoreCopyConsoleUser
65 @discussion Gets the name, user ID, and group ID of the currently
68 Note: this function only provides information about the
69 primary console. It does not provide any details
70 about console sessions that have fast user switched
71 out or about other consoles.
72 @param store An SCDynamicStoreRef representing the dynamic store
73 session that should be used for communication with the server.
74 If NULL, a temporary session will be used.
75 @param uid A pointer to memory that will be filled with the user ID
76 of the current console user. If NULL, this value will not
78 @param gid A pointer to memory that will be filled with the group ID
79 of the current console user. If NULL, this value will not be
81 @result Returns the user currently logged into the system;
82 NULL if no user is logged in or if an error was encountered.
83 You must release the returned value.
86 SCDynamicStoreCopyConsoleUser (
87 SCDynamicStoreRef store
,
93 @function SCDynamicStoreCopyLocalHostName
94 @discussion Gets the current local host name.
95 @param store An SCDynamicStoreRef representing the dynamic store
96 session that should be used for communication with the server.
97 If NULL, a temporary session will be used.
98 @result Returns the current local host name;
99 NULL if the name has not been set or if an error was encountered.
100 You must release the returned value.
103 SCDynamicStoreCopyLocalHostName (
104 SCDynamicStoreRef store
108 @function SCDynamicStoreCopyLocation
109 @discussion Gets the current location identifier.
110 @param store An SCDynamicStoreRef representing the dynamic store
111 session that should be used for communication with the server.
112 If NULL, a temporary session will be used.
113 @result Returns a string representing the current location identifier;
114 NULL if no location identifier has been defined or if an error
116 You must release the returned value.
119 SCDynamicStoreCopyLocation (
120 SCDynamicStoreRef store
124 @function SCDynamicStoreCopyProxies
125 @discussion Gets the current internet proxy settings.
126 The returned proxy settings dictionary includes:
135 <TD>kSCPropNetProxiesExceptionsList</TD>
136 <TD>CFArray[CFString]</TD>
137 <TD>Host name patterns which should bypass the proxy</TD>
140 <TD>kSCPropNetProxiesHTTPEnable</TD>
141 <TD>CFNumber (0 or 1)</TD>
142 <TD>Enables/disables the use of an HTTP proxy</TD>
145 <TD>kSCPropNetProxiesHTTPProxy</TD>
147 <TD>The proxy host</TD>
150 <TD>kSCPropNetProxiesHTTPPort</TD>
152 <TD>The proxy port number</TD>
155 <TD>kSCPropNetProxiesHTTPSEnable</TD>
156 <TD>CFNumber (0 or 1)</TD>
157 <TD>Enables/disables the use of an HTTPS proxy</TD>
160 <TD>kSCPropNetProxiesHTTPSProxy</TD>
162 <TD>The proxy host</TD>
165 <TD>kSCPropNetProxiesHTTPSPort</TD>
167 <TD>The proxy port number</TD>
170 <TD>kSCPropNetProxiesFTPEnable</TD>
171 <TD>CFNumber (0 or 1)</TD>
172 <TD>Enables/disables the use of an FTP proxy</TD>
175 <TD>kSCPropNetProxiesFTPProxy</TD>
177 <TD>The proxy host</TD>
180 <TD>kSCPropNetProxiesFTPPort</TD>
182 <TD>The proxy port number</TD>
185 <TD>kSCPropNetProxiesFTPPassive</TD>
186 <TD>CFNumber (0 or 1)</TD>
187 <TD>Enable passive mode operation for use behind connection
188 filter-ing firewalls.</TD>
192 Other key-value pairs are defined in the SCSchemaDefinitions.h
194 @param store An SCDynamicStoreRef representing the dynamic store
195 session that should be used for communication with the server.
196 If NULL, a temporary session will be used.
197 @result Returns a dictionary containing key-value pairs that represent
198 the current internet proxy settings;
199 NULL if no proxy settings have been defined or if an error
201 You must release the returned value.
204 SCDynamicStoreCopyProxies (
205 SCDynamicStoreRef store
210 #endif /* _SCDYNAMICSTORECOPYSPECIFIC_H */