[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/networks/bittorrent/bTTypes.m
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/networks/bittorrent/bTTypes.ml |
Date: |
Mon, 07 Nov 2005 15:11:54 -0500 |
Index: mldonkey/src/networks/bittorrent/bTTypes.ml
diff -u mldonkey/src/networks/bittorrent/bTTypes.ml:1.26
mldonkey/src/networks/bittorrent/bTTypes.ml:1.27
--- mldonkey/src/networks/bittorrent/bTTypes.ml:1.26 Thu Aug 4 22:00:23 2005
+++ mldonkey/src/networks/bittorrent/bTTypes.ml Mon Nov 7 20:11:42 2005
@@ -21,8 +21,10 @@
open Md4
open CommonTypes
open CommonDownloads
+open CommonStats
open BTRate
+
type torrent = {
mutable torrent_name : string;
mutable torrent_name_utf8 : string;
@@ -88,25 +90,69 @@
| Brand_xantorrent
| Brand_xbt
| Brand_ziptorrent
+| Brand_moopolice
+| Brand_utorrent
+| Brand_opera
+
+let brand_list = [
+ ( Brand_unknown , "unknown" , "unk" ) ;
+ ( Brand_abc , "ABC" , "abc" ) ;
+ ( Brand_arctic , "Arctic" , "arc" ) ;
+ ( Brand_azureus , "Azureus" , "azu" ) ;
+ ( Brand_bitbuddy , "Bitbuddy" , "bud" ) ;
+ ( Brand_bitcomet , "BitComet" , "com" ) ;
+ ( Brand_bitkitten , "BitKitten (libTorrent)" , "kit" ) ;
+ ( Brand_bitlord , "BitLord" , "lor" ) ;
+ ( Brand_bitsonwheels , "BitsOnWheels" , "bow" ) ;
+ ( Brand_bitspirit , "BitSpirit" , "spi" ) ;
+ ( Brand_bittornado , "BitTornado" , "trn" ) ;
+ ( Brand_bittorrentx , "BitTorrent X" , "btx" ) ;
+ ( Brand_btplus , "BitTorrent Plus!" , "plu" ) ;
+ ( Brand_btslave , "BTSlave" , "sla" ) ;
+ ( Brand_btugaxp , "BTugaXP" , "uga" ) ;
+ ( Brand_burst , "Burst !" , "brs" ) ;
+ ( Brand_ctorrent , "CTorrent" , "cto" ) ;
+ ( Brand_deadmanwalking , "Deadman Walking" , "dmw" ) ;
+ ( Brand_exeem , "eXeem" , "exm" ) ;
+ ( Brand_experimental , "Experimental" , "exp" ) ;
+ ( Brand_g3torrent , "G3 Torrent" , "g3t" ) ;
+ ( Brand_libtorrent , "libTorrent" , "lib" ) ;
+ ( Brand_mainline , "Mainline" , "mai" ) ;
+ ( Brand_martiniman , "Martini Man" , "mar" ) ;
+ ( Brand_mldonkey , "MLdonkey" , "mld" ) ;
+ ( Brand_moonlighttorrent , "MoonlightTorrent" , "mlt" ) ;
+ ( Brand_plus , "Plus" , "plu" ) ;
+ ( Brand_shadow , "Shad0w" , "sdo" ) ;
+ ( Brand_sharenet , "Sharenet" , "shn" ) ;
+ ( Brand_shareaza , "Shareaza" , "shz" ) ;
+ ( Brand_simplebt , "SimpleBT" , "sbt" ) ;
+ ( Brand_snark , "Snark" , "snk" ) ;
+ ( Brand_swarmscope , "SwarmScope" , "sws" ) ;
+ ( Brand_swarmy , "Swarmy" , "swy" ) ;
+ ( Brand_swiftbit , "SwiftBit" , "swb" ) ;
+ ( Brand_teeweety , "Teeweety" , "twt" ) ;
+ ( Brand_torrentdotnet , "Torrent.NET" , "t.n" ) ;
+ ( Brand_torrentstorm , "TorrentStorm" , "sto" ) ;
+ ( Brand_turbobt , "TurboBT" , "tbt" ) ;
+ ( Brand_upnp , "UPNP" , "upn" ) ;
+ ( Brand_xantorrent , "XanTorrent" , "xat" ) ;
+ ( Brand_xbt , "XBT" , "xbt" ) ;
+ ( Brand_ziptorrent , "ZipTorrent" , "zit" ) ;
+ ( Brand_moopolice , "MooPolice" , "moo" ) ;
+ ( Brand_utorrent , "uTorrent" , "uTo" ) ;
+ ( Brand_opera , "Opera" , "opr" ) ;
+ ]
+
+let brand_count = List.length brand_list
-let brand_count = 43
+let brand_to_string brand =
+ find_brand_to_string brand brand_list false
-type brand_stat = {
- mutable brand_seen : int;
- mutable brand_banned : int;
- mutable brand_filerequest : int;
- mutable brand_download : Int64.t;
- mutable brand_upload : Int64.t;
-}
-
-let dummy_stats =
- {
- brand_seen = 0;
- brand_banned = 0;
- brand_filerequest = 0;
- brand_download = Int64.zero;
- brand_upload = Int64.zero
- }
+let brand_to_string_short brand =
+ find_brand_to_string brand brand_list true
+
+let brand_to_int brand =
+ find_int_of_brand brand brand_list
type client = {
client_client : client CommonClient.client_impl;
@@ -150,7 +196,6 @@
mutable client_incoming : bool;
mutable client_registered_bitfield : bool;
mutable client_last_optimist : int;
- mutable client_software : string;
}
and tracker_info = {
- [Mldonkey-commits] Changes to mldonkey/src/networks/bittorrent/bTTypes.ml,
mldonkey-commits <=