IInstance.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017 Robin Appelman <robin@icewind.nl>
  4. *
  5. * @license GNU AGPL version 3 or any later version
  6. *
  7. * This program is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU Affero General Public License as
  9. * published by the Free Software Foundation, either version 3 of the
  10. * License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU Affero General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Affero General Public License
  18. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. *
  20. */
  21. namespace OCP\Remote;
  22. /**
  23. * Provides some basic info about a remote Nextcloud instance
  24. *
  25. * @since 13.0.0
  26. */
  27. interface IInstance {
  28. /**
  29. * @return string The url of the remote server without protocol
  30. *
  31. * @since 13.0.0
  32. */
  33. public function getUrl();
  34. /**
  35. * @return string The of of the remote server with protocol
  36. *
  37. * @since 13.0.0
  38. */
  39. public function getFullUrl();
  40. /**
  41. * @return string The full version string in '13.1.2.3' format
  42. *
  43. * @since 13.0.0
  44. */
  45. public function getVersion();
  46. /**
  47. * @return string 'http' or 'https'
  48. *
  49. * @since 13.0.0
  50. */
  51. public function getProtocol();
  52. /**
  53. * Check that the remote server is installed and not in maintenance mode
  54. *
  55. * @since 13.0.0
  56. *
  57. * @return bool
  58. */
  59. public function isActive();
  60. }