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 **************************************************************************/
23 #include "urpoconnection.h"
26 UrpoConnection::UrpoConnection()
31 UrpoConnection::~UrpoConnection()
37 QObject* UrpoConnection::getDebugMonitor() const
42 void UrpoConnection::setDebugMonitor(QObject *monitor)
44 debugMonitor_ = monitor;
47 QString UrpoConnection::getHostString()
49 // Get string user@host OR host (if userid empty)
51 if( !getUserid().isEmpty())
52 hostString=getUserid() + "@";
53 hostString.append( getHost());
57 QString UrpoConnection::getKeyOption()
59 if( getIdentity().isEmpty())
60 return QString(); // No identity
62 return QString("-i ").append(getIdentity() + " ");