1 /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
2 /* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 include protocol PContent;
12 /* This protocol bridges async access to the database thread running on the parent process
13 * and caches running on the child process.
15 sync protocol PStorage
22 sync Preload(nsCString scope, uint32_t alreadyLoadedCount)
23 returns (nsString[] keys, nsString[] values, nsresult rv);
25 async AsyncPreload(nsCString scope, bool priority);
26 async AsyncGetUsage(nsCString scope);
27 async AsyncAddItem(nsCString scope, nsString key, nsString value);
28 async AsyncUpdateItem(nsCString scope, nsString key, nsString value);
29 async AsyncRemoveItem(nsCString scope, nsString key);
30 async AsyncClear(nsCString scope);
34 async Observe(nsCString topic, nsCString scopePrefix);
35 async ScopesHavingData(nsCString[] scopes);
36 async LoadItem(nsCString scope, nsString key, nsString value);
37 async LoadDone(nsCString scope, nsresult rv);
38 async LoadUsage(nsCString scope, int64_t usage);
39 async Error(nsresult rv);