1
0

ChannelSync.h 845 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef NULLSOFT_CHANNELSYNCH
  2. #define NULLSOFT_CHANNELSYNCH
  3. #include "Feeds.h"
  4. /*
  5. ChannelSync is a virtual base class (aka interface) used by the RSS downloader.
  6. When you instantiate a downloader, you are required to give it a pointer to this interface.
  7. The downloader will call:
  8. BeginChannelSync();
  9. for (;;) // however many it encounters
  10. NewChannel(newChannel); // called once for each channel it downloads
  11. EndChannelSync();
  12. If you have a class or data structure that wants updates, you'll have to mix-in
  13. this interface or implement a data-structure-babysitter class (or however you want to deal with it)
  14. See the "WireManager" for an example of how to use it
  15. */
  16. class ChannelSync
  17. {
  18. public:
  19. virtual void BeginChannelSync() {}
  20. virtual void NewChannel(const Channel &newChannel) = 0;
  21. virtual void EndChannelSync() {}}
  22. ;
  23. #endif