#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* host; char* ignore; char* csname; 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); // Set the connection data used void SetClient( 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 SetHost( const char* newHost ); 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 | |
---|---|---|---|---|---|
#1 | 25222 | seandanger | "Forking branch Main of perforce-software-p4connect to seandanger-p4connect." | ||
//guest/perforce_software/p4connect/main/src/P4Bridge/p4bridge/ConnectionManager.h | |||||
#1 | 16209 | Norman Morse | Move entire source tree into "main" branch so workshop code will act correctly. | ||
//guest/perforce_software/p4connect/src/P4Bridge/p4bridge/ConnectionManager.h | |||||
#3 | 14005 | Norman Morse |
Bridge cleanup for OSX warnings and fixes for Unicode: P4CHARSET and P4HOST issues |
||
#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 |