netwerk/base/public/nsISerializationHelper.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/public/nsISerializationHelper.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,29 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +/**
    1.12 + * Simple scriptable serialization helper. Can be used as a service.
    1.13 + */
    1.14 +
    1.15 +interface nsISerializable;
    1.16 +
    1.17 +[scriptable, uuid(31654c0f-35f3-44c6-b31e-37a11516e6bc)]
    1.18 +interface nsISerializationHelper : nsISupports
    1.19 +{
    1.20 +  /**
    1.21 +   * Serialize the object to a base64 string. This string can be later passed
    1.22 +   * as an input to deserializeObject method.
    1.23 +   */
    1.24 +  ACString serializeToString(in nsISerializable serializable);
    1.25 +
    1.26 +  /**
    1.27 +   * Takes base64 encoded string that cointains serialization of a single
    1.28 +   * object. Most commonly, input is result of previous call to
    1.29 +   * serializeToString.
    1.30 +   */
    1.31 +  nsISupports deserializeObject(in ACString input);
    1.32 +};

mercurial