michael@0: /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */ michael@0: /* vim: set sw=4 ts=8 et tw=80 ft=cpp : */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: include protocol PContent; michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: michael@0: /* This protocol bridges async access to the database thread running on the parent process michael@0: * and caches running on the child process. michael@0: */ michael@0: sync protocol PStorage michael@0: { michael@0: manager PContent; michael@0: michael@0: parent: michael@0: async __delete__(); michael@0: michael@0: sync Preload(nsCString scope, uint32_t alreadyLoadedCount) michael@0: returns (nsString[] keys, nsString[] values, nsresult rv); michael@0: michael@0: async AsyncPreload(nsCString scope, bool priority); michael@0: async AsyncGetUsage(nsCString scope); michael@0: async AsyncAddItem(nsCString scope, nsString key, nsString value); michael@0: async AsyncUpdateItem(nsCString scope, nsString key, nsString value); michael@0: async AsyncRemoveItem(nsCString scope, nsString key); michael@0: async AsyncClear(nsCString scope); michael@0: async AsyncFlush(); michael@0: michael@0: child: michael@0: async Observe(nsCString topic, nsCString scopePrefix); michael@0: async ScopesHavingData(nsCString[] scopes); michael@0: async LoadItem(nsCString scope, nsString key, nsString value); michael@0: async LoadDone(nsCString scope, nsresult rv); michael@0: async LoadUsage(nsCString scope, int64_t usage); michael@0: async Error(nsresult rv); michael@0: }; michael@0: michael@0: } michael@0: }