]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h
7c63f27d69a6ad61ea9310446999a22d2aeb4da8
[apple/configd.git] / SystemConfiguration.fproj / SCDynamicStoreCopySpecific.h
1 /*
2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22
23 #ifndef _SCDYNAMICSTORECOPYSPECIFIC_H
24 #define _SCDYNAMICSTORECOPYSPECIFIC_H
25
26 #include <sys/cdefs.h>
27 #include <CoreFoundation/CoreFoundation.h>
28 #include <SystemConfiguration/SCDynamicStore.h>
29
30
31 /*!
32 @header SCDynamicStoreCopySpecific
33 The following APIs allow an application to determine specific
34 configuration information about the current system (e.g. the
35 computer/sharing name, the currently logged in user, etc).
36 */
37
38
39 __BEGIN_DECLS
40
41 /*!
42 @function SCDynamicStoreCopyComputerName
43 @discussion Gets the current computer/host name.
44 @param store An SCDynamicStoreRef that should be used for communication
45 with the server.
46 If NULL, a temporary session will be used.
47 @param nameEncoding A pointer to memory that, if non-NULL, will be
48 filled with the encoding associated with the computer/host name.
49 @result The current computer/host name;
50 NULL if the name has not been set or if an error was encountered.
51 You must release the returned value.
52 */
53 CFStringRef
54 SCDynamicStoreCopyComputerName (
55 SCDynamicStoreRef store,
56 CFStringEncoding *nameEncoding
57 );
58
59 /*!
60 @function SCDynamicStoreCopyConsoleUser
61 @discussion Gets the name, user ID, and group ID of the currently
62 logged in user.
63 @param store An SCDynamicStoreRef that should be used for communication
64 with the server.
65 If NULL, a temporary session will be used.
66 @param uid A pointer to memory that will be filled with the user ID
67 of the current "Console" user. If NULL, this value will not
68 be returned.
69 @param gid A pointer to memory that will be filled with the group ID
70 of the current "Console" user. If NULL, this value will not be
71 returned.
72 @result The current user logged into the system;
73 NULL if no user is logged in or if an error was encountered.
74 You must release the returned value.
75 */
76 CFStringRef
77 SCDynamicStoreCopyConsoleUser (
78 SCDynamicStoreRef session,
79 uid_t *uid,
80 gid_t *gid
81 );
82
83 /*!
84 @function SCDynamicStoreCopyLocalHostName
85 @discussion Gets the current local host name.
86
87 See SCDynamicStoreKeyCreateHostNames() for notification
88 key information.
89 @param store An SCDynamicStoreRef that should be used for communication
90 with the server.
91 If NULL, a temporary session will be used.
92 @result The current local host name;
93 NULL if the name has not been set or if an error was encountered.
94 You must release the returned value.
95 */
96 CFStringRef
97 SCDynamicStoreCopyLocalHostName (
98 SCDynamicStoreRef store
99 );
100
101 /*!
102 @function SCDynamicStoreCopyLocation
103 @discussion Gets the current "location" identifier.
104 @param store An SCDynamicStoreRef that should be used for communication
105 with the server.
106 If NULL, a temporary session will be used.
107 @result A string representing the current "location" identifier;
108 NULL if no "location" identifier has been defined or if an error
109 was encountered.
110 You must release the returned value.
111 */
112 CFStringRef
113 SCDynamicStoreCopyLocation (
114 SCDynamicStoreRef store
115 );
116
117 /*!
118 @function SCDynamicStoreCopyProxies
119 @discussion Gets the current internet proxy settings.
120 @param store An SCDynamicStoreRef that should be used for communication
121 with the server.
122 If NULL, a temporary session will be used.
123 @result A dictionary with key/value pairs representing the current
124 internet proxy settings (HTTP, FTP, etc);
125 NULL if no proxy settings have been defined or if an error was encountered.
126 You must release the returned value.
127 */
128 CFDictionaryRef
129 SCDynamicStoreCopyProxies (
130 SCDynamicStoreRef store
131 );
132
133 __END_DECLS
134
135 #endif /* _SCDYNAMICSTORECOPYSPECIFIC_H */