| <!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_socket_types.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_socket_types.h</h1><a href="oscl__socket__types_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 |
| 00002 |
| 00003 <span class="preprocessor">#ifndef OSCL_SOCKET_TYPES_H_INCLUDED</span> |
| 00004 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_SOCKET_TYPES_H_INCLUDED</span> |
| 00005 <span class="preprocessor"></span> |
| 00006 <span class="preprocessor">#include "<a class="code" href="osclconfig__io_8h.html">osclconfig_io.h</a>"</span> |
| 00007 <span class="preprocessor">#include "<a class="code" href="oscl__types_8h.html">oscl_types.h</a>"</span> |
| 00008 <span class="preprocessor">#include "<a class="code" href="oscl__scheduler__types_8h.html">oscl_scheduler_types.h</a>"</span> |
| 00009 <span class="preprocessor">#include "<a class="code" href="oscl__namestring_8h.html">oscl_namestring.h</a>"</span> |
| 00010 <span class="preprocessor">#include "<a class="code" href="oscl__stdstring_8h.html">oscl_stdstring.h</a>"</span> |
| 00011 |
| <a name="l00012"></a><a class="code" href="oscl__socket__types_8h.html#a19">00012</a> <span class="keyword">enum</span> <a class="code" href="oscl__socket__types_8h.html#a19">TPVSocketFxn</a> |
| 00013 { |
| 00014 <a class="code" href="oscl__socket__types_8h.html#a19a1">EPVSocketSend</a> = 0 |
| 00015 , <a class="code" href="oscl__socket__types_8h.html#a19a2">EPVSocketSendTo</a> |
| 00016 , <a class="code" href="oscl__socket__types_8h.html#a19a3">EPVSocketRecv</a> |
| 00017 , <a class="code" href="oscl__socket__types_8h.html#a19a4">EPVSocketRecvFrom</a> |
| 00018 , <a class="code" href="oscl__socket__types_8h.html#a19a5">EPVSocketConnect</a> |
| 00019 , <a class="code" href="oscl__socket__types_8h.html#a19a6">EPVSocketAccept</a> |
| 00020 , <a class="code" href="oscl__socket__types_8h.html#a19a7">EPVSocketShutdown</a> |
| 00021 , <a class="code" href="oscl__socket__types_8h.html#a19a8">EPVSocketBind</a> |
| 00022 , <a class="code" href="oscl__socket__types_8h.html#a19a9">EPVSocketListen</a> |
| 00023 , <a class="code" href="oscl__socket__types_8h.html#a19a10">EPVSocket_Last</a> <span class="comment">//placeholder</span> |
| 00024 } ; |
| 00025 |
| <a name="l00028"></a><a class="code" href="oscl__socket__types_8h.html#a20">00028</a> <span class="keyword">enum</span> <a class="code" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> |
| 00029 { |
| 00030 <a class="code" href="oscl__socket__types_8h.html#a20a11">EPVSocketSuccess</a> |
| 00031 , <a class="code" href="oscl__socket__types_8h.html#a20a12">EPVSocketPending</a> |
| 00032 , <a class="code" href="oscl__socket__types_8h.html#a20a13">EPVSocketTimeout</a> |
| 00033 , <a class="code" href="oscl__socket__types_8h.html#a20a14">EPVSocketFailure</a> |
| 00034 , <a class="code" href="oscl__socket__types_8h.html#a20a15">EPVSocketCancel</a> |
| 00035 } ; |
| 00036 |
| <a name="l00037"></a><a class="code" href="oscl__socket__types_8h.html#a21">00037</a> <span class="keyword">enum</span> <a class="code" href="oscl__socket__types_8h.html#a21">TPVSocketShutdown</a> |
| 00038 { |
| 00039 <a class="code" href="oscl__socket__types_8h.html#a21a16">EPVSocketSendShutdown</a> |
| 00040 , <a class="code" href="oscl__socket__types_8h.html#a21a17">EPVSocketRecvShutdown</a> |
| 00041 , <a class="code" href="oscl__socket__types_8h.html#a21a18">EPVSocketBothShutdown</a> |
| 00042 } ; |
| 00043 |
| <a name="l00044"></a><a class="code" href="oscl__socket__types_8h.html#a0">00044</a> <span class="preprocessor">#define PVNETWORKADDRESS_LEN 50</span> |
| 00045 <span class="preprocessor"></span> |
| <a name="l00046"></a><a class="code" href="classOsclNetworkAddress.html">00046</a> <span class="keyword">class </span><a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> |
| 00047 { |
| 00048 <span class="keyword">public</span>: |
| <a name="l00049"></a><a class="code" href="classOsclNetworkAddress.html#a0">00049</a> <a class="code" href="classOsclNetworkAddress.html#a0">OsclNetworkAddress</a>(): <a class="code" href="classOsclNetworkAddress.html#m1">port</a>(0) |
| 00050 { |
| 00051 } |
| <a name="l00052"></a><a class="code" href="classOsclNetworkAddress.html#a1">00052</a> <a class="code" href="classOsclNetworkAddress.html#a0">OsclNetworkAddress</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *addr, <span class="keywordtype">int</span> p) |
| 00053 { |
| 00054 <a class="code" href="classOsclNetworkAddress.html#m0">ipAddr</a>.<a class="code" href="classOsclNameString.html#a3">Set</a>(addr); |
| 00055 <a class="code" href="classOsclNetworkAddress.html#m1">port</a> = p; |
| 00056 } |
| 00057 |
| 00058 <span class="comment">//Network address in dotted decimal string format.</span> |
| <a name="l00059"></a><a class="code" href="classOsclNetworkAddress.html#m0">00059</a> <a class="code" href="classOsclNameString.html">OsclNameString<PVNETWORKADDRESS_LEN></a> <a class="code" href="classOsclNetworkAddress.html#m0">ipAddr</a>; |
| 00060 |
| 00061 <span class="comment">//Port number.</span> |
| <a name="l00062"></a><a class="code" href="classOsclNetworkAddress.html#m1">00062</a> <span class="keywordtype">int</span> <a class="code" href="classOsclNetworkAddress.html#m1">port</a>; |
| 00063 <span class="comment">//@cmember equality comparison operator</span> |
| <a name="l00064"></a><a class="code" href="classOsclNetworkAddress.html#a2">00064</a> <span class="keywordtype">bool</span> <a class="code" href="classOsclNetworkAddress.html#a2">operator == </a>(<span class="keyword">const</span> <a class="code" href="classOsclNetworkAddress.html">OsclNetworkAddress</a> & rhs)<span class="keyword"> const</span> |
| 00065 <span class="keyword"> </span>{ |
| 00066 <span class="keywordflow">if</span> (<a class="code" href="classOsclNetworkAddress.html#m1">port</a> == rhs.<a class="code" href="classOsclNetworkAddress.html#m1">port</a>) |
| 00067 { |
| 00068 <span class="keywordflow">if</span> (0 == <a class="code" href="group__osclbase.html#a47">oscl_strcmp</a>((<span class="keyword">const</span> <span class="keywordtype">char</span>*)ipAddr.<a class="code" href="classOsclNameString.html#a5">Str</a>(), (<span class="keyword">const</span> <span class="keywordtype">char</span>*)rhs.<a class="code" href="classOsclNetworkAddress.html#m0">ipAddr</a>.<a class="code" href="classOsclNameString.html#a5">Str</a>())) |
| 00069 <span class="keywordflow">return</span> <span class="keyword">true</span>; |
| 00070 } |
| 00071 <span class="keywordflow">return</span> <span class="keyword">false</span>; |
| 00072 }; |
| 00073 |
| 00074 } ; |
| 00075 |
| <a name="l00080"></a><a class="code" href="classOsclSocketObserver.html">00080</a> <span class="keyword">class </span><a class="code" href="classOsclSocketObserver.html">OsclSocketObserver</a> |
| 00081 { |
| 00082 <span class="keyword">public</span>: |
| 00095 OSCL_IMPORT_REF <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classOsclSocketObserver.html#a0">HandleSocketEvent</a>(int32 aId, <a class="code" href="oscl__socket__types_8h.html#a19">TPVSocketFxn</a> aFxn, <a class="code" href="oscl__socket__types_8h.html#a20">TPVSocketEvent</a> aEvent, int32 aError) = 0; |
| <a name="l00096"></a><a class="code" href="classOsclSocketObserver.html#a1">00096</a> <span class="keyword">virtual</span> <a class="code" href="classOsclSocketObserver.html#a1">~OsclSocketObserver</a>() {} |
| 00097 }; |
| 00098 |
| 00099 |
| 00100 <span class="preprocessor">#endif</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_20090310 </small> |
| </small></address> |
| </body> |
| </html> |