1 /***************************************************************************
2                           ADM_Aton  -  description
3                              -------------------
4 
5 	Helper class to deal with atom
6 
7     begin                : Mon Jul 21 2003
8     copyright            : (C) 2001 by mean
9     email                : fixounet@free.fr
10  ***************************************************************************/
11 
12 /***************************************************************************
13  *                                                                         *
14  *   This program is free software; you can redistribute it and/or modify  *
15  *   it under the terms of the GNU General Public License as published by  *
16  *   the Free Software Foundation; either version 2 of the License, or     *
17  *   (at your option) any later version.                                   *
18  *                                                                         *
19  ***************************************************************************/
20 #pragma once
21 /**
22  * \class adm_atom
23  * @param fd
24  */
25 class adm_atom
26 {
27 public:
28 				adm_atom(FILE *fd);
29 				adm_atom(adm_atom *atom);
30 		adm_atom        *duplicate();
31 		bool	        skipAtom( void );
getStartPos(void)32                 uint32_t        getStartPos(void) {return _atomStart;}
33 		uint32_t	getFCC( void );
34 		int64_t         getRemainingSize( void );
35 		bool		readPayload( uint8_t *whereto, uint32_t rd );
36 		bool		isDone(void );
37 		bool		skipBytes(uint32_t nb );
38 
39 		uint64_t	read64( void );
40 		uint32_t	read32( void );
41 		uint16_t	read16( void );
42 		uint8_t	        read( void );
43 
44 private:
45 		FILE 		*_fd;
46 		int64_t		_atomStart,_atomSize;
47 		uint32_t	_atomFCC;
48 		bool		dumpAtom( void );
49                                 adm_atom(int x); // for duplicate
adm_atom(const adm_atom & x)50                                 adm_atom(const adm_atom &x) // do not use
51                                 {
52 
53                                 }
54 
55 };
56 // eof