| <!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_file_native.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_file_native.h</h1><a href="oscl__file__native_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">// -*- c++ -*-</span> |
| 00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> |
| 00003 |
| 00004 <span class="comment">// O S C L _ F I L E _ N A T I V E</span> |
| 00005 |
| 00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> |
| 00007 |
| 00019 <span class="preprocessor">#ifndef OSCL_FILE_NATIVE_H_INCLUDED</span> |
| 00020 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_FILE_NATIVE_H_INCLUDED</span> |
| 00021 <span class="preprocessor"></span> |
| 00022 <span class="preprocessor">#ifndef OSCLCONFIG_IO_H_INCLUDED</span> |
| 00023 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="osclconfig__io_8h.html">osclconfig_io.h</a>"</span> |
| 00024 <span class="preprocessor">#endif</span> |
| 00025 <span class="preprocessor"></span> |
| 00026 <span class="preprocessor">#ifndef OSCL_BASE_H_INCLUDED</span> |
| 00027 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__base_8h.html">oscl_base.h</a>"</span> |
| 00028 <span class="preprocessor">#endif</span> |
| 00029 <span class="preprocessor"></span> |
| 00030 <span class="preprocessor">#ifndef OSCL_AOSTATUS_H_INCLUDED</span> |
| 00031 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__aostatus_8h.html">oscl_aostatus.h</a>"</span> |
| 00032 <span class="preprocessor">#endif</span> |
| 00033 <span class="preprocessor"></span> |
| 00034 <span class="preprocessor">#ifndef OSCL_FILE_IO_H_INCLUDED</span> |
| 00035 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__file__io_8h.html">oscl_file_io.h</a>"</span> |
| 00036 <span class="preprocessor">#endif</span> |
| 00037 <span class="preprocessor"></span> |
| 00038 <span class="preprocessor">#ifndef OSCL_FILE_TYPES_H_INCLUDED</span> |
| 00039 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__file__types_8h.html">oscl_file_types.h</a>"</span> |
| 00040 <span class="preprocessor">#endif</span> |
| 00041 <span class="preprocessor"></span> |
| 00042 |
| 00048 <span class="keyword">class </span><a class="code" href="classOscl__FileServer.html">Oscl_FileServer</a>; |
| <a name="l00049"></a><a class="code" href="classOsclNativeFile.html">00049</a> <span class="keyword">class </span><a class="code" href="classOsclNativeFile.html">OsclNativeFile</a> : <span class="keyword">public</span> <a class="code" href="classHeapBase.html">HeapBase</a> |
| 00050 { |
| 00051 <span class="keyword">public</span>: |
| 00052 <a class="code" href="classOsclNativeFile.html#a0">OsclNativeFile</a>(); |
| 00053 <a class="code" href="classOsclNativeFile.html#a1">~OsclNativeFile</a>(); |
| 00054 |
| 00055 <span class="comment">// These are the Native OS File IO calls.</span> |
| 00056 int32 <a class="code" href="classOsclNativeFile.html#a2">Open</a>(<span class="keyword">const</span> <a class="code" href="classOsclFileHandle.html">OsclFileHandle</a>&, uint32 mode |
| 00057 , <span class="keyword">const</span> <a class="code" href="classOsclNativeFileParams.html">OsclNativeFileParams</a>& params |
| 00058 , <a class="code" href="classOscl__FileServer.html">Oscl_FileServer</a>& fileserv); |
| 00059 int32 <a class="code" href="classOsclNativeFile.html#a2">Open</a>(<span class="keyword">const</span> <a class="code" href="group__osclbase.html#a32">oscl_wchar</a> *filename, uint32 mode |
| 00060 , <span class="keyword">const</span> <a class="code" href="classOsclNativeFileParams.html">OsclNativeFileParams</a>& params |
| 00061 , <a class="code" href="classOscl__FileServer.html">Oscl_FileServer</a>& fileserv); |
| 00062 int32 <a class="code" href="classOsclNativeFile.html#a2">Open</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename, uint32 mode |
| 00063 , <span class="keyword">const</span> <a class="code" href="classOsclNativeFileParams.html">OsclNativeFileParams</a>& params |
| 00064 , <a class="code" href="classOscl__FileServer.html">Oscl_FileServer</a>& fileserv); |
| 00065 uint32 <a class="code" href="classOsclNativeFile.html#a5">Read</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a> *buffer, uint32 size, uint32 numelements); |
| 00066 uint32 <a class="code" href="classOsclNativeFile.html#a6">Write</a>(<span class="keyword">const</span> <a class="code" href="group__osclbase.html#a25">OsclAny</a> *buffer, uint32 size, uint32 numelements); |
| 00067 int32 <a class="code" href="classOsclNativeFile.html#a7">Seek</a>(<a class="code" href="osclconfig__io_8h.html#a48">TOsclFileOffset</a> offset, <a class="code" href="classOscl__File.html#s11">Oscl_File::seek_type</a> origin); |
| 00068 <a class="code" href="osclconfig__io_8h.html#a48">TOsclFileOffset</a> <a class="code" href="classOsclNativeFile.html#a8">Tell</a>(); |
| 00069 int32 <a class="code" href="classOsclNativeFile.html#a9">Flush</a>(); |
| 00070 int32 <a class="code" href="classOsclNativeFile.html#a10">EndOfFile</a>(); |
| 00071 <a class="code" href="osclconfig__io_8h.html#a48">TOsclFileOffset</a> <a class="code" href="classOsclNativeFile.html#a11">Size</a>(); |
| 00072 int32 <a class="code" href="classOsclNativeFile.html#a12">Close</a>(); |
| 00073 |
| 00074 <span class="comment">//query for current open mode.</span> |
| <a name="l00075"></a><a class="code" href="classOsclNativeFile.html#a13">00075</a> uint32 <a class="code" href="classOsclNativeFile.html#a13">Mode</a>() |
| 00076 { |
| 00077 <span class="keywordflow">return</span> iMode; |
| 00078 } |
| 00079 |
| 00080 <span class="comment">//get last filesystem error.</span> |
| 00081 int32 <a class="code" href="classOsclNativeFile.html#a14">GetError</a>(); |
| 00082 |
| 00092 int32 <a class="code" href="classOsclNativeFile.html#a15">ReadAsync</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a>*buffer, uint32 size, uint32 numelements, <a class="code" href="classOsclAOStatus.html">OsclAOStatus</a>& status); |
| 00097 uint32 <a class="code" href="classOsclNativeFile.html#a16">GetReadAsyncNumElements</a>(); |
| 00101 <span class="keywordtype">bool</span> <a class="code" href="classOsclNativeFile.html#a17">HasAsyncRead</a>(); |
| 00105 <span class="keywordtype">void</span> <a class="code" href="classOsclNativeFile.html#a18">ReadAsyncCancel</a>(); |
| 00106 |
| 00107 <span class="keyword">private</span>: |
| 00108 |
| 00109 <span class="comment">//current open mode</span> |
| 00110 uint32 iMode; |
| 00111 |
| 00112 <span class="comment">//was an open file handle passed in?</span> |
| 00113 <span class="keywordtype">bool</span> iOpenFileHandle; |
| 00114 |
| 00115 <span class="comment">//native file object.</span> |
| 00116 FILE* iFile; |
| 00117 <span class="preprocessor">#if ENABLE_MEMORY_PLAYBACK</span> |
| 00118 <span class="preprocessor"></span> <span class="keyword">static</span> <span class="keywordtype">int</span> sigbushandlerfunc(siginfo_t *, <span class="keyword">struct</span> mediasigbushandler *); |
| 00119 <span class="comment">// memory block</span> |
| 00120 <span class="keywordtype">void</span>* membase; |
| 00121 <span class="keywordtype">long</span> <span class="keywordtype">long</span> memoffset; |
| 00122 <span class="keywordtype">long</span> <span class="keywordtype">long</span> memlen; |
| 00123 <span class="keywordtype">int</span> mempos; |
| 00124 <span class="keyword">struct </span>mediasigbushandler sigbushandler; |
| 00125 <span class="keywordtype">int</span> memcpyfailed; |
| 00126 <span class="keyword">static</span> <span class="keyword">struct </span>mediasigbushandler *getspecificforfaultaddr(char *faultaddr); |
| 00127 <span class="preprocessor">#endif</span> |
| 00128 <span class="preprocessor"></span> |
| 00129 }; |
| 00130 |
| 00131 <span class="preprocessor">#endif // OSCL_FILE_NATIVE_H_INCLUDED</span> |
| 00132 <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_20090310 </small> |
| </small></address> |
| </body> |
| </html> |