Helix Core C/C++ Developer Guide

Helix Core C/C++ Developer Guide

2020.2 November 2020

Copyright ? 2014-2020 Perforce Software, Inc..

All rights reserved.

All software and documentation of Perforce Software, Inc. is available from . You can download and use Perforce programs, but you can not sell or redistribute them. You can download, print, copy, edit, and redistribute the documentation, but you can not sell it, or sell any documentation derived from it. You can not modify or attempt to reverse engineer the programs.

This product is subject to U.S. export control laws and regulations including, but not limited to, the U.S. Export Administration Regulations, the International Traffic in Arms Regulation requirements, and all applicable end-use, end-user and destination restrictions. Licensee shall not permit, directly or indirectly, use of any Perforce technology in or by any U.S. embargoed country or otherwise in violation of any U.S. export control laws and regulations.

Perforce programs and documents are available from our Web site as is. No warranty or support is provided. Warranties and support, along with higher capacity servers, are sold by Perforce.

Perforce assumes no responsibility or liability for any errors or inaccuracies that might appear in this book. By downloading and using our programs and documents you agree to these terms.

Perforce and Inter-File Branching are trademarks of Perforce.

All other brands or product names are trademarks or registered trademarks of their respective companies or organizations.

Any additional software included within Perforce is listed in "License Statements" on page 300.

Contents

How to use this guide

Syntax conventions Feedback Other documentation Earlier versions of this guide

Overview

Release compatibility of the API Purpose of the API Architecture of the API Types of API files Downloading the API archive Compatibilities and version requirements

Compiling and linking Helix server applications

Additional script libraries for Helix Core Extensions Link order SSL support

OpenSSL Library Version Link order for SSL support Compiler support UNIX Linux Windows Sample Jamfile Sample Makefile

Application Programming

Building with Jam Building the sample application

Sending commands to the versioning service Helix server settings on the user's machine Connecting to the server Displaying Helix server forms Sending commands

13

13 14 14 14

15

15 15 15 15 15 16

17

17 17 17 17 18 18 18 18 19 19 19

21

21 22 24 24 25 25 26

3

Processing data from the server

26

Disconnecting from the server

29

Performing file I/O

29

Handling errors

33

Connection errors

34

Server errors

34

Find errorIds

34

Class overviews

35

ClientApi - Helix server connections and commands

35

ClientProgress - progress indicators for Helix server commands

36

ClientUser - I/O for Helix server commands

36

Error - collect and report layered errors

36

ErrorLog - output error messages

37

FileSys - Helix server file I/O

37

Ignore - support for rejecting files

37

KeepAlive - support for client-side disconnection

37

MapApi - logic for view mappings

38

Options - parse and store command line options

38

ServerHelperApi - helper methods for creating personal servers

38

Signaler - interrupt handling

38

StrBuf - string manipulation

38

StrDict - field/value manipulation

39

StrNum - small numeric strings

39

StrOps - string operations

39

StrPtr - text operations

39

StrRef - refer to existing strings

40

MonItems - between real-time counters and storage

40

MonItem - base class for performance counters

41

MonInteger - store 64-bit integer values

42

MonIntMax - tracks the highest recorded value

42

Public Methods Reference

44

ClientApi methods

49

ClientApi::DefineClient( const char *, Error * )

49

ClientApi::DefineHost( const char *, Error * )

50

ClientApi::DefineIgnoreFile( const char *, Error * )

51

ClientApi::DefinePassword( const char *, Error * )

51

ClientApi::DefinePort( const char *, Error * )

52

4

ClientApi::DefineUser( const char *, Error * ) ClientApi::Dropped() ClientApi::Final( Error * ) ClientApi::GetClient() ClientApi::GetConfig() ClientApi::GetCwd() ClientApi::GetHost() ClientApi::GetIgnore() ClientApi::GetIgnoreFile() ClientApi::GetOs() ClientApi::GetPassword() ClientApi::GetPort() ClientApi::GetProtocol( const char * ) ClientApi::GetTrans( ) ClientApi::GetUser() ClientApi::Init( Error * ) ClientApi::Run( const char *, ClientUser * ) ClientApi::SetBreak( KeepAlive *breakCallback ) ClientApi::SetClient( const StrPtr * ) ClientApi::SetClient( const char * ) ClientApi::SetCwd( const StrPtr * ) ClientApi::SetCwd( const char * ) ClientApi::SetCwdNoReload( const StrPtr * ) ClientApi::SetCwdNoReload( const char * ) ClientApi::SetHost( const StrPtr * ) ClientApi::SetHost( const char * ) ClientApi::SetIgnoreFile( const StrPtr * ) ClientApi::SetIgnoreFile( const char * ) ClientApi::SetPassword( const StrPtr * ) ClientApi::SetPassword( const char * ) ClientApi::SetPort( const StrPtr * ) ClientApi::SetPort( const char * ) ClientApi::SetProg( const StrPtr * ) ClientApi::SetProg( const char * ) ClientApi::SetProtocol( char *, char * ) ClientApi::SetProtocolV( char * ) ClientApi::SetTicketFile( const StrPtr * )

53 54 55 55 56 57 58 59 59 60 61 62 63 64 66 66 67 68 70 71 71 72 73 74 75 75 76 77 78 79 79 80 80 81 82 85 85

5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download