2015-10-30 12:10:08 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @author Roeland Jago Douma <rullzer@owncloud.com>
|
|
|
|
*
|
2016-01-12 14:02:16 +00:00
|
|
|
* @copyright Copyright (c) 2016, ownCloud, Inc.
|
2015-10-30 12:10:08 +00:00
|
|
|
* @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/>
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
namespace OC\Share20;
|
|
|
|
|
|
|
|
use OCP\Files\File;
|
|
|
|
use OCP\Files\Folder;
|
|
|
|
use OCP\Files\Node;
|
|
|
|
use OCP\IUser;
|
|
|
|
use OCP\IGroup;
|
|
|
|
|
|
|
|
interface IShare {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the id of the share
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getId();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the path of this share
|
|
|
|
*
|
2015-11-24 08:58:37 +00:00
|
|
|
* @param Node $path
|
2015-10-30 12:10:08 +00:00
|
|
|
* @return Share The modified object
|
|
|
|
*/
|
|
|
|
public function setPath(Node $path);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the path of this share for the current user
|
|
|
|
*
|
|
|
|
* @return File|Folder
|
|
|
|
*/
|
|
|
|
public function getPath();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the shareType
|
|
|
|
*
|
|
|
|
* @param int $shareType
|
|
|
|
* @return Share The modified object
|
|
|
|
*/
|
|
|
|
public function setShareType($shareType);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the shareType
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getShareType();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the receiver of this share
|
|
|
|
*
|
|
|
|
* @param IUser|IGroup|string
|
|
|
|
* @return Share The modified object
|
|
|
|
*/
|
|
|
|
public function setSharedWith($sharedWith);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the receiver of this share
|
|
|
|
*
|
|
|
|
* @return IUser|IGroup|string
|
|
|
|
*/
|
|
|
|
public function getSharedWith();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the permissions
|
|
|
|
*
|
|
|
|
* @param int $permissions
|
|
|
|
* @return Share The modified object
|
|
|
|
*/
|
|
|
|
public function setPermissions($permissions);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the share permissions
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getPermissions();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the expiration date
|
|
|
|
*
|
|
|
|
* @param \DateTime $expireDate
|
|
|
|
* @return Share The modified object
|
|
|
|
*/
|
2015-12-15 08:52:04 +00:00
|
|
|
public function setExpirationDate($expireDate);
|
2015-10-30 12:10:08 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the share expiration date
|
|
|
|
*
|
|
|
|
* @return \DateTime
|
|
|
|
*/
|
|
|
|
public function getExpirationDate();
|
|
|
|
|
2015-12-15 08:52:04 +00:00
|
|
|
/**
|
|
|
|
* Set the sharer of the path
|
|
|
|
*
|
|
|
|
* @param IUser|string $sharedBy
|
|
|
|
* @return Share The modified object
|
|
|
|
*/
|
|
|
|
public function setSharedBy($sharedBy);
|
|
|
|
|
2015-10-30 12:10:08 +00:00
|
|
|
/**
|
|
|
|
* Get share sharer
|
|
|
|
*
|
|
|
|
* @return IUser|string
|
|
|
|
*/
|
|
|
|
public function getSharedBy();
|
|
|
|
|
2015-12-15 08:52:04 +00:00
|
|
|
/**
|
|
|
|
* Set the original share owner (who owns the path)
|
|
|
|
*
|
|
|
|
* @param IUser|string
|
|
|
|
*
|
|
|
|
* @return Share The modified object
|
|
|
|
*/
|
|
|
|
public function setShareOwner($shareOwner);
|
|
|
|
|
2015-10-30 12:10:08 +00:00
|
|
|
/**
|
|
|
|
* Get the original share owner (who owns the path)
|
|
|
|
*
|
|
|
|
* @return IUser|string
|
|
|
|
*/
|
|
|
|
public function getShareOwner();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the password
|
|
|
|
*
|
|
|
|
* @param string $password
|
|
|
|
*
|
|
|
|
* @return Share The modified object
|
|
|
|
*/
|
|
|
|
public function setPassword($password);
|
|
|
|
|
2015-11-06 11:05:19 +00:00
|
|
|
/**
|
|
|
|
* Is a password set for this share
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getPassword();
|
|
|
|
|
2015-12-15 08:52:04 +00:00
|
|
|
/**
|
|
|
|
* Set the token
|
|
|
|
*
|
|
|
|
* @param string $token
|
|
|
|
* @return Share The modified object
|
|
|
|
*/
|
|
|
|
public function setToken($token);
|
|
|
|
|
2015-10-30 12:10:08 +00:00
|
|
|
/**
|
|
|
|
* Get the token
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getToken();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the parent it
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getParent();
|
2015-11-02 20:06:55 +00:00
|
|
|
|
2015-12-15 08:52:04 +00:00
|
|
|
/**
|
|
|
|
* Set the target of this share
|
|
|
|
*
|
|
|
|
* @param string $target
|
|
|
|
* @return Share The modified object
|
|
|
|
*/
|
|
|
|
public function setTarget($target);
|
|
|
|
|
2015-11-02 20:06:55 +00:00
|
|
|
/**
|
|
|
|
* Get the target of this share
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getTarget();
|
2015-11-06 11:05:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the timestamp this share was created
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getSharetime();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get mailSend
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function getMailSend();
|
2015-10-30 12:10:08 +00:00
|
|
|
}
|