open-source-search-engine/PageInject.h

79 lines
1.4 KiB
C
Raw Normal View History

#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-06-12 04:24:33 +04:00
bool sendPageInject ( class TcpSocket *s, class HttpRequest *hr );
bool resumeImports ( ) ;
// 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;
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
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-11-11 01:45:11 +03:00
//int32_t m_crawlbotAPI;
2013-08-03 00:12:24 +04:00
class ImportState *m_importState;
//void constructor();
2013-08-03 00:12:24 +04:00
Msg7 ();
~Msg7 ();
bool m_inUse;
void reset();
2013-08-03 00:12:24 +04:00
bool scrapeQuery ( );
bool inject ( char *coll,
char *proxiedUrl,
2014-11-11 01:45:11 +03:00
int32_t proxiedUrlLen,
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
//bool injectTitleRec ( void *state ,
// void (*callback)(void *state) ,
// class CollectionRec *cr );
void gotMsg7Reply ();
2013-08-03 00:12:24 +04:00
};
extern bool g_inPageInject;
#endif