blob: 30e2ae285e658bb3cf6ecd525998006cc283007b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include "SwifTools/AutoUpdater/SparkleAutoUpdater.h"
#include <Cocoa/Cocoa.h>
#include <Sparkle/Sparkle.h>
namespace Swift {
class SparkleAutoUpdater::Private {
public:
SUUpdater* updater;
};
SparkleAutoUpdater::SparkleAutoUpdater(const String& url) {
d = new Private;
d->updater = [SUUpdater sharedUpdater];
[d->updater retain];
NSURL* nsurl = [NSURL URLWithString:
[NSString stringWithUTF8String: url.getUTF8Data()]];
[d->updater setFeedURL: nsurl];
}
SparkleAutoUpdater::~SparkleAutoUpdater() {
[d->updater release];
delete d;
}
void SparkleAutoUpdater::checkForUpdates() {
[d->updater checkForUpdatesInBackground];
}
}
|