2016-01-11 04:30:03 -05:00
|
|
|
<?php
|
2024-05-23 03:26:56 -04:00
|
|
|
|
2016-01-11 04:30: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
|
2016-01-11 04:30:03 -05:00
|
|
|
*/
|
2016-01-27 06:13:53 -05:00
|
|
|
namespace OCP\Share;
|
2016-01-11 04:30:03 -05:00
|
|
|
|
2016-01-13 08:21:55 -05:00
|
|
|
use OC\Share20\Exception\ProviderException;
|
|
|
|
|
|
2016-01-11 04:30:03 -05:00
|
|
|
/**
|
|
|
|
|
* Interface IProviderFactory
|
|
|
|
|
*
|
|
|
|
|
* @since 9.0.0
|
|
|
|
|
*/
|
|
|
|
|
interface IProviderFactory {
|
|
|
|
|
/**
|
2016-01-13 08:21:55 -05:00
|
|
|
* @param string $id
|
|
|
|
|
* @return IShareProvider
|
|
|
|
|
* @throws ProviderException
|
2016-01-27 06:13:53 -05:00
|
|
|
* @since 9.0.0
|
2016-01-13 08:21:55 -05:00
|
|
|
*/
|
|
|
|
|
public function getProvider($id);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param int $shareType
|
|
|
|
|
* @return IShareProvider
|
|
|
|
|
* @throws ProviderException
|
2016-01-27 06:13:53 -05:00
|
|
|
* @since 9.0.0
|
2016-01-11 04:30:03 -05:00
|
|
|
*/
|
2016-01-13 08:21:55 -05:00
|
|
|
public function getProviderForType($shareType);
|
2016-06-18 16:04:56 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return IShareProvider[]
|
2016-11-15 12:51:52 -05:00
|
|
|
* @since 11.0.0
|
2016-06-18 16:04:56 -04:00
|
|
|
*/
|
|
|
|
|
public function getAllProviders();
|
2020-12-03 09:51:58 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 21.0.0
|
|
|
|
|
* @param string $shareProvier
|
|
|
|
|
*/
|
|
|
|
|
public function registerProvider(string $shareProvier): void;
|
2016-01-11 04:30:03 -05:00
|
|
|
}
|