/*
 * This file is part of DesktopBSD, see the README file.
 *
 * Authors: Reinhard Pointner
 *          Peter Hofer <ph@desktopbsd.net>
 *          (C) 2004, 2005
 *
 * Copyright: BSD, see the COPYING file included in this distribution
 *
 */

#ifndef __USERS_H
#define __USERS_H

#include <sys/types.h> /* uid_t */

class User;
class QString;
class QStringList;
template <class T> class QPtrList;

/** @brief Read or modify system user database.
  *
  * This class obtains information about specified
  * users and has a few methods to modify them.
  */
class Users {
public:
	static QPtrList<User> getAllUsers();

	static User *getUser(const QString & username);
	
	static User *getUser(uid_t uid);

	static bool addUser(const QString & username, const QString & fullName,
							  const QStringList & groups, const QString & shell);

	static bool removeUser(const User & user, bool removeHome);
};

#endif /* __USERS_H */
