dom/src/storage/PStorage.ipdl

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:d4c99205330c
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/. */
6
7 include protocol PContent;
8
9 namespace mozilla {
10 namespace dom {
11
12 /* This protocol bridges async access to the database thread running on the parent process
13 * and caches running on the child process.
14 */
15 sync protocol PStorage
16 {
17 manager PContent;
18
19 parent:
20 async __delete__();
21
22 sync Preload(nsCString scope, uint32_t alreadyLoadedCount)
23 returns (nsString[] keys, nsString[] values, nsresult rv);
24
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);
31 async AsyncFlush();
32
33 child:
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);
40 };
41
42 }
43 }

mercurial