//
// QPerforce is a gui interface to the perforce revision control
// system. It is based on the qt library, and should be easily portable
// across any platform that has this toolkit available.
//
// Copyright (C) 2002 Jacob Gladish
//
// TODO: find legit copyright.
//
#ifndef __PERFORCE_USER_H__
#define __PERFORCE_USER_H__
#include "clientapi.h"
#include "IUpdateable.h"
#include <qpixmap.h>
#include <qdatetime.h>
#include <qlist.h>
#include <qlistview.h>
#include <qstring.h>
namespace Perforce {
class User;
typedef QList< User > UserList;
class User
{
public:
virtual ~User() { }
static UserList getUsers();
inline const QString& getUserName() const { return _userName; }
inline const QString& getEmail() const { return _email; }
inline const QString& getFullName() const { return _fullName; }
inline const QDateTime& getLastAccessed() const { return _lastAccess; }
private:
User() { }
QString _userName;
QString _email;
QString _fullName;
QDateTime _lastAccess;
private:
struct UserListCache : public IUpdateable< Perforce::UserList > {
void OutputStat( StrDict* varList );
void HandleError( Error* err );
void updateCache();
};
friend UserListCache;
static UserListCache _userListCache;
};
}
#endif