14#include <boost/shared_ptr.hpp>
100 virtual void close();
105 virtual bool isOpen()
const;
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Thrown if UserDataSource encounters an error.
Defines an interface for reading user data into a registry.
Thrown a UserFile encounters an error.
UserFileError(const char *file, size_t line, const char *what)
Provides a UserDataSource implementation for JSON text files.
static const size_t USER_ENTRY_MAX_LEN
Maximum length of a single user entry.
virtual UserPtr readNextUser()
Fetches the next user from the file.
virtual void close()
Closes the underlying file.
UserFile(const std::string &fname)
Constructor.
UserPtr makeUser(const std::string &user_string)
Creates a new User instance from JSON text.
virtual bool isOpen() const
Returns true if the file is open.
virtual ~UserFile()
Destructor. / The destructor does call the close method.
virtual void open()
Opens the input file for reading.
Defines the logger used by the user check hooks library.
boost::shared_ptr< User > UserPtr
Defines a smart pointer to a User.
boost::shared_ptr< UserFile > UserFilePtr
Defines a smart pointer to a UserFile.
This file defines classes: UserId and User.
Defines the base class, UserDataSource.