X-Git-Url: http://git.maemo.org/git/?p=urpo;a=blobdiff_plain;f=src%2Furpoconnection.cpp;fp=src%2Furpoconnection.cpp;h=c2e91dc50666fff92a92f5c5e18e0f953c0b0368;hp=0000000000000000000000000000000000000000;hb=aa700f245d7c8ea96728266237f42691836baf74;hpb=d86a98ca60a68eedd68f03ef05b74a90d20cde20 diff --git a/src/urpoconnection.cpp b/src/urpoconnection.cpp new file mode 100644 index 0000000..c2e91dc --- /dev/null +++ b/src/urpoconnection.cpp @@ -0,0 +1,63 @@ +/************************************************************************** + + URPO + + Unix Remote Printing Operation + Copyright (c) Arto Hyvättinen 2010 + + This file is part of URPO. + + URPO is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + URPO is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + +**************************************************************************/ + +#include "urpoconnection.h" + + +UrpoConnection::UrpoConnection() +{ + debugMonitor_ = 0; +} + +UrpoConnection::~UrpoConnection() +{ + +} + + +QObject* UrpoConnection::getDebugMonitor() const +{ + return debugMonitor_; +} + +void UrpoConnection::setDebugMonitor(QObject *monitor) +{ + debugMonitor_ = monitor; +} + +QString UrpoConnection::getHostString() +{ + // Get string user@host OR host (if userid empty) + QString hostString; + if( !getUserid().isEmpty()) + hostString=getUserid() + "@"; + hostString.append( getHost()); + return hostString; +} + +QString UrpoConnection::getKeyOption() +{ + if( getIdentity().isEmpty()) + return QString(); // No identity + else + return QString("-i ").append(getIdentity() + " "); +}