📄 fdt.h
字号:
/* $Author: peltotal $ $Date: 2006/02/17 11:12:37 $ $Revision: 1.3 $ *//* * MAD-FLUTELIB: Implementation of FLUTE protocol. * Copyright (c) 2003-2006 TUT - Tampere University of Technology * main authors/contacts: jani.peltotalo@tut.fi and sami.peltotalo@tut.fi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */#ifndef _FDT_H_#define _FDT_H_/**** Typedefs ****/typedef struct file { struct file *prev; struct file *next; int is_downloaded; /* 0 = not, 1 = downloading, 2 = downloaded */#ifdef WIN32 ULONGLONG toi; ULONGLONG expires; ULONGLONG toi_len; ULONGLONG file_len;#else unsigned long long toi; unsigned long long expires; unsigned long long toi_len; unsigned long long file_len;#endif char *location; char *type; char *md5; char *encoding;/* FEC OTI */ short fec_enc_id; int fec_inst_id; unsigned int max_sb_len; unsigned short es_len; unsigned short max_nb_of_es;} file_t;typedef struct fdt {#ifdef WIN32 ULONGLONG expires;#else unsigned long long expires; /* fdt expiration time in NTP-time */#endif bool complete; file_t *file_list; unsigned int nb_of_files; /* Other common parameters */ char *type; char *encoding; /* FEC OTI */ short fec_enc_id; int fec_inst_id; unsigned int max_sb_len; unsigned short es_len; unsigned short max_nb_of_es;} fdt_t;typedef struct fdt_th_args{ int s_id; fdt_t *fdt; int rx_automatic; /* Download files defined in fdt automatically */ char *filetoken; /* wild card filetoken */ int accept_expired_fdt_inst; /* Accept expired FDT Instances in receiver */ int verbosity;} fdt_th_args_t;/**** Functions ****/fdt_t* decode_fdt_payload(char *fdt_payload);void FreeFDT(fdt_t *fdt);void free_file(file_t *file);int update_fdt(fdt_t *fdt_db, fdt_t *instance);void PrintFDT(fdt_t *fdt, int s_id);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -