IUpdate Interface



Summary: Giving your application the ability to auto-update is simple, first pass a list of update servers to the DNA. The DNA will scan these servers for new versions and then signal to you the response. If there is an update available call StartDownload and the DNA will search over the network for the new update. If update files can not be found it will fall back on downloading them from the update server. OnUpdateComplete is called once the downloading is complete and all files have been hash verified. The files can be found in the CurrentDownloadPath\Update directory. Download example update server setup


Update Methods:
  AddServer
  Check
  StartDownload
  CancelUpdate
  LaunchUpdate


Update Files:
  GetFileIDs
  GetTotalCompleted
  GetTotalSize
  GetFileName
  GetFileSize
  GetFileCompleted


Update Events: (_IUpdateEvent sink interface)
  OnUpdateFound
  OnUpdateFailed
  OnVersionCurrent
  OnUpdateComplete


Back to Interface Reference



AddServer
  Params: String Server
  Return: None
  Remarks: Add server to list of where to check for updates


Check
  Params: None
  Return: None
  Remarks: Check for update on servers


StartDownload
  Params: None
  Return: None
  Remarks: Start download of updates


CancelUpdate
  Params: None
  Return: None
  Remarks: Cancel update process


LaunchUpdate
  Params: None
  Return: None
  Remarks: Launch downloaded executable




GetFileIDs
  Params: None
  Return: Long Array
  Remarks: Returns array of files that are to be downloaded


GetTotalCompleted
  Params: None
  Return: Long
  Remarks: Returns total bytes completed of files being downloaded


GetTotalSize
  Params: None
  Return: Long
  Remarks: Returns total size of files in bytes


GetFileName
  Params: Long FileID
  Return: String
  Remarks: Returns name of update file


GetFileSize
  Params: Long FileID
  Return: Long
  Remarks: Returns size in bytes of update file


GetFileCompleted
  Params: Long FileID
  Return: Long
  Remarks: Returns bytes completed of file




OnUpdateFound
  Params: String Version
  Return: None
  Remarks: Signals a new version has been discovered


OnUpdateFailed
  Params: String Reason
  Return: None
  Remarks: Signals update has failed for specified reason


OnVersionCurrent
  Params: None
  Return: None
  Remarks: Signals current version is most recent


OnUpdateComplete
  Params: None
  Return: None
  Remarks: Signals all files downloaded and update complete