PageRenderTime 39ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/strigi-0.7.7/libstreamanalyzer/lib/endanalyzers/lzmaendanalyzer.h

#
C Header | 54 lines | 30 code | 5 blank | 19 comment | 0 complexity | 0db8c8dc6d3aa939be58c39dae7308f0 MD5 | raw file
Possible License(s): LGPL-2.0
  1. /* This file is part of Strigi Desktop Search
  2. *
  3. * Copyright (C) 2009 Jos van den Oever <jos@vandenoever.info>
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Library General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Library General Public License
  16. * along with this library; see the file COPYING.LIB. If not, write to
  17. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18. * Boston, MA 02110-1301, USA.
  19. */
  20. #ifndef LZMAENDANALYZER
  21. #define LZMAENDANALYZER
  22. #include <strigi/streamendanalyzer.h>
  23. #include <strigi/streambase.h>
  24. class LzmaEndAnalyzerFactory;
  25. class LzmaEndAnalyzer : public Strigi::StreamEndAnalyzer {
  26. private:
  27. const LzmaEndAnalyzerFactory* factory;
  28. public:
  29. LzmaEndAnalyzer(const LzmaEndAnalyzerFactory* f)
  30. :factory(f) {}
  31. bool checkHeader(const char* header, int32_t headersize) const;
  32. signed char analyze(Strigi::AnalysisResult& idx, Strigi::InputStream* in);
  33. const char* name() const { return "LzmaEndAnalyzer"; }
  34. };
  35. class LzmaEndAnalyzerFactory : public Strigi::StreamEndAnalyzerFactory {
  36. friend class LzmaEndAnalyzer;
  37. private:
  38. const Strigi::RegisteredField* typeField;
  39. public:
  40. const char* name() const {
  41. return "LzmaEndAnalyzer";
  42. }
  43. Strigi::StreamEndAnalyzer* newInstance() const {
  44. return new LzmaEndAnalyzer(this);
  45. }
  46. bool analyzesSubStreams() const { return true; }
  47. void registerFields(Strigi::FieldRegister&);
  48. };
  49. #endif