Skip to content

Commit 42e9455

Browse files
committed
Merge branch 'dev'
# Conflicts: # src/BigBlueButton.php
2 parents 1b377cb + 5ceff70 commit 42e9455

22 files changed

+560
-726
lines changed

composer.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"authors": [
1313
{
1414
"name": "Ghazi Triki",
15-
"email": "ghazi.[email protected]",
15+
"email": "ghazi.[email protected]",
1616
"role": "Developer"
1717
}
1818
],
@@ -30,12 +30,15 @@
3030
},
3131
"require-dev": {
3232
"ext-mbstring": "*",
33-
"composer/composer": "^1.10.0",
34-
"phpunit/phpunit": "^8",
35-
"fakerphp/faker": "^1.14",
36-
"friendsofphp/php-cs-fixer": "2.*",
37-
"squizlabs/php_codesniffer": "3.*",
38-
"php-coveralls/php-coveralls": "^2.4.0"
33+
"composer/composer": "^1.10.24",
34+
"phpunit/phpunit": "^8.5",
35+
"fakerphp/faker": "^1.17",
36+
"friendsofphp/php-cs-fixer": "^2.19",
37+
"squizlabs/php_codesniffer": "^3.6",
38+
"php-coveralls/php-coveralls": "^2.5.2"
39+
},
40+
"options": {
41+
"symlink": false
3942
},
4043
"autoload": {
4144
"psr-4": {

src/BigBlueButton.php

Lines changed: 14 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
use BigBlueButton\Responses\CreateMeetingResponse;
3636
use BigBlueButton\Responses\DeleteRecordingsResponse;
3737
use BigBlueButton\Responses\EndMeetingResponse;
38-
use BigBlueButton\Responses\GetDefaultConfigXMLResponse;
3938
use BigBlueButton\Responses\GetMeetingInfoResponse;
4039
use BigBlueButton\Responses\GetMeetingsResponse;
4140
use BigBlueButton\Responses\GetRecordingsResponse;
@@ -45,7 +44,6 @@
4544
use BigBlueButton\Responses\IsMeetingRunningResponse;
4645
use BigBlueButton\Responses\JoinMeetingResponse;
4746
use BigBlueButton\Responses\PublishRecordingsResponse;
48-
use BigBlueButton\Responses\SetConfigXMLResponse;
4947
use BigBlueButton\Responses\UpdateRecordingsResponse;
5048
use BigBlueButton\Util\UrlBuilder;
5149
use SimpleXMLElement;
@@ -60,6 +58,7 @@ class BigBlueButton
6058
protected $bbbServerBaseUrl;
6159
protected $urlBuilder;
6260
protected $jSessionId;
61+
protected $timeOut = 10;
6362

6463
/**
6564
* BigBlueButton constructor.
@@ -90,8 +89,6 @@ public function getApiVersion()
9089
/* __________________ BBB ADMINISTRATION METHODS _________________ */
9190
/* The methods in the following section support the following categories of the BBB API:
9291
-- create
93-
-- getDefaultConfigXML
94-
-- setConfigXML
9592
-- join
9693
-- end
9794
*/
@@ -117,47 +114,6 @@ public function createMeeting($createMeetingParams)
117114
return new CreateMeetingResponse($xml);
118115
}
119116

120-
/**
121-
* @return string
122-
*/
123-
public function getDefaultConfigXMLUrl()
124-
{
125-
return $this->urlBuilder->buildUrl(ApiMethod::GET_DEFAULT_CONFIG_XML);
126-
}
127-
128-
/**
129-
* @return GetDefaultConfigXMLResponse
130-
* @throws \RuntimeException
131-
*/
132-
public function getDefaultConfigXML()
133-
{
134-
$xml = $this->processXmlResponse($this->getDefaultConfigXMLUrl());
135-
136-
return new GetDefaultConfigXMLResponse($xml);
137-
}
138-
139-
/**
140-
* @return string
141-
*/
142-
public function setConfigXMLUrl()
143-
{
144-
return $this->urlBuilder->buildUrl(ApiMethod::SET_CONFIG_XML, '', false);
145-
}
146-
147-
/**
148-
* @param $setConfigXMLParams
149-
* @return SetConfigXMLResponse
150-
* @throws \RuntimeException
151-
*/
152-
public function setConfigXML($setConfigXMLParams)
153-
{
154-
$setConfigXMLPayload = $this->urlBuilder->buildQs(ApiMethod::SET_CONFIG_XML, $setConfigXMLParams->getHTTPQuery());
155-
156-
$xml = $this->processXmlResponse($this->setConfigXMLUrl(), $setConfigXMLPayload, 'application/x-www-form-urlencoded');
157-
158-
return new SetConfigXMLResponse($xml);
159-
}
160-
161117
/**
162118
* @param $joinMeetingParams JoinMeetingParameters
163119
*
@@ -504,7 +460,19 @@ private function processXmlResponse($url, $payload = '', $contentType = 'applica
504460
throw new \RuntimeException('Post XML data set but curl PHP module is not installed or not enabled.');
505461
}
506462
}
507-
463+
464+
/**
465+
* Set Curl Timeout (Optional), Default 10 Seconds
466+
* @param int $TimeOutInSeconds
467+
* @return static
468+
*/
469+
public function setTimeOut($TimeOutInSeconds)
470+
{
471+
$this->timeOut = $TimeOutInSeconds;
472+
473+
return $this;
474+
}
475+
508476
/**
509477
* Public accessor for buildUrl
510478
* @param string $method
@@ -516,5 +484,4 @@ public function buildUrl($method = '', $params = '', $append = TRUE)
516484
{
517485
return $this->urlBuilder->buildUrl($method, $params, $append);
518486
}
519-
520487
}

src/Core/ApiMethod.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ abstract class ApiMethod
2727
const IS_MEETING_RUNNING = 'isMeetingRunning';
2828
const GET_MEETING_INFO = 'getMeetingInfo';
2929
const GET_MEETINGS = 'getMeetings';
30-
const GET_DEFAULT_CONFIG_XML = 'getDefaultConfigXML';
31-
const SET_CONFIG_XML = 'setConfigXML';
32-
const CONFIG_XML = 'configXML';
3330
const SIGN_OUT = 'signOut';
3431
const GET_RECORDINGS = 'getRecordings';
3532
const PUBLISH_RECORDINGS = 'publishRecordings';
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,26 @@
1-
<?php
2-
/**
3-
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
4-
*
5-
* Copyright (c) 2016-2018 BigBlueButton Inc. and by respective authors (see below).
6-
*
7-
* This program is free software; you can redistribute it and/or modify it under the
8-
* terms of the GNU Lesser General Public License as published by the Free Software
9-
* Foundation; either version 3.0 of the License, or (at your option) any later
10-
* version.
11-
*
12-
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
13-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14-
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
15-
*
16-
* You should have received a copy of the GNU Lesser General Public License along
17-
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
18-
*/
19-
namespace BigBlueButton\Responses;
1+
<?php
2+
/**
3+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
4+
*
5+
* Copyright (c) 2016-2021 BigBlueButton Inc. and by respective authors (see below).
6+
*
7+
* This program is free software; you can redistribute it and/or modify it under the
8+
* terms of the GNU Lesser General Public License as published by the Free Software
9+
* Foundation; either version 3.0 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
13+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License along
17+
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
namespace BigBlueButton\Core;
2020

21-
/**
22-
* Class SetConfigXMLResponse
23-
* @package BigBlueButton\Parameters
24-
*/
25-
class SetConfigXMLResponse extends BaseResponse
21+
class GuestPolicy
2622
{
27-
/**
28-
* @return bool
29-
*/
30-
public function getToken()
31-
{
32-
return $this->rawXml->configToken->__toString();
33-
}
23+
public const ALWAYS_ACCEPT = 'ALWAYS_ACCEPT';
24+
public const ALWAYS_DENY = 'ALWAYS_DENY';
25+
public const ASK_MODERATOR = 'ASK_MODERATOR';
3426
}
Lines changed: 24 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,27 @@
1-
<?php
2-
/**
3-
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
4-
*
5-
* Copyright (c) 2016-2018 BigBlueButton Inc. and by respective authors (see below).
6-
*
7-
* This program is free software; you can redistribute it and/or modify it under the
8-
* terms of the GNU Lesser General Public License as published by the Free Software
9-
* Foundation; either version 3.0 of the License, or (at your option) any later
10-
* version.
11-
*
12-
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
13-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14-
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
15-
*
16-
* You should have received a copy of the GNU Lesser General Public License along
17-
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
18-
*/
19-
namespace BigBlueButton\Responses;
1+
<?php
2+
/**
3+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
4+
*
5+
* Copyright (c) 2016-2021 BigBlueButton Inc. and by respective authors (see below).
6+
*
7+
* This program is free software; you can redistribute it and/or modify it under the
8+
* terms of the GNU Lesser General Public License as published by the Free Software
9+
* Foundation; either version 3.0 of the License, or (at your option) any later
10+
* version.
11+
*
12+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
13+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License along
17+
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
namespace BigBlueButton\Core;
2020

21-
/**
22-
* Class GetDefaultConfigXMLUrlResponse
23-
* @package BigBlueButton\Responses
24-
*/
25-
class GetDefaultConfigXMLResponse
21+
class MeetingLayout
2622
{
27-
/**
28-
* @var \SimpleXMLElement
29-
*/
30-
protected $rawXml;
31-
32-
/**
33-
* BaseResponse constructor.
34-
*
35-
* @param \SimpleXMLElement $xml
36-
*/
37-
public function __construct(\SimpleXMLElement $xml)
38-
{
39-
$this->rawXml = $xml;
40-
}
41-
42-
/**
43-
* @return \SimpleXMLElement
44-
*/
45-
public function getRawXml()
46-
{
47-
return $this->rawXml;
48-
}
23+
public const CUSTOM_LAYOUT = 'CUSTOM_LAYOUT';
24+
public const SMART_LAYOUT = 'SMART_LAYOUT';
25+
public const PRESENTATION_FOCUS = 'PRESENTATION_FOCUS';
26+
public const VIDEO_FOCUS = 'VIDEO_FOCUS';
4927
}

0 commit comments

Comments
 (0)