diff options
Diffstat (limited to 'SwifTools/AutoUpdater/SparkleAutoUpdater.mm')
-rw-r--r-- | SwifTools/AutoUpdater/SparkleAutoUpdater.mm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/SwifTools/AutoUpdater/SparkleAutoUpdater.mm b/SwifTools/AutoUpdater/SparkleAutoUpdater.mm index 6b27ba7..ed5f094 100644 --- a/SwifTools/AutoUpdater/SparkleAutoUpdater.mm +++ b/SwifTools/AutoUpdater/SparkleAutoUpdater.mm @@ -21,7 +21,7 @@ class SparkleAutoUpdater::Private { bool restartToUpdate = false; }; -SparkleAutoUpdater::SparkleAutoUpdater(const std::string& url) : d(new Private()) { +SparkleAutoUpdater::SparkleAutoUpdater(const std::string& appcastFeed) : d(new Private()) { d->updater = [SUUpdater sharedUpdater]; [d->updater retain]; @@ -37,7 +37,7 @@ SparkleAutoUpdater::SparkleAutoUpdater(const std::string& url) : d(new Private() [d->updater setUpdateCheckInterval: 86400]; [d->updater setAutomaticallyDownloadsUpdates: true]; - NSURL* nsurl = [NSURL URLWithString: std2NSString(url)]; + NSURL* nsurl = [NSURL URLWithString: std2NSString(appcastFeed)]; [d->updater setFeedURL: nsurl]; } @@ -45,6 +45,11 @@ SparkleAutoUpdater::~SparkleAutoUpdater() { [d->updater release]; } +void SparkleAutoUpdater::setAppcastFeed(const std::string& appcastFeed) { + NSURL* nsurl = [NSURL URLWithString: std2NSString(appcastFeed)]; + [d->updater setFeedURL: nsurl]; +} + void SparkleAutoUpdater::checkForUpdates() { //[d->updater resetUpdateCycle]; // This is useful for testing to force a check ot start. [d->updater checkForUpdatesInBackground]; |