#pragma once class P4Connection; class StrPtr; class P4BridgeServer; #ifndef time #include "time.h" #endif //forward references class ConnectionManager; //#ifdef _DEBUG_MEMORY //class IdleConnection : public DoublyLinkedListItem, p4base //#else //class IdleConnection : public DoublyLinkedListItem //#endif //{ //public: // unsigned _int64 ReleaseTime; // P4Connection* pCon; // //#ifdef _DEBUG_MEMORY // IdleConnection(P4Connection* pcon, _int64 releaseTime); //#else // IdleConnection(P4Connection* pcon, _int64 releaseTime) // : DoublyLinkedListItem(NULL) { pCon = pcon; ReleaseTime = releaseTime;} //#endif // // virtual ~IdleConnection(void); // //#ifdef _DEBUG_MEMORY // // Simple type identification for registering objects // virtual int Type(void) {return tIdleConnection;} //#endif //}; #ifdef _DEBUG_MEMORY class ConnectionManager : public DoublyLinkedList, p4base #else class ConnectionManager : public DoublyLinkedList #endif { private: char* client; char* user; char* port; char* password; char* programName; char* programVer; char* cwd; char* ignore; char *host; CharSetApi::CharSet charset; CharSetApi::CharSet file_charset; P4BridgeServer *pServer; ConnectionManager(void); DoublyLinkedList* IdleConnections; void DiscardConnections(); public: int Initialized; ConnectionManager(P4BridgeServer *pserver); virtual ~ConnectionManager(void); P4Connection* GetConnection(int cmdId); void ReleaseConnection(int cmdId, P4UINT64 releaseTime); void ReleaseConnection(P4Connection* pCon, P4UINT64 releaseTime); int FreeConnections( P4UINT64 currentTime ); P4Connection* NewConnection(int cmdId); //P4Connection* DefaultConnection(); // Set the connection data used void SetClient( const char* newVal ); void SetHost(const char* newVal); void SetUser( const char* newVal ); void SetPort( const char* newVal ); void SetPassword( const char* newVal ); void SetProgramName( const char* newVal ); void SetProgramVer( const char* newVal ); void SetCwd( const char* newCwd ); void SetIgnore( const char* newVal ); void SetCharset( CharSetApi::CharSet c, CharSetApi::CharSet filec ); void SetConnection(const char* newPort, const char* newUser, const char* newPassword, const char* newClient) {SetClient(newClient); SetUser(newUser);SetPort(newPort);SetPassword(newPassword);} const StrPtr* GetCharset( ); int Disconnect( void ); #ifdef _DEBUG_MEMORY // Simple type identification for registering objects virtual int Type(void) {return tConnectionManager;} #endif };
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 12431 | YourUncleBob |
Added (in my branch only) support for P4HOST setting to p4bridge and p4api.net Without this, I was unable to attach to a Perforce depot on assembla (which controls access through P4HOST somehow). p4bridge sends a help command at startup to determine what charset the server is using. When attaching to the assembla server this command failed without P4HOST being set, which caused the connection to fail. I modified the startup sequence to use P4HOST if it has been specified. Not heavily tested |
||
#1 | 12428 | YourUncleBob |
Populate -o //guest/perforce_software/p4connect/src/P4Bridge/... //guest/YourUncleBob/p4connect/src/P4Bridge/.... |
||
//guest/perforce_software/p4connect/src/P4Bridge/p4bridge/ConnectionManager.h | |||||
#2 | 12135 | Norman Morse |
Integrate dev branch changes into main. This code is the basiis of the 2.7 BETA release which provides Unity 5 compatibility |
||
#1 | 10940 | Norman Morse |
Inital Workshop release of P4Connect. Released under BSD-2 license |