dev.stuconnolly.com / svn / safaritabs

  1. /*
  2.  *  $Id: STUpdaterProtocol.h 198 2010-01-06 23:05:30Z stuart $
  3.  *
  4.  *  SafariTabs
  5.  *  http://stuconnolly.com/projects/safaritabs/
  6.  *
  7.  *  Copyright (c) 2010 Stuart Connolly. All rights reserved.
  8.  *
  9.  *  This program is free software: you can redistribute it and/or modify
  10.  *  it under the terms of the GNU General Public License as published by
  11.  *  the Free Software Foundation, either version 3 of the License, or
  12.  *  (at your option) any later version.
  13.  *
  14.  *  This program is distributed in the hope that it will be useful,
  15.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17.  *  GNU General Public License for more details.
  18.  *
  19.  *  You should have received a copy of the GNU General Public License
  20.  *  along with this program. If not, see <http://www.gnu.org/licenses/>.
  21.  */
  22.  
  23. @class STUpdater;
  24.  
  25. @protocol STUpdaterProtocol <NSObject>
  26.  
  27. /*!
  28.  * @brief Notifies when a new version is available
  29.  *
  30.  * This method is called whenever the updater has detected that a newer version of the plugin is available to
  31.  * download. The updater itself and the new version string are passed as parameters. Conforming objects should
  32.  * decide whether to present the user with the information depending on whether or not the update is taking place
  33.  * in the background and then call subsequent download methods on its STUpdater instance depending on the
  34.  * users decision.
  35.  *
  36.  * @param updater The instance of STUpdater calling the method
  37.  * @param version The version String of the new version
  38.  */
  39. - (void)updater:(STUpdater *)updater newVersionAvailable:(NSString *)version;
  40.  
  41. /*!
  42.  * @brief Notifies when no new version is available
  43.  *
  44.  * This method is called whenever the updater has detected that there is no new version available to download.
  45.  * The updater itself is passed as a parameter. Conforming objects should decide whether to present the user
  46.  * with the information depending on whether or not the update is taking place in the background.
  47.  *
  48.  * @param updater The instance of STUpdater calling the method
  49.  */
  50. - (void)updaterNoNewVersionAvailable:(STUpdater *)updater;
  51.  
  52. /*!
  53.  * @brief Notifies when an error occurred when checking for updates
  54.  *
  55.  * This method is called whenever the updater encountered an error when checking for updates. The updater
  56.  * itself is passed as a parameter. Conforming objects should decide whether to present the user with the
  57.  * information depending on whether or not the update is taking place in the background.
  58.  *
  59.  * @param updater The instance of STUpdater calling the method
  60.  */
  61. - (void)updaterCheckForUpdateError:(STUpdater *)updater;
  62.  
  63. /*!
  64.  * @brief Notifies when an error occurred when attempting to download a new version
  65.  *
  66.  * This method is called whenever the updater encounters an error whilst trying to download a new version. The
  67.  * updater itself is passed as a parameter. Conforming objects should decide whether to present the user with
  68.  * the information depending on whether or not the update is taking place in the background.
  69.  *
  70.  * @param updater The instance of STUpdater calling the method
  71.  */
  72. - (void)updaterDownloadUpdateError:(STUpdater *)updater;
  73.  
  74. /*!
  75.  * @brief Notifies when the downloading of the new version is complete
  76.  *
  77.  * This method is called whenever the downloading of the new version from the server is complete. The updater
  78.  * itself is passed as a parameter. Conforming objects should present the user with this notification and possibly
  79.  * disclose the location of the downloaded file.
  80.  *
  81.  * @param updater The instance of STUpdater calling the method
  82.  */
  83. - (void)updaterDownloadComplete:(STUpdater *)updater;
  84.  
  85. @end
  86.