IXtfDeployCallback Interface

Provides a callback that is called when a trackable action occurs during an IXtfApplicationClient::Deploy operation.

Syntax

interface IXtfDeployCallback : public IUnknown  

Methods

Method Description
OnDeployChangeEvaluation Callback invoked when evaluating which files need to be transferred or deleted.
OnDeployError Reserved for internal use.
OnDeployExtraFileDetected Callback invoked when an extra file has been detected.
OnDeployExtraFileRemoved Callback invoked to report that an extra file on the console has been removed.
OnDeployFileProgress Callback invoked to report progress in deploying a file to the console
OnDeployInitialized Callback invoked when deployment begins.
OnDeployMetrics Callback invoked when deployment metrics are reported.

Remarks

All of the callback methods work in the same way with respect to their return values. If a callback returns a successful HResult, then the deployment process continues. If a callback returns any failure HResult, then the deployment process is canceled immediately. Files that have already been transferred or deleted remain as they are, and partially transferred files are closed in their truncated form.

The callback process is simple. Each file on the deploying development PC is compared to its corresponding file on the target console.

  • If a file is the same on PC and console, nothing more is done.
  • If a file on the PC is newer than the file on the console, the file is copied from PC to console.
  • If a file exists on the PC and is not on the console, it is copied to the console.
  • If a file exists on the console, but not on the PC, it is optionally deleted from the console. (Whether it is deleted is determined by the value of the fRemoveExtraFiles parameter to Deploy).

Callback methods are invoked at the appropriate time during the deployment process.

  1. OnDeployInitialized: This callback is invoked when the deployment system has been engaged, and can be used to start timing deployment or initializing progress dialogs. When this callback has been invoked, all potential interop and DLL boundary crossings have been successfully completed. This callback is invoked once per deployment.
  2. OnDeployChangeEvaluation: This callback is invoked when the deployment system is evaluating which files need to be deployed to the console or deleted from the console. You can use this callback to update a progress indicator.
  3. OnDeployMetrics: This callback is invoked once at the end of the evaluation process, to report how many files will be deployed to the console and the total number of bytes to be transferred.
  4. OnDeployFileProgress: This callback is invoked each time a buffer block is successfully transferred, per file. Transfers are performed on multiple threads simultaneously, so your code must ensure that it is tracking progress by filename, and protect agains normal multi-threading issues. This callback is called once at the start of a transfer and once at the end of the transfer, so a zero-length file will cause two invocations of this callback.
  5. OnDeployExtraFileDetected: Indicates that a file was found on the console that is not on the PC.
  6. OnDeployExtraFileRemoved: If the fRemoveExtraFiles parameter to Deploy was set to TRUE, this callback is invoked when a file is deleted from the console.
  7. OnDeployError is not used by the current implementation, but is reserved for future use.

If you want to indicate overall deployment progress, your code should report the number of different files named in OnDeployFileProgress callbacks so far, as a percentage of the total number of files reported to the OnDeployMetrics callback.

Requirements

Header: xtfapplication.h

Library: xtfapplication.lib

Supported platforms: Windows (for Xbox console tools)

See also

Reference

XtfApplication