Add Connection API
This commit is contained in:
parent
8b29c095c7
commit
cd34f69e27
|
@ -28,6 +28,11 @@ Jusqu'a présent, les fonctionalités suivantes ont été implémentées :
|
|||
- Downloads
|
||||
- Download
|
||||
- Configuration
|
||||
- Connection
|
||||
- Connection (Core)
|
||||
- xDSL
|
||||
- FTTH
|
||||
- DynDns
|
||||
- DHCP
|
||||
- FTP
|
||||
- LAN
|
||||
|
@ -106,6 +111,7 @@ Les exemples sont disponibles dans le repertoire `exemple`. Ils sont classés pa
|
|||
- `fsOperation` : Un exemple d'operations sur le fichiers (copies, déplacement, renommage, par2..)
|
||||
- `config`
|
||||
- `check_dns` : Un script pour récuperer la configuration courrante du DHCP
|
||||
- `Connection` : Récupere diverses informations sur la connexion de la freebox (xDSL, FTTH, DynDns...)
|
||||
- `DMZ` : Récupération de la configuration de votre zone démilitarisée
|
||||
- `Freeplug` : Affichage de votre configuration de Freeplug
|
||||
- `IncomingPort` : Retourne la configuration actuelle du port d'entrée HTTP
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
/// Require Composer AutoLoader
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
/// Define our application
|
||||
$App = new \alphayax\freebox\utils\Application( 'com.alphayax.freebox.config', 'PHP API Example (Config)', '1.0.0');
|
||||
$App->authorize();
|
||||
$App->openSession();
|
||||
|
||||
/*
|
||||
/// Get connection status
|
||||
$CnxService = new \alphayax\freebox\api\v3\services\config\Connection\Connection( $App);
|
||||
$CnxStatus = $CnxService->getStatus();
|
||||
print_r( $CnxStatus);
|
||||
|
||||
/// Get connection configuration
|
||||
$CnxConfig = $CnxService->getConfiguration();
|
||||
print_r( $CnxConfig);
|
||||
|
||||
/// Update connection configuration
|
||||
$CnxConfig->setPing( false);
|
||||
$CnxConfig = $CnxService->setConfiguration( $CnxConfig);
|
||||
print_r( $CnxConfig);
|
||||
|
||||
/// IPv6 config
|
||||
$IPv6Config = $CnxService->getIPv6Configuration();
|
||||
print_r( $IPv6Config);
|
||||
*/
|
||||
|
||||
/*
|
||||
/// XDSL Status
|
||||
$XDSLService = new \alphayax\freebox\api\v3\services\config\Connection\Xdsl( $App);
|
||||
$XdslStatus = $XDSLService->getStatus();
|
||||
print_r( $XdslStatus);
|
||||
*/
|
||||
|
||||
/*
|
||||
/// FTTH Status
|
||||
$FTTHService = new \alphayax\freebox\api\v3\services\config\Connection\Ftth( $App);
|
||||
$FtthStatus = $FTTHService->getStatus();
|
||||
print_r( $FtthStatus);
|
||||
*/
|
||||
|
||||
/*
|
||||
/// Ovh Status
|
||||
$DynDnsService = new \alphayax\freebox\api\v3\services\config\Connection\DynDns\Ovh( $App);
|
||||
$OvhStatus = $DynDnsService->getStatus();
|
||||
print_r( $OvhStatus);
|
||||
|
||||
$OvhConfig = $DynDnsService->getConfig();
|
||||
print_r( $OvhConfig);
|
||||
*/
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\models\Connection;
|
||||
use alphayax\freebox\api\v3\Model;
|
||||
|
||||
class Config extends Model {
|
||||
|
||||
/** @var bool : should the Freebox respond to external ping requests */
|
||||
protected $ping;
|
||||
|
||||
/** @var bool (Read-only) : is the admin password secure enough to enable remote access */
|
||||
protected $is_secure_pass;
|
||||
|
||||
/** @var bool : enable/disable HTTP remote access */
|
||||
protected $remote_access;
|
||||
|
||||
/** @var int : port number to use for remote HTTP access */
|
||||
protected $remote_access_port;
|
||||
|
||||
/** @var string (Read-only) : IPv4 to use for remote access (can be missing if connection is down) */
|
||||
protected $remote_access_ip;
|
||||
|
||||
/** @var bool (Read-only) : is remote access enabled for apps, or share link */
|
||||
protected $api_remote_access;
|
||||
|
||||
/** @var bool : enable/disable Wake-on-lan proxy */
|
||||
protected $wol;
|
||||
|
||||
/** @var bool : is ads blocking feature enabled */
|
||||
protected $adblock;
|
||||
|
||||
/** @var bool (Read-only) : if set to true adblock setting has never been set by the user */
|
||||
protected $adblock_not_set;
|
||||
|
||||
/** @var bool : if false, user has disabled new token request. New apps can’t request a new token. Apps that already have a token are still allowed */
|
||||
protected $allow_token_request;
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isPing() {
|
||||
return $this->ping;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param boolean $ping
|
||||
*/
|
||||
public function setPing($ping) {
|
||||
$this->ping = $ping;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isIsSecurePass() {
|
||||
return $this->is_secure_pass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isRemoteAccess() {
|
||||
return $this->remote_access;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param boolean $remote_access
|
||||
*/
|
||||
public function setRemoteAccess($remote_access) {
|
||||
$this->remote_access = $remote_access;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRemoteAccessPort() {
|
||||
return $this->remote_access_port;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $remote_access_port
|
||||
*/
|
||||
public function setRemoteAccessPort($remote_access_port) {
|
||||
$this->remote_access_port = $remote_access_port;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getRemoteAccessIp() {
|
||||
return $this->remote_access_ip;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isApiRemoteAccess() {
|
||||
return $this->api_remote_access;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isWol() {
|
||||
return $this->wol;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param boolean $wol
|
||||
*/
|
||||
public function setWol($wol) {
|
||||
$this->wol = $wol;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isAdblock() {
|
||||
return $this->adblock;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param boolean $adblock
|
||||
*/
|
||||
public function setAdblock($adblock) {
|
||||
$this->adblock = $adblock;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isAdblockNotSet() {
|
||||
return $this->adblock_not_set;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isAllowTokenRequest() {
|
||||
return $this->allow_token_request;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param boolean $allow_token_request
|
||||
*/
|
||||
public function setAllowTokenRequest($allow_token_request) {
|
||||
$this->allow_token_request = $allow_token_request;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\models\Connection\DynDns;
|
||||
use alphayax\freebox\api\v3\Model;
|
||||
|
||||
/**
|
||||
* Class Config
|
||||
* @package alphayax\freebox\api\v3\models\Connection\DynDns
|
||||
*/
|
||||
class Config extends Model {
|
||||
|
||||
/** @var bool */
|
||||
protected $enabled;
|
||||
|
||||
/** @var string : dns name to use to register */
|
||||
protected $hostname;
|
||||
|
||||
/** @var string (Write-only) : password to use to register */
|
||||
protected $password;
|
||||
|
||||
/** @var string : username to use to register */
|
||||
protected $user;
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isEnabled() {
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param boolean $enabled
|
||||
*/
|
||||
public function setEnabled( $enabled) {
|
||||
$this->enabled = $enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getHostname() {
|
||||
return $this->hostname;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $hostname
|
||||
*/
|
||||
public function setHostname( $hostname) {
|
||||
$this->hostname = $hostname;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $password
|
||||
*/
|
||||
public function setPassword( $password) {
|
||||
$this->password = $password;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getUser() {
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $user
|
||||
*/
|
||||
public function setUser( $user) {
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\models\Connection\DynDns;
|
||||
use alphayax\freebox\api\v3\Model;
|
||||
|
||||
/**
|
||||
* Class Status
|
||||
* @package alphayax\freebox\api\v3\models\Connection\DynDns
|
||||
*/
|
||||
class Status extends Model {
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @see alphayax\freebox\api\v3\symbols\Connection\DynDnsStatus\Status
|
||||
*/
|
||||
protected $status;
|
||||
|
||||
/** @var int : next refresh timestamp */
|
||||
protected $next_refresh;
|
||||
|
||||
/** @var int : last refresh timestamp */
|
||||
protected $last_refresh;
|
||||
|
||||
/** @var int : next retry timestamp */
|
||||
protected $next_retry;
|
||||
|
||||
/** @var int : last error timestamp */
|
||||
protected $last_error;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus() {
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next refresh timestamp
|
||||
* @return int
|
||||
*/
|
||||
public function getNextRefresh() {
|
||||
return $this->next_refresh;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the last refresh timestamp
|
||||
* @return int
|
||||
*/
|
||||
public function getLastRefresh() {
|
||||
return $this->last_refresh;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next retry timestamp
|
||||
* @return int
|
||||
*/
|
||||
public function getNextRetry() {
|
||||
return $this->next_retry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the last error timestamp
|
||||
* @return int
|
||||
*/
|
||||
public function getLastError() {
|
||||
return $this->last_error;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\models\Connection\Ftth;
|
||||
use alphayax\freebox\api\v3\Model;
|
||||
|
||||
/**
|
||||
* Class Status
|
||||
* @package alphayax\freebox\api\v3\models\Connection\Ftth
|
||||
*/
|
||||
class Status extends Model {
|
||||
|
||||
/** @var boolean (Read-only) */
|
||||
protected $sfp_present;
|
||||
|
||||
/** @var boolean (Read-only) */
|
||||
protected $sfp_alim_ok;
|
||||
|
||||
/** @var boolean (Read-only) */
|
||||
protected $sfp_has_power_report;
|
||||
|
||||
/** @var boolean (Read-only) */
|
||||
protected $sfp_has_signal;
|
||||
|
||||
/** @var boolean (Read-only) */
|
||||
protected $link;
|
||||
|
||||
/** @var string (Read-only) */
|
||||
protected $sfp_serial;
|
||||
|
||||
/** @var string (Read-only) */
|
||||
protected $sfp_model;
|
||||
|
||||
/** @var string (Read-only) */
|
||||
protected $sfp_vendor;
|
||||
|
||||
/** @var int (Read-only) : scaled by 100 (in dBm) */
|
||||
protected $sfp_pwr_tx;
|
||||
|
||||
/** @var int (Read-only) : scaled by 100 (in dBm) */
|
||||
protected $sfp_pwr_rx;
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isSfpPresent() {
|
||||
return $this->sfp_present;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isSfpAlimOk() {
|
||||
return $this->sfp_alim_ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isSfpHasPowerReport() {
|
||||
return $this->sfp_has_power_report;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isSfpHasSignal() {
|
||||
return $this->sfp_has_signal;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isLink() {
|
||||
return $this->link;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSfpSerial() {
|
||||
return $this->sfp_serial;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSfpModel() {
|
||||
return $this->sfp_model;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSfpVendor() {
|
||||
return $this->sfp_vendor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getSfpPwrTx() {
|
||||
return $this->sfp_pwr_tx;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getSfpPwrRx() {
|
||||
return $this->sfp_pwr_rx;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\models\Connection\Ipv6;
|
||||
use alphayax\freebox\api\v3\Model;
|
||||
|
||||
/**
|
||||
* Class Configuration
|
||||
* @package alphayax\freebox\api\v3\models\Connection\Ipv6
|
||||
*/
|
||||
class Configuration extends Model {
|
||||
|
||||
/** @var bool : is IPv6 enabled */
|
||||
protected $ipv6_enabled;
|
||||
|
||||
/** @var string (Read-only) : Freebox IPv6 link local address */
|
||||
protected $ipv6ll;
|
||||
|
||||
/** @var Delegation[] list of IPv6 delegations */
|
||||
protected $delegations;
|
||||
|
||||
/**
|
||||
* FreeplugNetwork constructor.
|
||||
* @param array $properties_x
|
||||
*/
|
||||
public function __construct( array $properties_x){
|
||||
parent::__construct( $properties_x);
|
||||
$this->initPropertyArray( 'delegations', Delegation::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if IPv6 is enabled
|
||||
* @return boolean
|
||||
*/
|
||||
public function isIpv6Enabled() {
|
||||
return $this->ipv6_enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/Disable IPv6
|
||||
* @param boolean $ipv6_enabled
|
||||
*/
|
||||
public function setIpv6Enabled( $ipv6_enabled) {
|
||||
$this->ipv6_enabled = $ipv6_enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Freebox IPv6 link local address
|
||||
* @return string
|
||||
*/
|
||||
public function getIpv6ll() {
|
||||
return $this->ipv6ll;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of IPv6 delegations
|
||||
* @return Delegation[]
|
||||
*/
|
||||
public function getDelegations() {
|
||||
return $this->delegations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a list of IPv6 delegations
|
||||
* @param Delegation[] $delegations
|
||||
*/
|
||||
public function setDelegations( $delegations) {
|
||||
$this->delegations = $delegations;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\models\Connection\Ipv6;
|
||||
use alphayax\freebox\api\v3\Model;
|
||||
|
||||
/**
|
||||
* Class Delegation
|
||||
* @package alphayax\freebox\api\v3\models\Connection\Ipv6
|
||||
*/
|
||||
class Delegation extends Model {
|
||||
|
||||
/** @var string : IPv6 prefix */
|
||||
protected $prefix;
|
||||
|
||||
/** @var string ipv6 : the next hop for the prefix */
|
||||
protected $next_hop;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPrefix() {
|
||||
return $this->prefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $prefix
|
||||
*/
|
||||
public function setPrefix( $prefix){
|
||||
$this->prefix = $prefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getNextHop(){
|
||||
return $this->next_hop;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $next_hop
|
||||
*/
|
||||
public function setNextHop( $next_hop){
|
||||
$this->next_hop = $next_hop;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,131 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\models\Connection;
|
||||
use alphayax\freebox\api\v3\Model;
|
||||
|
||||
/**
|
||||
* Class ConnectionStatus
|
||||
* @package alphayax\freebox\api\v3\models\Connection
|
||||
*/
|
||||
class Status extends Model {
|
||||
|
||||
/**
|
||||
* @var string (Read-only)
|
||||
* @see alphayax\freebox\api\v3\symbols\Connection\ConnectionStatusState
|
||||
*/
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* @var string (Read-only)
|
||||
* @see alphayax\freebox\api\v3\symbols\Connection\ConnectionStatusType
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
/**
|
||||
* @var string (Read-only)
|
||||
* @see alphayax\freebox\api\v3\symbols\Connection\ConnectionStatusMedia
|
||||
*/
|
||||
protected $media;
|
||||
|
||||
/** @var string (Read-only) : Freebox IPv4 address NOTE: this field is only available when connection state is up */
|
||||
protected $ipv4;
|
||||
|
||||
/** @var string (Read-only) : Freebox IPv6 address NOTE: this field is only available when connection state is up */
|
||||
protected $ipv6;
|
||||
|
||||
/** @var int (Read-only) : current upload rate in byte/s */
|
||||
protected $rate_up;
|
||||
|
||||
/** @var int (Read-only) : current download rate in byte/s */
|
||||
protected $rate_down;
|
||||
|
||||
/** @var int (Read-only) : available upload bandwidth in bit/s */
|
||||
protected $bandwidth_up;
|
||||
|
||||
/** @var int (Read-only) : available download bandwidth in bit/s */
|
||||
protected $bandwidth_down;
|
||||
|
||||
/** @var int (Read-only) : total uploaded bytes since last connection */
|
||||
protected $bytes_up;
|
||||
|
||||
/** @var int (Read-only) : total downloaded bytes since last connection */
|
||||
protected $bytes_down;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @see alphayax\freebox\api\v3\symbols\Connection\ConnectionStatusState
|
||||
*/
|
||||
public function getState() {
|
||||
return $this->state;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getType() {
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getMedia() {
|
||||
return $this->media;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getIpv4() {
|
||||
return $this->ipv4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getIpv6() {
|
||||
return $this->ipv6;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRateUp() {
|
||||
return $this->rate_up;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRateDown() {
|
||||
return $this->rate_down;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getBandwidthUp() {
|
||||
return $this->bandwidth_up;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getBandwidthDown() {
|
||||
return $this->bandwidth_down;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getBytesUp() {
|
||||
return $this->bytes_up;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getBytesDown() {
|
||||
return $this->bytes_down;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\models\Connection\Xdsl;
|
||||
use alphayax\freebox\api\v3\Model;
|
||||
|
||||
/**
|
||||
* Class XdslInfos
|
||||
* @package alphayax\freebox\api\v3\models\Connection\Xdsl
|
||||
*/
|
||||
class XdslInfos extends Model {
|
||||
|
||||
/** @var XdslStatus */
|
||||
protected $status;
|
||||
|
||||
/** @var XdslStats */
|
||||
protected $down;
|
||||
|
||||
/** @var XdslStats */
|
||||
protected $up;
|
||||
|
||||
/**
|
||||
* FreeplugNetwork constructor.
|
||||
* @param array $properties_x
|
||||
*/
|
||||
public function __construct(array $properties_x) {
|
||||
parent::__construct( $properties_x);
|
||||
$this->initProperty( 'status' , XdslStatus::class);
|
||||
$this->initProperty( 'down' , XdslStats::class);
|
||||
$this->initProperty( 'up' , XdslStats::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return XdslStatus
|
||||
*/
|
||||
public function getStatus() {
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return XdslStats
|
||||
*/
|
||||
public function getDown() {
|
||||
return $this->down;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return XdslStats
|
||||
*/
|
||||
public function getUp() {
|
||||
return $this->up;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,211 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\models\Connection\Xdsl;
|
||||
use alphayax\freebox\api\v3\Model;
|
||||
|
||||
/**
|
||||
* Class XdslStats
|
||||
* @package alphayax\freebox\api\v3\models\Connection\Xdsl
|
||||
*/
|
||||
class XdslStats extends Model {
|
||||
|
||||
/** @var int (Read-only) : ATM max rate in kbit/s */
|
||||
protected $maxrate;
|
||||
|
||||
/** @var int (Read-only) : ATM rate in kbit/s */
|
||||
protected $rate;
|
||||
|
||||
/** @var int (Read-only) : in dB */
|
||||
protected $snr;
|
||||
|
||||
/** @var int (Read-only) : in dB */
|
||||
protected $attn;
|
||||
|
||||
/** @var int (Read-only) : in dB/10 */
|
||||
protected $snr_10;
|
||||
|
||||
/** @var int (Read-only) : in dB/10 */
|
||||
protected $attn_10;
|
||||
|
||||
/** @var int (Read-only) */
|
||||
protected $fec;
|
||||
|
||||
/** @var int (Read-only) */
|
||||
protected $crc;
|
||||
|
||||
/** @var int (Read-only) */
|
||||
protected $hec;
|
||||
|
||||
/** @var int (Read-only) */
|
||||
protected $es;
|
||||
|
||||
/** @var int (Read-only) */
|
||||
protected $ses;
|
||||
|
||||
/** @var bool (Read-only) */
|
||||
protected $phyr;
|
||||
|
||||
/** @var bool (Read-only) */
|
||||
protected $ginp;
|
||||
|
||||
/** @var bool (Read-only) */
|
||||
protected $nitro;
|
||||
|
||||
/** @var int (Read-only) : only available when phyr is on */
|
||||
protected $rxmt;
|
||||
|
||||
/** @var int (Read-only) : only available when phyr is on */
|
||||
protected $rxmt_corr;
|
||||
|
||||
/** @var int (Read-only) : only available when phyr is on */
|
||||
protected $rxmt_uncorr;
|
||||
|
||||
/** @var int (Read-only) : only available when ginp is on */
|
||||
protected $rtx_tx;
|
||||
|
||||
/** @var int (Read-only) : only available when ginp is on */
|
||||
protected $rtx_c;
|
||||
|
||||
/** @var int (Read-only) : only available when ginp is on */
|
||||
protected $rtx_uc;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getMaxrate() {
|
||||
return $this->maxrate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRate() {
|
||||
return $this->rate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getSnr() {
|
||||
return $this->snr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getAttn() {
|
||||
return $this->attn;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getSnr10() {
|
||||
return $this->snr_10;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getAttn10() {
|
||||
return $this->attn_10;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getFec() {
|
||||
return $this->fec;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getCrc() {
|
||||
return $this->crc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getHec() {
|
||||
return $this->hec;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getEs() {
|
||||
return $this->es;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getSes() {
|
||||
return $this->ses;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isPhyr() {
|
||||
return $this->phyr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isGinp() {
|
||||
return $this->ginp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isNitro() {
|
||||
return $this->nitro;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRxmt() {
|
||||
return $this->rxmt;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRxmtCorr() {
|
||||
return $this->rxmt_corr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRxmtUncorr() {
|
||||
return $this->rxmt_uncorr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRtxTx() {
|
||||
return $this->rtx_tx;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRtxC() {
|
||||
return $this->rtx_c;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRtxUc() {
|
||||
return $this->rtx_uc;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\models\Connection\Xdsl;
|
||||
use alphayax\freebox\api\v3\Model;
|
||||
|
||||
/**
|
||||
* Class XdslStatus
|
||||
* @package alphayax\freebox\api\v3\models\Connection\Xdsl
|
||||
*/
|
||||
class XdslStatus extends Model {
|
||||
|
||||
/**
|
||||
* @var string (Read-only)
|
||||
* @see alphayax\freebox\api\v3\symbols\Connection\XdslStatus\Status
|
||||
*/
|
||||
protected $status;
|
||||
|
||||
/**
|
||||
* @var string (Read-only)
|
||||
* @see alphayax\freebox\api\v3\symbols\Connection\XdslStatus\Protocol
|
||||
*/
|
||||
protected $protocol;
|
||||
|
||||
/**
|
||||
* @var string (Read-only)
|
||||
* @see alphayax\freebox\api\v3\symbols\Connection\XdslStatus\Modulation
|
||||
*/
|
||||
protected $modulation;
|
||||
|
||||
/** @var int (Read-only) : uptime in seconds */
|
||||
protected $uptime;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @see alphayax\freebox\api\v3\symbols\Connection\XdslStatus\Status
|
||||
*/
|
||||
public function getStatus() {
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @see alphayax\freebox\api\v3\symbols\Connection\XdslStatus\Protocol
|
||||
*/
|
||||
public function getProtocol() {
|
||||
return $this->protocol;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @see alphayax\freebox\api\v3\symbols\Connection\XdslStatus\Modulation
|
||||
*/
|
||||
public function getModulation() {
|
||||
return $this->modulation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the uptime in seconds
|
||||
* @return int
|
||||
*/
|
||||
public function getUptime() {
|
||||
return $this->uptime;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\services\config\Connection;
|
||||
use alphayax\freebox\api\v3\Service;
|
||||
use alphayax\freebox\api\v3\models;
|
||||
|
||||
/**
|
||||
* Class Connection
|
||||
* @package alphayax\freebox\api\v3\services\config\Connection
|
||||
*/
|
||||
class Connection extends Service{
|
||||
|
||||
const API_CONNECTION = '/api/v3/connection/';
|
||||
const API_CONNECTION_CONFIG = '/api/v3/connection/config/';
|
||||
const API_CONNECTION_IPV6_CONFIG = '/api/v3/connection/ipv6/config/';
|
||||
|
||||
/**
|
||||
* Get the current Connection status
|
||||
* @return models\Connection\Status
|
||||
*/
|
||||
public function getStatus(){
|
||||
$rest = $this->getAuthService( self::API_CONNECTION);
|
||||
$rest->GET();
|
||||
|
||||
return new models\Connection\Status( $rest->getCurlResponse()['result']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current Connection configuration
|
||||
* @return models\Connection\Config
|
||||
*/
|
||||
public function getConfiguration(){
|
||||
$rest = $this->getAuthService( self::API_CONNECTION_CONFIG);
|
||||
$rest->GET();
|
||||
|
||||
return new models\Connection\Config( $rest->getCurlResponse()['result']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the current Connection configuration
|
||||
* @param models\Connection\Config $connectionConfig
|
||||
* @return models\Connection\Config
|
||||
*/
|
||||
public function setConfiguration( models\Connection\Config $connectionConfig){
|
||||
$rest = $this->getAuthService( self::API_CONNECTION_CONFIG);
|
||||
$rest->PUT( $connectionConfig->toArray());
|
||||
|
||||
return new models\Connection\Config( $rest->getCurlResponse()['result']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current IPv6 Connection configuration
|
||||
*/
|
||||
public function getIPv6Configuration(){
|
||||
$rest = $this->getAuthService( self::API_CONNECTION_IPV6_CONFIG);
|
||||
$rest->GET();
|
||||
|
||||
return new models\Connection\Ipv6\Configuration( $rest->getCurlResponse()['result']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the IPv6 Connection configuration
|
||||
* @param \alphayax\freebox\api\v3\models\Connection\Ipv6\Configuration $connectionIpv6Configuration
|
||||
* @return \alphayax\freebox\api\v3\models\Connection\Ipv6\Configuration
|
||||
*/
|
||||
public function setIPv6Configuration(models\Connection\Ipv6\Configuration $connectionIpv6Configuration){
|
||||
$rest = $this->getAuthService( self::API_CONNECTION_IPV6_CONFIG);
|
||||
$rest->PUT( $connectionIpv6Configuration->toArray());
|
||||
|
||||
return new models\Connection\Ipv6\Configuration( $rest->getCurlResponse()['result']);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\services\config\Connection;
|
||||
use alphayax\freebox\api\v3\Service;
|
||||
use alphayax\freebox\api\v3\models;
|
||||
|
||||
/**
|
||||
* Class DynDns
|
||||
* @package alphayax\freebox\api\v3\services\config\Connection
|
||||
*/
|
||||
abstract class DynDns extends Service {
|
||||
|
||||
const API_CONNECTION_DDNS_STATUS = '/api/v3/connection/ddns/%s/status/';
|
||||
const API_CONNECTION_DDNS_CONFIG = '/api/v3/connection/ddns/%s/';
|
||||
|
||||
/**
|
||||
* Get the current DDns status by a given dynamic dns provider
|
||||
* @param string $provider
|
||||
* @return \alphayax\freebox\api\v3\models\Connection\DynDns\Status
|
||||
*/
|
||||
protected function getStatusFromProvider( $provider){
|
||||
$service = sprintf( self::API_CONNECTION_DDNS_STATUS, $provider);
|
||||
$rest = $this->getAuthService( $service);
|
||||
$rest->GET();
|
||||
|
||||
return new models\Connection\DynDns\Status( $rest->getCurlResponse()['result']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current DDns config by a given dynamic dns provider
|
||||
* @param string $provider
|
||||
* @return \alphayax\freebox\api\v3\models\Connection\DynDns\Config
|
||||
*/
|
||||
protected function getConfigFromProvider( $provider){
|
||||
$service = sprintf( self::API_CONNECTION_DDNS_CONFIG, $provider);
|
||||
$rest = $this->getAuthService( $service);
|
||||
$rest->GET();
|
||||
|
||||
return new models\Connection\DynDns\Config( $rest->getCurlResponse()['result']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $provider
|
||||
* @param models\Connection\DynDns\Config $config
|
||||
* @return models\Connection\DynDns\Config
|
||||
*/
|
||||
protected function setConfigFromProvider( $provider, models\Connection\DynDns\Config $config){
|
||||
$service = sprintf( self::API_CONNECTION_DDNS_CONFIG, $provider);
|
||||
$rest = $this->getAuthService( $service);
|
||||
$rest->PUT( $config->toArray());
|
||||
|
||||
return new models\Connection\DynDns\Config( $rest->getCurlResponse()['result']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current DDns status
|
||||
* @return \alphayax\freebox\api\v3\models\Connection\DynDns\Status
|
||||
*/
|
||||
abstract public function getStatus();
|
||||
|
||||
/**
|
||||
* Get the current DDns Configuration
|
||||
* @return models\Connection\DynDns\Config
|
||||
*/
|
||||
abstract public function getConfig();
|
||||
|
||||
/**
|
||||
* Set the DDns Configuration
|
||||
* @param models\Connection\DynDns\Config $config
|
||||
* @return models\Connection\DynDns\Config
|
||||
*/
|
||||
abstract public function setConfig( models\Connection\DynDns\Config $config);
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\services\config\Connection\DynDns;
|
||||
use alphayax\freebox\api\v3\services;
|
||||
use alphayax\freebox\api\v3\models;
|
||||
|
||||
/**
|
||||
* Class DynDns
|
||||
* @package alphayax\freebox\api\v3\services\config\Connection\DynDns
|
||||
*/
|
||||
class DynDns extends services\config\Connection\DynDns {
|
||||
|
||||
const PROVIDER_DYNDNS = 'dyndns';
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return \alphayax\freebox\api\v3\models\Connection\DynDns\Status
|
||||
*/
|
||||
public function getStatus(){
|
||||
return $this->getStatusFromProvider( self::PROVIDER_DYNDNS);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return models\Connection\DynDns\Config
|
||||
*/
|
||||
public function getConfig(){
|
||||
return $this->getConfigFromProvider( self::PROVIDER_DYNDNS);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @param models\Connection\DynDns\Config $config
|
||||
* @return models\Connection\DynDns\Config
|
||||
*/
|
||||
public function setConfig( models\Connection\DynDns\Config $config){
|
||||
return $this->setConfigFromProvider( self::PROVIDER_DYNDNS, $config);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\services\config\Connection\DynDns;
|
||||
use alphayax\freebox\api\v3\models;
|
||||
use alphayax\freebox\api\v3\services;
|
||||
|
||||
/**
|
||||
* Class NoIP
|
||||
* @package alphayax\freebox\api\v3\services\config\Connection\DynDns
|
||||
*/
|
||||
class NoIP extends services\config\Connection\DynDns {
|
||||
|
||||
const PROVIDER_NOIP = 'noip';
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return \alphayax\freebox\api\v3\models\Connection\DynDns\Status
|
||||
*/
|
||||
public function getStatus(){
|
||||
return $this->getStatusFromProvider( self::PROVIDER_NOIP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return models\Connection\DynDns\Config
|
||||
*/
|
||||
public function getConfig(){
|
||||
return $this->getConfigFromProvider( self::PROVIDER_NOIP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @param models\Connection\DynDns\Config $config
|
||||
* @return models\Connection\DynDns\Config
|
||||
*/
|
||||
public function setConfig( models\Connection\DynDns\Config $config){
|
||||
return $this->setConfigFromProvider( self::PROVIDER_NOIP, $config);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\services\config\Connection\DynDns;
|
||||
use alphayax\freebox\api\v3\models;
|
||||
use alphayax\freebox\api\v3\services;
|
||||
|
||||
/**
|
||||
* Class Ovh
|
||||
* @package alphayax\freebox\api\v3\services\config\Connection\DynDns
|
||||
*/
|
||||
class Ovh extends services\config\Connection\DynDns {
|
||||
|
||||
const PROVIDER_OVH = 'ovh';
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return \alphayax\freebox\api\v3\models\Connection\DynDns\Status
|
||||
*/
|
||||
public function getStatus(){
|
||||
return $this->getStatusFromProvider( self::PROVIDER_OVH);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return models\Connection\DynDns\Config
|
||||
*/
|
||||
public function getConfig(){
|
||||
return $this->getConfigFromProvider( self::PROVIDER_OVH);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @param models\Connection\DynDns\Config $config
|
||||
* @return models\Connection\DynDns\Config
|
||||
*/
|
||||
public function setConfig( models\Connection\DynDns\Config $config){
|
||||
return $this->setConfigFromProvider( self::PROVIDER_OVH, $config);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\services\config\Connection;
|
||||
use alphayax\freebox\api\v3\Service;
|
||||
use alphayax\freebox\api\v3\models;
|
||||
|
||||
/**
|
||||
* Class Ftth
|
||||
* @package alphayax\freebox\api\v3\services\config\Connection
|
||||
*/
|
||||
class Ftth extends Service{
|
||||
|
||||
const API_CONNECTION_FTTH = '/api/v3/connection/ftth/';
|
||||
|
||||
/**
|
||||
* Get the current Connection status
|
||||
* @return models\Connection\Status
|
||||
*/
|
||||
public function getStatus(){
|
||||
$rest = $this->getAuthService( self::API_CONNECTION_FTTH);
|
||||
$rest->GET();
|
||||
|
||||
return new models\Connection\Ftth\Status( $rest->getCurlResponse()['result']);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\services\config\Connection;
|
||||
use alphayax\freebox\api\v3\Service;
|
||||
use alphayax\freebox\api\v3\models;
|
||||
|
||||
/**
|
||||
* Class Xdsl
|
||||
* @package alphayax\freebox\api\v3\services\config\Connection
|
||||
*/
|
||||
class Xdsl extends Service {
|
||||
|
||||
const API_CONNECTION_XDSL = '/api/v3/connection/xdsl/';
|
||||
|
||||
/**
|
||||
* Get the current Connection status
|
||||
* @return models\Connection\Status
|
||||
*/
|
||||
public function getStatus(){
|
||||
$rest = $this->getAuthService( self::API_CONNECTION_XDSL);
|
||||
$rest->GET();
|
||||
|
||||
return new models\Connection\Xdsl\XdslInfos( $rest->getCurlResponse()['result']);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\symbols\Connection\ConnectionStatus;
|
||||
|
||||
/**
|
||||
* Symbol Media
|
||||
* @package alphayax\freebox\api\v3\symbols\Connection\ConnectionStatus
|
||||
* @see alphayax\freebox\api\v3\models\Connection\Status
|
||||
*/
|
||||
interface Media {
|
||||
const FTTH = 'ftth';
|
||||
const XDSL = 'xdsl';
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\symbols\Connection\ConnectionStatus;
|
||||
|
||||
/**
|
||||
* Symbol State
|
||||
* @package alphayax\freebox\api\v3\symbols\Connection\ConnectionStatus
|
||||
* @see alphayax\freebox\api\v3\models\Connection\Status
|
||||
*/
|
||||
interface State {
|
||||
|
||||
/** connection is initializing */
|
||||
const GOING_UP = 'going_up';
|
||||
|
||||
/** connection is active */
|
||||
const UP = 'up';
|
||||
|
||||
/** connection is about to become inactive */
|
||||
const GOING_DOWN = 'going_down';
|
||||
|
||||
/** connection is inactive */
|
||||
const DOWN = 'down';
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\symbols\Connection\ConnectionStatus;
|
||||
|
||||
/**
|
||||
* Symbol Type
|
||||
* @package alphayax\freebox\api\v3\symbols\Connection\ConnectionStatus
|
||||
* @see alphayax\freebox\api\v3\models\Connection\Status
|
||||
*/
|
||||
interface Type {
|
||||
|
||||
/** FTTH */
|
||||
const FTTH = 'ethernet';
|
||||
|
||||
/** xDSL (unbundled) */
|
||||
const XDSL_UNBUNDLED = 'rfc2684';
|
||||
|
||||
/** xDSL */
|
||||
const XDSL = 'pppoatm';
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\symbols\Connection\DynDnsStatus;
|
||||
|
||||
/**
|
||||
* Interface Status
|
||||
* @package alphayax\freebox\api\v3\symbols\Connection\DynDnsStatus
|
||||
* @see alphayax\freebox\api\v3\models\Connection\DynDns\Status
|
||||
*/
|
||||
interface Status {
|
||||
|
||||
/** Disabled */
|
||||
const DISABLED = 'disabled';
|
||||
|
||||
/** Ok */
|
||||
const OK = 'ok';
|
||||
|
||||
/** Updating */
|
||||
const WAIT = 'wait';
|
||||
|
||||
/** Request failed */
|
||||
const REQUEST_FAILED = 'reqfail';
|
||||
|
||||
/** Authentication error */
|
||||
const AUTHENTICATION_ERROR = 'authfail';
|
||||
|
||||
/** Invalid credential */
|
||||
const INVALID_CREDENTIAL = 'nocredential';
|
||||
|
||||
/** Invalid IP */
|
||||
const INVALID_IP = 'ipinval';
|
||||
|
||||
/** Invalid hostname */
|
||||
const INVALID_HOSTNAME = 'hostinval';
|
||||
|
||||
/** Blocked because of abuse */
|
||||
const BLOCKED_FOR_ABUSE = 'abuse';
|
||||
|
||||
/** DNS error */
|
||||
const DNS_ERROR = 'dnserror';
|
||||
|
||||
/** Service unavailable */
|
||||
const UNAVAILABLE = 'unavailable';
|
||||
|
||||
/** Unable to get wan IP */
|
||||
const NO_WAN_IP = 'nowan';
|
||||
|
||||
/** Unknown */
|
||||
const UNKNOWN = 'unknown';
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\symbols\Connection\XdslStatus;
|
||||
|
||||
/**
|
||||
* Symbol Modulation
|
||||
* @package alphayax\freebox\api\v3\symbols\Connection\XdslStatus
|
||||
* @see alphayax\freebox\api\v3\models\Connection\Xdsl\XdslStatus
|
||||
*/
|
||||
interface Modulation {
|
||||
const ADSL = 'adsl';
|
||||
const VDSL = 'vdsl';
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\symbols\Connection\XdslStatus;
|
||||
|
||||
/**
|
||||
* Symbol Protocol
|
||||
* @package alphayax\freebox\api\v3\symbols\Connection\XdslStatus
|
||||
* @see alphayax\freebox\api\v3\models\Connection\Xdsl\XdslStatus
|
||||
*/
|
||||
interface Protocol {
|
||||
|
||||
/** T1.413 */
|
||||
const T1_413 = 't1413';
|
||||
|
||||
/** ADSL */
|
||||
const ADSL = 'adsl1_a';
|
||||
|
||||
/** ADSL2 */
|
||||
const ADSL2 = 'adsl2_a';
|
||||
|
||||
/** ADSL2+ */
|
||||
const ADSL2PLUS = 'adsl2plus_a';
|
||||
|
||||
/** ReachDSL */
|
||||
const REACH_DSL = 'readsl2';
|
||||
|
||||
/** ADSL2 annex M */
|
||||
const ADSL2_M = 'adsl2_m';
|
||||
|
||||
/** ADSL2+ annex M */
|
||||
const ADSL2PLUS_M = 'adsl2plus_m';
|
||||
|
||||
/** Unknown */
|
||||
const UNKNOWN = 'unknown';
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
namespace alphayax\freebox\api\v3\symbols\Connection\XdslStatus;
|
||||
|
||||
/**
|
||||
* Symbol Status
|
||||
* @package alphayax\freebox\api\v3\symbols\Connection\XdslStatus
|
||||
* @see alphayax\freebox\api\v3\models\Connection\Xdsl\XdslStatus
|
||||
*/
|
||||
interface Status {
|
||||
|
||||
/** unsynchronized */
|
||||
const DOWN = 'down';
|
||||
|
||||
/** synchronizing step 1/4 */
|
||||
const TRAINING = 'training';
|
||||
|
||||
/** synchronizing step 2/4 */
|
||||
const STARTED = 'started';
|
||||
|
||||
/** synchronizing step 3/4 */
|
||||
const CHAN_ANALYSIS = 'chan_analysis';
|
||||
|
||||
/** synchronizing step 4/4 */
|
||||
const MSG_EXCHANGE = 'msg_exchange';
|
||||
|
||||
/** Ready */
|
||||
const SHOWTIME = 'showtime';
|
||||
|
||||
/** Disabled */
|
||||
const DISABLED = 'disabled';
|
||||
}
|
Loading…
Reference in New Issue