#ifndef __JOB_H__
#define __JOB_H__
#include "IUpdateable.h"
#include <qdatetime.h>
#include <qlist.h>
#include <qstring.h>
namespace Perforce {
class Job;
typedef QList< Job > JobList;
class Job {
public:
inline const QString& getName() const;
inline const QString& getStatus() const;
inline const QString& getReportedBy() const;
inline const QDateTime& getReportDate() const;
inline const QString& getDescription() const;
public:
static const JobList& getJobs();
private:
Job() { }
QString _name;
QString _status;
QString _reportedBy;
QDateTime _reportDate;
QString _description;
private:
struct JobListCache : IUpdateable< Perforce::JobList > {
void HandleError( Error* err );
void OutputStat( StrDict* varList );
void updateCache();
};
friend JobListCache;
static JobListCache _joblistCache;
};
inline const QString& Job::getName() const
{
return _name;
}
inline const QString& Job::getStatus() const
{
return _status;
}
inline const QString& Job::getReportedBy() const
{
return _reportedBy;
}
inline const QDateTime& Job::getReportDate() const
{
return _reportDate;
}
inline const QString& Job::getDescription() const
{
return _description;
}
} // end namespace
#endif