]> git.saurik.com Git - apple/configd.git/blob - configd.tproj/session.h
896a3a721b5805dd6fd77508df8c4f71145f4d5e
[apple/configd.git] / configd.tproj / session.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25
26 /*
27 * Modification History
28 *
29 * June 1, 2001 Allan Nathanson <ajn@apple.com>
30 * - public API conversion
31 *
32 * March 24, 2000 Allan Nathanson <ajn@apple.com>
33 * - initial revision
34 */
35
36 #ifndef _S_SESSION_H
37 #define _S_SESSION_H
38
39 #include <sys/cdefs.h>
40
41 /* Per client server state */
42 typedef struct {
43
44 /* mach port used as the key to this session */
45 mach_port_t key;
46
47 /* mach port associated with this session */
48 CFMachPortRef serverPort;
49 CFRunLoopSourceRef serverRunLoopSource;
50
51 /* data associated with this "open" session */
52 SCDynamicStoreRef store;
53
54 /* credentials associated with this "open" session */
55 int callerEUID;
56 int callerEGID;
57
58 } serverSession, *serverSessionRef;
59
60 __BEGIN_DECLS
61
62 serverSessionRef getSession (mach_port_t server);
63
64 serverSessionRef addSession (CFMachPortRef server);
65
66 void removeSession (mach_port_t server);
67
68 void cleanupSession (mach_port_t server);
69
70 void listSessions ();
71
72 __END_DECLS
73
74 #endif /* !_S_SESSION_H */