2015-11-05 15:46:37 +00:00
|
|
|
<?php
|
2016-01-12 14:02:16 +00:00
|
|
|
/**
|
2016-07-21 14:49:16 +00:00
|
|
|
* @copyright Copyright (c) 2016, ownCloud, Inc.
|
|
|
|
*
|
2016-01-12 14:02:16 +00: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,
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
*
|
|
|
|
*/
|
2016-01-25 16:50:39 +00:00
|
|
|
namespace OCA\DAV\DAV\Sharing;
|
|
|
|
use Sabre\DAV\INode;
|
2015-11-05 15:46:37 +00:00
|
|
|
|
|
|
|
/**
|
2016-01-25 16:50:39 +00:00
|
|
|
* This interface represents a dav resource that can be shared with other users.
|
2015-11-05 15:46:37 +00:00
|
|
|
*
|
|
|
|
*/
|
2016-01-25 16:50:39 +00:00
|
|
|
interface IShareable extends INode {
|
2015-11-05 15:46:37 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Updates the list of shares.
|
|
|
|
*
|
|
|
|
* The first array is a list of people that are to be added to the
|
2016-01-25 16:50:39 +00:00
|
|
|
* resource.
|
2015-11-05 15:46:37 +00: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 16:50:39 +00:00
|
|
|
* Returns the list of people whom this resource is shared with.
|
2015-11-05 15:46:37 +00: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-25 21:49:26 +00:00
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getResourceId();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getOwner();
|
|
|
|
|
2015-11-05 15:46:37 +00:00
|
|
|
}
|