X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fdevel-api%2Fadaptor-framework%2Ffile-loader.cpp;h=e4a2030c32779043de9a002820c1d65442dead3c;hb=97568a209c309d5f99bf288afa951a77f7fdcddd;hp=c5674563867aa1125106be152aed8c4407e7ef01;hpb=efd294001ad65fd66000c2cf65973d8f29b95872;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/devel-api/adaptor-framework/file-loader.cpp b/dali/devel-api/adaptor-framework/file-loader.cpp index c567456..e4a2030 100644 --- a/dali/devel-api/adaptor-framework/file-loader.cpp +++ b/dali/devel-api/adaptor-framework/file-loader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ #include // EXTERNAL INCLUDES -#include #include +#include // INTERNAL INCLUDES #include @@ -27,26 +27,24 @@ namespace Dali { - namespace { - // limit maximum image down load size to 50 MB -const size_t MAXIMUM_DOWNLOAD_IMAGE_SIZE = 50 * 1024 * 1024 ; +const size_t MAXIMUM_DOWNLOAD_IMAGE_SIZE = 50 * 1024 * 1024; -} +} // namespace namespace FileLoader { - -int ReadFile(const std::string& filename, Dali::Vector & memblock, FileLoader::FileType fileType) +int ReadFile(const std::string& filename, Dali::Vector& memblock, FileLoader::FileType fileType) { - return Dali::Internal::Adaptor::ReadFile( filename, memblock, fileType ); + return Dali::Internal::Adaptor::ReadFile(filename, memblock, fileType); } int ReadFile(const std::string& filename, std::streampos& fileSize, Dali::Vector& memblock, FileLoader::FileType fileType) { - return Dali::Internal::Adaptor::ReadFile( filename, fileSize, memblock, fileType );; + return Dali::Internal::Adaptor::ReadFile(filename, fileSize, memblock, fileType); + ; } std::streampos GetFileSize(const std::string& filename) @@ -54,12 +52,12 @@ std::streampos GetFileSize(const std::string& filename) return Dali::Internal::Adaptor::GetFileSize(filename); } -bool DownloadFileSynchronously(const std::string& filename, Dali::Vector &dataBuffer) +bool DownloadFileSynchronously(const std::string& filename, Dali::Vector& dataBuffer) { size_t dataSize; - return TizenPlatform::Network::DownloadRemoteFileIntoMemory( filename, dataBuffer, dataSize, MAXIMUM_DOWNLOAD_IMAGE_SIZE ); + return TizenPlatform::Network::DownloadRemoteFileIntoMemory(filename, dataBuffer, dataSize, MAXIMUM_DOWNLOAD_IMAGE_SIZE); } -} //FileLoader +} // namespace FileLoader -} //Dali +} // namespace Dali