示例#1
0
 /**
  * Destory a progress operation.
  *
  * @param array $pop progress operation details
  * @return boolean true on success
  */
 private function _util_progressDestroy($pop)
 {
     // Connect to vboxwebsrv
     $this->connect();
     try {
         /* @var $progress IProgress */
         $progress = new IProgress($this->client, $pop['progress']);
         $progress->releaseRemote();
     } catch (Exception $e) {
     }
     try {
         // Close session and logoff
         try {
             if ($this->session->handle) {
                 if ((string) $this->session->state != 'Unlocked') {
                     $this->session->unlockMachine();
                 }
                 $this->session->releaseRemote();
                 unset($this->session);
             }
         } catch (Exception $e) {
             $this->errors[] = $e;
         }
         // Logoff session associated with progress operation
         $this->websessionManager->logoff($this->vbox->handle);
         unset($this->vbox);
     } catch (Exception $e) {
         $this->errors[] = $e;
     }
     // Remove progress handles
     $this->persistentRequest = array();
     return true;
 }