X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fevent_client.h;h=39a9c11bebc57294fce34681e22484c6755a25aa;hb=9985db24464855946b7b2647d0dc5f94609a2ee0;hp=0e6cae95323fec8a2918ce2db7901c7959cd2b1b;hpb=91d42549e96cb21ab3fee9b481c70ee0729d1b79;p=citadel.git diff --git a/citadel/event_client.h b/citadel/event_client.h index 0e6cae953..39a9c11be 100644 --- a/citadel/event_client.h +++ b/citadel/event_client.h @@ -2,6 +2,8 @@ #include #include #include +#include +#include typedef struct AsyncIO AsyncIO; @@ -16,6 +18,8 @@ typedef enum _eNextState { typedef int (*EventContextAttach)(void *Data); typedef eNextState (*IO_CallBack)(void *Data); typedef eReadState (*IO_LineReaderCallback)(AsyncIO *IO); +typedef void (*ParseDNSAnswerCb)(AsyncIO*, unsigned char*, int); +typedef void (*FreeDNSReply)(void *DNSData); struct AsyncIO { StrBuf *Host; @@ -49,6 +53,14 @@ struct AsyncIO { IO_LineReaderCallback LineReader; /* if we have linereaders, maybe we want to read more lines before the real application logic is called? */ + struct ares_options DNSOptions; + ares_channel DNSChannel; + ParseDNSAnswerCb DNS_CB; + IO_CallBack PostDNS; + int DNSStatus; + void *VParsedDNSReply; + FreeDNSReply DNSReplyFree; + /* Custom data; its expected to contain AsyncIO so we can save malloc()s... */ DeleteHashDataFunc DeleteData; /* so if we have to destroy you, what to do... */ void *Data; /* application specific data */ @@ -74,3 +86,5 @@ void InitEventIO(AsyncIO *IO, IO_CallBack CustomDNS, IO_LineReaderCallback LineReader, int ReadFirst); + +int QueueQuery(ns_type Type, char *name, AsyncIO *IO, IO_CallBack PostDNS);