xref: /haiku/src/servers/registrar/AuthenticationManager.h (revision e81a954787e50e56a7f06f72705b7859b6ab06d1)
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 			void				_InvalidatePasswdDBReply();
39 			void				_InvalidateGroupDBReply();
40 			void				_InvalidateShadowPwdDBReply();
41 
42 private:
43 			port_id				fRequestPort;
44 			thread_id			fRequestThread;
45 			UserDB*				fUserDB;
46 			GroupDB*			fGroupDB;
47 			BPrivate::KMessage*	fPasswdDBReply;
48 			BPrivate::KMessage*	fGroupDBReply;
49 			BPrivate::KMessage*	fShadowPwdDBReply;
50 };
51 
52 
53 #endif	// AUTHENTICATION_MANAGER_H
54