flute.h

Go to the documentation of this file.
00001 
00033 #ifndef _FLUTE_H_
00034 #define _FLUTE_H_
00035 
00036 #if defined(__cplusplus) && defined(_MSC_VER) 
00037 #include <winsock2.h> 
00038 #include <ws2tcpip.h> 
00039 #endif
00040 
00041 #include "../alclib/defines.h"
00042 #include "../alclib/alc_session.h"
00043 #include "parse_args.h"
00044 #include "fdt.h"
00045 
00051 #include "flute_defines.h"
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00058 #define FILE_URI_TABLE_SIZE 10
00059 
00065 typedef struct flute_sender {
00066   int s_id;                     
00067   fdt_t *fdt;           
00068 } flute_sender_t;
00069 
00075 typedef struct flute_receiver {
00076   int s_id;                                                                             
00077   fdt_t *fdt;                                                                   
00078   int rx_automatic;                                                             
00079   char *file_uri_table[FILE_URI_TABLE_SIZE];    
00080   char *wildcard_token;                         
00081   int accept_expired_fdt_inst;                                  
00082   int verbosity;                                                                
00083 } flute_receiver_t;
00084 
00090 typedef struct missing_block {
00091     struct missing_block *next;
00092     unsigned long long first;
00093     unsigned long long last;
00094 } missing_block_t;
00095 
00101 typedef struct flute_receiver_report {
00102     struct flute_receiver_report *next;
00103     char *file_name;
00104     char *md5;
00105     missing_block_t *mb_list;
00106 } flute_receiver_report_t;
00107 
00119 int flute_sender(arguments_t *a, int *s_id, unsigned long long *session_size);
00120 
00133 int flute_receiver(arguments_t *a, int *s_id);
00134 
00148 int flute_receiver_report(arguments_t *a, int *s_id, flute_receiver_report_t **report);
00149 
00157 void free_receiver_report(flute_receiver_report_t *report);
00158 
00170 unsigned long long flute_session_size(arguments_t *a, int *s_id);
00171 
00180 void set_flute_session_state(int s_id, enum alc_session_states state);
00181 
00189 void set_all_flute_sessions_state(enum alc_session_states state);
00190 
00199 void set_flute_session_base_rate(int s_id, int base_tx_rate);
00200 
00208 int start_up_flute(void);
00209 
00217 void shut_down_flute(arguments_t* anArguments);
00218 
00224 void shut_down_flute2(void);
00225 
00226 #ifdef __cplusplus
00227 }; //extern "C"
00228 #endif
00229 
00230 #endif
00231 

Generated on Fri Mar 9 19:59:53 2007 for MAD-FCL by  doxygen 1.5.0