Class P4::Progress
Description
The P4::Progress
provides access to progress
indicators from the server. After defining the progress class, call
P4::SetProgress()
with your implementation of
P4::Progress
.
Because
P4 API for Perl
does not provide a template or superclass, you must implement all five of
the following methods: Init()
, Description()
,
Update()
, Total()
, and Done()
,
even if the implementation consists of trivially returning
0
.
Class Methods
None.
Instance Methods
$progress.Init() -> int
Initialize progress indicator.
$progress.Description( string, int ) -> int
Description and type of units to be used for progress reporting.
$progress.Update() -> int
If non-zero, user has requested a cancellation of the operation.
$progress.Total()-> int
Total number of units expected (if known).
$progress.Done() -> int
If non-zero, operation has failed.
Progress Units
Progress Unit Type | Value |
---|---|
Unspecified | 0
|
Percentage Complete | 1
|
Number of files | 2
|
KB (1024 bytes) | 3
|
MB (1024*1024 bytes) | 4
|
Number of deltas | 5
|
Progress Types
The following
ProgressTypes
can be reported:
Type | Value | Meaning |
---|---|---|
|
|
Files sent to the server. This represents the source path, that is, the local path to the file being sent. |
|
|
Files received from server. This represents the destination path, that is, the local path to the file being received. |
|
|
Files transmitted. |
|
|
Computation performed server-side. |