korganizer Library API Documentation

engine.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018     Boston, MA 02111-1307, USA.
00019 */
00020 #ifndef KNEWSTUFF_ENGINE_H
00021 #define KNEWSTUFF_ENGINE_H
00022 
00023 #include <qmap.h>
00024 #include <qobject.h>
00025 #include <qstring.h>
00026 
00027 #include "entry.h"
00028 #include "provider.h"
00029 
00030 namespace KIO { class Job; }
00031 
00032 class KNewStuff;
00033 
00034 namespace KNS {
00035 
00036 class DownloadDialog;
00037 class UploadDialog;
00038 class ProviderDialog;
00039 
00040 class Engine : public QObject
00041 {
00042     Q_OBJECT
00043   public:
00044     Engine( KNewStuff *, const QString &, QWidget *parentWidget = 0 );
00045     virtual ~Engine();
00046     
00047     void download();
00048     void upload();
00049 
00050     void download( Entry * );
00051 
00052     void requestMetaInformation( Provider * );
00053     
00054     void upload( Entry * );
00055     
00056   protected slots:
00057     void getMetaInformation( Provider::List *providers );
00058     void selectUploadProvider( Provider::List *providers );
00059 
00060     void slotNewStuffJobData( KIO::Job *job, const QByteArray &data );
00061     void slotNewStuffJobResult( KIO::Job *job );
00062     
00063     void slotDownloadJobResult( KIO::Job *job );
00064 
00065     void slotUploadPayloadJobResult( KIO::Job *job );
00066     void slotUploadMetaJobResult( KIO::Job *job );
00067 
00068   protected:
00069     bool createMetaFile( Entry * );
00070 
00071   private:
00072     QWidget *mParentWidget;
00073   
00074     ProviderLoader *mProviderLoader;
00075   
00076     QMap<KIO::Job *,QCString> mNewStuffJobData;
00077     
00078     QPtrList<Entry> mNewStuffList;
00079     
00080     DownloadDialog *mDownloadDialog;
00081     UploadDialog *mUploadDialog;
00082     ProviderDialog *mProviderDialog;
00083     
00084     QString mDownloadDestination;
00085     
00086     Provider *mUploadProvider;
00087 
00088     QString mUploadMetaFile;
00089 
00090     KNewStuff *mNewStuff;
00091 
00092     QString mType;
00093 };
00094 
00095 }
00096 
00097 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:41:08 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001