Initial: added urpo files!
[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     void setHost(const QString &host);
51     void setIdentity(const QString &password);
52     void setUserid(const QString &userid);
53
54     /*! Store settings via QSettings */
55     void store() const;
56     /*! Load settings via QSettings */
57     void load();
58
59 private:
60     QString host_;  /*! Host name or ip address */
61     QString identity_;  /*! Identity (private key) file path */
62     QString userid_; /*! Userid in remote host */
63
64     bool storePassword_; /*! Allow to store password */
65
66     QString organization_;  /*! Organization key storing settings */
67     QString application_; /*! Application key storing settings */
68
69
70 };
71
72 #endif // URPOCONNECTIONSETTINGS_H