~ubuntu-branches/ubuntu/dapper/curl/dapper-security

« back to all changes in this revision

Viewing changes to lib/progress.h

  • Committer: Bazaar Package Importer
  • Author(s): Domenico Andreoli
  • Date: 2002-03-12 19:06:21 UTC
  • Revision ID: james.westby@ubuntu.com-20020312190621-iqx7k9cipo5d0ifr
Tags: upstream-7.9.5
ImportĀ upstreamĀ versionĀ 7.9.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __PROGRESS_H
 
2
#define __PROGRESS_H
 
3
/*****************************************************************************
 
4
 *                                  _   _ ____  _     
 
5
 *  Project                     ___| | | |  _ \| |    
 
6
 *                             / __| | | | |_) | |    
 
7
 *                            | (__| |_| |  _ <| |___ 
 
8
 *                             \___|\___/|_| \_\_____|
 
9
 *
 
10
 * Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
 
11
 *
 
12
 * In order to be useful for every potential user, curl and libcurl are
 
13
 * dual-licensed under the MPL and the MIT/X-derivate licenses.
 
14
 *
 
15
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 
16
 * copies of the Software, and permit persons to whom the Software is
 
17
 * furnished to do so, under the terms of the MPL or the MIT/X-derivate
 
18
 * licenses. You may pick one of these licenses.
 
19
 *
 
20
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 
21
 * KIND, either express or implied.
 
22
 *
 
23
 * $Id: progress.h,v 1.14 2001/11/20 15:00:50 bagder Exp $
 
24
 *****************************************************************************/
 
25
 
 
26
#include "timeval.h"
 
27
 
 
28
 
 
29
typedef enum {
 
30
  TIMER_NONE,
 
31
  TIMER_NAMELOOKUP,
 
32
  TIMER_CONNECT,
 
33
  TIMER_PRETRANSFER,
 
34
  TIMER_STARTTRANSFER,
 
35
  TIMER_POSTRANSFER,
 
36
  TIMER_STARTSINGLE,
 
37
  TIMER_LAST /* must be last */
 
38
} timerid;
 
39
  
 
40
void Curl_pgrsDone(struct connectdata *);
 
41
void Curl_pgrsStartNow(struct SessionHandle *data);
 
42
void Curl_pgrsSetDownloadSize(struct SessionHandle *data, double size);
 
43
void Curl_pgrsSetUploadSize(struct SessionHandle *data, double size);
 
44
void Curl_pgrsSetDownloadCounter(struct SessionHandle *data, double size);
 
45
void Curl_pgrsSetUploadCounter(struct SessionHandle *data, double size);
 
46
int Curl_pgrsUpdate(struct connectdata *);
 
47
void Curl_pgrsTime(struct SessionHandle *data, timerid timer);
 
48
 
 
49
 
 
50
/* Don't show progress for sizes smaller than: */
 
51
#define LEAST_SIZE_PROGRESS BUFSIZE
 
52
 
 
53
#define PROGRESS_DOWNLOAD (1<<0)
 
54
#define PROGRESS_UPLOAD   (1<<1)
 
55
#define PROGRESS_DOWN_AND_UP (PROGRESS_UPLOAD | PROGRESS_DOWNLOAD)
 
56
 
 
57
#define PGRS_SHOW_DL (1<<0)
 
58
#define PGRS_SHOW_UL (1<<1)
 
59
#define PGRS_DONE_DL (1<<2)
 
60
#define PGRS_DONE_UL (1<<3)
 
61
#define PGRS_HIDE    (1<<4)
 
62
#define PGRS_UL_SIZE_KNOWN (1<<5)
 
63
#define PGRS_DL_SIZE_KNOWN (1<<6)
 
64
 
 
65
#define PGRS_HEADERS_OUT (1<<7) /* set when the headers have been written */
 
66
 
 
67
 
 
68
#endif /* __PROGRESS_H */