next up previous contents
Next: 修改 icon Up: Openmeetings 優化 Previous: 版本宣告   Contents

gateway

  1. Openmeetings gateway 函式的參數,請參考apache.org。所有 gateway 函式都是透過傳遞 url 參數,取得 openmeetings 畫面或資料。
  2. 修改 gateway 函式名稱 deleteRoomopenmeetings_deleteRoom
    [root@moodle moodle23]# diff -urN -wbBE mod_tmp/openmeetings/openmeetings_gateway.php mod/openmeetings/openmeetings_gateway.php 
    --- mod_tmp/openmeetings/openmeetings_gateway.php	2012-08-02 19:04:40.000000000 +0800
    +++ mod/openmeetings/openmeetings_gateway.php	2013-04-25 13:46:30.436316177 +0800
    @@ -210,7 +211,8 @@
     		return -1;
     	}
     
    -	function deleteRoom($openmeetings) {
    +	
    +	function openmeetings_deleteRoom($openmeetings) {
     		global $CFG;
     
     		//echo $client_roomService."<br/>";
    
  3. 修改 gateway 函式 openmeetings_getRecordingsByExternalRooms,並變更名稱為 openmeetings_getFlvRecordingByExternalRoomTypeByList,變更後可列出用戶所有會議錄影。
    @@ -342,20 +346,86 @@
     	/**
     	 * Get list of available recordings made by this Moodle instance
     	 */
    -	function openmeetings_getRecordingsByExternalRooms() {
    +	function openmeetings_getFlvRecordingByExternalRoomTypeByList() {
     	
     		global $CFG;
     
     		$restService = new openmeetings_rest_service();
    +		$url = $this->getUrl()."/services/RoomService/getFlvRecordingByExternalRoomTypeByList?" .
    +					"SID=".$this->session_id .
    +					"&externalRoomType=".urlencode($CFG->openmeetings_openmeetingsModuleKey);
    +		$result = $restService->call($url,"");
    +		return $result;		
    +	}
    
  4. 新增 gateway 函式 openmeetings_getRecordingsByExternalRoomType,由會議型態讀取可播放的會議錄影,與上一個函式不同之處,為回傳型式不同。
    +	/**
    +	 * Get list of available recordings made by this Moodle instance
    +	 */
    +	function openmeetings_getRecordingsByExternalRoomType() {
    +	
    +		global $CFG;
     		
    +		$restService = new openmeetings_rest_service();
     		$url = $this->getUrl()."/services/RoomService/getFlvRecordingByExternalRoomType?" .
     					"SID=".$this->session_id .
     					"&externalRoomType=".urlencode($CFG->openmeetings_openmeetingsModuleKey);
    +		$result = $restService->call($url,"");
    +		return $result;		
    +	}
    
  5. 新增 gateway 函式 openmeetings_getFlvRecordingByExternalRoomTypeAndCreator,由會議型態讀及用戶 id 取得該用戶錄製的會議錄影。
    +	/**
    +	 * Get list of available recordings made by dywang
    +	 */
    +	function openmeetings_getFlvRecordingByExternalRoomTypeAndCreator() {
    +	
    +		global $CFG,$USER;
     
    +		$restService = new openmeetings_rest_service();
    +		$url = $this->getUrl()."/services/RoomService/getFlvRecordingByExternalRoomTypeAndCreator?" .
    +					"SID=".$this->session_id . 
    +					"&externalRoomType=".urlencode($CFG->openmeetings_openmeetingsModuleKey) .
    +					"&insertedBy=". $USER->id ;
     		$result = $restService->call($url,"");
    +		return $result;		
    +	}
    
  6. 新增 gateway 函式 openmeetings_getFlvRecordingByRoomId,由會議室 id 取得該會議室的會議錄影。
    +	/**
    +	 * Get list of available recordings made by dywang
    +	 */
    +	function openmeetings_getFlvRecordingByRoomId($roomid) {
    +	
    +		global $CFG,$USER;
     					
    +		$restService = new openmeetings_rest_service();
    +		$url = $this->getUrl()."/services/RoomService/getFlvRecordingByRoomId?" .
    +					"SID=".$this->session_id . 
    +					"&roomId=". $roomid ;
    +		$result = $restService->call($url,"");
     		return $result;		
    +	}
    
  7. 新增 gateway 函式 openmeetings_getFlvRecordingByExternalUserId,由用戶 id 取得該用戶的會議錄影。
    +	/**
    +	 * Get list of available recordings made by dywang
    +	 */
    +	function openmeetings_getFlvRecordingByExternalUserId() {
     					
    +		global $CFG,$USER;
    +
    +		$restService = new openmeetings_rest_service();
    +		$url = $this->getUrl()."/services/RoomService/getFlvRecordingByExternalUserId?" .
    +					"SID=".$this->session_id . 
    +					"&externalUserId=". $USER->id ;
    +		$result = $restService->call($url,"");
    +		return $result;		
    +	}
    
  8. 新增 gateway 函式 openmeetings_deleteFlvRecording,可以刪除會議錄影。
    +	/**
    +	 * Remove recordings by dywang
    +	 */
    +	function openmeetings_deleteFlvRecording($recording_id) {
    +	
    +		global $CFG;
    +		$restService = new openmeetings_rest_service();
    +		$url = $this->getUrl()."/services/RoomService/deleteFlvRecording?" .
    +					"SID=".$this->session_id .
    +					"&flvRecordingId=".$recording_id;
    +		$result = $restService->call($url,"");
    +		return $result;		
     	}
     
     }
    



2018-08-14