knewstuff Library API Documentation

TestNewStuff Class Reference

Inheritance diagram for TestNewStuff:

Inheritance graph
[legend]
Collaboration diagram for TestNewStuff:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TestNewStuff ()
bool install (const QString &fileName)
bool createUploadFile (const QString &fileName)

Detailed Description

Definition at line 33 of file testnewstuff.h.


Member Function Documentation

bool TestNewStuff::install const QString fileName  )  [virtual]
 

Install file to application.

The given fileName points to the file downloaded by the KNewStuff engine. This is a temporary file by default. The application can do whatever is needed to handle the information contained in the file.

The function returns true, when the installation was successful and false if were errors.

Parameters:
fileName name of downloaded file

Implements KNewStuff.

Definition at line 40 of file testnewstuff.cpp.

References QFile::open(), and QTextStream::read().

bool TestNewStuff::createUploadFile const QString fileName  )  [virtual]
 

Create a file to be uploaded to a "new stuff provider" and return the filename.

The format of the file is application specific. The only constraint is that the corresponding install() implementation is able to use the file.

Parameters:
fileName name of the file to be written
Returns:
true on success, false on error.

Implements KNewStuff.

Definition at line 55 of file testnewstuff.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for knewstuff Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Sep 15 10:53:06 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003