]>
git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCDConsoleUser.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
23 #ifndef _SCDCONSOLEUSER_H
24 #define _SCDCONSOLEUSER_H
26 #include <sys/cdefs.h>
29 @header SCDConsoleUser.h
30 The SystemConfiguration framework provides access to the data used
31 to configure a running system.
33 Specifically, the SCDConsoleUserXXX() API's allow an application
34 to determine (or set) the login/user currently using the
37 The APIs provided by this framework communicate with the "configd"
38 daemon to obtain information regarding the systems current
46 @function SCDKeyCreateConsoleUser
47 @discussion Creates a key which can be used by the SCDNotifierAdd()
48 function to receive notifications when the current "Console"
50 @result A notification string for the current "Console" user.
52 CFStringRef
SCDKeyCreateConsoleUser ();
55 @function SCDConsoleUserGet
56 @discussion Gets the name, user ID, and group ID of the currently
58 @param user A pointer to a character buffer of at least size
59 userlen. The returned name is null-terminated unless
60 in-sufficient space is provided.If NULL, this value
62 @param userlen Pass an integer specifying the maximum size of the
64 @param uid A pointer to memory which will be filled with the user ID
65 of the current "Console" user. If NULL, this value will not
67 @param gid A pointer to memory which will be filled with the group ID
68 of the current "Console" user. If NULL, this value will not be
70 @result A constant of type SCDStatus indicating the success (or failure) of
73 SCDStatus
SCDConsoleUserGet (char *user
,
79 @function SCDConsoleUserSet
80 @discussion Sets the name, user ID, and group ID of the currently
82 @param user A pointer to a character buffer containing the name of
83 the current "Console" user. If NULL, any current "Console"
84 user information will be reset.
85 @param uid The user ID of the current "Console" user.
86 @param gid The group ID of the current "Console" user.
87 @result A constant of type SCDStatus indicating the success (or failure) of
90 SCDStatus
SCDConsoleUserSet (const char *user
,
96 #endif /* _SCDCONSOLEUSER_H */