#include <QString>
#include <QList>
#include <QTime>
+#include <QUrl>
class ConnectionSettings;
class StartupSettings;
* file at initialization time. Since there is one appliation per device normally running, therefore
* there is only one instance of this class, which is accessible by using a statis getter method.
*/
-class Configuration : public QObject
-{
+class Configuration: public QObject {
Q_OBJECT
private:
* Gets the connection settings.
* \return Pointer to ConnectionSettings instance.
*/
- ConnectionSettings* connectionSettings();
+ //ConnectionSettings* connectionSettings();
+ /**
+ * Returns the current server URL
+ */
+ QUrl getServerUrl();
+ /**
+ * Returns the current username
+ */
+ QString getUsername();
+ /**
+ * Returns the current users password
+ */
+ QString getPassword();
+ /**
+ * Returns the refresh interval
+ */
+ unsigned int getRefreshinterval();
+ /**
+ * Sets the current server URL
+ */
+ void setServerUrl(QUrl serverUrl);
+ /**
+ * Sets the current username
+ */
+ void setUsername(QString username);
+ /**
+ * Sets the current users password
+ */
+ void setPassword(QString password);
+ /**
+ * Sets the refresh interval
+ */
+ void setRefreshinterval(unsigned int refreshinterval);
+
+ //! Sets the confidential meeting details showing setting.
+ /*!
+ * Sets the confidential meeting details showing setting.
+ * \param confidential meeting details showing setting.
+ */
+ bool setShowConfidentialMeetingDetails(bool showconfidentialmeetingdetails);
+
//! Gets the detault room.
/*!
* Gets the default meeting room.
QByteArray adminPassword();
//! Sets room list.
/*!
- * Sets room list.
+ * Sets room list.
* \param aRooms List of rooms
*/
void setRooms(const QList<Room*> aRooms);
+ //! Gets the confidential meeting details showing setting.
+ /*!
+ * Gets the confidential meeting details showing setting.
+ * \return confidential meeting details showing setting.
+ */
+ bool showConfidentialMeetingDetails();
+
+signals:
+ void configurationChanged();
+
public slots:
//! Saves setting values to file.
* \param aPath path and name of configuration file
* \return Configuration object.
*/
- static Configuration* readFromXML(const QString &aPath);
+ void readFromXML(const QString &aPath);
//! Static. Reads settings of connection from and XML node.
/*!
* Static. Reads settings of connection from an XML node.
* \param aXml QDomNode containing connection parameters.
* \return Pointer to ConnectionSettings object.
*/
- static ConnectionSettings* readConnectionSettings(const QDomNode &aXML);
+ ConnectionSettings* readConnectionSettings(const QDomNode &aXML);
//! Static. Reads rooms from an XML node.
/*!
* Static. Reads rooms from an XML node.
* \param aXml QDomNode containing meeting room parameters
* \return List of meetingrooms.
*/
- static QList<Room*> readRooms(const QDomNode &aXML);
+ QList<Room*> readRooms(const QDomNode &aXML);
//! Static. Reads language code from an XML node.
/*!
* Static. Reads rooms from an XML node.
* \param aXml QDomNode containing language code
* \return Language code.
*/
- static QString readLanguageCode(const QDomNode &aXML);
+ QString readLanguageCode(const QDomNode &aXML);
//! Static. Reads settings of startup from an XML node.
/*!
* Static. Reads settings of startup from an XML node.
* \param aXml QDomNode containing startup parameters
* \return Pointer to the read StartupSettings object.
*/
- static StartupSettings* readStartupSettings(const QDomNode &aXML);
+ StartupSettings* readStartupSettings(const QDomNode &aXML);
/*!
* Static function to load and store display settings from xml node.
* \param aXml QDomNode containing display parameters
* \return Pointer to the read DisplaySettings object.
*/
- static DisplaySettings* readDisplaySettings(const QDomNode &aXML);
+ DisplaySettings* readDisplaySettings(const QDomNode &aXML);
//! Static. Reads the date/time settings from an XML node.
/*!
* Static. Reads the date/time settings from an XML node.
* \param aXml QDomNode containing the date/time settings
* \return The date/time settings.
*/
- static DateTimeSettings* readDateTimeSettings(const QDomNode &aXML);
+ DateTimeSettings* readDateTimeSettings(const QDomNode &aXML);
//! Static. Reads adminstrator's password from an XML node.
/*!
* \param aXml QDomNode containing admin password
* \return Admin password.
*/
- static QByteArray readAdminPassword(const QDomNode &aXML);
+ QByteArray readAdminPassword(const QDomNode &aXML);
+ //! Static. Reads confidential meeting details setting from an XML node.
+ /*!
+ * Static. Reads confidential meeting details setting from an XML node.
+ * \param aXml QDomNode containing confidential meeting details setting
+ * \return Confidential meeting details setting.
+ */
+ void readPrivacySettings(const QDomNode &aXML);
+
//! Saves connection data to the document.
/*!
* Reads data from iConnectionSettings and saves it to the aXML document.
*/
void saveAdminPassword(const QDomNode &aXML);
+ //! Saves confidential meeting details setting to the document.
+ /*!
+ * Reads data from iShowConfidentialMeetingDetails and saves it to the aXML document.
+ * \param aXml QDomNode confidential meeting details setting
+ */
+ void savePrivacySettings(QDomNode &aXML);
+
//! Hash password with md5 method.
/*!
* Hash password with md5 method.
//! Stores language code
QString iLanguageCode;
+ bool iShowConfidentialMeetingDetails;
};
#endif /*CONFIGURATION_H_*/