1
0

ICloudFederationShare.php 4.2 KB

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