00001 00002 #ifndef OSCL_DNS_REQUEST_H_INCLUDED 00003 #define OSCL_DNS_REQUEST_H_INCLUDED 00004 00005 #include "oscl_dns_tuneables.h" 00006 #if PV_DNS_SERVER 00007 00008 #include "oscl_namestring.h" 00009 #include "oscl_dns.h" 00010 #include "oscl_socket_types.h" 00011 #include "oscl_dns_tuneables.h" 00012 00013 #if PV_DNS_IS_THREAD 00014 #include "oscl_thread.h" 00015 #include "oscl_mutex.h" 00016 #endif 00017 00018 class DNSRequestParam; 00019 class OsclDNSRequestAO; 00020 00024 class OsclDNSRequest 00025 { 00026 public: 00027 OsclDNSRequest() 00028 : iDNSRequestAO(NULL) 00029 , iDNSRequestParam(NULL) 00030 , iActive(false) 00031 { 00032 } 00033 ~OsclDNSRequest() 00034 { 00035 } 00036 00037 OsclDNSRequestAO *iDNSRequestAO;//the AO that is waiting on completion. 00038 DNSRequestParam *iDNSRequestParam; 00039 bool iActive; 00040 00041 #if PV_DNS_IS_THREAD 00042 static TOsclThreadFuncRet OSCL_THREAD_DECL ThreadFunc(TOsclThreadFuncArg arg); 00043 #endif 00044 00045 void CancelRequest(); 00046 void Complete(bool, int32 aStatus, int32 aSockErr); 00047 void Activate(DNSRequestParam *iParam, OsclDNSRequestAO &a); 00048 }; 00049 00050 #endif 00051 00052 00053 #endif 00054