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 #ifndef URPOCONNECTION_H
24 #define URPOCONNECTION_H
30 /*! Information about ssh connection (abstract)
32 @author Arto Hyvättinen
44 virtual ~UrpoConnection();
46 /*! Host name or ip address
48 @return Server host name of ip address */
49 virtual QString getHost() const = 0;
53 @return userid in server */
54 virtual QString getUserid() const = 0;
58 ssh identity file (private key)
60 @return ssh identity file path */
61 virtual QString getIdentity() const = 0;
63 /*! Default time out in connection
65 Connection fais if connecting or commanding lasts
68 @return default timeout in msecs */
73 Debug monitor is QObject receiving debugMsg(QString&) signals.
74 @param monitor QObject receiving debug messages */
75 void setDebugMonitor(QObject* monitor);
77 /*! Get pointer to Debug monitor
79 Debug monitor is QObject receiving debugMsg(QString&) signals.
80 @return QObject receiving debug messages */
81 QObject* getDebugMonitor() const;
83 /*! user@@host -string
86 @return user@@host -string
88 QString getHostString();
90 /*! Key option needed for ssh
93 @return -i key_file or empty if no keyfile
95 QString getKeyOption();
98 /*! Receiver for debugMsg(QString&) signals */
99 QObject* debugMonitor_;
102 #endif // URPOCONNECTION_H