You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.8 KiB

3 years ago
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Björn Schießle <bjoern@schiessle.org>
  6. * @author Christopher Schäpers <kondou@ts.unde.re>
  7. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  8. * @author Daniel Calviño Sánchez <danxuliu@gmail.com>
  9. * @author Joas Schilling <coding@schilljs.com>
  10. * @author Morris Jobke <hey@morrisjobke.de>
  11. *
  12. * @license AGPL-3.0
  13. *
  14. * This code is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU Affero General Public License, version 3,
  16. * as published by the Free Software Foundation.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU Affero General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Affero General Public License, version 3,
  24. * along with this program. If not, see <http://www.gnu.org/licenses/>
  25. *
  26. */
  27. namespace OC\Share;
  28. use OCP\Share\IShare;
  29. class Constants {
  30. /**
  31. * @deprecated 17.0.0 - use IShare::TYPE_USER instead
  32. */
  33. public const SHARE_TYPE_USER = 0;
  34. /**
  35. * @deprecated 17.0.0 - use IShare::TYPE_GROUP instead
  36. */
  37. public const SHARE_TYPE_GROUP = 1;
  38. // const SHARE_TYPE_USERGROUP = 2; // Internal type used by DefaultShareProvider
  39. /**
  40. * @deprecated 17.0.0 - use IShare::TYPE_LINK instead
  41. */
  42. public const SHARE_TYPE_LINK = 3;
  43. /**
  44. * @deprecated 17.0.0 - use IShare::TYPE_EMAIL instead
  45. */
  46. public const SHARE_TYPE_EMAIL = 4;
  47. public const SHARE_TYPE_CONTACT = 5; // ToDo Check if it is still in use otherwise remove it
  48. /**
  49. * @deprecated 17.0.0 - use IShare::TYPE_REMOTE instead
  50. */
  51. public const SHARE_TYPE_REMOTE = 6;
  52. /**
  53. * @deprecated 17.0.0 - use IShare::TYPE_CIRCLE instead
  54. */
  55. public const SHARE_TYPE_CIRCLE = 7;
  56. /**
  57. * @deprecated 17.0.0 - use IShare::TYPE_GUEST instead
  58. */
  59. public const SHARE_TYPE_GUEST = 8;
  60. /**
  61. * @deprecated 17.0.0 - use IShare::REMOTE_GROUP instead
  62. */
  63. public const SHARE_TYPE_REMOTE_GROUP = 9;
  64. /**
  65. * @deprecated 17.0.0 - use IShare::TYPE_ROOM instead
  66. */
  67. public const SHARE_TYPE_ROOM = 10;
  68. // const SHARE_TYPE_USERROOM = 11; // Internal type used by RoomShareProvider
  69. public const FORMAT_NONE = -1;
  70. public const FORMAT_STATUSES = -2;
  71. public const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it
  72. public const RESPONSE_FORMAT = 'json'; // default resonse format for ocs calls
  73. public const TOKEN_LENGTH = 15; // old (oc7) length is 32, keep token length in db at least that for compatibility
  74. protected static $shareTypeUserAndGroups = -1;
  75. protected static $shareTypeGroupUserUnique = 2;
  76. protected static $backends = [];
  77. protected static $backendTypes = [];
  78. protected static $isResharingAllowed;
  79. }