vslavik/winsparkle — pull request #12 by orng (2013-10-02 16:43:08+00:00)
Title: Host-driven, silent, updates

This is a first step towards completely silent updates. The one thing missing now is custom parameters to the installer.
Using this, something similar to the way Spotify handles their updates on Windows could easily be created.

>The API now has functions for performing silent (UI-less) , host driven update checks and downloads.
>To do this the host initializes WinSparkle in silent-mode with `win_sparkle_init_silent` and provides WinSparkle with two callbacks at the same time:
>
>`void checkCallback(int isUpdateAvailable, int errorCode)`
>Where:
>`isUpdateAvailable` will be 1 if an update is found, 0 otherwise
>`errorCode` will be 0 if no errors occurred, nonzero otherwise
>
>`void downloadCallback(int errorCode)`
>Where:
>`errorCode` will be 0 if no errors occurred, nonzero otherwise
>
>After initializing the host can then do the following:
>
>Check for updates using win_sparkle_check_update_silent() which will call `checkCallback` when it's done.

>If an update is available the host can the call `win_sparkle_download_update_silent()` to download the update. `downloadCallback` will be called once the download is done.
>
>After downloading the host can then call `win_sparkle_run_installer()` which will try to launch the installer and return 0 if successful, nonzero error code otherwise.

Please let me know what you think.
As always I am open to feedback and willing to cooperate ;)