/[axel]/branches/3.x-broken/src/axel.h
ViewVC logotype

Diff of /branches/3.x-broken/src/axel.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 79 by phihag-guest, Tue Dec 30 20:13:35 2008 UTC revision 80 by phihag-guest, Sat Jan 3 07:54:10 2009 UTC
# Line 86  struct axel_struct { Line 86  struct axel_struct {
86          /** A function that displays messages with the following parameters:          /** A function that displays messages with the following parameters:
87    
88          axel: A pointer to the calling axel structure          axel: A pointer to the calling axel structure
89          verbosity: one of the VERBOSITY_* values          rel: Importance of this message, may be used to supress some
90          message: The message to display (already i18ned), will be freed upon returning          message: The message to display (already i18ned), will be freed upon returning
91    
92          NULL for no message display          NULL for no message display
93          */          */
94          void (*message_handler)(const struct axel_struct* axel, int verbosity, const char* message);          void (*message_handler)(const struct axel_struct* axel, message_relevance rel, const char* message);
95          /**          /**
96          * A handler that displays the current download state.          * A handler that displays the current download state.
97          * May be called frequently. Is guaranteed to be called on state changes and messages.          * May be called frequently. Is guaranteed to be called on state changes and messages.
# Line 118  struct axel_struct { Line 118  struct axel_struct {
118          AXEL_FILESIZE size; // The full file size in Byte, or AXEL_SIZE_UNDETERMINED if the file size is not yet determined or undeterminable          AXEL_FILESIZE size; // The full file size in Byte, or AXEL_SIZE_UNDETERMINED if the file size is not yet determined or undeterminable
119          AXEL_TIME start_utime; // Start time in microseconds          AXEL_TIME start_utime; // Start time in microseconds
120    
121          // The download's state, one of the AXEL_STATE_* constants          int state; // The download's state, one of the AXEL_STATE_* constants
         int state;  
   
         // Time to wait because of speed limit.  
         int delay_time;  
122    
123          // Messages          // Messages
124          message_queue_t msgs[1];          message_queue_t msgs[1];
# Line 130  struct axel_struct { Line 126  struct axel_struct {
126  };  };
127  typedef struct axel_struct axel_t;  typedef struct axel_struct axel_t;
128    
129  // Main axel API: The following methods are used by the frontend.  // Main axel API: The following methods form the axel API.
130  void axel_init(axel_t* ax, const conf_t *conf);  void axel_init(axel_t* ax, const conf_t *conf);
131  _Bool axel_addurlstr(axel_t* axel, const char* urlstr, int priority);  _Bool axel_addurlstr(axel_t* axel, const char* urlstr, int priority);
132  axel_state axel_download(axel_t* axel);  axel_state axel_download(axel_t* axel);
133  void axel_destroy(axel_t* axel);  void axel_destroy(axel_t* axel);
134    
135  // For other functions called only from axel's core, see messages.h  // Called from axel's core, but not the main thread
136    void axel_message_static(axel_t* axel, message_relevance rel, const char* msgstr);
137    void axel_message_heap(axel_t* axel, message_relevance rel, char* msgstr);
138    void axel_message_fmt(axel_t *axel, message_relevance rel, const char *format, ... );
139    void axel_message(axel_t* axel, message_t* msg);
140    

Legend:
Removed from v.79  
changed lines
  Added in v.80

  ViewVC Help
Powered by ViewVC 1.1.5