• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • knewstuff
 

knewstuff

  • KNS
  • Engine
Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KNS::Engine Class Reference

#include <engine.h>

Inherits TQObject.

Signals

void uploadFinished (bool result)
 

Public Member Functions

 Engine (KNewStuff *newStuff, const TQString &type, TQWidget *parentWidget=0)
 
 Engine (KNewStuff *newStuff, const TQString &type, const TQString &providerList, TQWidget *parentWidget=0)
 
virtual ~Engine ()
 
TQString type () const
 
TQWidget * parentWidget () const
 
void download ()
 
void upload (const TQString &fileName=TQString::null, const TQString &previewName=TQString::null)
 
void download (Entry *entry)
 
void requestMetaInformation (Provider *provider)
 
void upload (Entry *entry)
 
void ignoreInstallResult (bool ignore)
 

Protected Slots

void getMetaInformation (Provider::List *providers)
 
void selectUploadProvider (Provider::List *providers)
 
void slotNewStuffJobData (KIO::Job *job, const TQByteArray &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 (schum.nosp@m.ache.nosp@m.r@kde.nosp@m..org)
Maintainer:
Josef Spillner (spill.nosp@m.ner@.nosp@m.kde.o.nosp@m.rg)

Definition at line 51 of file engine.h.

Constructor & Destructor Documentation

Engine::Engine ( KNewStuff *  newStuff,
const TQString &  type,
TQWidget *  parentWidget = 0 
)

Constructor.

Parameters
newStuffa KNewStuff object
typethe Hotstuff data type such as "korganizer/calendar"
parentWidgetthe parent window

Definition at line 48 of file engine.cpp.

Engine::Engine ( KNewStuff *  newStuff,
const TQString &  type,
const TQString &  providerList,
TQWidget *  parentWidget = 0 
)

Constructor.

Parameters
newStuffa KNewStuff object
typethe Hotstuff data type such as "korganizer/calendar"
providerListthe URL of the provider list
parentWidgetthe parent window

Definition at line 59 of file engine.cpp.

Engine::~Engine ( )
virtual

Destructor.

Definition at line 72 of file engine.cpp.

Member Function Documentation

void Engine::download ( )

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

Definition at line 81 of file engine.cpp.

void Engine::download ( Entry *  entry)

Downloads the specified data file.

Parameters
entrythe Hotstuff data object to be downloaded

Definition at line 185 of file engine.cpp.

void Engine::ignoreInstallResult ( bool  ignore)

Ignores the return value of the install method.

Used internally to avoid showing of the success/failure dialog when installation is done in another place, like in KNewStuffSecure

Definition at line 425 of file engine.cpp.

TQWidget* KNS::Engine::parentWidget ( ) const
inline

Returns the previously set parent widget.

Returns
parent widget

Definition at line 91 of file engine.h.

void Engine::requestMetaInformation ( Provider *  provider)

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

Parameters
providerthe Hotstuff provider to request information from

Definition at line 258 of file engine.cpp.

TQString KNS::Engine::type ( ) const
inline

Returns the previously set data type.

Returns
the Hotstuff data type

Definition at line 84 of file engine.h.

void Engine::upload ( const TQString &  fileName = TQString::null,
const TQString &  previewName = TQString::null 
)

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

Parameters
fileNamename of the payload data file
previewNamename of the preview image file

Definition at line 227 of file engine.cpp.

void Engine::upload ( Entry *  entry)

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

Parameters
entrythe Hotstuff data object to be uploaded

Definition at line 271 of file engine.cpp.

void KNS::Engine::uploadFinished ( bool  result)
signal

Emitted when the upload has finished.

Parameters
resultindicates the success/failure of the upload

The documentation for this class was generated from the following files:
  • engine.h
  • engine.cpp

knewstuff

Skip menu "knewstuff"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

knewstuff

Skip menu "knewstuff"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for knewstuff by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |