fdt.h

Go to the documentation of this file.
00001 
00033 #ifndef _FDT_H_
00034 #define _FDT_H_
00035 
00036 #include "flute_defines.h"
00037 #include "../alclib/defines.h"
00038 #include "../alclib/utils.h"
00039 
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043 
00049 typedef struct file {
00050         
00051         struct file *prev;                              
00052         struct file *next;                              
00054         int status;                                             
00056         unsigned long long expires;             
00058         unsigned long long toi;                 
00059         unsigned long long content_len; 
00060         char *location;                                 
00061         char *md5;                                              
00063         /* These overwrite FDT level values */
00064 
00065         char *encoding;                                 
00066         char *type;                                             
00068         /* FEC OTI, these overwrite FDT level values */
00069 
00070         short fec_enc_id;                                       
00071         int fec_inst_id;                                        
00072         unsigned char finite_field;                     
00073         unsigned char nb_of_es_per_group;       
00074         unsigned int max_sb_len;                        
00075         unsigned short es_len;                          
00076         unsigned short max_nb_of_es;            
00078         /* FEC OTI, only at file level */
00079 
00080         unsigned long long transfer_len;        
00082 } file_t;
00083 
00089 typedef struct fdt {
00090         unsigned long long expires;     /* fdt expiration time in NTP-time */
00091         BOOL complete;                          
00092         file_t *file_list;                      
00093         unsigned int nb_of_files;       
00095         /* Other common parameters */
00096 
00097         char *type;                                     
00098         char *encoding;                         
00100         /* FEC OTI */
00101 
00102         short fec_enc_id;                                       
00103         int fec_inst_id;                                        
00104         unsigned char finite_field;                     
00105         unsigned char nb_of_es_per_group;       
00106         unsigned int max_sb_len;                        
00107         unsigned short es_len;                          
00108         unsigned short max_nb_of_es;            
00110 } fdt_t;
00111 
00117 void initialize_fdt_parser(void);
00118 
00124 void release_fdt_parser(void);
00125 
00135 fdt_t* decode_fdt_payload(char *fdt_payload);
00136 
00144 void FreeFDT(fdt_t *fdt);
00145 
00158 int update_fdt(fdt_t *fdt_db, fdt_t *instance);
00159 
00170 file_t* find_file_with_toi(fdt_t *fdt, unsigned long long toi);
00171 
00180 void PrintFDT(fdt_t *fdt, int s_id);
00181 
00189 void free_file(file_t *file);
00190 
00191 #ifdef __cplusplus
00192 }; //extern "C"
00193 #endif
00194 
00195 #endif

Generated on Fri Mar 9 20:08:52 2007 for MAD-FCL by  doxygen 1.5.0