home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / libkcddb / cache.h next >
Encoding:
C/C++ Source or Header  |  2007-01-15  |  1.7 KB  |  58 lines

  1. /*
  2.   Copyright (C) 2002 Rik Hemsley (rikkus) <rik@kde.org>
  3.   Copyright (C) 2002 Benjamin Meyer <ben-devel@meyerhome.net>
  4.   Copyright (C) 2002 Nadeem Hasan <nhasan@kde.org>
  5.  
  6.   This library is free software; you can redistribute it and/or
  7.   modify it under the terms of the GNU Library General Public
  8.   License as published by the Free Software Foundation; either
  9.   version 2 of the License, or (at your option) any later version.
  10.  
  11.   This library is distributed in the hope that it will be useful,
  12.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.   Library General Public License for more details.
  15.  
  16.   You should have received a copy of the GNU Library General Public License
  17.   along with this library; see the file COPYING.LIB.  If not, write to
  18.   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.   Boston, MA 02111-1307, USA.
  20. */
  21.  
  22. #ifndef KCDDB_CACHE_H
  23. #define KCDDB_CACHE_H
  24.  
  25. #include <qpair.h>
  26. #include <qstring.h>
  27.  
  28. #include "cdinfo.h"
  29. #include <kdemacros.h>
  30. namespace KCDDB
  31. {
  32.   class KDE_EXPORT Cache
  33.   {
  34.     public:
  35.  
  36.       enum Policy
  37.       {
  38.         Only,
  39.         Use,
  40.         Ignore
  41.       };
  42.  
  43.       static CDInfoList lookup( const QString & );
  44.       static void store( const CDInfoList & );
  45.       // KDE4: Should probably take a TrackOffsetList too, so
  46.       // the list can be stored in the file, and we can make
  47.       // sure the discid is correct (had to do the same fix in
  48.       // both kscd and kaudiocreator)
  49.       static void store( const CDInfo & );
  50.  
  51.     private:
  52.       static QString fileName( const QString &category, const QString& discid, const QString &cacheDir );
  53.   };
  54. }
  55.  
  56. #endif // KCDDB_CACHE_H
  57. // vim:tabstop=2:shiftwidth=2:expandtab:cinoptions=(s,U1,m1
  58.