]>
git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h
2 * Copyright (c) 2000-2003 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 <CoreFoundation/CoreFoundation.h>
29 #include <SystemConfiguration/SCDynamicStore.h>
33 @header SCDynamicStoreCopySpecific
34 The following APIs allow an application to determine specific
35 configuration information about the current system (e.g. the
36 computer/sharing name, the currently logged in user, etc).
43 @function SCDynamicStoreCopyComputerName
44 @discussion Gets the current computer/host name.
45 @param store An SCDynamicStoreRef that should be used for communication
47 If NULL, a temporary session will be used.
48 @param nameEncoding A pointer to memory that, if non-NULL, will be
49 filled with the encoding associated with the computer/host name.
50 @result The current computer/host name;
51 NULL if the name has not been set or if an error was encountered.
52 You must release the returned value.
55 SCDynamicStoreCopyComputerName (
56 SCDynamicStoreRef store
,
57 CFStringEncoding
*nameEncoding
61 @function SCDynamicStoreCopyConsoleUser
62 @discussion Gets the name, user ID, and group ID of the currently
64 @param store An SCDynamicStoreRef that should be used for communication
66 If NULL, a temporary session will be used.
67 @param uid A pointer to memory that will be filled with the user ID
68 of the current "Console" user. If NULL, this value will not
70 @param gid A pointer to memory that will be filled with the group ID
71 of the current "Console" user. If NULL, this value will not be
73 @result The current user logged into the system;
74 NULL if no user is logged in or if an error was encountered.
75 You must release the returned value.
78 SCDynamicStoreCopyConsoleUser (
79 SCDynamicStoreRef store
,
85 @function SCDynamicStoreCopyLocalHostName
86 @discussion Gets the current local host name.
88 See SCDynamicStoreKeyCreateHostNames() for notification
90 @param store An SCDynamicStoreRef that should be used for communication
92 If NULL, a temporary session will be used.
93 @result The current local host name;
94 NULL if the name has not been set or if an error was encountered.
95 You must release the returned value.
98 SCDynamicStoreCopyLocalHostName (
99 SCDynamicStoreRef store
103 @function SCDynamicStoreCopyLocation
104 @discussion Gets the current "location" identifier.
105 @param store An SCDynamicStoreRef that should be used for communication
107 If NULL, a temporary session will be used.
108 @result A string representing the current "location" identifier;
109 NULL if no "location" identifier has been defined or if an error
111 You must release the returned value.
114 SCDynamicStoreCopyLocation (
115 SCDynamicStoreRef store
119 @function SCDynamicStoreCopyProxies
120 @discussion Gets the current internet proxy settings.
121 @param store An SCDynamicStoreRef that should be used for communication
123 If NULL, a temporary session will be used.
124 @result A dictionary with key/value pairs representing the current
125 internet proxy settings (HTTP, FTP, etc);
126 NULL if no proxy settings have been defined or if an error was encountered.
127 You must release the returned value.
130 SCDynamicStoreCopyProxies (
131 SCDynamicStoreRef store
136 #endif /* _SCDYNAMICSTORECOPYSPECIFIC_H */