1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
//! # KGet - A Powerful Download Library for Rust
//!
//! `kget` provides robust downloading capabilities for modern applications:
//!
//! - **HTTP/HTTPS downloads** with parallel connections (up to 32x speed)
//! - **FTP/SFTP support** for legacy and secure file transfers
//! - **BitTorrent** via magnet links with native client (requires `torrent-native` feature)
//! - **ISO verification** with automatic SHA-256 integrity checking
//! - **Auto-optimization** based on file type and network conditions
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use kget::{download, DownloadOptions, ProxyConfig, Optimizer};
//!
//! // Simple download
//! let proxy = ProxyConfig::default();
//! let optimizer = Optimizer::new();
//! let options = DownloadOptions::default();
//! download("https://example.com/file.zip", proxy, optimizer, options, None).unwrap();
//! ```
//!
//! ## Advanced Download with Progress
//!
//! ```rust,no_run
//! use kget::{AdvancedDownloader, ProxyConfig, Optimizer};
//!
//! let mut downloader = AdvancedDownloader::new(
//! "https://example.com/large.iso".to_string(),
//! "large.iso".to_string(),
//! false,
//! ProxyConfig::default(),
//! Optimizer::new(),
//! );
//!
//! // Set progress callback
//! downloader.set_progress_callback(|progress| {
//! println!("Progress: {:.1}%", progress * 100.0);
//! });
//!
//! downloader.download().unwrap();
//! ```
//!
//! ## Torrent Downloads
//!
//! ```rust,no_run
//! use kget::torrent::{download_magnet, TorrentCallbacks};
//! use kget::{ProxyConfig, Optimizer};
//! use std::sync::Arc;
//!
//! let callbacks = TorrentCallbacks {
//! status: Some(Arc::new(|msg| println!("Status: {}", msg))),
//! progress: Some(Arc::new(|p| println!("Progress: {:.1}%", p * 100.0))),
//! };
//!
//! download_magnet(
//! "magnet:?xt=urn:btih:...",
//! "./downloads",
//! false,
//! ProxyConfig::default(),
//! Optimizer::new(),
//! callbacks,
//! ).unwrap();
//! ```
//!
//! ## Features
//!
//! - `gui` - Cross-platform GUI using egui (includes `torrent-native`)
//! - `torrent-native` - Native BitTorrent client using librqbit
//! - `torrent-transmission` - Transmission RPC integration
// Core modules
// Protocol modules
// Re-exports: Configuration
pub use ;
// Re-exports: Core download functionality
pub use AdvancedDownloader;
pub use ;
pub use Optimizer;
pub use create_progress_bar;
// Re-exports: Torrent types (when available)
pub use ;
// Re-exports: Utilities
pub use ;
/// Options for configuring a download operation.
///
/// # Example
///
/// ```rust
/// use kget::DownloadOptions;
///
/// let options = DownloadOptions {
/// quiet_mode: true,
/// output_path: Some("./downloads/file.zip".to_string()),
/// verify_iso: false,
/// expected_sha256: None,
/// };
/// ```
/// Type alias for progress callbacks (0.0 to 1.0)
pub type ProgressCallback = Arc;
/// Type alias for status message callbacks
pub type StatusCallback = Arc;
/// Prelude module for convenient imports