#ifndef __P4_CLIENT_H__
#define __P4_CLIENT_H__
#include "clientapi.h"
#include <qthread.h>
// extern ClientApi gP4Client;
extern Error gError;
extern void InitialzeClient( const char* p4Port = "public.perforce.com:1666" );
/**
* public interface to the p4 server.
* Callbacks are made to the ui passed in.
*/
extern void RunP4Command( int argc,
char* argv[],
const char* func,
ClientUser* ui );
//===========================================================
//
// asynchronous access to the p4 server.
//
template< typename OBJECT, typename MEMBERFUNC >
struct ServerThread : public QThread {
OBJECT* object;
MEMBERFUNC function;
ServerThread( OBJECT* obj, MEMBERFUNC func ) :
object( obj ),
function( func ) { start(); }
void run() {
qDebug( "Running server thread." );
((*object).*function)();
delete this;
}
};
#endif
# |
Change |
User |
Description |
Committed |
|
#3
|
2152 |
Jacob Gladish |
Added a couple more images, and non-blocking server communication |
|
|
#2
|
2147 |
Jacob Gladish |
Added more functionality to the pending changes list, and added asynchronous access to the server. |
|
|
#1
|
2118 |
Jacob Gladish |
changed server interface to use perforce c++ api instead of p4 command. |
|
|