add_torrent_params.hpp
parent
99111c0bb2
commit
f12e0e9bf0
|
@ -1,4 +1,14 @@
|
||||||
from ..utils import Enum
|
from ..utils import Enum
|
||||||
|
|
||||||
|
class torrent_info(object):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class torrent_plugin(object):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class torrent_handle(object):
|
||||||
|
pass
|
||||||
|
|
||||||
class add_torrent_params(object):
|
class add_torrent_params(object):
|
||||||
flags_t = Enum({
|
flags_t = Enum({
|
||||||
'flag_seed_mode': 0x001,
|
'flag_seed_mode': 0x001,
|
||||||
|
@ -20,28 +30,48 @@ class add_torrent_params(object):
|
||||||
default_flags = flags_t.flag_pinned | flags_t.flag_update_subscribe |\
|
default_flags = flags_t.flag_pinned | flags_t.flag_update_subscribe |\
|
||||||
flags_t.flag_auto_managed | flags_t.flag_paused | flags_t.flag_apply_ip_filter |\
|
flags_t.flag_auto_managed | flags_t.flag_paused | flags_t.flag_apply_ip_filter |\
|
||||||
flags_t.flag_need_save_resume
|
flags_t.flag_need_save_resume
|
||||||
version = int()
|
version = 0
|
||||||
ti = None
|
ti = None
|
||||||
trackers = list()
|
trackers = []
|
||||||
tracker_tiers = list()
|
tracker_tiers = []
|
||||||
dht_nodes = list()
|
dht_nodes = []
|
||||||
name = ''
|
name = ''
|
||||||
save_path = ''
|
save_path = ''
|
||||||
storage_mode = storage_mode_t
|
storage_mode = storage_mode_t
|
||||||
storage = storage_constructor_type
|
storage = storage_constructor_type
|
||||||
userdata = None
|
userdata = None
|
||||||
file_priorities = list()
|
file_priorities = []
|
||||||
extensions = list()
|
extensions = []
|
||||||
trackerid = ''
|
trackerid = ''
|
||||||
url = ''
|
url = ''
|
||||||
flags = int()
|
flags = 0
|
||||||
info_hash = None
|
info_hash = None
|
||||||
max_uploads = int()
|
max_uploads = 0
|
||||||
max_connections = int()
|
max_connections = 0
|
||||||
upload_limit = int()
|
upload_limit = 0
|
||||||
download_limit = int()
|
download_limit = 0
|
||||||
total_uploaded = int()
|
total_uploaded = 0
|
||||||
total_downloaded = int()
|
total_downloaded = 0
|
||||||
|
active_time = 0
|
||||||
|
finished_time = 0
|
||||||
|
seeding_time = 0
|
||||||
|
added_time = 0
|
||||||
|
completed_time = 0
|
||||||
|
last_seen_complete = 0
|
||||||
|
num_complete = 0
|
||||||
|
num_incomplete = 0
|
||||||
|
num_downloaded = 0
|
||||||
|
http_seeds = []
|
||||||
|
url_seeds = []
|
||||||
|
peers = []
|
||||||
|
banned_peers = []
|
||||||
|
unfinished_pieces = []
|
||||||
|
have_pieces = []
|
||||||
|
verified_pieces = []
|
||||||
|
piece_priorities = []
|
||||||
|
merkle_tree = []
|
||||||
|
renamed_files = []
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
version = LIBTORRENT_VERSION_NUM,
|
version = LIBTORRENT_VERSION_NUM,
|
||||||
storage_mode = storage_mode_sparse,
|
storage_mode = storage_mode_sparse,
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
# Надо найти определение структур и определить объекты
|
||||||
|
address = 'boost::asio::ip::address'
|
||||||
|
address_v4 = 'boost::asio::ip::address_v4'
|
||||||
|
address_v6 = 'boost::asio::ip::address_v6'
|
|
@ -1,8 +1,7 @@
|
||||||
from ..utils import Enum
|
from ..utils import Enum
|
||||||
|
|
||||||
class Alert(object):
|
class Alert(object):
|
||||||
def __init__(self):
|
category_t = Enum({
|
||||||
self.category_t = Enum({
|
|
||||||
'error_notification': 0x1,
|
'error_notification': 0x1,
|
||||||
'peer_notification': 0x2,
|
'peer_notification': 0x2,
|
||||||
'port_mapping_notification': 0x4,
|
'port_mapping_notification': 0x4,
|
||||||
|
@ -25,4 +24,15 @@ class Alert(object):
|
||||||
'picker_log_notification': 0x100000,
|
'picker_log_notification': 0x100000,
|
||||||
'all_categories': 0x7fffffff
|
'all_categories': 0x7fffffff
|
||||||
})
|
})
|
||||||
|
def timestamp(self):
|
||||||
|
pass
|
||||||
|
def type(self):
|
||||||
|
pass
|
||||||
|
def what(self):
|
||||||
|
pass
|
||||||
|
def message(self):
|
||||||
|
pass
|
||||||
|
def category(self):
|
||||||
|
pass
|
||||||
|
|
||||||
alert = Alert()
|
alert = Alert()
|
||||||
|
|
Loading…
Reference in New Issue