2014-06-10 23:29:50 +04:00
|
|
|
#ifndef GBINJECT_H
|
|
|
|
#define GBINJECT_H
|
2013-08-03 00:12:24 +04:00
|
|
|
|
2014-11-11 01:45:11 +03:00
|
|
|
void handleRequest7 ( class UdpSlot *slot , int32_t netnice ) ;
|
2014-09-24 23:40:39 +04:00
|
|
|
|
2014-06-12 04:24:33 +04:00
|
|
|
bool sendPageInject ( class TcpSocket *s, class HttpRequest *hr );
|
|
|
|
|
2014-09-21 07:12:28 +04:00
|
|
|
bool resumeImports ( ) ;
|
|
|
|
|
2014-09-24 04:48:40 +04:00
|
|
|
// called by Process.cpp
|
|
|
|
void saveImportStates ( ) ;
|
|
|
|
|
2013-08-03 00:12:24 +04:00
|
|
|
#include "XmlDoc.h"
|
|
|
|
#include "Users.h"
|
2014-06-12 04:24:33 +04:00
|
|
|
#include "Parms.h" // GigablastRequest
|
2013-08-03 00:12:24 +04:00
|
|
|
|
|
|
|
class Msg7 {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2014-06-12 04:24:33 +04:00
|
|
|
GigablastRequest m_gr;
|
2014-06-15 20:10:00 +04:00
|
|
|
SafeBuf m_injectUrlBuf;
|
|
|
|
bool m_firstTime;
|
|
|
|
char *m_start;
|
|
|
|
bool m_fixMe;
|
2014-11-11 01:45:11 +03:00
|
|
|
int32_t m_injectCount;
|
2014-06-12 04:24:33 +04:00
|
|
|
|
2013-08-03 00:12:24 +04:00
|
|
|
bool m_needsSet;
|
|
|
|
XmlDoc m_xd;
|
|
|
|
TcpSocket *m_socket;
|
|
|
|
SafeBuf m_sb;
|
|
|
|
char m_round;
|
|
|
|
char m_useAhrefs;
|
|
|
|
HashTableX m_linkDedupTable;
|
2014-06-12 04:24:33 +04:00
|
|
|
|
2014-09-24 04:48:40 +04:00
|
|
|
SafeBuf m_sbuf; // for holding entire titlerec for importing
|
|
|
|
|
2014-06-12 04:24:33 +04:00
|
|
|
void *m_state;
|
|
|
|
void (* m_callback )(void *state);
|
|
|
|
|
2014-10-30 22:36:39 +03:00
|
|
|
//int64_t m_hackFileOff;
|
2014-11-11 01:45:11 +03:00
|
|
|
//int32_t m_hackFileId;
|
2014-09-21 07:12:28 +04:00
|
|
|
|
2014-11-11 01:45:11 +03:00
|
|
|
//int32_t m_crawlbotAPI;
|
2013-08-03 00:12:24 +04:00
|
|
|
|
2014-09-21 07:12:28 +04:00
|
|
|
class ImportState *m_importState;
|
|
|
|
|
2014-09-24 04:48:40 +04:00
|
|
|
//void constructor();
|
2013-08-03 00:12:24 +04:00
|
|
|
Msg7 ();
|
|
|
|
~Msg7 ();
|
2014-09-21 07:12:28 +04:00
|
|
|
bool m_inUse;
|
|
|
|
|
|
|
|
void reset();
|
2013-08-03 00:12:24 +04:00
|
|
|
|
|
|
|
bool scrapeQuery ( );
|
|
|
|
|
2014-07-09 23:25:23 +04:00
|
|
|
bool inject ( char *coll,
|
|
|
|
char *proxiedUrl,
|
2014-11-11 01:45:11 +03:00
|
|
|
int32_t proxiedUrlLen,
|
2014-07-09 23:25:23 +04:00
|
|
|
char *content,
|
|
|
|
void *state ,
|
|
|
|
void (*callback)(void *state) );
|
|
|
|
|
2014-06-12 04:24:33 +04:00
|
|
|
bool inject ( void *state ,
|
|
|
|
void (*callback)(void *state) );
|
2013-08-03 00:12:24 +04:00
|
|
|
|
2014-09-24 04:48:40 +04:00
|
|
|
|
2014-09-24 23:40:39 +04:00
|
|
|
//bool injectTitleRec ( void *state ,
|
|
|
|
// void (*callback)(void *state) ,
|
|
|
|
// class CollectionRec *cr );
|
2014-09-24 04:48:40 +04:00
|
|
|
|
|
|
|
void gotMsg7Reply ();
|
|
|
|
|
2013-08-03 00:12:24 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
extern bool g_inPageInject;
|
|
|
|
|
|
|
|
#endif
|