1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/profile/dirserviceprovider/src/nsProfileStringTypes.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,32 @@ 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 +/** 1.10 + * We support two builds of the directory service provider. 1.11 + * One, linked into the profile component, uses the internal 1.12 + * string API. The other can be used by standalone embedding 1.13 + * clients, and uses embed strings. 1.14 + * To keep the code clean, we are using typedefs to equate 1.15 + * embed/internal string types. We are also defining some 1.16 + * internal macros in terms of the embedding strings API. 1.17 + * 1.18 + * When modifying the profile directory service provider, be 1.19 + * sure to use methods supported by both the internal and 1.20 + * embed strings APIs. 1.21 + */ 1.22 + 1.23 +#ifndef MOZILLA_INTERNAL_API 1.24 + 1.25 +#include "nsEmbedString.h" 1.26 + 1.27 +typedef nsCString nsPromiseFlatCString; 1.28 +typedef nsCString nsAutoCString; 1.29 + 1.30 +#define PromiseFlatCString nsCString 1.31 + 1.32 +#else 1.33 +#include "nsString.h" 1.34 +#include "nsPromiseFlatString.h" 1.35 +#endif