ClientApi::SetVersion( const char * )
Sets the application or script version for this connection.
Virtual? |
No |
|
Class |
||
Arguments |
|
the new version number |
Returns |
|
Notes
SetVersion()
sets
the version number of a client application as reported by the p4
monitor -e
command, or as recorded by server logging.
If a client application compiled with version 2005.2 or later of the API
does not call SetVersion()
, then
the version string reported by p4 monitor -e
(and
recorded in the server log) defaults to the
pass:[<literal>api</literal> value appropriate for the server
level as per SetProtocol()
.
Call SetVersion()
after calling Init()
and
before each call to Run()
.
See also
ClientApi::SetProtocol()
ClientApi::SetProg()
Example
The following example appears as 2005.2
in the output of
p4 monitor show -e
.
ClientApi client; ClientUser ui; Error e; client.Init( &e ); client.SetVersion( "2005.2" ); client.Run( "info", &ui );