2014-02-18 09:07:03 -05:00
|
|
|
<?php
|
2024-05-23 03:26:56 -04:00
|
|
|
|
2014-02-18 09:07:03 -05:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2014-02-18 09:07:03 -05:00
|
|
|
*/
|
|
|
|
|
namespace OC\Share;
|
|
|
|
|
|
2019-08-23 07:54:19 -04:00
|
|
|
use OCP\Share\IShare;
|
|
|
|
|
|
2014-02-18 09:07:03 -05:00
|
|
|
class Constants {
|
2019-08-23 07:54:19 -04:00
|
|
|
/**
|
|
|
|
|
* @deprecated 17.0.0 - use IShare::TYPE_USER instead
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const SHARE_TYPE_USER = 0;
|
2019-08-23 07:54:19 -04:00
|
|
|
/**
|
|
|
|
|
* @deprecated 17.0.0 - use IShare::TYPE_GROUP instead
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const SHARE_TYPE_GROUP = 1;
|
2018-06-29 03:58:07 -04:00
|
|
|
// const SHARE_TYPE_USERGROUP = 2; // Internal type used by DefaultShareProvider
|
2019-08-23 07:54:19 -04:00
|
|
|
/**
|
|
|
|
|
* @deprecated 17.0.0 - use IShare::TYPE_LINK instead
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const SHARE_TYPE_LINK = 3;
|
2019-08-23 07:54:19 -04:00
|
|
|
/**
|
|
|
|
|
* @deprecated 17.0.0 - use IShare::TYPE_EMAIL instead
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const SHARE_TYPE_EMAIL = 4;
|
|
|
|
|
public const SHARE_TYPE_CONTACT = 5; // ToDo Check if it is still in use otherwise remove it
|
2019-08-23 07:54:19 -04:00
|
|
|
/**
|
|
|
|
|
* @deprecated 17.0.0 - use IShare::TYPE_REMOTE instead
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const SHARE_TYPE_REMOTE = 6;
|
2019-08-23 07:54:19 -04:00
|
|
|
/**
|
|
|
|
|
* @deprecated 17.0.0 - use IShare::TYPE_CIRCLE instead
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const SHARE_TYPE_CIRCLE = 7;
|
2019-08-23 07:54:19 -04:00
|
|
|
/**
|
|
|
|
|
* @deprecated 17.0.0 - use IShare::TYPE_GUEST instead
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const SHARE_TYPE_GUEST = 8;
|
2019-08-23 07:54:19 -04:00
|
|
|
/**
|
|
|
|
|
* @deprecated 17.0.0 - use IShare::REMOTE_GROUP instead
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const SHARE_TYPE_REMOTE_GROUP = 9;
|
2019-08-23 07:54:19 -04:00
|
|
|
/**
|
|
|
|
|
* @deprecated 17.0.0 - use IShare::TYPE_ROOM instead
|
|
|
|
|
*/
|
2020-04-10 10:54:27 -04:00
|
|
|
public const SHARE_TYPE_ROOM = 10;
|
2018-06-29 03:58:07 -04:00
|
|
|
// const SHARE_TYPE_USERROOM = 11; // Internal type used by RoomShareProvider
|
2020-12-03 10:02:47 -05:00
|
|
|
/**
|
2020-12-09 07:19:14 -05:00
|
|
|
* @deprecated 21.0.0 - use IShare::TYPE_DECK instead
|
2020-12-03 10:02:47 -05:00
|
|
|
*/
|
|
|
|
|
public const SHARE_TYPE_DECK = 12;
|
2020-12-09 07:19:14 -05:00
|
|
|
// const SHARE_TYPE_DECK_USER = 13; // Internal type used by DeckShareProvider
|
2014-02-18 09:07:03 -05:00
|
|
|
|
2023-02-20 04:50:31 -05:00
|
|
|
// Note to developers: Do not add new share types here
|
|
|
|
|
|
2020-04-10 10:54:27 -04:00
|
|
|
public const FORMAT_NONE = -1;
|
|
|
|
|
public const FORMAT_STATUSES = -2;
|
|
|
|
|
public const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it
|
2014-02-18 09:07:03 -05:00
|
|
|
|
2022-07-27 08:51:42 -04:00
|
|
|
public const RESPONSE_FORMAT = 'json'; // default response format for ocs calls
|
2014-12-04 13:51:04 -05:00
|
|
|
|
2020-04-10 10:54:27 -04:00
|
|
|
public const TOKEN_LENGTH = 15; // old (oc7) length is 32, keep token length in db at least that for compatibility
|
2014-09-04 10:46:20 -04:00
|
|
|
|
2014-02-18 09:07:03 -05:00
|
|
|
protected static $shareTypeUserAndGroups = -1;
|
|
|
|
|
protected static $shareTypeGroupUserUnique = 2;
|
2020-03-26 04:30:18 -04:00
|
|
|
protected static $backends = [];
|
|
|
|
|
protected static $backendTypes = [];
|
2014-02-18 09:07:03 -05:00
|
|
|
protected static $isResharingAllowed;
|
|
|
|
|
}
|