| Index: base/sys_string_conversions.h
|
| ===================================================================
|
| --- base/sys_string_conversions.h (revision 95578)
|
| +++ base/sys_string_conversions.h (working copy)
|
| @@ -12,7 +12,7 @@
|
|
|
| #include <string>
|
|
|
| -#include "base/base_api.h"
|
| +#include "base/base_export.h"
|
| #include "base/basictypes.h"
|
| #include "base/string16.h"
|
|
|
| @@ -31,14 +31,14 @@
|
|
|
| // Converts between wide and UTF-8 representations of a string. On error, the
|
| // result is system-dependent.
|
| -BASE_API std::string SysWideToUTF8(const std::wstring& wide);
|
| -BASE_API std::wstring SysUTF8ToWide(const StringPiece& utf8);
|
| +BASE_EXPORT std::string SysWideToUTF8(const std::wstring& wide);
|
| +BASE_EXPORT std::wstring SysUTF8ToWide(const StringPiece& utf8);
|
|
|
| // Converts between wide and the system multi-byte representations of a string.
|
| // DANGER: This will lose information and can change (on Windows, this can
|
| // change between reboots).
|
| -BASE_API std::string SysWideToNativeMB(const std::wstring& wide);
|
| -BASE_API std::wstring SysNativeMBToWide(const StringPiece& native_mb);
|
| +BASE_EXPORT std::string SysWideToNativeMB(const std::wstring& wide);
|
| +BASE_EXPORT std::wstring SysNativeMBToWide(const StringPiece& native_mb);
|
|
|
| // Windows-specific ------------------------------------------------------------
|
|
|
| @@ -47,10 +47,10 @@
|
| // Converts between 8-bit and wide strings, using the given code page. The
|
| // code page identifier is one accepted by the Windows function
|
| // MultiByteToWideChar().
|
| -BASE_API std::wstring SysMultiByteToWide(const StringPiece& mb,
|
| - uint32 code_page);
|
| -BASE_API std::string SysWideToMultiByte(const std::wstring& wide,
|
| - uint32 code_page);
|
| +BASE_EXPORT std::wstring SysMultiByteToWide(const StringPiece& mb,
|
| + uint32 code_page);
|
| +BASE_EXPORT std::string SysWideToMultiByte(const std::wstring& wide,
|
| + uint32 code_page);
|
|
|
| #endif // defined(OS_WIN)
|
|
|
| @@ -62,25 +62,25 @@
|
|
|
| // Creates a string, and returns it with a refcount of 1. You are responsible
|
| // for releasing it. Returns NULL on failure.
|
| -BASE_API CFStringRef SysUTF8ToCFStringRef(const std::string& utf8);
|
| -BASE_API CFStringRef SysUTF16ToCFStringRef(const string16& utf16);
|
| -BASE_API CFStringRef SysWideToCFStringRef(const std::wstring& wide);
|
| +BASE_EXPORT CFStringRef SysUTF8ToCFStringRef(const std::string& utf8);
|
| +BASE_EXPORT CFStringRef SysUTF16ToCFStringRef(const string16& utf16);
|
| +BASE_EXPORT CFStringRef SysWideToCFStringRef(const std::wstring& wide);
|
|
|
| // Same, but returns an autoreleased NSString.
|
| -BASE_API NSString* SysUTF8ToNSString(const std::string& utf8);
|
| -BASE_API NSString* SysUTF16ToNSString(const string16& utf16);
|
| -BASE_API NSString* SysWideToNSString(const std::wstring& wide);
|
| +BASE_EXPORT NSString* SysUTF8ToNSString(const std::string& utf8);
|
| +BASE_EXPORT NSString* SysUTF16ToNSString(const string16& utf16);
|
| +BASE_EXPORT NSString* SysWideToNSString(const std::wstring& wide);
|
|
|
| // Converts a CFStringRef to an STL string. Returns an empty string on failure.
|
| -BASE_API std::string SysCFStringRefToUTF8(CFStringRef ref);
|
| -BASE_API string16 SysCFStringRefToUTF16(CFStringRef ref);
|
| -BASE_API std::wstring SysCFStringRefToWide(CFStringRef ref);
|
| +BASE_EXPORT std::string SysCFStringRefToUTF8(CFStringRef ref);
|
| +BASE_EXPORT string16 SysCFStringRefToUTF16(CFStringRef ref);
|
| +BASE_EXPORT std::wstring SysCFStringRefToWide(CFStringRef ref);
|
|
|
| // Same, but accepts NSString input. Converts nil NSString* to the appropriate
|
| // string type of length 0.
|
| -BASE_API std::string SysNSStringToUTF8(NSString* ref);
|
| -BASE_API string16 SysNSStringToUTF16(NSString* ref);
|
| -BASE_API std::wstring SysNSStringToWide(NSString* ref);
|
| +BASE_EXPORT std::string SysNSStringToUTF8(NSString* ref);
|
| +BASE_EXPORT string16 SysNSStringToUTF16(NSString* ref);
|
| +BASE_EXPORT std::wstring SysNSStringToWide(NSString* ref);
|
|
|
| #endif // defined(OS_MACOSX)
|
|
|
|
|