You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

appconfig.js 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /**
  2. * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
  3. *
  4. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  5. * @author Joas Schilling <coding@schilljs.com>
  6. * @author John Molakvoæ <skjnldsv@protonmail.com>
  7. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  8. * @author Robin Appelman <robin@icewind.nl>
  9. * @author Vincent Petry <vincent@nextcloud.com>
  10. *
  11. * @license GNU AGPL version 3 or any later version
  12. *
  13. * This program is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU Affero General Public License as
  15. * published by the Free Software Foundation, either version 3 of the
  16. * License, or (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU Affero General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Affero General Public License
  24. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  25. *
  26. */
  27. /* eslint-disable */
  28. import { getValue, setValue, getApps, getKeys, deleteKey } from '../OCP/appconfig'
  29. export const appConfig = window.oc_appconfig || {}
  30. /**
  31. * @namespace
  32. * @deprecated 16.0.0 Use OCP.AppConfig instead
  33. */
  34. export const AppConfig = {
  35. /**
  36. * @deprecated Use OCP.AppConfig.getValue() instead
  37. */
  38. getValue: function(app, key, defaultValue, callback) {
  39. getValue(app, key, defaultValue, {
  40. success: callback
  41. })
  42. },
  43. /**
  44. * @deprecated Use OCP.AppConfig.setValue() instead
  45. */
  46. setValue: function(app, key, value) {
  47. setValue(app, key, value)
  48. },
  49. /**
  50. * @deprecated Use OCP.AppConfig.getApps() instead
  51. */
  52. getApps: function(callback) {
  53. getApps({
  54. success: callback
  55. })
  56. },
  57. /**
  58. * @deprecated Use OCP.AppConfig.getKeys() instead
  59. */
  60. getKeys: function(app, callback) {
  61. getKeys(app, {
  62. success: callback
  63. })
  64. },
  65. /**
  66. * @deprecated Use OCP.AppConfig.deleteKey() instead
  67. */
  68. deleteKey: function(app, key) {
  69. deleteKey(app, key)
  70. }
  71. }