QGeniePlugin_Basic_Remote_ReadyShare::QGeniePlugin_Basic_Remote_ReadyShare(QWidget *parent) : QWidget(parent) { iErrorNum=0; strHost="192.168.1.1"; strIpInUsing="192.168.1.1"; strRouterAdminPassword="******"; http=new QHttp(this); timerHttp=new QTimer(this); timerHttp->setInterval(10000); timerHttp->stop(); connect (timerHttp,SIGNAL(timeout()),this,SLOT(httpTimeout())); iTimerCount=0; //void QHttp::authenticationRequired ( const QString & hostname, quint16 port, QAuthenticator * authenticator ) ; connect (http,SIGNAL(authenticationRequired(QString,quint16,QAuthenticator*)),this,SLOT(authenticationRequired(QString,quint16,QAuthenticator*))); connect (http,SIGNAL(readyRead(QHttpResponseHeader)),this,SLOT(readyRead(QHttpResponseHeader))); connect (http,SIGNAL(requestFinished(int,bool)),this,SLOT(requestFinished(int,bool))); connect (http,SIGNAL(requestStarted(int)),this,SLOT(requestStarted(int))); iCurId=-1; setupUi(); btnBack->setEnabled(false); }
ChannelDownloader::ChannelDownloader(bool writeDb) : QObject(NULL), mWriteDb(writeDb), mHttpAborted(false), mRssFormatError(true), mStartItem(false), mCurrentTag(""), mTitle(""), mPublishDate(""), mAuthor(""), mCategory(""), mDescription(""), mLink("") { mHttp = new QHttp(); mTimer = new QTimer(); connect(mHttp, SIGNAL(done(bool)), this, SLOT(httpDownloaded(bool))); connect(mHttp, SIGNAL(readyRead(const QHttpResponseHeader &)), this, SLOT(parseRss(const QHttpResponseHeader &))); connect(mTimer, SIGNAL(timeout()), this, SLOT(httpTimeout())); }