PageRenderTime 49ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
C Header | 68 lines | 42 code | 7 blank | 19 comment | 0 complexity | d1dc0ff57977c29667ed81a356d111fe MD5 | raw file
Possible License(s): LGPL-2.0
  1. /* This file is part of Strigi Desktop Search
  2. *
  3. * Copyright (C) 2007 Vincent Ricard <magic@magicninja.org>
  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_AUTHROUGHANALYZER
  21. #define STRIGI_AUTHROUGHANALYZER
  22. #include <strigi/streamthroughanalyzer.h>
  23. #include <strigi/analyzerplugin.h>
  24. #include "string.h"
  25. #include <string>
  26. namespace Strigi {
  27. class RegisteredField;
  28. }
  29. class AuThroughAnalyzerFactory;
  30. class AuThroughAnalyzer
  31. : public Strigi::StreamThroughAnalyzer {
  32. private:
  33. Strigi::AnalysisResult* analysisResult;
  34. const AuThroughAnalyzerFactory* factory;
  35. public:
  36. AuThroughAnalyzer(const AuThroughAnalyzerFactory* f) :factory(f) {}
  37. ~AuThroughAnalyzer() {}
  38. void setIndexable(Strigi::AnalysisResult* i);
  39. Strigi::InputStream *connectInputStream(Strigi::InputStream *in);
  40. bool isReadyWithStream();
  41. const char* name() const { return "AuThroughAnalyzer"; }
  42. };
  43. class AuThroughAnalyzerFactory
  44. : public Strigi::StreamThroughAnalyzerFactory {
  45. friend class AuThroughAnalyzer;
  46. private:
  47. const Strigi::RegisteredField* lengthField;
  48. const Strigi::RegisteredField* sampleRateField;
  49. const Strigi::RegisteredField* channelsField;
  50. const Strigi::RegisteredField* sampleBitDepthField;
  51. const Strigi::RegisteredField* sampleDataTypeField;
  52. const Strigi::RegisteredField* typeField;
  53. const char* name() const {
  54. return "AuThroughAnalyzer";
  55. }
  56. Strigi::StreamThroughAnalyzer* newInstance() const {
  57. return new AuThroughAnalyzer(this);
  58. }
  59. void registerFields(Strigi::FieldRegister&);
  60. };
  61. #endif