/**
  * rescan calendars that changed on backends
  */
 public function propagateChanges()
 {
     $changes = $this->getChanges();
     $this->resetChanges();
     foreach ($changes as $c) {
         $scanner = $this->backends->getScanner();
         $scanner->scanCalendar($c['backendId'], $c['privateUri'], $c['userId'], $c['usersCalendar']);
     }
 }
 /**
  * @param integer $limit
  * @param integer $offset
  * @return \OCP\AppFramework\Http\Response
  *
  * @NoAdminRequired
  * @NoCSRFRequired
  */
 public function index($limit = null, $offset = null)
 {
     try {
         $this->backends->getScanner()->scan($this->user->getUID());
         return $this->backends->subset($limit, $offset);
     } catch (\Exception $ex) {
         return $this->handleException($ex);
     }
 }
Ejemplo n.º 3
0
 /**
  * @param IBackendCollection $backends
  */
 public function __construct(IBackendCollection $backends)
 {
     $this->backends = $backends;
     $this->cache = $backends->getCache();
     $this->scanner = $backends->getScanner();
 }