/******************************************************************************* Copyright (c) 1997-2004, Perforce Software, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PERFORCE SOFTWARE, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ class ClientApi; class PerlClientUser; class PerlClientApi { public: PerlClientApi(); ~PerlClientApi(); SV * Connect(); SV * Disconnect(); SV * Dropped(); SV * Run( const char *cmd, int argc, char * const *argv ); void SetClient( const char *c ) { client->SetClient( c ); } void SetCwd( const char *c ) { client->SetCwd( c ); } void SetHost( const char *c ) { client->SetHost( c ); } void SetLanguage( const char *c ) { client->SetLanguage( c ); } void SetPassword( const char *c ) { client->SetPassword( c ); } void SetPort( const char *c ) { client->SetPort( c ); } void SetCharset( const char *c ) { client->SetCharset( c ); } void SetTrans( int output, int content = -2, int fnames = -2, int dialog = -2 ) { client->SetTrans( output, content, fnames, dialog ); } void SetUser( const char *c ) { client->SetUser( c ); } void SetProg( const char *c ); void SetInput( SV *i ); SV * GetClient(); SV * GetCwd(); SV * GetHost(); SV * GetLanguage(); SV * GetPassword(); SV * GetPort(); SV * GetCharset(); SV * GetUser(); void SetProtocol( const char *p, const char *v ); StrPtr * GetProtocol( const char *v ); // // Handling command output // SV * MergeErrors( int merge = -1 ); SV * GetFirstOutput(); AV * GetOutput(); AV * GetWarnings(); AV * GetErrors(); I32 GetOutputCount(); I32 GetWarningCount(); I32 GetErrorCount(); // Debugging support void SetDebugLevel( int l ); int GetDebugLevel() { return debugLevel; } int IsConnected() { return initCount; } // // Compatibility flags // enum { CPT_MERGED = 0x0001 }; private: ClientApi * client; PerlClientUser * ui; int initCount; int debugLevel; int compatFlags; };
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 4672 | Raymond Danks |
Add support for Internationalized Perforce Servers. Specifically, add GetCharset, SetCharset, and SetTrans. |
||
#1 | 4669 | Raymond Danks | Create a branch of P4-3.4608. | ||
//guest/tony_smith/perforce/API/Perl/P4/lib/perlclientapi.h | |||||
#3 | 4608 | Tony Smith |
Bug fix: The SetInput() method was omitted in the big rewrite so quite a lot was broken in builds 3.4579 and later. This change fixes that omission, and adds support for 'p4 login' too (that was how I discovered that SetInput() was missing). |
||
#2 | 4585 | Tony Smith |
Make the new P4Perl work with older versions of the Perforce API (i.e those without ClientApi::SetProg() defined ). This also introduces automatic determination of the API version being used so we can selectively exclude functionality that isn't available. No functional change. |
||
#1 | 4579 | Tony Smith |
Rewrite P4Perl to be more like P4Ruby. This change does away with the old P4/P4::Client split and pulls all the functionality of P4::Client into P4. Hence P4::Client is now deprecated. There are a few gotcha's - see the Changes file, and documentation for the details, but in general it's backwards compatible. As part of this change, I'm also releasing the previous current versions of P4 and P4::Client as released versions - for posterity. P4 now gets a v3.x version number so the old versions will stand out clearly. Hopefully it's all working - works fine for me - but people should consider this a beta build, for now at least. |