IOCMDiscoveryService.php 686 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\OCM;
  8. use OCP\OCM\Exceptions\OCMProviderException;
  9. /**
  10. * Discover remote OCM services
  11. *
  12. * @since 28.0.0
  13. */
  14. interface IOCMDiscoveryService {
  15. /**
  16. * Discover remote OCM services
  17. *
  18. * @param string $remote address of the remote provider
  19. * @param bool $skipCache ignore cache, refresh data
  20. *
  21. * @return IOCMProvider
  22. * @throws OCMProviderException if no valid discovery data can be returned
  23. * @since 28.0.0
  24. */
  25. public function discover(string $remote, bool $skipCache = false): IOCMProvider;
  26. }