xpcom/ds/nsISerializable.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsISupports.idl"
     8 interface nsIObjectInputStream;
     9 interface nsIObjectOutputStream;
    11 [scriptable, uuid(91cca981-c26d-44a8-bebe-d9ed4891503a)]
    12 interface nsISerializable : nsISupports
    13 {
    14     /**
    15      * Initialize the object implementing nsISerializable, which must have
    16      * been freshly constructed via CreateInstance.  All data members that
    17      * can't be set to default values must have been serialized by write,
    18      * and should be read from aInputStream in the same order by this method.
    19      */
    20     void read(in nsIObjectInputStream aInputStream);
    22     /**
    23      * Serialize the object implementing nsISerializable to aOutputStream, by
    24      * writing each data member that must be recovered later to reconstitute
    25      * a working replica of this object, in a canonical member and byte order,
    26      * to aOutputStream.
    27      *
    28      * NB: a class that implements nsISerializable *must* also implement
    29      * nsIClassInfo, in particular nsIClassInfo::GetClassID.
    30      */
    31     void write(in nsIObjectOutputStream aOutputStream);
    32 };

mercurial