12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #ifndef BASE_WIN_SCOPED_HSTRING_H_
- #define BASE_WIN_SCOPED_HSTRING_H_
- #include <hstring.h>
- #include "base/compiler_specific.h"
- #include "base/scoped_generic.h"
- #include "base/strings/string_piece_forward.h"
- namespace base {
- namespace internal {
- struct BASE_EXPORT ScopedHStringTraits {
- static HSTRING InvalidValue() { return nullptr; }
- static void Free(HSTRING hstr);
- };
- }
- namespace win {
- class BASE_EXPORT ScopedHString
- : public ScopedGeneric<HSTRING, base::internal::ScopedHStringTraits> {
- public:
-
- explicit ScopedHString(HSTRING hstr);
- static ScopedHString Create(WStringPiece str);
- static ScopedHString Create(StringPiece str);
-
- static bool ResolveCoreWinRTStringDelayload() WARN_UNUSED_RESULT;
-
-
-
- WStringPiece Get() const;
-
- std::string GetAsUTF8() const;
- };
- }
- }
- #endif
|