]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h
configd-84.6.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / SCDynamicStoreCopySpecific.h
1 /*
2 * Copyright (c) 2000-2003 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 <CoreFoundation/CoreFoundation.h>
29 #include <SystemConfiguration/SCDynamicStore.h>
30
31
32 /*!
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).
37 */
38
39
40 __BEGIN_DECLS
41
42 /*!
43 @function SCDynamicStoreCopyComputerName
44 @discussion Gets the current computer/host name.
45 @param store An SCDynamicStoreRef that should be used for communication
46 with the server.
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.
53 */
54 CFStringRef
55 SCDynamicStoreCopyComputerName (
56 SCDynamicStoreRef store,
57 CFStringEncoding *nameEncoding
58 );
59
60 /*!
61 @function SCDynamicStoreCopyConsoleUser
62 @discussion Gets the name, user ID, and group ID of the currently
63 logged in user.
64 @param store An SCDynamicStoreRef that should be used for communication
65 with the server.
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
69 be returned.
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
72 returned.
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.
76 */
77 CFStringRef
78 SCDynamicStoreCopyConsoleUser (
79 SCDynamicStoreRef store,
80 uid_t *uid,
81 gid_t *gid
82 );
83
84 /*!
85 @function SCDynamicStoreCopyLocalHostName
86 @discussion Gets the current local host name.
87
88 See SCDynamicStoreKeyCreateHostNames() for notification
89 key information.
90 @param store An SCDynamicStoreRef that should be used for communication
91 with the server.
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.
96 */
97 CFStringRef
98 SCDynamicStoreCopyLocalHostName (
99 SCDynamicStoreRef store
100 );
101
102 /*!
103 @function SCDynamicStoreCopyLocation
104 @discussion Gets the current "location" identifier.
105 @param store An SCDynamicStoreRef that should be used for communication
106 with the server.
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
110 was encountered.
111 You must release the returned value.
112 */
113 CFStringRef
114 SCDynamicStoreCopyLocation (
115 SCDynamicStoreRef store
116 );
117
118 /*!
119 @function SCDynamicStoreCopyProxies
120 @discussion Gets the current internet proxy settings.
121 @param store An SCDynamicStoreRef that should be used for communication
122 with the server.
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.
128 */
129 CFDictionaryRef
130 SCDynamicStoreCopyProxies (
131 SCDynamicStoreRef store
132 );
133
134 __END_DECLS
135
136 #endif /* _SCDYNAMICSTORECOPYSPECIFIC_H */