/*
* $Id: STUpdaterProtocol.h 198 2010-01-06 23:05:30Z stuart $
*
* SafariTabs
* http://stuconnolly.com/projects/safaritabs/
*
* Copyright (c) 2010 Stuart Connolly. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@class STUpdater;
@protocol STUpdaterProtocol <NSObject>
/*!
* @brief Notifies when a new version is available
*
* This method is called whenever the updater has detected that a newer version of the plugin is available to
* download. The updater itself and the new version string are passed as parameters. Conforming objects should
* decide whether to present the user with the information depending on whether or not the update is taking place
* in the background and then call subsequent download methods on its STUpdater instance depending on the
* users decision.
*
* @param updater The instance of STUpdater calling the method
* @param version The version String of the new version
*/
- (void)updater:(STUpdater *)updater newVersionAvailable:(NSString *)version;
/*!
* @brief Notifies when no new version is available
*
* This method is called whenever the updater has detected that there is no new version available to download.
* The updater itself is passed as a parameter. Conforming objects should decide whether to present the user
* with the information depending on whether or not the update is taking place in the background.
*
* @param updater The instance of STUpdater calling the method
*/
- (void)updaterNoNewVersionAvailable:(STUpdater *)updater;
/*!
* @brief Notifies when an error occurred when checking for updates
*
* This method is called whenever the updater encountered an error when checking for updates. The updater
* itself is passed as a parameter. Conforming objects should decide whether to present the user with the
* information depending on whether or not the update is taking place in the background.
*
* @param updater The instance of STUpdater calling the method
*/
- (void)updaterCheckForUpdateError:(STUpdater *)updater;
/*!
* @brief Notifies when an error occurred when attempting to download a new version
*
* This method is called whenever the updater encounters an error whilst trying to download a new version. The
* updater itself is passed as a parameter. Conforming objects should decide whether to present the user with
* the information depending on whether or not the update is taking place in the background.
*
* @param updater The instance of STUpdater calling the method
*/
- (void)updaterDownloadUpdateError:(STUpdater *)updater;
/*!
* @brief Notifies when the downloading of the new version is complete
*
* This method is called whenever the downloading of the new version from the server is complete. The updater
* itself is passed as a parameter. Conforming objects should present the user with this notification and possibly
* disclose the location of the downloaded file.
*
* @param updater The instance of STUpdater calling the method
*/
- (void)updaterDownloadComplete:(STUpdater *)updater;
@end