Add Download BT BlackList Model

This commit is contained in:
alphayax 2016-05-27 10:32:38 +02:00
parent 4b1244aa0c
commit 5c7dae69f4
2 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,54 @@
<?php
namespace alphayax\freebox\api\v3\models\Download;
use alphayax\freebox\api\v3\Model;
/**
* Class BlackListEntry
* @package alphayax\freebox\api\v3\models\Download
*/
class BlackListEntry extends Model {
/** @var string (Read-only) : entry ip */
protected $host;
/**
* @var string (Read-only) : blacklist reason
* @see alphayax\freebox\api\v3\symbols\Download\BlackListEntry\Reason
*/
protected $reason;
/** @var int (Read-only) : time left before blacklist removal */
protected $expire;
/** @var bool (Read-only) : does this entry applies to all torrents */
protected $global;
/**
* @return string
*/
public function getHost() {
return $this->host;
}
/**
* @return string
*/
public function getReason() {
return $this->reason;
}
/**
* @return int
*/
public function getExpire() {
return $this->expire;
}
/**
* @return boolean
*/
public function isGlobal() {
return $this->global;
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace alphayax\freebox\api\v3\symbols\Download\BlackListEntry;
/**
* Symbol Reason
* @package alphayax\freebox\api\v3\symbols\Download\BlackListEntry
*/
interface Reason {
/** not connected */
const DISCONNECTED = 'disconnected';
/** trying to connect to the peer */
const CONNECTING = 'connecting';
/** connected to the peer, negotiating capabilities */
const HANDSHAKING = 'handshaking';
/** ready to exchange data */
const READY = 'ready';
}