1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/src/storage/PStorage.ipdl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,43 @@ 1.4 +/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */ 1.5 +/* vim: set sw=4 ts=8 et tw=80 ft=cpp : */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +include protocol PContent; 1.11 + 1.12 +namespace mozilla { 1.13 +namespace dom { 1.14 + 1.15 +/* This protocol bridges async access to the database thread running on the parent process 1.16 + * and caches running on the child process. 1.17 + */ 1.18 +sync protocol PStorage 1.19 +{ 1.20 + manager PContent; 1.21 + 1.22 +parent: 1.23 + async __delete__(); 1.24 + 1.25 + sync Preload(nsCString scope, uint32_t alreadyLoadedCount) 1.26 + returns (nsString[] keys, nsString[] values, nsresult rv); 1.27 + 1.28 + async AsyncPreload(nsCString scope, bool priority); 1.29 + async AsyncGetUsage(nsCString scope); 1.30 + async AsyncAddItem(nsCString scope, nsString key, nsString value); 1.31 + async AsyncUpdateItem(nsCString scope, nsString key, nsString value); 1.32 + async AsyncRemoveItem(nsCString scope, nsString key); 1.33 + async AsyncClear(nsCString scope); 1.34 + async AsyncFlush(); 1.35 + 1.36 +child: 1.37 + async Observe(nsCString topic, nsCString scopePrefix); 1.38 + async ScopesHavingData(nsCString[] scopes); 1.39 + async LoadItem(nsCString scope, nsString key, nsString value); 1.40 + async LoadDone(nsCString scope, nsresult rv); 1.41 + async LoadUsage(nsCString scope, int64_t usage); 1.42 + async Error(nsresult rv); 1.43 +}; 1.44 + 1.45 +} 1.46 +}