ICloudFederationShare.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2018 Bjoern Schiessle <bjoern@schiessle.org>
  4. *
  5. * @license GNU AGPL version 3 or any later version
  6. *
  7. * This program is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU Affero General Public License as
  9. * published by the Free Software Foundation, either version 3 of the
  10. * License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU Affero General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Affero General Public License
  18. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. *
  20. */
  21. namespace OCP\Federation;
  22. /**
  23. * Interface ICloudFederationShare
  24. *
  25. * @package OCP\Federation
  26. *
  27. * @since 14.0.0
  28. */
  29. interface ICloudFederationShare {
  30. /**
  31. * set uid of the recipient
  32. *
  33. * @param string $user
  34. *
  35. * @since 14.0.0
  36. */
  37. public function setShareWith($user);
  38. /**
  39. * set resource name (e.g. file, calendar, contact,...)
  40. *
  41. * @param string $name
  42. *
  43. * @since 14.0.0
  44. */
  45. public function setResourceName($name);
  46. /**
  47. * set resource type (e.g. file, calendar, contact,...)
  48. *
  49. * @param string $resourceType
  50. *
  51. * @since 14.0.0
  52. */
  53. public function setResourceType($resourceType);
  54. /**
  55. * set resource description (optional)
  56. *
  57. * @param string $description
  58. *
  59. * @since 14.0.0
  60. */
  61. public function setDescription($description);
  62. /**
  63. * set provider ID (e.g. file ID)
  64. *
  65. * @param string $providerId
  66. *
  67. * @since 14.0.0
  68. */
  69. public function setProviderId($providerId);
  70. /**
  71. * set owner UID
  72. *
  73. * @param string $owner
  74. *
  75. * @since 14.0.0
  76. */
  77. public function setOwner($owner);
  78. /**
  79. * set owner display name
  80. *
  81. * @param string $ownerDisplayName
  82. *
  83. * @since 14.0.0
  84. */
  85. public function setOwnerDisplayName($ownerDisplayName);
  86. /**
  87. * set UID of the user who sends the share
  88. *
  89. * @param string $sharedBy
  90. *
  91. * @since 14.0.0
  92. */
  93. public function setSharedBy($sharedBy);
  94. /**
  95. * set display name of the user who sends the share
  96. *
  97. * @param $sharedByDisplayName
  98. *
  99. * @since 14.0.0
  100. */
  101. public function setSharedByDisplayName($sharedByDisplayName);
  102. /**
  103. * set protocol specification
  104. *
  105. * @param array $protocol
  106. *
  107. * @since 14.0.0
  108. */
  109. public function setProtocol(array $protocol);
  110. /**
  111. * share type (group or user)
  112. *
  113. * @param string $shareType
  114. *
  115. * @since 14.0.0
  116. */
  117. public function setShareType($shareType);
  118. /**
  119. * get the whole share, ready to send out
  120. *
  121. * @return array
  122. *
  123. * @since 14.0.0
  124. */
  125. public function getShare();
  126. /**
  127. * get uid of the recipient
  128. *
  129. * @return string
  130. *
  131. * @since 14.0.0
  132. */
  133. public function getShareWith();
  134. /**
  135. * get resource name (e.g. file, calendar, contact,...)
  136. *
  137. * @return string
  138. *
  139. * @since 14.0.0
  140. */
  141. public function getResourceName();
  142. /**
  143. * get resource type (e.g. file, calendar, contact,...)
  144. *
  145. * @return string
  146. *
  147. * @since 14.0.0
  148. */
  149. public function getResourceType();
  150. /**
  151. * get resource description (optional)
  152. *
  153. * @return string
  154. *
  155. * @since 14.0.0
  156. */
  157. public function getDescription();
  158. /**
  159. * get provider ID (e.g. file ID)
  160. *
  161. * @return string
  162. *
  163. * @since 14.0.0
  164. */
  165. public function getProviderId();
  166. /**
  167. * get owner UID
  168. *
  169. * @return string
  170. *
  171. * @since 14.0.0
  172. */
  173. public function getOwner();
  174. /**
  175. * get owner display name
  176. *
  177. * @return string
  178. *
  179. * @since 14.0.0
  180. */
  181. public function getOwnerDisplayName();
  182. /**
  183. * get UID of the user who sends the share
  184. *
  185. * @return string
  186. *
  187. * @since 14.0.0
  188. */
  189. public function getSharedBy();
  190. /**
  191. * get display name of the user who sends the share
  192. *
  193. * @return string
  194. *
  195. * @since 14.0.0
  196. */
  197. public function getSharedByDisplayName();
  198. /**
  199. * get share type (group or user)
  200. *
  201. * @return string
  202. *
  203. * @since 14.0.0
  204. */
  205. public function getShareType();
  206. /**
  207. * get share Secret
  208. *
  209. * @return string
  210. *
  211. * @since 14.0.0
  212. */
  213. public function getShareSecret();
  214. /**
  215. * get protocol specification
  216. *
  217. * @return array
  218. *
  219. * @since 14.0.0
  220. */
  221. public function getProtocol();
  222. }