#ifndef INTRABOCAL_H #define INTRABOCAL_H #include #include #include #include #include #include #include #include #include "epimafia_global.h" typedef QPair City; class EPIMAFIASHARED_EXPORT IntraBocal : public QObject { Q_OBJECT public: enum Error { BadLogin, SslError, NetworkError, ParseError }; explicit IntraBocal(QObject *parent = 0); static QListgetCities(); signals: void error(IntraBocal::Error); void logged(); void searchFinished(QList >); public slots: void login(QString user, QString pass); void searchUser(QString lastName, QString firstName, QString login, QString promo = QString(), QString school = QString(), QString city = QString()); private slots: void loginError(QNetworkReply::NetworkError); void loginFinished(); void loginSslError(QList); void searchError(QNetworkReply::NetworkError); void searchFinished(); void searchSslError(QList); private: QNetworkAccessManager* m_mgr; QNetworkCookie m_phpSessId; void addPart(QHttpMultiPart* data, QString name, QString body); }; #endif // INTRABOCAL_H