#include "Client.h"
#include "P4Client.h"
namespace Perforce {
Client::ClientListCache Client::_clientListCache;
const ClientList& Client::getClients()
{
_clientListCache.updateCacheIfNecessary();
return _clientListCache.getCache();
}
void Client::ClientListCache::OutputStat( StrDict* varList )
{
Client* c = new Client();
QString temp = varList->GetVar( "Access" )->Text();
c->_date.setTime_t( temp.toInt() );
c->_description = varList->GetVar( "Description" )->Text();
replaceNewlinesWithSpaces( c->_description );
c->_host = varList->GetVar( "Host" )->Text();
c->_name = varList->GetVar( "client" )->Text();
c->_owner = varList->GetVar( "Owner" )->Text();
c->_root = varList->GetVar( "Root" )->Text();
_cache.append( c );
}
void Client::ClientListCache::HandleError( Error* err )
{
ASSERT( 0 && "Failed to update client list cache" );
}
void Client::ClientListCache::updateCache()
{
char* p[] = { "" };
RunP4Command( 0, p, "clients", this );
}
} // end namespace
# |
Change |
User |
Description |
Committed |
|
#1
|
2157 |
Jacob Gladish |
Adding initial support for the client view of the depot. |
|
|