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