netwerk/base/src/nsSerializationHelper.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 /** @file
     6  * Helper functions for (de)serializing objects to/from ASCII strings.
     7  */
     9 #ifndef NSSERIALIZATIONHELPER_H_
    10 #define NSSERIALIZATIONHELPER_H_
    12 #include "nsStringFwd.h"
    13 #include "nsISerializationHelper.h"
    14 #include "mozilla/Attributes.h"
    16 class nsISerializable;
    18 /**
    19  * Serialize an object to an ASCII string.
    20  */
    21 nsresult NS_SerializeToString(nsISerializable* obj,
    22                               nsCSubstring& str);
    24 /**
    25  * Deserialize an object.
    26  */
    27 nsresult NS_DeserializeObject(const nsCSubstring& str,
    28                               nsISupports** obj);
    30 class nsSerializationHelper MOZ_FINAL : public nsISerializationHelper
    31 {
    32   NS_DECL_ISUPPORTS
    33   NS_DECL_NSISERIALIZATIONHELPER
    34 };
    36 #endif

mercurial