/******************************************************************************* Copyright (c) 2003, Robert Cowham and Vaccaperna Systems Ltd. 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 VACCAPERNA SYSTEMS LTD. 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. *******************************************************************************/ /******************************************************************************* * Name: p4clientuser.h * * Author: Robert Cowham <robert@vaccaperna.co.uk> * * Description: * COM bindings for the Perforce API. User interface class * for getting Perforce results into COM. * ******************************************************************************/ #if !defined(AFX_p4clientuser_H__C7A92243_2012_4DCA_8EB2_2E73ACA85A30__INCLUDED_) #define AFX_p4clientuser_H__C7A92243_2012_4DCA_8EB2_2E73ACA85A30__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // The various safearray types etc. #include "OleType.H" #ifndef _P4API_H_ #define _P4API_H_ #ifdef SetPort // Windows bug #undef SetPort #endif // P4 API files # include "clientapi.h" # include "enviro.h" # include "signaler.h" # include "msgclient.h" # include "spec.h" #endif // _P4API_H_ class p4ClientUser : public ClientUser { public: p4ClientUser(); virtual ~p4ClientUser(); virtual void Reset(); virtual void HandleError(Error *err); virtual void ErrorPause(char *errBuf, Error *e); virtual void OutputInfo(char level, char *data); virtual void OutputError(char *errBuf); virtual void OutputWarning(char *errBuf); virtual void OutputText(char *data, int len); virtual void OutputBinary(char *data, int len); virtual void OutputStat(StrDict *results); virtual void InputData(StrBuf *strbuf, Error *e); virtual String GetVar(String varName); virtual void SetVar(String varName, String newVal); void SetArrayVar(String varName, ArrayString newVal); ArrayString GetArrayVar(String varName); virtual void TranslateCharset(Boolean newVal); virtual Boolean TranslateCharset(); virtual ArrayString InfoArray() {return m_InfoArray;}; virtual ArrayString ErrorArray() {return m_ErrorArray;}; virtual ArrayString WarningArray() {return m_WarningArray;}; virtual BSTR TextFileName() {return m_TextFileName;}; virtual BSTR BinaryFileName() {return m_BinaryFileName;}; virtual void CloseFiles(); // closes open files (if there were any) protected: Boolean m_TranslateCharset; private: SpecDataTable *m_specData; Spec *m_spec; // Arrays used to return text strings to VB functions ArrayString m_ErrorArray; ArrayString m_InfoArray; ArrayString m_WarningArray; // These are pointers to temporary files used by OutputText and OutputBinary String m_BinaryFileName; FileSys *m_BinaryFile; String m_TextFileName; FileSys *m_TextFile; void OutputData(FileSys ** OutFile, String * FileName, enum FileSysType FType, char *data, int len); void AddToArray(char *data, int len, ArrayString & as); }; #endif // !defined(AFX_p4clientuser_H__C7A92243_2012_4DCA_8EB2_2E73ACA85A30__INCLUDED_)
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#7 | 7443 | Robert Cowham | Update for new API outputstat. | ||
#6 | 6050 | Robert Cowham |
- Use P4API 2007.2 - Added SetProg, SetVersion, SetProtocol and GetProtocol |
||
#5 | 5194 | Robert Cowham |
Changes (2005.1.0.0) Added Dropped() to detect dropped connections Added Input property to provide input e.g. for passwords Added FormatDateTime() as a convenience for calling C Runtime function (for VB use) Imported changes from p4ofc which made it more reliable. |
||
#4 | 4242 | Robert Cowham |
Fixed some String leaks. Fixed problem with writing to temporary files. Updated p4API to released version of 2003.2. Start of Delphi example. |
||
#3 | 4182 | Robert Cowham | Release 1.0.0.4 - put output of Diff in normal output array. | ||
#2 | 3614 | Robert Cowham | Fixed memory leak and hanging over of variables when using forms. | ||
#1 | 3525 | Robert Cowham | Initial release |