|
Data Structures |
struct | vernum |
struct | dl_key |
struct | dl_server |
struct | dl_buffers |
| Structure used to control read buffering for active downloads. More...
|
struct | download |
Defines |
#define | URN_INDEX 0xffffffff /**< Marking index, indicates URN instead */ |
| Marking index, indicates URN instead.
|
#define | dl_server_valid(x) ((x) != NULL && (x)->magic == DL_SERVER_MAGIC) |
#define | DL_F_URIRES 0x00000001 /**< We sent a "/uri-res/N2R?" request */ |
| We sent a "/uri-res/N2R?" request.
|
#define | DL_F_PUSH_IGN 0x00000002 /**< Trying to ignore push flag */ |
| Trying to ignore push flag.
|
#define | DL_F_OVERLAPPED 0x00000004 /**< We went through overlap checking */ |
| We went through overlap checking.
|
#define | DL_F_REPLIED 0x00000008 /**< Servent replied to last request */ |
| Servent replied to last request.
|
#define | DL_F_CHUNK_CHOSEN 0x00000010 /**< Retrying with specific chunk */ |
| Retrying with specific chunk.
|
#define | DL_F_SHRUNK_REPLY 0x00000020 /**< Server sending less than we asked */ |
| Server sending less than we asked.
|
#define | DL_F_SUNK_DATA 0x00000040 /**< Whether we previously sunk data */ |
| Whether we previously sunk data.
|
#define | DL_F_ACTIVE_QUEUED 0x00000080 /**< Download is actively queued */ |
| Download is actively queued.
|
#define | DL_F_PASSIVE_QUEUED 0x00000100 /**< Download is passively queued */ |
| Download is passively queued.
|
#define | DL_F_DNS_LOOKUP 0x00000200 /**< Attempted DNS lookup */ |
| Attempted DNS lookup.
|
#define | DL_F_BROWSE 0x00000400 /**< Browse host type (requests "/") */ |
| Browse host type (requests "/").
|
#define | DL_F_TRANSIENT 0x20000000 /**< Transient, don't persist */ |
| Transient, don't persist.
|
#define | DL_F_SUSPENDED 0x40000000 /**< Suspended, do not schedule */ |
| Suspended, do not schedule.
|
#define | DL_F_MARK 0x80000000 /**< Marked in traversal */ |
| Marked in traversal.
|
#define | DLS_A_UNUSED_1 0x00000001 /**< UNUSED */ |
| UNUSED.
|
#define | DLS_A_PUSH_IGN 0x00000002 /**< Ignore pushes, connect directly */ |
| Ignore pushes, connect directly.
|
#define | DLS_A_UNUSED_2 0x00000004 /**< UNUSED */ |
| UNUSED.
|
#define | DLS_A_NO_HTTP_1_1 0x00000008 /**< Server does NOT support HTTP/1.1 */ |
| Server does NOT support HTTP/1.1.
|
#define | DLS_A_MINIMAL_HTTP 0x00000010 /**< Use minimalist HTTP with server */ |
| Use minimalist HTTP with server.
|
#define | DLS_A_BANNING 0x00000020 /**< Server might be banning us */ |
| Server might be banning us.
|
#define | DLS_A_FAKE_G2 0x00000040 /**< Fake a G2 server */ |
| Fake a G2 server.
|
#define | DLS_A_DNS_LOOKUP 0x00000080 /**< Perform DNS lookup if possible */ |
| Perform DNS lookup if possible.
|
#define | DLS_A_REMOVED 0x80000000 /**< Server marked for removal */ |
| Server marked for removal.
|
#define | download_guid(d) ((d)->server->key->guid) |
#define | download_addr(d) ((d)->server->key->addr) |
#define | download_port(d) ((d)->server->key->port) |
#define | download_vendor(d) ((d)->server->vendor) |
#define | download_country(d) ((d)->server->country) |
#define | download_hostname(d) ((d)->server->hostname) |
#define | download_vendor_str(d) ((d)->server->vendor ? (d)->server->vendor : "") |
#define | download_path(d) ((d)->file_info->path) |
#define | download_outname(d) ((d)->file_info->file_name) |
#define | download_filesize(d) ((d)->file_info->size) |
#define | download_filedone(d) ((d)->file_info->done) |
#define | DOWNLOAD_IS_QUEUED(d) ((d)->status == GTA_DL_QUEUED) |
#define | DOWNLOAD_IS_VERIFYING(d) |
#define | DOWNLOAD_IS_MOVING(d) |
#define | DOWNLOAD_IS_STOPPED(d) |
#define | DOWNLOAD_IS_ACTIVE(d) ( (d)->status == GTA_DL_RECEIVING ) |
#define | DOWNLOAD_IS_WAITING(d) ( (d)->status == GTA_DL_TIMEOUT_WAIT) |
#define | DOWNLOAD_IS_ESTABLISHING(d) |
#define | DOWNLOAD_IS_EXPECTING_GIV(d) |
#define | DOWNLOAD_IS_RUNNING(d) |
#define | DOWNLOAD_IS_IN_PUSH_MODE(d) (d->push) |
#define | DOWNLOAD_IS_VISIBLE(d) (d->visible) |
Typedefs |
typedef guint32 | gnet_src_t |
typedef void(* | src_listener_t )(gnet_src_t) |
typedef download | download_t |
Enumerations |
enum | gnet_src_ev_t {
EV_SRC_ADDED = 0,
EV_SRC_REMOVED,
EV_SRC_INFO_CHANGED,
EV_SRC_STATUS_CHANGED,
EV_SRC_RANGES_CHANGED,
EV_SRC_EVENTS
} |
enum | dl_list {
DL_LIST_INVALID = -1,
DL_LIST_RUNNING = 0,
DL_LIST_WAITING = 1,
DL_LIST_STOPPED = 2,
DL_LIST_SZ = 3
} |
enum | dl_server_magic { DL_SERVER_MAGIC = 0x5e45e4ffU
} |
enum | download_status_t {
GTA_DL_QUEUED = 1,
GTA_DL_CONNECTING = 2,
GTA_DL_PUSH_SENT = 3,
GTA_DL_FALLBACK = 4,
GTA_DL_REQ_SENT = 5,
GTA_DL_HEADERS = 6,
GTA_DL_RECEIVING = 7,
GTA_DL_COMPLETED = 8,
GTA_DL_ERROR = 9,
GTA_DL_ABORTED = 10,
GTA_DL_TIMEOUT_WAIT = 11,
GTA_DL_REMOVED = 12,
GTA_DL_VERIFY_WAIT = 13,
GTA_DL_VERIFYING = 14,
GTA_DL_VERIFIED = 15,
GTA_DL_MOVE_WAIT = 16,
GTA_DL_MOVING = 17,
GTA_DL_DONE = 18,
GTA_DL_SINKING = 19,
GTA_DL_ACTIVE_QUEUED = 20,
GTA_DL_PASSIVE_QUEUED = 21,
GTA_DL_REQ_SENDING = 22
} |
| Download states. More...
|
enum | dl_bufmode { DL_BUF_READING = 0,
DL_BUF_WRITING
} |