| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
| <title>oscl_dns_param.h Source File</title> |
| <link href="doxygen.css" rel="stylesheet" type="text/css"> |
| </head><body> |
| <!-- Generated by Doxygen 1.2.18 --> |
| <center> |
| <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> |
| <hr><h1>oscl_dns_param.h</h1><a href="oscl__dns__param_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 |
| 00002 <span class="preprocessor">#ifndef OSCL_DNS_PARAM_H_INCLUDED</span> |
| 00003 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_DNS_PARAM_H_INCLUDED</span> |
| 00004 <span class="preprocessor"></span> |
| 00005 <span class="preprocessor">#include "<a class="code" href="oscl__socket__types_8h.html">oscl_socket_types.h</a>"</span> |
| 00006 <span class="preprocessor">#include "<a class="code" href="oscl__dns__tuneables_8h.html">oscl_dns_tuneables.h</a>"</span> |
| 00007 <span class="preprocessor">#include "<a class="code" href="oscl__namestring_8h.html">oscl_namestring.h</a>"</span> |
| 00008 <span class="preprocessor">#include "<a class="code" href="oscl__dns_8h.html">oscl_dns.h</a>"</span> |
| 00009 <span class="preprocessor">#include "<a class="code" href="oscl__mutex_8h.html">oscl_mutex.h</a>"</span> |
| 00010 <span class="preprocessor">#include "<a class="code" href="oscl__semaphore_8h.html">oscl_semaphore.h</a>"</span> |
| 00011 |
| 00012 <span class="keyword">class </span><a class="code" href="classOsclDNSRequestAO.html">OsclDNSRequestAO</a>; |
| 00013 <span class="keyword">class </span><a class="code" href="classOsclDNSRequest.html">OsclDNSRequest</a>; |
| 00014 |
| 00015 <span class="preprocessor">#if(PV_DNS_IS_THREAD)</span> |
| 00016 <span class="preprocessor"></span><span class="comment">/*</span> |
| 00017 <span class="comment">** Only the _OsclBasicAllocator is used in order to</span> |
| 00018 <span class="comment">** avoid the need to init memory manager in the DNS thread.</span> |
| 00019 <span class="comment">*/</span> |
| 00020 <span class="keyword">typedef</span> <a class="code" href="class__OsclBasicAllocator.html">_OsclBasicAllocator</a> <a class="code" href="classOsclMemAllocator.html">TDNSRequestParamAllocator</a>; |
| 00021 <span class="preprocessor">#else</span> |
| <a name="l00022"></a><a class="code" href="oscl__dns__param_8h.html#a0">00022</a> <span class="preprocessor"></span><span class="keyword">typedef</span> <a class="code" href="classOsclMemAllocator.html">OsclMemAllocator</a> TDNSRequestParamAllocator; |
| 00023 <span class="preprocessor">#endif</span> |
| 00024 <span class="preprocessor"></span> |
| 00025 <span class="comment">/*</span> |
| 00026 <span class="comment">** Base class for all DNS method parameter sets</span> |
| 00027 <span class="comment">** A thread-safe, reference-counted parameter set.</span> |
| 00028 <span class="comment">** A reference count is used since the data may need</span> |
| 00029 <span class="comment">** to persist after the request is canceled while still</span> |
| 00030 <span class="comment">** waiting on some blocking OS-level operation to complete.</span> |
| 00031 <span class="comment">*/</span> |
| <a name="l00032"></a><a class="code" href="classDNSRequestParam.html">00032</a> <span class="keyword">class </span><a class="code" href="classDNSRequestParam.html">DNSRequestParam</a> |
| 00033 { |
| 00034 <span class="keyword">public</span>: |
| 00035 |
| <a name="l00036"></a><a class="code" href="classDNSRequestParam.html#a0">00036</a> <span class="keyword">virtual</span> <a class="code" href="classDNSRequestParam.html#a0">~DNSRequestParam</a>() |
| 00037 { |
| 00038 <span class="preprocessor">#if(PV_DNS_IS_THREAD)</span> |
| 00039 <span class="preprocessor"></span> iLock.Close(); |
| 00040 iStartup.Close(); |
| 00041 <span class="preprocessor">#endif</span> |
| 00042 <span class="preprocessor"></span> } |
| 00043 |
| 00044 <span class="keywordtype">void</span> <a class="code" href="classDNSRequestParam.html#a1">RemoveRef</a>(); |
| 00045 |
| 00046 <span class="preprocessor">#if(PV_DNS_SERVER)</span> |
| 00047 <span class="preprocessor"></span> <span class="keywordtype">void</span> <a class="code" href="classDNSRequestParam.html#a2">InThread</a>(); |
| 00048 <span class="preprocessor">#endif</span> |
| 00049 <span class="preprocessor"></span> |
| 00050 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDNSRequestParam.html#a3">Destroy</a>() = 0; |
| 00051 |
| <a name="l00052"></a><a class="code" href="classDNSRequestParam.html#m0">00052</a> <a class="code" href="group__osclio.html#a23">TPVDNSFxn</a> <a class="code" href="classDNSRequestParam.html#m0">iFxn</a>; |
| <a name="l00053"></a><a class="code" href="classDNSRequestParam.html#m1">00053</a> <a class="code" href="classOsclDNSRequest.html">OsclDNSRequest</a> *<a class="code" href="classDNSRequestParam.html#m1">iDNSRequest</a>; |
| 00054 |
| 00055 <span class="preprocessor">#if(PV_DNS_IS_THREAD)</span> |
| 00056 <span class="preprocessor"></span> <span class="keywordtype">bool</span> iThreadKillFlag; |
| 00057 <a class="code" href="classOsclMutex.html">OsclMutex</a> iLock; |
| 00058 <a class="code" href="classOsclSemaphore.html">OsclSemaphore</a> iStartup; |
| 00059 <span class="preprocessor">#endif</span> |
| 00060 <span class="preprocessor"></span> |
| 00061 |
| 00062 <span class="keyword">protected</span>: |
| 00063 |
| 00064 <a class="code" href="classDNSRequestParam.html#b0">DNSRequestParam</a>(<a class="code" href="group__osclio.html#a23">TPVDNSFxn</a> aFxn); |
| 00065 |
| <a name="l00066"></a><a class="code" href="classDNSRequestParam.html#n0">00066</a> uint32 <a class="code" href="classDNSRequestParam.html#n0">iRefCount</a>; |
| 00067 }; |
| 00068 |
| 00069 |
| 00070 <span class="comment">/*</span> |
| 00071 <span class="comment">** Parameters for GetHostByName request</span> |
| 00072 <span class="comment">*/</span> |
| <a name="l00073"></a><a class="code" href="classGetHostByNameParam.html">00073</a> <span class="keyword">class </span><a class="code" href="classGetHostByNameParam.html">GetHostByNameParam</a>: <span class="keyword">public</span> <a class="code" href="classDNSRequestParam.html">DNSRequestParam</a> |
| 00074 { |
| 00075 <span class="keyword">public</span>: |
| 00076 |
| 00077 <span class="comment">//Use this routine to create, use DNSRequestParam::RemoveRef when finished.</span> |
| 00078 <span class="keyword">static</span> <a class="code" href="classGetHostByNameParam.html">GetHostByNameParam</a>* <a class="code" href="classGetHostByNameParam.html#d0">Create</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>* &addr); |
| 00079 |
| 00080 <span class="comment">//from DNSRequestParam</span> |
| 00081 <span class="keywordtype">void</span> <a class="code" href="classGetHostByNameParam.html#a0">Destroy</a>(); |
| 00082 |
| 00083 <a class="code" href="classGetHostByNameParam.html#a1">~GetHostByNameParam</a>(); |
| 00084 |
| 00085 <span class="comment">//request params.</span> |
| <a name="l00086"></a><a class="code" href="classGetHostByNameParam.html#m0">00086</a> <span class="keywordtype">char</span> *<a class="code" href="classGetHostByNameParam.html#m0">iName</a>; |
| <a name="l00087"></a><a class="code" href="classGetHostByNameParam.html#m1">00087</a> <a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> *<a class="code" href="classGetHostByNameParam.html#m1">iAddr</a>; |
| 00088 |
| 00089 <span class="keyword">private</span>: |
| 00090 |
| 00091 <a class="code" href="classGetHostByNameParam.html">GetHostByNameParam</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a>* &addr); |
| 00092 |
| 00093 |
| 00094 } ; |
| 00095 |
| 00096 |
| 00097 <span class="preprocessor">#endif</span> |
| 00098 <span class="preprocessor"></span> |
| </pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> |
| <address style="align: left;"><small>Posting Version: OPENCORE_20090120 </small> |
| </small></address> |
| </body> |
| </html> |