<?php

class LicenseInfo
{
    public $mac = "";
    public $edition = 0;
    public $rtmpNumber = 0;
    public $rtspNumber = 0;
    public $checkMac = false;
    public $supportHLS = false;
    public $supportRtmpFW = false;
    public $supportTS = false;
    public $liveNumber = 0;
    public $tryDays = 0;
    
    public $supportPlayItemLive = false;
    public $supportPullStream = false;
    public $supportTransfer = false;

    public function toJson()
    {
        return json_encode($this);
    }

    public function fromJson($json_obj)
    {
        $this->mac = $json_obj['mac'];
        $this->edition = $json_obj['edition'];
        $this->rtmpNumber = $json_obj['rtmpNumber'];
        $this->rtspNumber = $json_obj['rtspNumber'];
        $this->checkMac = $json_obj['checkMac'];
        $this->supportHLS = $json_obj['supportHLS'];
        $this->supportRtmpFW = $json_obj['supportRtmpFW'];
        $this->supportTS = $json_obj['supportTS'];
        $this->liveNumber = $json_obj['liveNumber'];

        $this->tryDays = $json_obj['tryDays'];
        $this->supportPlayItemLive = $json_obj['supportPlayItemLive'];
        $this->supportPullStream = $json_obj['supportPullStream'];
        $this->supportTransfer = $json_obj['supportTransfer'];
    }
}