1
0

TextFeedEnum.h 673 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef NULLSOFT_WASABI_TEXTFEEDENUM_H
  2. #define NULLSOFT_WASABI_TEXTFEEDENUM_H
  3. #include <bfc/string/StringW.h>
  4. #include <api/skin/feeds/api_textfeed.h>
  5. // see helper class TextFeed
  6. #include <api/service/servicei.h>
  7. template <class T>
  8. class TextFeedCreatorSingle : public waServiceFactoryTSingle<svc_textFeed, T>
  9. {
  10. public:
  11. svc_textFeed *getFeed()
  12. {
  13. return getSingleService();
  14. }
  15. };
  16. #include <api/service/svc_enum.h>
  17. class TextFeedEnum : public SvcEnumT<svc_textFeed>
  18. {
  19. public:
  20. TextFeedEnum(const wchar_t *_feedid) : feedid(_feedid) {}
  21. protected:
  22. virtual int testService(svc_textFeed *svc)
  23. {
  24. return (svc->hasFeed(feedid));
  25. }
  26. private:
  27. StringW feedid;
  28. };
  29. #endif