File indexing completed on 2024-04-21 04:50:14

0001 /*
0002     SPDX-FileCopyrightText: 2010 Michal Malek <michalm@jabster.pl>
0003     SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef _K3B_PROJECT_INTERFACE_H_
0009 #define _K3B_PROJECT_INTERFACE_H_
0010 
0011 #include <KIO/Global>
0012 #include <QObject>
0013 #include <QString>
0014 #include <QStringList>
0015 
0016 /**
0017  * Base class for all project interfaces
0018  */
0019 namespace K3b {
0020     class Doc;
0021 
0022     class ProjectInterface : public QObject
0023     {
0024         Q_OBJECT
0025         Q_CLASSINFO( "D-Bus Interface", "org.k3b.Project" )
0026 
0027     public:
0028         explicit ProjectInterface( Doc* doc, const QString& dbusPath = QString() );
0029         ~ProjectInterface() override;
0030 
0031         QString dbusPath() const;
0032 
0033     public Q_SLOTS:
0034         void addUrls( const QStringList& urls );
0035         void addUrl( const QString& url );
0036 
0037         /**
0038         * Opens the burn dialog
0039         */
0040         void burn();
0041 
0042         /**
0043         * Starts the burning immediately
0044         * \return true if the burning could be started. Be aware that the return
0045         *         value does not say anything about the success of the burning
0046         *         process.
0047         */
0048         bool directBurn();
0049 
0050         void setBurnDevice( const QString& blockdevicename );
0051 
0052         /**
0053         * \return the length of the project in blocks (frames).
0054         */
0055         int length() const;
0056 
0057         /**
0058         * \return size of the project in bytes.
0059         */
0060         KIO::filesize_t size() const;
0061 
0062         const QString& imagePath() const;
0063 
0064         /**
0065         * \return A string representation of the project type. One of:
0066         * \li "data" - Data
0067         * \li "audiocd" - Audio CD
0068         * \li "mixedcd" - Mixed Mode CD
0069         * \li "videocd" - Video CD
0070         * \li "emovix" - eMovix
0071         * \li "videodvd" - Video DVD
0072         *
0073         * Be aware that this is not the same as Doc::documentType for historical reasons.
0074         */
0075         QString projectType() const;
0076 
0077     private:
0078         Doc* m_doc;
0079         QString m_dbusPath;
0080     };
0081 }
0082 
0083 #endif