RegisterService.hpp Example File
pushCollector/10.0/pushCollector/src/service/RegisterService.hpp
#ifndef REGISTERSERVICE_HPP
#define REGISTERSERVICE_HPP
#include "ConfigurationService.hpp"
#include "../dao/UserDAO.hpp"
#include <QtCore/QObject>
#include <QtNetwork/QNetworkReply>
class RegisterService : public QObject
{
Q_OBJECT
public:
RegisterService(QObject *parent = 0);
void subscribeToPushInitiator(const User& user, const QString& token);
Q_SIGNALS:
void piRegistrationCompleted(int code, const QString &description);
private Q_SLOTS:
void httpFinished();
void onSslErrors(QNetworkReply * reply, const QList<QSslError> & errors);
private:
ConfigurationService m_configurationService;
QNetworkAccessManager m_accessManager;
UserDAO m_userDAO;
QNetworkReply *m_reply;
User m_currentUser;
QString deviceVersion() const;
QString deviceModel() const;
};
#endif