Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

IManager.php 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Joas Schilling <coding@schilljs.com>
  6. *
  7. * @license AGPL-3.0
  8. *
  9. * This code is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU Affero General Public License, version 3,
  11. * as published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Affero General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public License, version 3,
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>
  20. *
  21. */
  22. namespace OCP\Notification;
  23. /**
  24. * Interface IManager
  25. *
  26. * @package OCP\Notification
  27. * @since 9.0.0
  28. */
  29. interface IManager extends IApp, INotifier {
  30. /**
  31. * @param \Closure $service The service must implement IApp, otherwise a
  32. * \InvalidArgumentException is thrown later
  33. * @since 9.0.0
  34. */
  35. public function registerApp(\Closure $service);
  36. /**
  37. * @param \Closure $service The service must implement INotifier, otherwise a
  38. * \InvalidArgumentException is thrown later
  39. * @param \Closure $info An array with the keys 'id' and 'name' containing
  40. * the app id and the app name
  41. * @since 9.0.0
  42. */
  43. public function registerNotifier(\Closure $service, \Closure $info);
  44. /**
  45. * @return array App ID => App Name
  46. * @since 9.0.0
  47. */
  48. public function listNotifiers();
  49. /**
  50. * @return INotification
  51. * @since 9.0.0
  52. */
  53. public function createNotification();
  54. /**
  55. * @return bool
  56. * @since 9.0.0
  57. */
  58. public function hasNotifiers();
  59. /**
  60. * @param bool $preparingPushNotification
  61. * @since 14.0.0
  62. */
  63. public function setPreparingPushNotification($preparingPushNotification);
  64. /**
  65. * @return bool
  66. * @since 14.0.0
  67. */
  68. public function isPreparingPushNotification();
  69. }