nsISettingsService.idl 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. #include "domstubs.idl"
  5. [scriptable, uuid(aad47850-2e87-11e2-81c1-0800200c9a66)]
  6. interface nsISettingsServiceCallback : nsISupports
  7. {
  8. void handle(in DOMString aName, in jsval aResult);
  9. void handleError(in DOMString aErrorMessage);
  10. };
  11. [scriptable, uuid(f1b3d820-8e75-11e3-baa8-0800200c9a66)]
  12. interface nsISettingsTransactionCompleteCallback : nsISupports
  13. {
  14. void handle();
  15. void handleAbort(in DOMString aErrorMessage);
  16. };
  17. [scriptable, uuid(d7a395a0-e292-11e1-834e-1761d57f5f99)]
  18. interface nsISettingsServiceLock : nsISupports
  19. {
  20. void set(in string aName,
  21. in jsval aValue,
  22. in nsISettingsServiceCallback aCallback,
  23. [optional] in string aMessage);
  24. void get(in string aName, in nsISettingsServiceCallback aCallback);
  25. };
  26. [scriptable, uuid(d1ed155c-9f90-47bb-91c2-7eac54d69f4b)]
  27. interface nsISettingsService : nsISupports
  28. {
  29. nsISettingsServiceLock createLock([optional] in nsISettingsTransactionCompleteCallback aCallback);
  30. void receiveMessage(in jsval aMessage);
  31. };