1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3<title>oscl_file_native.h Source File</title> 4<link href="doxygen.css" rel="stylesheet" type="text/css"> 5</head><body> 6<!-- Generated by Doxygen 1.2.18 --> 7<center> 8<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> 9<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> 1000002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> 1100003 1200004 <span class="comment">// O S C L _ F I L E _ N A T I V E</span> 1300005 1400006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> 1500007 1600019 <span class="preprocessor">#ifndef OSCL_FILE_NATIVE_H_INCLUDED</span> 1700020 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_FILE_NATIVE_H_INCLUDED</span> 1800021 <span class="preprocessor"></span> 1900022 <span class="preprocessor">#ifndef OSCLCONFIG_IO_H_INCLUDED</span> 2000023 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="osclconfig__io_8h.html">osclconfig_io.h</a>"</span> 2100024 <span class="preprocessor">#endif</span> 2200025 <span class="preprocessor"></span> 2300026 <span class="preprocessor">#ifndef OSCL_BASE_H_INCLUDED</span> 2400027 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__base_8h.html">oscl_base.h</a>"</span> 2500028 <span class="preprocessor">#endif</span> 2600029 <span class="preprocessor"></span> 2700030 <span class="preprocessor">#ifndef OSCL_AOSTATUS_H_INCLUDED</span> 2800031 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__aostatus_8h.html">oscl_aostatus.h</a>"</span> 2900032 <span class="preprocessor">#endif</span> 3000033 <span class="preprocessor"></span> 3100034 <span class="preprocessor">#ifndef OSCL_FILE_IO_H_INCLUDED</span> 3200035 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__file__io_8h.html">oscl_file_io.h</a>"</span> 3300036 <span class="preprocessor">#endif</span> 3400037 <span class="preprocessor"></span> 3500038 <span class="preprocessor">#ifndef OSCL_FILE_TYPES_H_INCLUDED</span> 3600039 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__file__types_8h.html">oscl_file_types.h</a>"</span> 3700040 <span class="preprocessor">#endif</span> 3800041 <span class="preprocessor"></span> 3900042 4000048 <span class="keyword">class </span><a class="code" href="classOscl__FileServer.html">Oscl_FileServer</a>; 41<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> 4200050 { 4300051 <span class="keyword">public</span>: 4400052 <a class="code" href="classOsclNativeFile.html#a0">OsclNativeFile</a>(); 4500053 <a class="code" href="classOsclNativeFile.html#a1">~OsclNativeFile</a>(); 4600054 4700055 <span class="comment">// These are the Native OS File IO calls.</span> 4800056 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 4900057 , <span class="keyword">const</span> <a class="code" href="classOsclNativeFileParams.html">OsclNativeFileParams</a>& params 5000058 , <a class="code" href="classOscl__FileServer.html">Oscl_FileServer</a>& fileserv); 5100059 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 5200060 , <span class="keyword">const</span> <a class="code" href="classOsclNativeFileParams.html">OsclNativeFileParams</a>& params 5300061 , <a class="code" href="classOscl__FileServer.html">Oscl_FileServer</a>& fileserv); 5400062 int32 <a class="code" href="classOsclNativeFile.html#a2">Open</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename, uint32 mode 5500063 , <span class="keyword">const</span> <a class="code" href="classOsclNativeFileParams.html">OsclNativeFileParams</a>& params 5600064 , <a class="code" href="classOscl__FileServer.html">Oscl_FileServer</a>& fileserv); 5700065 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); 5800066 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); 5900067 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); 6000068 <a class="code" href="osclconfig__io_8h.html#a48">TOsclFileOffset</a> <a class="code" href="classOsclNativeFile.html#a8">Tell</a>(); 6100069 int32 <a class="code" href="classOsclNativeFile.html#a9">Flush</a>(); 6200070 int32 <a class="code" href="classOsclNativeFile.html#a10">EndOfFile</a>(); 6300071 <a class="code" href="osclconfig__io_8h.html#a48">TOsclFileOffset</a> <a class="code" href="classOsclNativeFile.html#a11">Size</a>(); 6400072 int32 <a class="code" href="classOsclNativeFile.html#a12">Close</a>(); 6500073 6600074 <span class="comment">//query for current open mode.</span> 67<a name="l00075"></a><a class="code" href="classOsclNativeFile.html#a13">00075</a> uint32 <a class="code" href="classOsclNativeFile.html#a13">Mode</a>() 6800076 { 6900077 <span class="keywordflow">return</span> iMode; 7000078 } 7100079 7200080 <span class="comment">//get last filesystem error.</span> 7300081 int32 <a class="code" href="classOsclNativeFile.html#a14">GetError</a>(); 7400082 7500092 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); 7600097 uint32 <a class="code" href="classOsclNativeFile.html#a16">GetReadAsyncNumElements</a>(); 7700101 <span class="keywordtype">bool</span> <a class="code" href="classOsclNativeFile.html#a17">HasAsyncRead</a>(); 7800105 <span class="keywordtype">void</span> <a class="code" href="classOsclNativeFile.html#a18">ReadAsyncCancel</a>(); 7900106 8000107 <span class="keyword">private</span>: 8100108 8200109 <span class="comment">//current open mode</span> 8300110 uint32 iMode; 8400111 8500112 <span class="comment">//was an open file handle passed in?</span> 8600113 <span class="keywordtype">bool</span> iOpenFileHandle; 8700114 8800115 <span class="comment">//native file object.</span> 8900116 FILE* iFile; 9000117 <span class="preprocessor">#if ENABLE_MEMORY_PLAYBACK</span> 9100118 <span class="preprocessor"></span> <span class="keyword">static</span> <span class="keywordtype">int</span> sigbushandlerfunc(siginfo_t *, <span class="keyword">struct</span> mediasigbushandler *); 9200119 <span class="comment">// memory block</span> 9300120 <span class="keywordtype">void</span>* membase; 9400121 <span class="keywordtype">long</span> <span class="keywordtype">long</span> memoffset; 9500122 <span class="keywordtype">long</span> <span class="keywordtype">long</span> memlen; 9600123 <span class="keywordtype">int</span> mempos; 9700124 <span class="keyword">struct </span>mediasigbushandler sigbushandler; 9800125 <span class="keywordtype">int</span> memcpyfailed; 9900126 <span class="keyword">static</span> <span class="keyword">struct </span>mediasigbushandler *getspecificforfaultaddr(char *faultaddr); 10000127 <span class="preprocessor">#endif</span> 10100128 <span class="preprocessor"></span> 10200129 }; 10300130 10400131 <span class="preprocessor">#endif // OSCL_FILE_NATIVE_H_INCLUDED</span> 10500132 <span class="preprocessor"></span> 106</pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> 107<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> 108</small></address> 109</body> 110</html> 111