File indexing completed on 2024-04-21 04:57:03

0001 /* This file is part of the KDE project
0002 
0003    Copyright (C) 2007 by Javier Goday <jgoday@gmail.com>
0004    Copyright (C) 2009 by Dario Massarin <nekkar@libero.it>
0005 
0006    This program is free software; you can redistribute it and/or
0007    modify it under the terms of the GNU General Public
0008    License as published by the Free Software Foundation; either
0009    version 2 of the License, or (at your option) any later version.
0010 */
0011 #ifndef KGETGLOBALJOB_H
0012 #define KGETGLOBALJOB_H
0013 
0014 #include <KIO/Job>
0015 
0016 class TransferHandler;
0017 
0018 class KGetGlobalJob : public KJob
0019 {
0020     Q_OBJECT
0021 public:
0022     KGetGlobalJob(QObject *parent = nullptr);
0023     ~KGetGlobalJob() override;
0024 
0025     void update();
0026 
0027     void start() override
0028     {
0029     }
0030 
0031 Q_SIGNALS:
0032     /**
0033      * Emitted when doKill is called, e.g. when the gui is closed.
0034      * Not handling this signal might lead to a crash if something tries to
0035      * access the then non-existing gui.
0036      * @param job is this
0037      * @param handler is always nullptr suggesting that all TransferHandlers should be stopped
0038      */
0039     void requestStop(KJob *job, TransferHandler *handler);
0040 
0041 protected:
0042     bool doKill() override;
0043 };
0044 
0045 #endif