2 * Copyright (c) 2013 Grzegorz Kostka (kostka.grzegorz@gmail.com)
\r
6 * Copyright (c) 2012 Martin Sucha
\r
7 * Copyright (c) 2012 Frantisek Princ
\r
8 * All rights reserved.
\r
10 * Redistribution and use in source and binary forms, with or without
\r
11 * modification, are permitted provided that the following conditions
\r
14 * - Redistributions of source code must retain the above copyright
\r
15 * notice, this list of conditions and the following disclaimer.
\r
16 * - Redistributions in binary form must reproduce the above copyright
\r
17 * notice, this list of conditions and the following disclaimer in the
\r
18 * documentation and/or other materials provided with the distribution.
\r
19 * - The name of the author may not be used to endorse or promote products
\r
20 * derived from this software without specific prior written permission.
\r
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
\r
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
\r
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
\r
25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
\r
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
\r
27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
\r
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
\r
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
\r
31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
34 /** @addtogroup lwext4
\r
38 * @file ext4_inode.h
\r
39 * @brief Inode handle functions
\r
42 #ifndef EXT4_INODE_H_
\r
43 #define EXT4_INODE_H_
\r
45 #include <ext4_config.h>
\r
48 /**@brief TODO: ...*/
\r
49 uint32_t ext4_inode_get_mode(struct ext4_sblock *sb, struct ext4_inode *inode);
\r
52 /**@brief TODO: ...*/
\r
53 void ext4_inode_set_mode(struct ext4_sblock *sb, struct ext4_inode *inode,
\r
56 /**@brief TODO: ...*/
\r
57 uint32_t ext4_inode_get_uid(struct ext4_inode *inode);
\r
59 /**@brief TODO: ...*/
\r
60 void ext4_inode_set_uid(struct ext4_inode *inode, uint32_t uid);
\r
62 /**@brief TODO: ...*/
\r
63 uint64_t ext4_inode_get_size(struct ext4_sblock *sb, struct ext4_inode *inode);
\r
65 /**@brief TODO: ...*/
\r
66 void ext4_inode_set_size(struct ext4_inode *inode, uint64_t size);
\r
68 /**@brief TODO: ...*/
\r
69 uint32_t ext4_inode_get_access_time(struct ext4_inode *inode);
\r
71 /**@brief TODO: ...*/
\r
72 void ext4_inode_set_access_time(struct ext4_inode *inode, uint32_t time);
\r
74 /**@brief TODO: ...*/
\r
75 uint32_t ext4_inode_get_change_inode_time(struct ext4_inode *inode);
\r
77 /**@brief TODO: ...*/
\r
78 void ext4_inode_set_change_inode_time(struct ext4_inode *inode,
\r
81 /**@brief TODO: ...*/
\r
82 uint32_t ext4_inode_get_modification_time(struct ext4_inode *inode);
\r
84 /**@brief TODO: ...*/
\r
85 void ext4_inode_set_modification_time(struct ext4_inode *inode, uint32_t time);
\r
87 /**@brief TODO: ...*/
\r
88 uint32_t ext4_inode_get_deletion_time(struct ext4_inode *inode);
\r
90 /**@brief TODO: ...*/
\r
91 void ext4_inode_set_deletion_time(struct ext4_inode *inode, uint32_t time);
\r
93 /**@brief TODO: ...*/
\r
94 uint32_t ext4_inode_get_gid(struct ext4_inode *inode);
\r
96 /**@brief TODO: ...*/
\r
97 void ext4_inode_set_gid(struct ext4_inode *inode, uint32_t gid);
\r
99 /**@brief TODO: ...*/
\r
100 uint16_t ext4_inode_get_links_count(struct ext4_inode *inode);
\r
102 /**@brief TODO: ...*/
\r
103 void ext4_inode_set_links_count(struct ext4_inode *inode, uint16_t cnt);
\r
105 /**@brief TODO: ...*/
\r
106 uint64_t ext4_inode_get_blocks_count(struct ext4_sblock *sb,
\r
107 struct ext4_inode *inode);
\r
109 /**@brief TODO: ...*/
\r
110 int ext4_inode_set_blocks_count(struct ext4_sblock *sb,
\r
111 struct ext4_inode *inode, uint64_t cnt);
\r
113 /**@brief TODO: ...*/
\r
114 uint32_t ext4_inode_get_flags(struct ext4_inode *inode);
\r
116 /**@brief TODO: ...*/
\r
117 void ext4_inode_set_flags(struct ext4_inode *inode, uint32_t flags);
\r
119 /**@brief TODO: ...*/
\r
120 uint32_t ext4_inode_get_generation(struct ext4_inode *inode);
\r
122 /**@brief TODO: ...*/
\r
123 void ext4_inode_set_generation(struct ext4_inode *inode, uint32_t gen);
\r
125 /**@brief TODO: ...*/
\r
126 uint64_t ext4_inode_get_file_acl(struct ext4_inode *inode,
\r
127 struct ext4_sblock *sb);
\r
129 /**@brief TODO: ...*/
\r
130 void ext4_inode_set_file_acl(struct ext4_inode *inode,
\r
131 struct ext4_sblock *sb, uint64_t acl);
\r
133 /**@brief TODO: ...*/
\r
134 uint32_t ext4_inode_get_direct_block(struct ext4_inode *inode, uint32_t idx);
\r
136 /**@brief TODO: ...*/
\r
137 void ext4_inode_set_direct_block(struct ext4_inode *inode, uint32_t idx,
\r
140 /**@brief TODO: ...*/
\r
141 uint32_t ext4_inode_get_indirect_block(struct ext4_inode *inode, uint32_t idx);
\r
143 /**@brief TODO: ...*/
\r
144 void ext4_inode_set_indirect_block(struct ext4_inode *inode, uint32_t idx,
\r
147 /**@brief TODO: ...*/
\r
148 bool ext4_inode_is_type(struct ext4_sblock *sb, struct ext4_inode *inode,
\r
151 /**@brief TODO: ...*/
\r
152 bool ext4_inode_has_flag(struct ext4_inode *inode, uint32_t f);
\r
154 /**@brief TODO: ...*/
\r
155 void ext4_inode_clear_flag(struct ext4_inode *inode, uint32_t f);
\r
157 /**@brief TODO: ...*/
\r
158 void ext4_inode_set_flag(struct ext4_inode *inode, uint32_t f);
\r
160 /**@brief TODO: ...*/
\r
161 bool ext4_inode_can_truncate(struct ext4_sblock *sb, struct ext4_inode *inode);
\r
164 struct ext4_extent_header * ext4_inode_get_extent_header(struct ext4_inode *inode);
\r
166 #endif /* EXT4_INODE_H_ */
\r