ClientUser::CreateProgress( int, P4INT64 )

Create a ClientProgress object by subclassing, or null if no progress indicator is desired.

Virtual?

Yes

 

Class

ClientUser

 

Arguments

int ProgressType

The type of progress to be reported, which might influence how to handle progress notification, if at all. See Progress types in the ClientProgress class overview.

 

P4INT64 filesize

The size of the file for the progress object. This method can be overridden to change the default value of 1024 bytes.

Returns

*ClientProgress

A pointer to the new ClientProgress object.

Notes

Typically used by client-side file transfer callbacks. The P4INT64 parameter is the total size of the file, which is used to decide if a progress notification is worth the overhead.

If not implemented, the default behavior is to skip progress notifications if the size is less that 1024 bytes and call ClientUser::CreateProgress( int ). Overriding ClientUser::CreateProgress( int, P4INT64 ) allows your implementation to decide whether to return a ClientProgress instance or NULL based on the file size. In your override, consider incrementing a file count because CreateProgress( int, P4INT64 ) will be called for all transfers.

To enable progress reporting for a command, create a ClientProgress object and then implement ProgressIndicator() to return 0 or 1 depending on whether or not you want to enable the progress indicator. (You typically implement ProgressIndicator() to return 1.)

See also

ClientProgress