Password authentication (stage 1 - without xosso-terminal)
[urpo] / src / urpoconnectionsettings.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 URPOCONNECTIONSETTINGS_H
24 #define URPOCONNECTIONSETTINGS_H
25
26 #include "urpoconnection.h"
27
28 /*!  Connection information, support storing settings
29
30   Setting are stored/loaded using QSettings
31
32     @author Arto Hyvättinen
33     @date 2010-06-11
34     @version 1
35   */
36 class UrpoConnectionSettings : public UrpoConnection
37 {
38 public:
39     /*!
40       @param organization Organization key for storing settings
41       @param application Application key for storing settings
42       */
43     UrpoConnectionSettings(const QString organization = QString(), const QString application=QString());
44
45
46     QString getHost() const;
47     QString getIdentity() const;
48     QString getUserid() const;
49
50     QString getPassword() const;
51     void setPassword(QString &password);
52
53     void setHost(const QString &host);
54     void setIdentity(const QString &password);
55     void setUserid(const QString &userid);
56
57     /*! Store settings via QSettings */
58     void store() const;
59     /*! Load settings via QSettings */
60     void load();
61
62 private:
63     QString host_;  /*! Host name or ip address */
64     QString identity_;  /*! Identity (private key) file path */
65     QString userid_; /*! Userid in remote host */
66     QString password_; /*! Password */
67
68     bool storePassword_; /*! Allow to store password */
69
70     QString organization_;  /*! Organization key storing settings */
71     QString application_; /*! Application key storing settings */
72
73
74 };
75
76 #endif // URPOCONNECTIONSETTINGS_H