/******************************************************************************* 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: p4com.idl * * Author: Robert Cowham <robert@vaccaperna.co.uk> * * Description: * IDL source for p4com.dll * ******************************************************************************/ // This file will be processed by the MIDL tool to // produce the type library (p4com.tlb) and marshalling code. import "oaidl.idl"; import "ocidl.idl"; // Defines for SafeArray definitions #define IDLArrayByte SAFEARRAY(Byte) * #define IDLArrayInteger SAFEARRAY(short) * #define IDLArrayLong SAFEARRAY(long) * #define IDLArraySingle SAFEARRAY(float) * #define IDLArrayDouble SAFEARRAY(double) * #define IDLArrayCurrency SAFEARRAY(Currency) * #define IDLArrayDate SAFEARRAY(Date) * //@B IDLArrayString #define IDLArrayString SAFEARRAY(BSTR) * //@E IDLArrayString #define IDLArrayBoolean SAFEARRAY(Boolean) * #define IDLArrayObject SAFEARRAY(IDispatch*) * #define IDLArrayVariant SAFEARRAY(Variant) * [ object, uuid(E7D963D4-7AC8-4B89-B768-16F900DB2A93), dual, helpstring("Ip4 Interface"), pointer_default(unique) ] interface Ip4 : IDispatch { [propget, id(1), helpstring("property Charset")] HRESULT Charset([out, retval] BSTR *pVal); [propput, id(1), helpstring("property Charset")] HRESULT Charset([in] BSTR newVal); [propget, id(2), helpstring("property Client")] HRESULT Client([out, retval] BSTR *pVal); [propput, id(2), helpstring("property Client")] HRESULT Client([in] BSTR newVal); [propget, id(3), helpstring("property Cwd")] HRESULT Cwd([out, retval] BSTR *pVal); [propput, id(3), helpstring("property Cwd")] HRESULT Cwd([in] BSTR newVal); [propget, id(4), helpstring("property Host")] HRESULT Host([out, retval] BSTR *pVal); [propput, id(4), helpstring("property Host")] HRESULT Host([in] BSTR newVal); [propget, id(5), helpstring("property Language")] HRESULT Language([out, retval] BSTR *pVal); [propput, id(5), helpstring("property Language")] HRESULT Language([in] BSTR newVal); [propget, id(6), helpstring("property Password")] HRESULT Password([out, retval] BSTR *pVal); [propput, id(6), helpstring("property Password")] HRESULT Password([in] BSTR newVal); [propget, id(7), helpstring("property Port")] HRESULT Port([out, retval] BSTR *pVal); [propput, id(7), helpstring("property Port")] HRESULT Port([in] BSTR newVal); [propget, id(8), helpstring("property User")] HRESULT User([out, retval] BSTR *pVal); [propput, id(8), helpstring("property User")] HRESULT User([in] BSTR newVal); [propget, id(10), helpstring("Array of any Errors that occurred during previous 'run'")] HRESULT Errors([out, retval] IDLArrayString valArray); [propget, id(11), helpstring("Array of any Warnings that occurred during previous 'run'")] HRESULT Warnings([out, retval] IDLArrayString valArray); [id(12), helpstring("Returns the results of running the Perforce command as array of strings")] HRESULT run(BSTR cmd, [out, retval] IDLArrayString valArray); [id(13), helpstring("Connect to Perforce server")] HRESULT Connect(); [id(14), helpstring("Disconnect from Perforce server")] HRESULT Disconnect(); [propget, id(15), helpstring("0 means no exceptions, 1 exception on errors only, 2 exceptions on warnings as well")] HRESULT ExceptionLevel([out, retval] long *pVal); [propput, id(15), helpstring("0 means no exceptions, 1 exception on errors only, 2 exceptions on warnings as well")] HRESULT ExceptionLevel([in] long newVal); [id(16), helpstring("Set's tagging of results")] HRESULT Tagged(); [id(17), helpstring("method ParseForms")] HRESULT ParseForms(); [propget, id(18), helpstring("Name of any temporary file produced by a p4 command such as 'print'")] HRESULT TempFilename([out, retval] BSTR *pVal); [propget, id(19), helpstring("Get the value of the variable with the specified name (requires ParseForms)")] HRESULT Var(BSTR varName, [out, retval] BSTR *pVal); [propput, id(19), helpstring("Get the value of the variable with the specified name (requires ParseForms)")] HRESULT Var(BSTR varName, [in] BSTR newVal); [propget, id(20), helpstring("Does the variable with the specified name exist (requires ParseForms)")] HRESULT VarExists(BSTR varName, [out, retval] BOOL *pVal); [propget, id(21), helpstring("Get the array of values of the variable with the specified name (requires ParseForms)")] HRESULT ArrayVar(BSTR varName, [out, retval] IDLArrayString pVal); [propput, id(21), helpstring("Set the array of values of the variable with the specified name (requires ParseForms)")] HRESULT ArrayVar(BSTR varName, [in] IDLArrayString newVal); [propget, id(22), helpstring("property Os")] HRESULT Os([out, retval] BSTR *pVal); [propget, id(23), helpstring("property ServerVersion")] HRESULT ServerVersion([out, retval] long *pVal); [propput, id(24), helpstring("Same as ArrayVar but sets array of VARIANT values of the variable with the specified name (requires ParseForms)")] HRESULT ArrayVar_variant(BSTR varName, [in] VARIANT newVal); [propget, id(24), helpstring("Same as ArrayVar but gets array of VARIANT values of the variable with the specified name (requires ParseForms)")] HRESULT ArrayVar_variant(BSTR varName, [out, retval] VARIANT *pVal); [id(25), helpstring("Same as Run but returns the results of running the Perforce command as array of variants")] HRESULT run_variant(BSTR cmd, [out, retval] VARIANT *vArray); [propget, id(26), helpstring("Array of any Errors (as variant) that occurred during previous 'run'")] HRESULT Errors_variant([out, retval] VARIANT *vArray); [propget, id(27), helpstring("Array of any Warnings (as variant) that occurred during previous 'run'")] HRESULT Warnings_variant([out, retval] VARIANT *vArray); [propput, id(28), helpstring("Specify input for subsequent command - e.g. password for login")] HRESULT Input([in] BSTR newVal); [id(29), helpstring("Utility function to return Perforce format date strings from unix time in seconds.")] HRESULT FormatDateTime([in] long unixtime, [out, retval] BSTR *pVal); [id(30), helpstring("Has connection been dropped?.")] HRESULT Dropped([out, retval] long *pVal); [id(31), helpstring("Returns value from GetProtocol")] HRESULT GetProtocol(BSTR pname, [out, retval] BSTR *pVal); [id(32), helpstring("Set protocol - for things like api, tagged etc")] HRESULT SetProtocol(BSTR pname, BSTR newVal); [id(33), helpstring("Set program name (for server log)")] HRESULT SetProg(BSTR pname); [id(34), helpstring("Set program version name (for server log)")] HRESULT SetVersion(BSTR pname); [id(35), helpstring("Set ticket file")] HRESULT SetTicketFile(BSTR fname); [id(36), helpstring("Set protocolV - special version")] HRESULT SetProtocolV(BSTR newVal); }; [ uuid(BC5DA98A-3A2F-4458-8666-22EDB27C6258), version(1.0), helpstring("p4com 1.0 Type Library") ] library P4COM { importlib("stdole32.tlb"); importlib("stdole2.tlb"); [ uuid(0709D2DF-09E0-4DBF-AECB-9B997006C0B4), helpstring("p4 Class") ] coclass p4 { [default] interface Ip4; }; };
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 11314 | Robert Cowham | Initial population of perforce_software version of P4OFC | ||
//guest/robert_cowham/perforce/API/p4com/main/src/p4com.idl | |||||
#9 | 9835 | Robert Cowham | Added SetProtocolV | ||
#8 | 7459 | Robert Cowham | Add SetTicketFile option | ||
#7 | 6050 | Robert Cowham |
- Use P4API 2007.2 - Added SetProg, SetVersion, SetProtocol and GetProtocol |
||
#6 | 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. |
||
#5 | 4156 | Robert Cowham | Updated to support Variant Arrays (as required by VBScript). | ||
#4 | 3612 | Robert Cowham |
Version 1.0.0.2 New interface for ServerVersion. New put property ArrayVarVar which is the same as ArrayVar but takes an Array of Variants rather than strings (for Lisp compatibility!). |
||
#3 | 3561 | Robert Cowham | Renamed P4COMLib to P4COM and run from property to method. | ||
#2 | 3542 | Robert Cowham | Update to use exceptions properly - including examples. | ||
#1 | 3525 | Robert Cowham | Initial release |