No password authentication - it does not work!
[urpo] / src / urpoconnection.h
1 /**************************************************************************
2
3     URPO
4
5     Unix Remote Printing Operation
6     Copyright (c) Arto Hyvättinen 2010
7
8     This file is part of URPO.
9
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.
14
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.
19
20
21 **************************************************************************/
22
23 #ifndef URPOCONNECTION_H
24 #define URPOCONNECTION_H
25
26
27 #include <QString>
28 class QObject;
29
30 /*! Information about ssh connection (abstract)
31
32 @author Arto Hyvättinen
33 @date 2010-06-11
34 @version 1
35 @abstract
36
37
38   */
39 class UrpoConnection
40 {
41 protected:
42     UrpoConnection();
43 public:
44     virtual ~UrpoConnection();
45
46     /*! Host name or ip address
47
48       @return Server host name of ip address */
49     virtual QString getHost() const = 0;
50
51     /*! Userid in server
52
53       @return userid in server */
54     virtual QString getUserid() const = 0;
55
56     /*! Identity file
57
58       ssh identity file (private key)
59
60       @return ssh identity file path */
61     virtual QString getIdentity() const = 0;
62
63     /*! Default time out in connection
64
65       Connection fais if connecting or commanding lasts
66       more than timeout.
67
68       @return default timeout in msecs */
69
70
71     /*! Set Debug monitor
72
73       Debug monitor is QObject receiving debugMsg(QString&) signals.
74       @param monitor QObject receiving debug messages */
75     void setDebugMonitor(QObject* monitor);
76
77     /*! Get pointer to Debug monitor
78
79       Debug monitor is QObject receiving debugMsg(QString&) signals.
80       @return QObject receiving debug messages */
81     QObject* getDebugMonitor() const;
82
83     /*! user@@host -string
84
85
86       @return user@@host -string
87       */
88     QString getHostString();
89
90     /*!  Key option needed for ssh
91
92
93         @return -i key_file or empty if no keyfile
94       */
95     QString getKeyOption();
96
97 private:
98     /*! Receiver for debugMsg(QString&) signals */
99     QObject* debugMonitor_;
100 };
101
102 #endif // URPOCONNECTION_H