2015-11-05 18:46:37 +03:00
|
|
|
<?php
|
2016-01-12 17:02:16 +03:00
|
|
|
/**
|
2016-07-21 17:49:16 +03:00
|
|
|
* @copyright Copyright (c) 2016, ownCloud, Inc.
|
|
|
|
*
|
2019-12-03 21:57:53 +03:00
|
|
|
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
2016-01-12 17:02:16 +03:00
|
|
|
* @author Thomas Müller <thomas.mueller@tmit.eu>
|
|
|
|
*
|
|
|
|
* @license AGPL-3.0
|
|
|
|
*
|
|
|
|
* This code is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License, version 3,
|
2019-12-03 21:57:53 +03:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
2016-01-12 17:02:16 +03:00
|
|
|
*
|
|
|
|
*/
|
2019-11-22 22:52:10 +03:00
|
|
|
|
2016-01-25 19:50:39 +03:00
|
|
|
namespace OCA\DAV\DAV\Sharing;
|
2020-04-09 12:48:10 +03:00
|
|
|
|
2016-01-25 19:50:39 +03:00
|
|
|
use Sabre\DAV\INode;
|
2015-11-05 18:46:37 +03:00
|
|
|
|
|
|
|
/**
|
2016-01-25 19:50:39 +03:00
|
|
|
* This interface represents a dav resource that can be shared with other users.
|
2015-11-05 18:46:37 +03:00
|
|
|
*
|
|
|
|
*/
|
2016-01-25 19:50:39 +03:00
|
|
|
interface IShareable extends INode {
|
2015-11-05 18:46:37 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Updates the list of shares.
|
|
|
|
*
|
|
|
|
* The first array is a list of people that are to be added to the
|
2016-01-25 19:50:39 +03:00
|
|
|
* resource.
|
2015-11-05 18:46:37 +03:00
|
|
|
*
|
|
|
|
* Every element in the add array has the following properties:
|
|
|
|
* * href - A url. Usually a mailto: address
|
|
|
|
* * commonName - Usually a first and last name, or false
|
|
|
|
* * summary - A description of the share, can also be false
|
|
|
|
* * readOnly - A boolean value
|
|
|
|
*
|
|
|
|
* Every element in the remove array is just the address string.
|
|
|
|
*
|
|
|
|
* @param array $add
|
|
|
|
* @param array $remove
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function updateShares(array $add, array $remove);
|
|
|
|
|
|
|
|
/**
|
2016-01-25 19:50:39 +03:00
|
|
|
* Returns the list of people whom this resource is shared with.
|
2015-11-05 18:46:37 +03:00
|
|
|
*
|
|
|
|
* Every element in this array should have the following properties:
|
|
|
|
* * href - Often a mailto: address
|
|
|
|
* * commonName - Optional, for example a first + last name
|
|
|
|
* * status - See the Sabre\CalDAV\SharingPlugin::STATUS_ constants.
|
|
|
|
* * readOnly - boolean
|
|
|
|
* * summary - Optional, a description for the share
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
function getShares();
|
|
|
|
|
2016-01-26 00:49:26 +03:00
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getResourceId();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getOwner();
|
2019-11-22 22:52:10 +03:00
|
|
|
}
|