\section{KNew\-Stuff\-Secure Class Reference}
\label{classKNewStuffSecure}\index{KNewStuffSecure@{KNewStuffSecure}}
Makes possible downloading and installing signed resource files from a server.  


{\tt \#include $<$knewstuffsecure.h$>$}

Inheritance diagram for KNew\-Stuff\-Secure:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=84pt]{classKNewStuffSecure__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KNew\-Stuff\-Secure:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=227pt]{classKNewStuffSecure__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf install\-Finished} ()\label{classKNewStuffSecure_l0}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KNew\-Stuff\-Secure} (const {\bf QString} \&type, {\bf QWidget} $\ast$parent\-Widget=0)
\item 
bool {\bf install} (const {\bf QString} \&file\-Name)
\item 
bool {\bf create\-Upload\-File} (const {\bf QString} \&file\-Name)
\item 
void {\bf download\-Resource} ()
\item 
void {\bf upload\-Resource} (const {\bf QString} \&file\-Name)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf install\-Resource} ()=0
\item 
void {\bf remove\-Temp\-Directory} ()
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
KTemp\-Dir $\ast$ {\bf m\_\-temp\-Dir}\label{classKNewStuffSecure_p0}

\item 
{\bf QString} {\bf m\_\-tar\-Name}\label{classKNewStuffSecure_p1}

\item 
{\bf QString} {\bf m\_\-signed\-File\-Name}\label{classKNewStuffSecure_p2}

\item 
{\bf QMap}$<$ {\bf QString}, {\bf QString} $>$ {\bf m\_\-installed\-Resources}\label{classKNewStuffSecure_p3}

\end{CompactItemize}


\subsection{Detailed Description}
Makes possible downloading and installing signed resource files from a server. 

You must subclass it and implement the {\bf install\-Resource()}{\rm (p.\,\pageref{classKNewStuffSecure_b0})} pure virtual method to install a resource. For uploading you must create a resource tarball (which is installabale by {\bf install\-Resource()}{\rm (p.\,\pageref{classKNewStuffSecure_b0})}) and call the {\bf upload\-Resource()}{\rm (p.\,\pageref{classKNewStuffSecure_a5})} 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 {\bf KNew\-Stuff}{\rm (p.\,\pageref{classKNewStuff})} class.

\begin{Desc}
\item[Since:]3.4\end{Desc}
\begin{Desc}
\item[Author:]Andras Mantia $<${\tt amantia@kde.org}$>$ \end{Desc}




Definition at line 40 of file knewstuffsecure.h.

\subsection{Constructor \& Destructor Documentation}
\index{KNewStuffSecure@{KNew\-Stuff\-Secure}!KNewStuffSecure@{KNewStuffSecure}}
\index{KNewStuffSecure@{KNewStuffSecure}!KNewStuffSecure@{KNew\-Stuff\-Secure}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KNew\-Stuff\-Secure::KNew\-Stuff\-Secure (const {\bf QString} \& {\em type}, {\bf QWidget} $\ast$ {\em parent\-Widget} = {\tt 0})}\label{classKNewStuffSecure_a0}


Constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]type of data to be handled, should be something like korganizer/calendar, kword/template, kdesktop/wallpaper \item[{\em parent\-Widget}]parent widget of dialogs opened by the {\bf KNew\-Stuff}{\rm (p.\,\pageref{classKNewStuff})} engine \end{description}
\end{Desc}


Definition at line 36 of file knewstuffsecure.cpp.

References QObject::connect(), and KNew\-Stuff::engine().

\subsection{Member Function Documentation}
\index{KNewStuffSecure@{KNew\-Stuff\-Secure}!install@{install}}
\index{install@{install}!KNewStuffSecure@{KNew\-Stuff\-Secure}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KNew\-Stuff\-Secure::install (const {\bf QString} \& {\em file\-Name})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNewStuffSecure_a2}


Installs the downloaded resource. 

Do not call or reimplement directly. It's reimplemented from {\bf KNew\-Stuff}{\rm (p.\,\pageref{classKNewStuff})} for internal reasons. 

Implements {\bf KNew\-Stuff} {\rm (p.\,\pageref{classKNewStuff_a8})}.

Definition at line 49 of file knewstuffsecure.cpp.

References QObject::connect(), QString::is\-Empty(), KNew\-Stuff::parent\-Widget(), QString::prepend(), and remove\-Temp\-Directory().\index{KNewStuffSecure@{KNew\-Stuff\-Secure}!createUploadFile@{createUploadFile}}
\index{createUploadFile@{createUploadFile}!KNewStuffSecure@{KNew\-Stuff\-Secure}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KNew\-Stuff\-Secure::create\-Upload\-File (const {\bf QString} \& {\em file\-Name})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNewStuffSecure_a3}


Reimplemented for internal reasons. 



Implements {\bf KNew\-Stuff} {\rm (p.\,\pageref{classKNewStuff_a9})}.

Definition at line 168 of file knewstuffsecure.cpp.\index{KNewStuffSecure@{KNew\-Stuff\-Secure}!downloadResource@{downloadResource}}
\index{downloadResource@{downloadResource}!KNewStuffSecure@{KNew\-Stuff\-Secure}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KNew\-Stuff\-Secure::download\-Resource ()}\label{classKNewStuffSecure_a4}


Initiates a download. 

This is the method that must be called in order to download a signed resource. 

Definition at line 160 of file knewstuffsecure.cpp.

References KNew\-Stuff::download(), KNew\-Stuff::engine(), and KNS::Engine::ignore\-Install\-Result().\index{KNewStuffSecure@{KNew\-Stuff\-Secure}!uploadResource@{uploadResource}}
\index{uploadResource@{uploadResource}!KNewStuffSecure@{KNew\-Stuff\-Secure}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KNew\-Stuff\-Secure::upload\-Resource (const {\bf QString} \& {\em file\-Name})}\label{classKNewStuffSecure_a5}


Signs the file and uploads to the central server. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em file\-Name}]The file to be signed and uploaded \end{description}
\end{Desc}


Definition at line 174 of file knewstuffsecure.cpp.

References QObject::connect(), QFile\-Info::file\-Name(), and remove\-Temp\-Directory().\index{KNewStuffSecure@{KNew\-Stuff\-Secure}!installResource@{installResource}}
\index{installResource@{installResource}!KNewStuffSecure@{KNew\-Stuff\-Secure}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KNew\-Stuff\-Secure::install\-Resource ()\hspace{0.3cm}{\tt  [protected, pure virtual]}}\label{classKNewStuffSecure_b0}


Installs the resource specified by m\_\-tar\-Name. 

Implement it in the subclass. \index{KNewStuffSecure@{KNew\-Stuff\-Secure}!removeTempDirectory@{removeTempDirectory}}
\index{removeTempDirectory@{removeTempDirectory}!KNewStuffSecure@{KNew\-Stuff\-Secure}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KNew\-Stuff\-Secure::remove\-Temp\-Directory ()\hspace{0.3cm}{\tt  [protected]}}\label{classKNewStuffSecure_b1}


Removes the temporary directory m\_\-temp\-Dir. 



Definition at line 230 of file knewstuffsecure.cpp.

References KNew\-Stuff::parent\-Widget().

Referenced by install(), and upload\-Resource().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
knewstuffsecure.h\item 
knewstuffsecure.cpp\end{CompactItemize}
