michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 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 "nsISupports.idl" michael@0: michael@0: /** michael@0: * Simple scriptable serialization helper. Can be used as a service. michael@0: */ michael@0: michael@0: interface nsISerializable; michael@0: michael@0: [scriptable, uuid(31654c0f-35f3-44c6-b31e-37a11516e6bc)] michael@0: interface nsISerializationHelper : nsISupports michael@0: { michael@0: /** michael@0: * Serialize the object to a base64 string. This string can be later passed michael@0: * as an input to deserializeObject method. michael@0: */ michael@0: ACString serializeToString(in nsISerializable serializable); michael@0: michael@0: /** michael@0: * Takes base64 encoded string that cointains serialization of a single michael@0: * object. Most commonly, input is result of previous call to michael@0: * serializeToString. michael@0: */ michael@0: nsISupports deserializeObject(in ACString input); michael@0: };