| 42 | } |
| 43 | |
| 44 | void 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 | |
| 68 | void RSSPhotoFrameSource::onSourceUpdate(const FileTransfer& transfer) |
| 69 | { |
no test coverage detected