1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_FILE_IMAGE_H
25 #define INCLUDED_FILE_IMAGE_H
26 
27 #ifndef INCLUDED_STDDEF_H
28 #include <stddef.h>
29 #define INCLUDED_STDDEF_H
30 #endif
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /** file_image.
37  */
38 struct file_image_st
39 {
40     void * m_base;
41     size_t m_size;
42 };
43 
44 typedef struct file_image_st file_image;
45 
46 #define FILE_IMAGE_INITIALIZER { 0, 0 }
47 
48 
49 /** file_image_open.
50  */
51 int file_image_open (
52     file_image * image,
53     const char * filename);
54 
55 
56 /** file_image_pagein.
57  */
58 int file_image_pagein (
59 	file_image * image);
60 
61 
62 /** file_image_close.
63  */
64 int file_image_close (
65     file_image * image);
66 
67 
68 /** Epilog.
69  */
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* INCLUDED_ODEP_IMAGE_H */
75