.TH "Observer" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Observer \- Observer for \fBKIO::Job\fP progress information. Observer for \fBKIO::Job\fP progress information.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <observer.h>\fP
.PP
Inherits \fBQObject\fP, and \fBDCOPObject\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBslotTotalSize\fP (\fBKIO::Job\fP *, \fBKIO::filesize_t\fP size)"
.br
.ti -1c
.RI "void \fBslotTotalFiles\fP (\fBKIO::Job\fP *, unsigned long files)"
.br
.ti -1c
.RI "void \fBslotTotalDirs\fP (\fBKIO::Job\fP *, unsigned long dirs)"
.br
.ti -1c
.RI "void \fBslotProcessedSize\fP (\fBKIO::Job\fP *, \fBKIO::filesize_t\fP size)"
.br
.ti -1c
.RI "void \fBslotProcessedFiles\fP (\fBKIO::Job\fP *, unsigned long files)"
.br
.ti -1c
.RI "void \fBslotProcessedDirs\fP (\fBKIO::Job\fP *, unsigned long dirs)"
.br
.ti -1c
.RI "void \fBslotSpeed\fP (\fBKIO::Job\fP *, unsigned long bytes_per_second)"
.br
.ti -1c
.RI "void \fBslotPercent\fP (\fBKIO::Job\fP *, unsigned long percent)"
.br
.ti -1c
.RI "void \fBslotInfoMessage\fP (\fBKIO::Job\fP *, const \fBQString\fP &msg)"
.br
.ti -1c
.RI "void \fBslotCopying\fP (\fBKIO::Job\fP *, const \fBKURL\fP &from, const \fBKURL\fP &to)"
.br
.ti -1c
.RI "void \fBslotMoving\fP (\fBKIO::Job\fP *, const \fBKURL\fP &from, const \fBKURL\fP &to)"
.br
.ti -1c
.RI "void \fBslotDeleting\fP (\fBKIO::Job\fP *, const \fBKURL\fP &url)"
.br
.ti -1c
.RI "void \fBslotTransferring\fP (\fBKIO::Job\fP *, const \fBKURL\fP &url)"
.br
.ti -1c
.RI "void \fBslotCreatingDir\fP (\fBKIO::Job\fP *, const \fBKURL\fP &dir)"
.br
.ti -1c
.RI "void \fBslotCanResume\fP (\fBKIO::Job\fP *, \fBKIO::filesize_t\fP offset)"
.br
.in -1c
.SS "DCOP Member Functions"

.in +1c
.ti -1c
.RI "void \fBkillJob\fP (int progressId)"
.br
.ti -1c
.RI "\fBKIO::MetaData\fP \fBmetadata\fP (int progressId)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "int \fBnewJob\fP (\fBKIO::Job\fP *job, bool showProgress)"
.br
.ti -1c
.RI "void \fBjobFinished\fP (int progressId)"
.br
.ti -1c
.RI "bool \fBopenPassDlg\fP (const \fBQString\fP &prompt, \fBQString\fP &user, \fBQString\fP &pass, bool readOnly)"
.br
.ti -1c
.RI "bool \fBopenPassDlg\fP (\fBKIO::AuthInfo\fP &info)"
.br
.ti -1c
.RI "\fBKIO::RenameDlg_Result\fP \fBopen_RenameDlg\fP (\fBKIO::Job\fP *job, const \fBQString\fP &caption, const \fBQString\fP &src, const \fBQString\fP &dest, KIO::RenameDlg_Mode mode, \fBQString\fP &newDest, \fBKIO::filesize_t\fP sizeSrc=(\fBKIO::filesize_t\fP)-1, \fBKIO::filesize_t\fP sizeDest=(\fBKIO::filesize_t\fP)-1, time_t ctimeSrc=(time_t)-1, time_t ctimeDest=(time_t)-1, time_t mtimeSrc=(time_t)-1, time_t mtimeDest=(time_t)-1)"
.br
.ti -1c
.RI "KIO::SkipDlg_Result \fBopen_SkipDlg\fP (\fBKIO::Job\fP *job, bool multi, const \fBQString\fP &error_text)"
.br
.ti -1c
.RI "void \fBstating\fP (\fBKIO::Job\fP *, const \fBKURL\fP &url)"
.br
.ti -1c
.RI "void \fBmounting\fP (\fBKIO::Job\fP *, const \fBQString\fP &dev, const \fBQString\fP &point)"
.br
.ti -1c
.RI "void \fBunmounting\fP (\fBKIO::Job\fP *, const \fBQString\fP &point)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBObserver\fP * \fBself\fP ()"
.br
.ti -1c
.RI "static int \fBmessageBox\fP (int progressId, int type, const \fBQString\fP &text, const \fBQString\fP &caption, const \fBQString\fP &buttonYes, const \fBQString\fP &buttonNo)"
.br
.ti -1c
.RI "static int \fBmessageBox\fP (int progressId, int type, const \fBQString\fP &text, const \fBQString\fP &caption, const \fBQString\fP &buttonYes, const \fBQString\fP &buttonNo, const \fBQString\fP &dontAskAgainName)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "UIServer_stub * \fBm_uiserver\fP"
.br
.ti -1c
.RI "\fBQIntDict\fP< \fBKIO::Job\fP > \fBm_dctJobs\fP"
.br
.in -1c
.SS "Static Protected Attributes"

.in +1c
.ti -1c
.RI "static \fBObserver\fP * \fBs_pObserver\fP = 0L"
.br
.in -1c
.SH "Detailed Description"
.PP 
Observer for \fBKIO::Job\fP progress information. Observer for \fBKIO::Job\fP progress information. 

This class, of which there is always only one instance, 'observes' what jobs do and forwards this information to the progress-info server.
.PP
It is a DCOP object so that the UI server can call the kill method when the user presses Cancel.
.PP
Usually jobs are automatically registered by the \fBKIO::Scheduler\fP, so you do not have to care about that.
.PP
\fBAuthor:\fP
.RS 4
David Faure <faure@kde.org> 
.RE
.PP

.PP
Definition at line 55 of file observer.h.
.SH "Member Function Documentation"
.PP 
.SS "static \fBObserver\fP* Observer::self ()\fC [inline, static]\fP"
.PP
Returns the unique observer object. 
.PP
\fBReturns:\fP
.RS 4
the observer object 
.RE
.PP

.PP
Definition at line 66 of file observer.h.
.PP
Referenced by KIO::mimetype(), KIO::mount(), KIO::SlaveInterface::openPassDlg(), KIO::stat(), KIO::TransferJob::TransferJob(), and KIO::unmount().
.SS "int Observer::newJob (\fBKIO::Job\fP * job, bool showProgress)"
.PP
Called by the job constructor, to signal its presence to the UI Server. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the new job 
.br
\fIshowProgress\fP true to show progress, false otherwise 
.RE
.PP
\fBReturns:\fP
.RS 4
the progress ID assigned by the UI Server to the Job. 
.RE
.PP

.PP
Definition at line 81 of file observer.cpp.
.PP
References QIntDict::insert().
.SS "void Observer::jobFinished (int progressId)"
.PP
Called by the job destructor, to tell the UI Server that the job ended. 
.PP
\fBParameters:\fP
.RS 4
\fIprogressId\fP the progress ID of the job, as returned by \fBnewJob()\fP 
.RE
.PP

.PP
Definition at line 93 of file observer.cpp.
.PP
References QIntDict::remove().
.SS "bool Observer::openPassDlg (const \fBQString\fP & prompt, \fBQString\fP & user, \fBQString\fP & pass, bool readOnly)"
.PP
\fBDeprecated\fP
.RS 4
use KIO::AutoInfo 
.RE
.PP

.PP
Definition at line 227 of file observer.cpp.
.PP
References KIO::AuthInfo::password, KIO::AuthInfo::prompt, KIO::AuthInfo::readOnly, and KIO::AuthInfo::username.
.PP
Referenced by KIO::SlaveInterface::openPassDlg().
.SS "bool Observer::openPassDlg (\fBKIO::AuthInfo\fP & info)"
.PP
Opens a password dialog. 
.PP
\fBParameters:\fP
.RS 4
\fIinfo\fP the authentication information 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful ('ok' clicked), false otherwise 
.RE
.PP

.PP
Definition at line 244 of file observer.cpp.
.PP
References endl(), KIO::PasswordDialog::getNameAndPassword(), and kdDebug().
.SS "int Observer::messageBox (int progressId, int type, const \fBQString\fP & text, const \fBQString\fP & caption, const \fBQString\fP & buttonYes, const \fBQString\fP & buttonNo)\fC [static]\fP"
.PP
Popup a message box. 
.PP
See \fBKIO::SlaveBase\fP. This doesn't use DCOP anymore, it shows the dialog in the application's process. Otherwise, other apps would block when trying to communicate with \fBUIServer\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIprogressId\fP the progress ID of the job, as returned by \fBnewJob()\fP 
.br
\fItype\fP the type of the message box 
.br
\fItext\fP the text to show 
.br
\fIcaption\fP the window caption 
.br
\fIbuttonYes\fP the text of the 'Yes' button 
.br
\fIbuttonNo\fP the text of the 'No button 
.RE
.PP

.PP
Definition at line 260 of file observer.cpp.
.SS "int Observer::messageBox (int progressId, int type, const \fBQString\fP & text, const \fBQString\fP & caption, const \fBQString\fP & buttonYes, const \fBQString\fP & buttonNo, const \fBQString\fP & dontAskAgainName)\fC [static]\fP"
.PP
Popup a message box. 
.PP
See \fBKIO::SlaveBase\fP. This doesn't use DCOP anymore, it shows the dialog in the application's process. Otherwise, other apps would block when trying to communicate with \fBUIServer\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIprogressId\fP the progress ID of the job, as returned by \fBnewJob()\fP 
.br
\fItype\fP the type of the message box 
.br
\fItext\fP the text to show 
.br
\fIcaption\fP the window caption 
.br
\fIbuttonYes\fP the text of the 'Yes' button 
.br
\fIbuttonNo\fP the text of the 'No button 
.br
\fIdontAskAgainName\fP A checkbox is added with which further confirmation can be turned off. The string is used to lookup and store the setting in kioslaverc. 
.RE
.PP
\fBSince:\fP
.RS 4
3.3 
.RE
.PP

.PP
Definition at line 267 of file observer.cpp.
.PP
References QPtrList::append(), KSSLCertificate::chain(), QPtrList::count(), endl(), QDialog::exec(), KSSLCertificate::fromString(), KMessageBox::information(), kdDebug(), kdWarning(), KMessageBox::questionYesNo(), QPtrList::setAutoDelete(), KSSLCertChain::setChain(), KMessageBox::setDontShowAskAgainConfig(), KSSLInfoDlg::setup(), QStringList::split(), KMessageBox::warningContinueCancel(), KMessageBox::warningYesNo(), and KMessageBox::warningYesNoCancel().
.SS "void Observer::killJob (int progressId)"
.PP
Called by the UI Server (using DCOP) if the user presses cancel. 
.PP
\fBParameters:\fP
.RS 4
\fIprogressId\fP the progress ID of the job, as returned by \fBnewJob()\fP 
.RE
.PP

.PP
Definition at line 99 of file observer.cpp.
.SS "\fBMetaData\fP Observer::metadata (int progressId)"
.PP
Called by the UI Server (using DCOP) to get all the metadata of the job. 
.PP
\fBParameters:\fP
.RS 4
\fIprogressId\fP the progress IDof the job, as returned by \fBnewJob()\fP 
.RE
.PP

.PP
Definition at line 110 of file observer.cpp.
.SS "void Observer::slotTransferring (\fBKIO::Job\fP *, const \fBKURL\fP & url)\fC [slot]\fP"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 194 of file observer.cpp.
.PP
Referenced by KIO::TransferJob::TransferJob().

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