]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h
configd-42.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / SCDynamicStoreCopySpecific.h
1 /*
2 * Copyright (c) 2000 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 SCDynamicStoreCopyProxies
85 @discussion Gets the current internet proxy settings.
86 @param store An SCDynamicStoreRef that should be used for communication
87 with the server.
88 If NULL, a temporary session will be used.
89 @result A dictionary with key/value pairs representing the current
90 internet proxy settings (HTTP, FTP, etc);
91 NULL if no proxy settings have been defined or if an error was encountered.
92 You must release the returned value.
93 */
94 CFDictionaryRef
95 SCDynamicStoreCopyProxies (
96 SCDynamicStoreRef store
97 );
98
99 __END_DECLS
100
101 #endif /* _SCDYNAMICSTORECOPYSPECIFIC_H */