Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / netwerk / base / nsSerializationHelper.h
blob4e21a4c2dfdd44d38babeaf949adab938e43a68a
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.
21 nsresult NS_SerializeToString(nsISerializable* obj, nsACString& str);
23 /**
24 * Deserialize an object.
26 nsresult NS_DeserializeObject(const nsACString& str, nsISupports** obj);
28 class nsSerializationHelper final : public nsISerializationHelper {
29 ~nsSerializationHelper() = default;
31 NS_DECL_ISUPPORTS
32 NS_DECL_NSISERIALIZATIONHELPER
35 #endif