~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to tests/Xmds/XmdsWrapper.php

  • Committer: Dan Garner
  • Date: 2016-02-18 16:07:16 UTC
  • mfrom: (454.4.137)
  • Revision ID: git-v1:8867f12675bc9e0e67e7e622c80da7471b9f294a
Merge pull request #139 from dasgarner/feature/nested-display-groups

Feature/nested display groups

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/*
3
 
 * Spring Signage Ltd - http://www.springsignage.com
4
 
 * Copyright (C) 2016 Spring Signage Ltd
5
 
 * (XmdsWrapper.php)
6
 
 */
7
 
 
8
 
namespace Xibo\Tests\Xmds;
9
 
 
10
 
/**
11
 
 * Class XmdsWrapper
12
 
 * @package Xibo\Tests\Xmds
13
 
 */
14
 
 
15
 
class XmdsWrapper
16
 
{
17
 
 
18
 
    private $URL;
19
 
    private $KEY;
20
 
    private $version;
21
 
    protected $client;
22
 
 
23
 
    function __construct($URL = "http://localhost/xmds.php", $KEY="test", $version='5')
24
 
    {
25
 
        $this->URL = $URL;
26
 
        $this->KEY = $KEY;
27
 
        $this->version = $version;
28
 
        
29
 
        ini_set('soap.wsdl_cache_enabled', 0);
30
 
        ini_set('soap.wsdl_cache_ttl', 900);
31
 
        ini_set('default_socket_timeout', 15);
32
 
        
33
 
        $options = array(
34
 
            'uri'=>'http://schemas.xmlsoap.org/soap/envelope/',
35
 
            'style'=>SOAP_RPC,
36
 
            'use'=>SOAP_ENCODED,
37
 
            'soap_version'=>SOAP_1_1,
38
 
            'cache_wsdl'=>WSDL_CACHE_NONE,
39
 
            'connection_timeout'=>15,
40
 
            'trace'=>true,
41
 
            'encoding'=>'UTF-8',
42
 
            'exceptions'=>true,
43
 
            );
44
 
        
45
 
        $this->client = new \SoapClient($this->URL . '?wsdl&v=' . $this->version, $options);
46
 
    }
47
 
    
48
 
    function RegisterDisplay($hardwareKey, $displayName, $clientType='windows', $clientVersion='', $clientCode='', $operatingSystem='', $macAddress='', $xmrChannel='', $xmrPubKey='')
49
 
    {
50
 
        $response = $this->client->RegisterDisplay($this->KEY,
51
 
                                                   $hardwareKey,
52
 
                                                   $displayName,
53
 
                                                   $clientType,
54
 
                                                   $clientVersion,
55
 
                                                   $clientCode,
56
 
                                                   $operatingSystem,
57
 
                                                   $macAddress,
58
 
                                                   $xmrChannel,
59
 
                                                   $xmrPubKey);
60
 
        return $response;
61
 
    }
62
 
    
63
 
    function RequiredFiles($hardwareKey)
64
 
    {
65
 
        $response = $this->client->RequiredFiles($this->KEY,
66
 
                                                 $hardwareKey);
67
 
        return $response;
68
 
    }
69
 
    
70
 
    function GetFile()
71
 
    {
72
 
    
73
 
    }
74
 
    
75
 
    function Schedule($hardwareKey)
76
 
    {
77
 
        $response = $this->client->Schedule($this->KEY,
78
 
                                            $hardwareKey);
79
 
        return $response;
80
 
    }
81
 
    
82
 
    function BlackList()
83
 
    {
84
 
    
85
 
    }
86
 
    
87
 
    function SubmitLog()
88
 
    {
89
 
    
90
 
    }
91
 
    
92
 
    function SubmitStats()
93
 
    {
94
 
    
95
 
    }
96
 
    
97
 
    function MediaInventory()
98
 
    {
99
 
    
100
 
    }
101
 
 
102
 
    /**
103
 
     * @param string $hardwareKey
104
 
     * @param int $layoutId
105
 
     * @param int $regionId
106
 
     * @param string $mediaId
107
 
     * @return string
108
 
     */
109
 
    function GetResource($hardwareKey, $layoutId, $regionId, $mediaId)
110
 
    {
111
 
        return $this->client->GetResource($this->KEY, $hardwareKey, $layoutId, $regionId, $mediaId);
112
 
    }
113
 
    
114
 
    function NotifyStatus()
115
 
    {
116
 
    
117
 
    }
118
 
    
119
 
    function SubmitScreenShot()
120
 
    {
121
 
    
122
 
    }
123
 
}
124
 
 
125
 
?>
 
 
b'\\ No newline at end of file'