MCPcopy Create free account
hub / github.com/bumptop/BumpTop / requestSourceUpdate

Method requestSourceUpdate

trunk/win/Source/BT_RSSPhotoFrameSource.cpp:44–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void RSSPhotoFrameSource::requestSourceUpdate()
45{
46 // just load the images from cache if there is no internet connection
47 if (!ftManager->hasInternetConnection())
48 {
49 loadPhotosFromCache();
50 return;
51 }
52
53 // remove existing downloads
54 ftManager->removeTransfersToHandler(this);
55
56 // ensure cache directory exists
57 createLocalCacheDirectory();
58
59 // download the rss feed
60 ftManager->addTransfer(FileTransfer(FileTransfer::Download, this)
61 .setUrl(_rssFeedUrl)
62 .setTimeout(60)
63 .setUserData(new bool(false)) // !isImageNotSource
64 .setTemporaryString(), false
65 );
66}
67
68void RSSPhotoFrameSource::onSourceUpdate(const FileTransfer& transfer)
69{

Callers 1

onUpdateMethod · 0.45

Calls 6

FileTransferClass · 0.85
hasInternetConnectionMethod · 0.80
addTransferMethod · 0.80
setUserDataMethod · 0.80
setTimeoutMethod · 0.45

Tested by

no test coverage detected