• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2011 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /**
18  ******************************************************************************
19  * @file         M4OSA_FileReader_optim.h
20  * @brief        File reader for Symbian
21  * @note         This file declares functions and types to read a file.
22  ******************************************************************************
23 */
24 
25 
26 
27 #ifndef M4OSA_FILEREADER_OPTIM_H
28 #define M4OSA_FILEREADER_OPTIM_H
29 
30 #define M4OSA_READER_OPTIM_USE_OSAL_IF
31 
32 /**/
33 #ifndef M4OSA_READER_OPTIM_USE_OSAL_IF
34     typedef struct
35     {
36         M4OSA_Void*        (*pFctPtr_Open)( M4OSA_Void* fd,
37                                             M4OSA_UInt32 FileModeAccess,
38                                             M4OSA_UInt16* errno );
39         M4OSA_FilePosition (*pFctPtr_Read)( M4OSA_Void* fd,
40                                             M4OSA_UInt8* data,
41                                             M4OSA_FilePosition size,
42                                             M4OSA_UInt16* errno );
43         M4OSA_FilePosition (*pFctPtr_Seek)( M4OSA_Void* fd,
44                                             M4OSA_FilePosition pos,
45                                             M4OSA_FileSeekAccessMode mode,
46                                             M4OSA_UInt16* errno );
47         M4OSA_FilePosition (*pFctPtr_Tell)( M4OSA_Void* fd,
48                                             M4OSA_UInt16* errno );
49         M4OSA_Int32        (*pFctPtr_Close)( M4OSA_Void* fd,
50                                              M4OSA_UInt16* errno );
51         M4OSA_Void         (*pFctPtr_AccessType)( M4OSA_UInt32 FileModeAccess_In,
52                                                   M4OSA_Void* FileModeAccess_Out );
53 
54     } M4OSA_FileSystem_FctPtr;
55 #endif
56 /**/
57 
58 
59 /* Reader API : bufferized functions */
60 #ifdef M4OSA_READER_OPTIM_USE_OSAL_IF
61     M4OSA_ERR M4OSA_fileReadOpen_optim( M4OSA_Context* context,
62                                         M4OSA_Void* fileDescriptor,
63                                         M4OSA_UInt32 fileModeAccess);
64 #else
65     M4OSA_ERR M4OSA_fileReadOpen_optim( M4OSA_Context* context,
66                                         M4OSA_Void* fileDescriptor,
67                                         M4OSA_UInt32 fileModeAccess,
68                                         M4OSA_FileSystem_FctPtr *FS);
69 #endif
70 
71 M4OSA_ERR M4OSA_fileReadData_optim( M4OSA_Context context,
72                                     M4OSA_MemAddr8 buffer,
73                                     M4OSA_UInt32* size );
74 M4OSA_ERR M4OSA_fileReadSeek_optim( M4OSA_Context context,
75                                     M4OSA_FileSeekAccessMode seekMode,
76                                     M4OSA_FilePosition* position );
77 M4OSA_ERR M4OSA_fileReadClose_optim( M4OSA_Context context );
78 M4OSA_ERR M4OSA_fileReadGetOption_optim( M4OSA_Context context,
79                                          M4OSA_FileReadOptionID optionID,
80                                          M4OSA_DataOption *optionValue );
81 M4OSA_ERR M4OSA_fileReadSetOption_optim( M4OSA_Context context,
82                                          M4OSA_FileReadOptionID optionID,
83                                          M4OSA_DataOption optionValue );
84 
85 #endif /* M4OSA_FILEREADER_OPTIM_H */
86