qtmeetings sources to Maemo garage
[qtmeetings] / src / Domain / Configuration / ConnectionSettings.h
1 #ifndef CONNECTION_H_\r
2 #define CONNECTION_H_\r
3 \r
4 #include <QString>\r
5 #include <QUrl>\r
6 \r
7 //! Domain class. Stores connection information.\r
8 /*!\r
9  * Domain class. Stores connection information like server url, username, password and refresh\r
10  * interval.\r
11  */\r
12 class ConnectionSettings\r
13 {\r
14 public:\r
15         //! Constructor.\r
16         /*!\r
17          * Overloaded. Constructor to initialize a ConnectionSettings instance.\r
18          * \param aServerUrl The URL of the Exchange server.\r
19          * \param aUsername The username used to log in to the server.\r
20          * \param aPassword The password used to log in to the server.\r
21          * \param aRefreshInterval The interval defines how often the server's data must be fetched. (Interpreted in seconds.)\r
22          */\r
23         ConnectionSettings( const QUrl &aServerUrl, const QString &aUsername, const QString &aPassword, unsigned int aRefreshInterval );\r
24         //! Copy constructor.\r
25         /*!\r
26          * Overloaded. Constructor to initialize a ConnectionSettings instance.\r
27          * \param aOther ConnectionSettings class to be copied.\r
28          */\r
29         ConnectionSettings( const ConnectionSettings &aOther );\r
30         //! Destructor\r
31         virtual ~ConnectionSettings();\r
32 \r
33         //! Gets the server address\r
34         /*!\r
35          * Gets the server url address.\r
36          * \return Url address of server.\r
37          */\r
38         QUrl serverUrl();\r
39         //! Gets the username.\r
40         /*!\r
41          * Gets username used to connect.\r
42          * \return Username.\r
43          */\r
44         QString username();\r
45         //! Gets the password.\r
46         /*!\r
47          * Gets the password used to connect.\r
48          * \return Password.\r
49          */\r
50         QString password();\r
51         //! Gets the refresh interval.\r
52         /*!\r
53          * Gets refresh interval in seconds to read the data from server.\r
54          * \return Refresh interval.\r
55          */\r
56         unsigned int refreshInterval();\r
57 \r
58         //! Sets the server address\r
59         /*!\r
60          * Sets the server url address.\r
61          * \param aServerUrl Url address of server.\r
62          */\r
63         void setServerUrl( const QUrl &aServerUrl );\r
64         //! Sets the username.\r
65         /*!\r
66          * Sets username used to connect.\r
67          * \param aUsername Username.\r
68          */\r
69         void setUsername( const QString &aUsername );\r
70         //! Sets the password.\r
71         /*!\r
72          * Sets the password used to connect.\r
73          * \param aPassword Password.\r
74          */\r
75         void setPassword( const QString &aPassword );\r
76         //! Sets the refresh interval.\r
77         /*!\r
78          * Sets refresh interval in seconds to read the data from server.\r
79          * \param aRefreshInterval Refresh interval.\r
80          */\r
81         void setRefreshInterval( unsigned int aRefreshInterval );\r
82 \r
83 \r
84 private:\r
85         QUrl iServerUrl;\r
86         QString iUsername;\r
87         QString iPassword;\r
88         unsigned int iRefreshInterval; // in seconds\r
89 \r
90 };\r
91 \r
92 #endif /*CONNECTION_H_*/\r