.TH "KNewStuffSecure" kde3 "11 Jun 2005" "Version Version 3.4.1" "knewstuff Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KNewStuffSecure \- Makes possible downloading and installing signed resource files from a server.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <knewstuffsecure.h>\fP
.PP
Inherits \fBQObject\fP, and \fBKNewStuff\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBinstallFinished\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKNewStuffSecure\fP (const \fBQString\fP &type, \fBQWidget\fP *parentWidget=0)"
.br
.ti -1c
.RI "bool \fBinstall\fP (const \fBQString\fP &fileName)"
.br
.ti -1c
.RI "bool \fBcreateUploadFile\fP (const \fBQString\fP &fileName)"
.br
.ti -1c
.RI "void \fBdownloadResource\fP ()"
.br
.ti -1c
.RI "void \fBuploadResource\fP (const \fBQString\fP &fileName)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBinstallResource\fP ()=0"
.br
.ti -1c
.RI "void \fBremoveTempDirectory\fP ()"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "KTempDir * \fBm_tempDir\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_tarName\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBm_signedFileName\fP"
.br
.ti -1c
.RI "\fBQMap\fP< \fBQString\fP, \fBQString\fP > \fBm_installedResources\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Makes possible downloading and installing signed resource files from a server. 

You must subclass it and implement the \fBinstallResource()\fP pure virtual method to install a resource. For uploading you must create a resource tarball (which is installabale by \fBinstallResource()\fP) and call the \fBuploadResource()\fP method with this tarball as the argument. Signing and verification is done by the gpg application, so the user must have it installed, otherwise this class does not give any extra security compared to the standard \fBKNewStuff\fP class.
.PP
\fBSince:\fP
.RS 4
3.4
.RE
.PP
\fBAuthor:\fP
.RS 4
Andras Mantia <amantia@kde.org> 
.RE
.PP

.PP
Definition at line 40 of file knewstuffsecure.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KNewStuffSecure::KNewStuffSecure (const \fBQString\fP & type, \fBQWidget\fP * parentWidget = \fC0\fP)"
.PP
Constructor. 
.PP
\fBParameters:\fP
.RS 4
\fItype\fP type of data to be handled, should be something like korganizer/calendar, kword/template, kdesktop/wallpaper 
.br
\fIparentWidget\fP parent widget of dialogs opened by the \fBKNewStuff\fP engine 
.RE
.PP

.PP
Definition at line 36 of file knewstuffsecure.cpp.
.PP
References QObject::connect(), and KNewStuff::engine().
.SH "Member Function Documentation"
.PP 
.SS "bool KNewStuffSecure::install (const \fBQString\fP & fileName)\fC [virtual]\fP"
.PP
Installs the downloaded resource. 
.PP
Do not call or reimplement directly. It's reimplemented from \fBKNewStuff\fP for internal reasons. 
.PP
Implements \fBKNewStuff\fP.
.PP
Definition at line 49 of file knewstuffsecure.cpp.
.PP
References QObject::connect(), QString::isEmpty(), KNewStuff::parentWidget(), QString::prepend(), and removeTempDirectory().
.SS "bool KNewStuffSecure::createUploadFile (const \fBQString\fP & fileName)\fC [virtual]\fP"
.PP
Reimplemented for internal reasons. 
.PP
Implements \fBKNewStuff\fP.
.PP
Definition at line 168 of file knewstuffsecure.cpp.
.SS "void KNewStuffSecure::downloadResource ()"
.PP
Initiates a download. 
.PP
This is the method that must be called in order to download a signed resource. 
.PP
Definition at line 160 of file knewstuffsecure.cpp.
.PP
References KNewStuff::download(), KNewStuff::engine(), and KNS::Engine::ignoreInstallResult().
.SS "void KNewStuffSecure::uploadResource (const \fBQString\fP & fileName)"
.PP
Signs the file and uploads to the central server. 
.PP
\fBParameters:\fP
.RS 4
\fIfileName\fP The file to be signed and uploaded 
.RE
.PP

.PP
Definition at line 174 of file knewstuffsecure.cpp.
.PP
References QObject::connect(), QFileInfo::fileName(), and removeTempDirectory().
.SS "virtual void KNewStuffSecure::installResource ()\fC [protected, pure virtual]\fP"
.PP
Installs the resource specified by m_tarName. 
.PP
Implement it in the subclass. 
.SS "void KNewStuffSecure::removeTempDirectory ()\fC [protected]\fP"
.PP
Removes the temporary directory m_tempDir. 
.PP
Definition at line 230 of file knewstuffsecure.cpp.
.PP
References KNewStuff::parentWidget().
.PP
Referenced by install(), and uploadResource().

.SH "Author"
.PP 
Generated automatically by Doxygen for knewstuff Library from the source code.
