1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #ifndef __CCWINRT_UTILS_H__
- #define __CCWINRT_UTILS_H__
- #include "platform/CCPlatformMacros.h"
- #include <ppltasks.h>
- #include <string>
- NS_CC_BEGIN
- bool isWindowsPhone();
- CC_DEPRECATED_ATTRIBUTE std::wstring CC_DLL CCUtf8ToUnicode(const char * pszUtf8Str, unsigned len = -1);
- CC_DEPRECATED_ATTRIBUTE std::string CC_DLL CCUnicodeToUtf8(const wchar_t* pwszStr);
- std::wstring CC_DLL StringUtf8ToWideChar(const std::string& strUtf8);
- std::string CC_DLL StringWideCharToUtf8(const std::wstring& strWideChar);
- Platform::Object^ findXamlElement(Platform::Object^ parent, Platform::String^ name);
- bool removeXamlElement(Platform::Object^ parent, Platform::Object^ element);
- bool replaceXamlElement(Platform::Object^ parent, Platform::Object^ add, Platform::Object^ remove);
- std::string PlatformStringToString(Platform::String^ s);
- Platform::String^ PlatformStringFromString(const std::string& s);
- Concurrency::task<Platform::Array<byte>^> ReadDataAsync(Platform::String^ path);
- void CC_DLL CCLogIPAddresses();
- std::string CC_DLL getDeviceIPAddresses();
- std::string computeHashForFile(const std::string& filePath);
- bool createMappedCacheFile(/*In*/ const std::string& srcFilePath, /*Out*/ std::string& cacheFilePath, /*Optional*/ const std::string& ext = "");
- void destroyMappedCacheFile(const std::string& key);
- NS_CC_END
- #endif
|