911
* Gets additional resources for assigned media
912
* @param <type> $serverKey
913
* @param <type> $hardwareKey
914
* @param <type> $layoutId
915
* @param <type> $regionId
916
* @param <type> $mediaId
917
* @param <type> $version
919
function GetResource($serverKey, $hardwareKey, $layoutId, $regionId, $mediaId, $version)
924
$serverKey = Kit::ValidateParam($serverKey, _STRING);
925
$hardwareKey = Kit::ValidateParam($hardwareKey, _STRING);
926
$layoutId = Kit::ValidateParam($layoutId, _INT);
927
$regionId = Kit::ValidateParam($regionId, _STRING);
928
$mediaId = Kit::ValidateParam($mediaId, _STRING);
929
$version = Kit::ValidateParam($version, _STRING);
931
// Make sure we are talking the same language
932
if (!$this->CheckVersion($version))
934
throw new SoapFault('Receiver', "Your client is not of the correct version for communication with this server. You can get the latest from http://www.xibo.org.uk");
937
// Auth this request...
938
if (!$this->AuthDisplay($hardwareKey))
940
throw new SoapFault('Receiver', "This display client is not licensed");
943
// What type of module is this?
944
Kit::ClassLoader('region');
945
$region = new region($db, null);
946
$type = $region->GetMediaNodeType($layoutId, $regionId, $mediaId);
949
throw new SoapFault('Receiver', 'Unable to get the media node type');
951
// Get the resource from the module
952
require_once('modules/' . $type . '.module.php');
953
$module = new $type($db, null, $mediaid, $layoutid, $regionid, $lkid);
954
$resource = $module->GetResource();
956
if (!$resource || $resource == '')
957
throw new SoapFault('Receiver', 'Unable to get the media resource');
911
963
* Authenticates the display
912
964
* @param <type> $hardwareKey