1 /**************************************************************************
5 Unix Remote Printing Operation
6 Copyright (c) Arto Hyvättinen 2010
8 This file is part of URPO.
10 URPO is free software: you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
15 URPO is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
21 **************************************************************************/
25 #include "urpoconnection.h"
27 UrpoJob::UrpoJob(UrpoConnection* connection) :
30 connection_=connection;
31 // Connect debug monitor
32 if( connection_->getDebugMonitor())
33 connect(this,SIGNAL(debugMessage(QString)),connection_->getDebugMonitor(),SLOT(debugMessage(QString)));
39 void UrpoJob::sendDebugMessage(QString message)
41 emit debugMessage(message);
44 UrpoProcess* UrpoJob::newProcess()
46 UrpoProcess* process = new UrpoProcess( this );
47 // Connect debug monitor
48 connect( process, SIGNAL(debugMessage(QString)), connection_->getDebugMonitor(), SLOT(debugMessage(QString)));
52 void UrpoJob::finish(JobStatus status)
55 if( status == Successed )
61 void UrpoJob::fail(QString errorString)
64 emit finished(false, errorString);