svc_export.h 678 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _SVC_EXPORT_H
  2. #define _SVC_EXPORT_H
  3. #include <bfc/dispatch.h>
  4. #include <api/service/services.h>
  5. class svc_fileReader;
  6. class svc_exporter /*: public Dispatchable*/ {
  7. public:
  8. static FOURCC getServiceType() { return WaSvc::EXPORTER; }
  9. virtual int isMine(const char *exportid, const char *family)=0;
  10. virtual svc_fileReader *open()=0;
  11. virtual close(svc_fileReader *reader)=0;
  12. };
  13. class ExporterEnum : public SvcEnumT<svc_exporter> {
  14. public:
  15. ExporterEnum(const char *exportid, const char *family=NULL) :
  16. id(exportid), fam(family) { }
  17. virtual int testService(svc_exporter *svc) {
  18. return svc->isMine(id, fam);
  19. }
  20. private:
  21. String id, fam;
  22. };
  23. #endif