PageRenderTime 42ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/strigi-0.7.7/libstreamanalyzer/plugins/throughplugins/rgbthroughanalyzer.h

#
C Header | 68 lines | 42 code | 7 blank | 19 comment | 0 complexity | 6ebb806abe9bf897dea94ba82e407dfd MD5 | raw file
Possible License(s): LGPL-2.0
  1. /* This file is part of Strigi Desktop Search
  2. *
  3. * Copyright (C) 2007 Flavio Castelli <flavio.castelli@gmail.com>
  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 STRIGI_RGBTHROUGHANALYZER
  21. #define STRIGI_RGBTHROUGHANALYZER
  22. #include <strigi/streamthroughanalyzer.h>
  23. #include <strigi/analyzerplugin.h>
  24. #include <string>
  25. namespace Strigi {
  26. class RegisteredField;
  27. }
  28. class RgbThroughAnalyzerFactory;
  29. class STRIGI_PLUGIN_API RgbThroughAnalyzer
  30. : public Strigi::StreamThroughAnalyzer {
  31. private:
  32. Strigi::AnalysisResult* analysisResult;
  33. const RgbThroughAnalyzerFactory* factory;
  34. public:
  35. RgbThroughAnalyzer(const RgbThroughAnalyzerFactory* f) :factory(f) {}
  36. ~RgbThroughAnalyzer() {}
  37. void setIndexable(Strigi::AnalysisResult* i);
  38. Strigi::InputStream *connectInputStream(Strigi::InputStream *in);
  39. bool isReadyWithStream();
  40. const char* name() const { return "RgbThroughAnalyzer"; }
  41. };
  42. class RgbThroughAnalyzerFactory
  43. : public Strigi::StreamThroughAnalyzerFactory {
  44. friend class RgbThroughAnalyzer;
  45. private:
  46. const Strigi::RegisteredField* widthField;
  47. const Strigi::RegisteredField* heightField;
  48. const Strigi::RegisteredField* bitDepthField;
  49. const Strigi::RegisteredField* imageNameField;
  50. const Strigi::RegisteredField* sharedRowsField;
  51. const Strigi::RegisteredField* colorModeField;
  52. const Strigi::RegisteredField* compressionField;
  53. const char* name() const {
  54. return "RgbThroughAnalyzer";
  55. }
  56. Strigi::StreamThroughAnalyzer* newInstance() const {
  57. return new RgbThroughAnalyzer(this);
  58. }
  59. void registerFields(Strigi::FieldRegister&);
  60. };
  61. #endif