ezfeed.h 689 B

123456789101112131415161718192021222324252627
  1. #ifndef _EZFEED_H
  2. #define _EZFEED_H
  3. //#include <bfc/wasabi_std.h>
  4. #include <api/service/waservicefactorybase.h>
  5. #include <api/skin/feeds/textfeed.h>
  6. class EzFeed : public waServiceFactoryBase<svc_textFeed, EzFeed>, public TextFeed
  7. {
  8. public:
  9. EzFeed() : registered(0) { }
  10. static const char *getServiceName() { return "EzTextFeed"; }
  11. virtual svc_textFeed *newService() { return this; }
  12. virtual int delService(svc_textFeed *service) { return TRUE; }
  13. virtual int svc_notify(int msg, int param1 = 0, int param2 = 0)
  14. {
  15. if (msg == SvcNotify::ONREGISTERED) registered = 1;
  16. else if (msg == SvcNotify::ONDEREGISTERED) registered = 0;
  17. return 1;
  18. }
  19. private:
  20. int registered;
  21. };
  22. #endif