PageRenderTime 58ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/libtunepimp-0.5.3/plugins/flac/flac_meta.h

#
C Header | 64 lines | 21 code | 10 blank | 33 comment | 0 complexity | ed9caa1bec2837f5ddd8ddf91b8ec663 MD5 | raw file
Possible License(s): LGPL-2.1, LGPL-3.0, GPL-2.0, LGPL-2.0
  1. /*----------------------------------------------------------------------------
  2. libtunepimp -- The MusicBrainz tagging library.
  3. Let a thousand taggers bloom!
  4. Copyright (C) Robert Kaye 2003
  5. This file is part of libtunepimp.
  6. libtunepimp is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. libtunepimp 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
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with libtunepimp; if not, write to the Free Software
  16. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. $Id: flac_meta.h 1448 2006-01-14 00:29:50Z luks $
  18. ----------------------------------------------------------------------------*/
  19. //---------------------------------------------------------------------------
  20. // This code is based on vorbis.cpp and vorbis.cpp from FreeAmp. EMusic.com
  21. // has released this code into the Public Domain.
  22. // (Thanks goes to Brett Thomas, VP Engineering Emusic.com)
  23. //---------------------------------------------------------------------------
  24. // Portions (c) Copyright Kristian G. Kvilekval, and permission to use in LGPL
  25. // library granted on February 25th, 2003
  26. #ifndef INCLUDED_FLAC_META_H
  27. #define INCLUDED_FLAC_META_H
  28. #include <string>
  29. #include <assert.h>
  30. using namespace std;
  31. #include "metadata.h"
  32. #include "metadata_plugin.h"
  33. class FLAC : public MetadataPlugin
  34. {
  35. public:
  36. FLAC(const char *encoding) : encoding(encoding) {};
  37. virtual ~FLAC(void) {};
  38. bool write (const string &fileName, const Metadata &metadata, bool clear);
  39. bool read (const string &fileName, Metadata &metadata);
  40. void getError(string &error) { error = errString; };
  41. private:
  42. const string ConvertToISO(const char *utf8);
  43. string encoding;
  44. string errString;
  45. };
  46. #endif