xref: /haiku/src/servers/registrar/AuthenticationManager.h (revision b55a57da7173b9af0432bd3e148d03f06161d036)
1 /*
2  * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef AUTHENTICATION_MANAGER_H
6 #define AUTHENTICATION_MANAGER_H
7 
8 
9 #include <OS.h>
10 
11 
12 namespace BPrivate {
13 	class KMessage;
14 }
15 
16 
17 class AuthenticationManager {
18 public:
19 								AuthenticationManager();
20 								~AuthenticationManager();
21 
22 			status_t			Init();
23 
24 private:
25 	class FlatStore;
26 	class User;
27 	class Group;
28 	class UserDB;
29 	class GroupDB;
30 
31 	static	status_t			_RequestThreadEntry(void* data);
32 			status_t			_RequestThread();
33 
34 			status_t			_InitPasswdDB();
35 			status_t			_InitGroupDB();
36 			status_t			_InitShadowPwdDB();
37 
38 private:
39 			port_id				fRequestPort;
40 			thread_id			fRequestThread;
41 			UserDB*				fUserDB;
42 			GroupDB*			fGroupDB;
43 			BPrivate::KMessage*	fPasswdDBReply;
44 			BPrivate::KMessage*	fGroupDBReply;
45 			BPrivate::KMessage*	fShadowPwdDBReply;
46 };
47 
48 
49 #endif	// AUTHENTICATION_MANAGER_H
50