From 50b48aec6ddd451a6d1709c0942477b503457663 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 3 Feb 2010 02:15:56 +0000 Subject: Added abandoned KDE3 version of K3B git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1084400 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libk3bdevice/k3btoc.h | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 libk3bdevice/k3btoc.h (limited to 'libk3bdevice/k3btoc.h') diff --git a/libk3bdevice/k3btoc.h b/libk3bdevice/k3btoc.h new file mode 100644 index 0000000..adfba74 --- /dev/null +++ b/libk3bdevice/k3btoc.h @@ -0,0 +1,101 @@ +/* + * + * $Id: k3btoc.h 619556 2007-01-03 17:38:12Z trueg $ + * Copyright (C) 2003-2007 Sebastian Trueg + * + * This file is part of the K3b project. + * Copyright (C) 1998-2007 Sebastian Trueg + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * See the file "COPYING" for the exact licensing terms. + */ + + +#ifndef K3BTOC_H +#define K3BTOC_H + +#include +#include + +#include + +#include "k3btrack.h" +#include "k3bdevice_export.h" +class QString; + +namespace K3bDevice +{ + + enum ContentsType { + DATA, + AUDIO, + MIXED, + NONE // no tracks + }; + + /** + * A list of K3bTracks that represents the contents + * of a cd. + * The Toc deletes all its tracks when it is deleted and + * deletes removed tracks. + */ + class LIBK3BDEVICE_EXPORT Toc : public QValueList + { + public: + Toc(); + /** deep copy */ + Toc( const Toc& ); + /** deletes all tracks */ + ~Toc(); + /** deep copy */ + Toc& operator=( const Toc& ); + + /** + * CDDB disc Id + */ + unsigned int discId() const; + + const QCString& mcn() const { return m_mcn; } + + /** + * determine the contents type based on the tracks' types. + * Audio, Data, or Mixed + */ + int contentType() const; + + /** + * \return the number of sessions in this TOC. + */ + int sessions() const; + + /** + * The first track's first sector could differ from the disc's + * first sector if there is a pregap before index 1 + */ + const K3b::Msf& firstSector() const; + K3b::Msf lastSector() const; + K3b::Msf length() const; + + void setFirstSector( int i ) { m_firstSector = i; } + + void setMcn( const QCString& mcn ) { m_mcn = mcn; } + + void clear(); + + void debug() const; + + bool operator==( const Toc& ) const; + bool operator!=( const Toc& ) const; + + private: + unsigned int m_discId; + K3b::Msf m_firstSector; + + QCString m_mcn; + }; +} + +#endif -- cgit v1.2.3