config.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /**
  2. * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
  3. *
  4. * @license GNU AGPL version 3 or any later version
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as
  8. * published by the Free Software Foundation, either version 3 of the
  9. * License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. */
  20. /**
  21. * @namespace
  22. * @deprecated Use OCP.AppConfig instead
  23. */
  24. OC.AppConfig={
  25. /**
  26. * @deprecated Use OCP.AppConfig.getValue() instead
  27. */
  28. getValue:function(app,key,defaultValue,callback){
  29. OCP.AppConfig.getValue(app, key, defaultValue, {
  30. success: callback
  31. });
  32. },
  33. /**
  34. * @deprecated Use OCP.AppConfig.setValue() instead
  35. */
  36. setValue:function(app,key,value){
  37. OCP.AppConfig.setValue(app, key, value);
  38. },
  39. /**
  40. * @deprecated Use OCP.AppConfig.getApps() instead
  41. */
  42. getApps:function(callback){
  43. OCP.AppConfig.getApps({
  44. success: callback
  45. });
  46. },
  47. /**
  48. * @deprecated Use OCP.AppConfig.getKeys() instead
  49. */
  50. getKeys:function(app,callback){
  51. OCP.AppConfig.getKeys(app, {
  52. success: callback
  53. });
  54. },
  55. /**
  56. * @deprecated Use OCP.AppConfig.deleteKey() instead
  57. */
  58. deleteKey:function(app,key){
  59. OCP.AppConfig.deleteKey(app, key);
  60. }
  61. };