korganizer Library API Documentation

KNS::Engine Class Reference

Central class combining all possible KNewStuff operations. More...

#include <engine.h>

Inheritance diagram for KNS::Engine:

Inheritance graph
[legend]
Collaboration diagram for KNS::Engine:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Engine (KNewStuff *newStuff, const QString &type, QWidget *parentWidget=0)
virtual ~Engine ()
QString type () const
QWidgetparentWidget () const
void download ()
void upload (const QString &fileName=QString::null, const QString &previewName=QString::null)
void download (Entry *entry)
void requestMetaInformation (Provider *provider)
void upload (Entry *entry)

Protected Slots

void getMetaInformation (Provider::List *providers)
void selectUploadProvider (Provider::List *providers)
void slotNewStuffJobData (KIO::Job *job, const QByteArray &data)
void slotNewStuffJobResult (KIO::Job *job)
void slotDownloadJobResult (KIO::Job *job)
void slotUploadPayloadJobResult (KIO::Job *job)
void slotUploadPreviewJobResult (KIO::Job *job)
void slotUploadMetaJobResult (KIO::Job *job)

Protected Member Functions

bool createMetaFile (Entry *)

Detailed Description

Central class combining all possible KNewStuff operations.

In most cases, Engine objects are built and used internally. Using this class explicitely does however give fine-grained control about the upload and download operations.

Author:
Cornelius Schumacher (schumacher@kde.org)
Maintainer:
Josef Spillner (spillner@kde.org)

Definition at line 51 of file engine.h.


Constructor & Destructor Documentation

Engine::Engine KNewStuff newStuff,
const QString type,
QWidget parentWidget = 0
 

Constructor.

Parameters:
newStuff a KNewStuff object
type the Hotstuff data type such as "korganizer/calendar"
parentWidget the parent window

Definition at line 42 of file engine.cpp.

Engine::~Engine  )  [virtual]
 

Destructor.

Definition at line 53 of file engine.cpp.


Member Function Documentation

QString KNS::Engine::type  )  const [inline]
 

Returns the previously set data type.

Returns:
the Hotstuff data type

Definition at line 74 of file engine.h.

Referenced by KNewStuff::type().

QWidget* KNS::Engine::parentWidget  )  const [inline]
 

Returns the previously set parent widget.

Returns:
parent widget

Definition at line 81 of file engine.h.

Referenced by KNewStuff::parentWidget().

void Engine::download  ) 
 

Initiates the download process, retrieving provider lists and invoking the download dialog.

Definition at line 61 of file engine.cpp.

References KNS::ProviderLoader::load().

Referenced by KNewStuff::download().

void Engine::upload const QString fileName = QString::null,
const QString previewName = QString::null
 

Initiates the upload process, invoking the provider selection dialog and the file upload dialog.

Parameters:
fileName name of the payload data file
previewName name of the preview image file

Definition at line 204 of file engine.cpp.

References KNS::ProviderLoader::load().

Referenced by KNewStuff::upload().

void Engine::download Entry entry  ) 
 

Downloads the specified data file.

Parameters:
entry the Hotstuff data object to be downloaded

Definition at line 165 of file engine.cpp.

References KNewStuff::downloadDestination(), and KNS::Entry::payload().

void Engine::requestMetaInformation Provider provider  ) 
 

Asynchronous lookup of provider information such as upload and download locations, icon etc.

Parameters:
provider the Hotstuff provider to request information from

Definition at line 235 of file engine.cpp.

References KNS::UploadDialog::setPreviewFile().

void Engine::upload Entry entry  ) 
 

Uploads the specified data file to the provider-dependent location.

Parameters:
entry the Hotstuff data object to be uploaded

Definition at line 247 of file engine.cpp.

References KNewStuff::createUploadFile(), KNS::Entry::fullName(), KNS::Entry::langs(), KNS::Provider::noUpload(), KNS::Provider::noUploadUrl(), KNS::Entry::setPayload(), and KNS::Provider::uploadUrl().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Apr 4 04:50:02 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003