]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h
configd-135.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / SCDynamicStoreCopySpecific.h
1 /*
2 * Copyright (c) 2000-2005 Apple Computer, 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 #define _SCDYNAMICSTORECOPYSPECIFIC_H
26
27 #include <sys/cdefs.h>
28 #include <sys/types.h>
29 #include <CoreFoundation/CoreFoundation.h>
30 #include <SystemConfiguration/SCDynamicStore.h>
31
32
33 /*!
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.).
39 */
40
41
42 __BEGIN_DECLS
43
44 /*!
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
52 host name.
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.
56 */
57 CFStringRef
58 SCDynamicStoreCopyComputerName (
59 SCDynamicStoreRef store,
60 CFStringEncoding *nameEncoding
61 );
62
63 /*!
64 @function SCDynamicStoreCopyConsoleUser
65 @discussion Gets the name, user ID, and group ID of the currently
66 logged-in user.
67
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
77 be returned.
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
80 returned.
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.
84 */
85 CFStringRef
86 SCDynamicStoreCopyConsoleUser (
87 SCDynamicStoreRef store,
88 uid_t *uid,
89 gid_t *gid
90 );
91
92 /*!
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.
101 */
102 CFStringRef
103 SCDynamicStoreCopyLocalHostName (
104 SCDynamicStoreRef store
105 );
106
107 /*!
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
115 was encountered.
116 You must release the returned value.
117 */
118 CFStringRef
119 SCDynamicStoreCopyLocation (
120 SCDynamicStoreRef store
121 );
122
123 /*!
124 @function SCDynamicStoreCopyProxies
125 @discussion Gets the current internet proxy settings.
126 The returned proxy settings dictionary includes:
127
128 <TABLE BORDER>
129 <TR>
130 <TH>key</TD>
131 <TH>type</TD>
132 <TH>description</TD>
133 </TR>
134 <TR>
135 <TD>kSCPropNetProxiesExceptionsList</TD>
136 <TD>CFArray[CFString]</TD>
137 <TD>Host name patterns which should bypass the proxy</TD>
138 </TR>
139 <TR>
140 <TD>kSCPropNetProxiesHTTPEnable</TD>
141 <TD>CFNumber (0 or 1)</TD>
142 <TD>Enables/disables the use of an HTTP proxy</TD>
143 </TR>
144 <TR>
145 <TD>kSCPropNetProxiesHTTPProxy</TD>
146 <TD>CFString</TD>
147 <TD>The proxy host</TD>
148 </TR>
149 <TR>
150 <TD>kSCPropNetProxiesHTTPPort</TD>
151 <TD>CFNumber</TD>
152 <TD>The proxy port number</TD>
153 </TR>
154 <TR>
155 <TD>kSCPropNetProxiesHTTPSEnable</TD>
156 <TD>CFNumber (0 or 1)</TD>
157 <TD>Enables/disables the use of an HTTPS proxy</TD>
158 </TR>
159 <TR>
160 <TD>kSCPropNetProxiesHTTPSProxy</TD>
161 <TD>CFString</TD>
162 <TD>The proxy host</TD>
163 </TR>
164 <TR>
165 <TD>kSCPropNetProxiesHTTPSPort</TD>
166 <TD>CFNumber</TD>
167 <TD>The proxy port number</TD>
168 </TR>
169 <TR>
170 <TD>kSCPropNetProxiesFTPEnable</TD>
171 <TD>CFNumber (0 or 1)</TD>
172 <TD>Enables/disables the use of an FTP proxy</TD>
173 </TR>
174 <TR>
175 <TD>kSCPropNetProxiesFTPProxy</TD>
176 <TD>CFString</TD>
177 <TD>The proxy host</TD>
178 </TR>
179 <TR>
180 <TD>kSCPropNetProxiesFTPPort</TD>
181 <TD>CFNumber</TD>
182 <TD>The proxy port number</TD>
183 </TR>
184 <TR>
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>
189 </TR>
190 </TABLE>
191
192 Other key-value pairs are defined in the SCSchemaDefinitions.h
193 header file.
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
200 was encountered.
201 You must release the returned value.
202 */
203 CFDictionaryRef
204 SCDynamicStoreCopyProxies (
205 SCDynamicStoreRef store
206 );
207
208 __END_DECLS
209
210 #endif /* _SCDYNAMICSTORECOPYSPECIFIC_H */