File indexing completed on 2024-10-06 04:26:00

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 
0009 #ifndef _K3B_INTERFACE_H_
0010 #define _K3B_INTERFACE_H_
0011 
0012 #include <QObject>
0013 #include <QString>
0014 #include <QStringList>
0015 
0016 
0017 namespace K3b {
0018     class MainWindow;
0019 
0020     class Interface : public QObject
0021     {
0022         Q_OBJECT
0023         Q_CLASSINFO( "D-Bus Interface", "org.k3b.MainWindow" )
0024 
0025     public:
0026         explicit Interface( MainWindow* main );
0027         ~Interface() override;
0028 
0029     public Q_SLOTS:
0030         /**
0031         * Returns a D-BUS path to a newly created project
0032         */
0033         QString createDataProject();
0034         QString createAudioProject();
0035         QString createMixedProject();
0036         QString createVcdProject();
0037         QString createMovixProject();
0038         QString createVideoDvdProject();
0039 
0040         /**
0041         * Returns a D-BUS path to the currently active project.
0042         */
0043         QString currentProject();
0044 
0045         QString openProject( const QString& url );
0046 
0047         QStringList projects();
0048 
0049         void copyMedium();
0050         void copyMedium( const QString& dev );
0051         void formatMedium();
0052         void writeImage();
0053         void writeImage( const QString& url );
0054 
0055         void audioCdRip();
0056         void audioCdRip( const QString& dev );
0057         void videoCdRip();
0058         void videoCdRip( const QString& dev );
0059         void videoDvdRip();
0060         void videoDvdRip( const QString& dev );
0061 
0062         /**
0063         * Add URLs to the current active project.
0064         * If no project is open a new Audio or Data CD
0065         * project will be created depending on the type
0066         * of the first file.
0067         */
0068         void addUrls( const QStringList& urls );
0069         void addUrl( const QString& url );
0070 
0071         /**
0072         * @return true if currently some job is running.
0073         */
0074         bool blocked() const;
0075 
0076     private:
0077         MainWindow* m_main;
0078     };
0079 }
0080 
0081 #endif