|
@@ -53,17 +53,17 @@ class OpenMeetingsGateway
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
function getRestUrl($name)
|
|
|
{
|
|
|
return $this->getUrl() . "/services/" . $name . "/";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
function getUrl()
|
|
|
{
|
|
|
return $this->_url;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
function var_to_str($in)
|
|
|
{
|
|
|
if (is_bool($in)) {
|
|
@@ -72,7 +72,7 @@ class OpenMeetingsGateway
|
|
|
return $in;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* TODO: Get Error Service and show detailed Error Message
|
|
|
*/
|
|
@@ -80,7 +80,7 @@ class OpenMeetingsGateway
|
|
|
{
|
|
|
$returnValue = 0;
|
|
|
$response = $this->rest->call($this->getRestUrl("UserService") . "getSession", "session_id");
|
|
|
-
|
|
|
+
|
|
|
if ($this->rest->getError()) {
|
|
|
error_log('Fault (Expect - The request contains an invalid SOAP body) '.print_r($response,1));
|
|
|
|
|
@@ -91,7 +91,7 @@ class OpenMeetingsGateway
|
|
|
} else {
|
|
|
//error_log('getSession returned '.$response. ' - Storing as sessionId');
|
|
|
$this->sessionId = $response;
|
|
|
-
|
|
|
+
|
|
|
$url = $this->getRestUrl("UserService")
|
|
|
. "loginUser?"
|
|
|
. "SID=" . $this->sessionId
|
|
@@ -111,7 +111,7 @@ class OpenMeetingsGateway
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if ($returnValue > 0) {
|
|
|
return true;
|
|
|
} else {
|
|
@@ -126,12 +126,12 @@ class OpenMeetingsGateway
|
|
|
error_log('Debug: ' . $this->rest->getDebug());
|
|
|
exit();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$isModeratedRoom = false;
|
|
|
if ($room->isModeratedRoom == 1) {
|
|
|
$isModeratedRoom = true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$url = $this->getRestUrl($this->getRestUrl("RoomService")
|
|
|
. "updateRoomWithModeration?SID=" . $this->sessionId
|
|
|
. "&room_id=" . $room->room_id
|
|
@@ -161,7 +161,7 @@ class OpenMeetingsGateway
|
|
|
}
|
|
|
return - 1;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/*
|
|
|
* public String setUserObjectAndGenerateRecordingHashByURL(String SID, String username, String firstname, String lastname, Long externalUserId, String externalUserType, Long recording_id)
|
|
|
*/
|
|
@@ -176,7 +176,7 @@ class OpenMeetingsGateway
|
|
|
. '&externalUserId=' . $userId
|
|
|
. '&externalUserType=' . urlencode($systemType)
|
|
|
. '&recording_id=' . $recording_id, 'return');
|
|
|
-
|
|
|
+
|
|
|
if ($result->fault) {
|
|
|
error_log('Fault (Expect - The request contains an invalid SOAP body) '.print_r($result,1));
|
|
|
} else {
|
|
@@ -197,7 +197,7 @@ class OpenMeetingsGateway
|
|
|
error_log('Debug: ' . $this->rest->getDebug());;
|
|
|
exit();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$result = $this->rest->call($this->getRestUrl("UserService")
|
|
|
. "setUserObjectAndGenerateRoomHashByURLAndRecFlag?"
|
|
|
. "SID=" . $this->sessionId
|
|
@@ -212,7 +212,7 @@ class OpenMeetingsGateway
|
|
|
. "&becomeModeratorAsInt=" . $becomeModerator
|
|
|
. "&showAudioVideoTestAsInt=1"
|
|
|
. "&allowRecording=" . $this->var_to_str($allowRecording));
|
|
|
-
|
|
|
+
|
|
|
if ($result->fault) {
|
|
|
error_log('Fault (Expect - The request contains an invalid SOAP body) '.print_r($result,1));
|
|
|
} else {
|
|
@@ -234,10 +234,10 @@ class OpenMeetingsGateway
|
|
|
error_log('Debug: ' . $this->rest->getDebug());;
|
|
|
exit();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$result = $this->rest->call($this->getRestUrl("RoomService") . "deleteRoom?SID=" . $this->sessionId
|
|
|
. "&rooms_id=" . $openmeetings->room_id);
|
|
|
-
|
|
|
+
|
|
|
if ($result->fault) {
|
|
|
error_log('Fault (Expect - The request contains an invalid SOAP body) '.print_r($result,1));
|
|
|
} else {
|
|
@@ -252,7 +252,7 @@ class OpenMeetingsGateway
|
|
|
}
|
|
|
return - 1;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* Generate a new room hash for entering a conference room
|
|
|
*/
|
|
@@ -271,7 +271,7 @@ class OpenMeetingsGateway
|
|
|
. "&room_id=" . $room_id
|
|
|
. "&becomeModeratorAsInt=" . $becomeModeratorAsInt
|
|
|
. "&showAudioVideoTestAsInt=" . $showAudioVideoTestAsInt);
|
|
|
-
|
|
|
+
|
|
|
if ($result->getError()) {
|
|
|
error_log('Fault (Expect - The request contains an invalid SOAP body) '.print_r($result,1));
|
|
|
} else {
|
|
@@ -285,7 +285,7 @@ class OpenMeetingsGateway
|
|
|
}
|
|
|
return - 1;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* Create a new conference room
|
|
|
* @param The room object
|
|
@@ -322,7 +322,7 @@ class OpenMeetingsGateway
|
|
|
}
|
|
|
error_log($url);
|
|
|
$result = $this->rest->call($url);
|
|
|
-
|
|
|
+
|
|
|
if ($this->rest->fault) {
|
|
|
error_log('Fault (Expect - The request contains an invalid SOAP body) '.print_r($result,1));
|
|
|
} else {
|
|
@@ -397,14 +397,15 @@ class OpenMeetingsGateway
|
|
|
. "getFlvRecordingByExternalRoomType?"
|
|
|
. "SID=" . $this->sessionId
|
|
|
. "&externalRoomType=" . urlencode($this->config["moduleKey"]);
|
|
|
-
|
|
|
+
|
|
|
$result = $this->rest->call($url, "return");
|
|
|
-
|
|
|
+
|
|
|
return $result;
|
|
|
}
|
|
|
/**
|
|
|
* Get list of available recordings made for the given room
|
|
|
* @param int $id Room ID
|
|
|
+ * @return array
|
|
|
*/
|
|
|
function getFlvRecordingsByRoomId($id)
|
|
|
{
|
|
@@ -427,9 +428,9 @@ class OpenMeetingsGateway
|
|
|
. "getFlvRecordingByExternalUserId?"
|
|
|
. "SID=" . $this->sessionId
|
|
|
. "&externalUserId=" . $id;
|
|
|
-
|
|
|
+
|
|
|
$result = $this->rest->call($url, "return");
|
|
|
-
|
|
|
+
|
|
|
return $result;
|
|
|
}
|
|
|
}
|