#include <set>
#include <string>
#include <vector>
+#include <utility>
#include "wgt/wgt_backend_data.h"
const std::vector<std::pair<std::string, std::string>> metadata) {
GList* list = *metadatas;
for (auto& meta : metadata) {
- metadata_x* new_meta = static_cast<metadata_x*>(calloc(1, sizeof(metadata_x)));
+ metadata_x* new_meta =
+ static_cast<metadata_x*>(calloc(1, sizeof(metadata_x)));
new_meta->key = strdup(meta.first.c_str());
if (!meta.second.empty())
new_meta->value = strdup(meta.second.c_str());
namespace {
-const std::size_t kEncryptionChunkMaxSize = 8_kB; // bytes
+const std::size_t kEncryptionChunkMaxSize = 8_kB; // bytes
const std::set<std::string> encryptSet { ".html", ".htm", ".css", ".js"};
FILE* OpenFile(const std::string& path, const std::string& mode) {
size_t encrypted_size = 0;
// TODO(p.sikorski) check if it is Preloaded
int ret;
- if (context_->request_mode.get() == common_installer::RequestMode::GLOBAL) {
+ if (context_->request_mode.get()
+ == common_installer::RequestMode::GLOBAL) {
ret = wae_encrypt_global_web_application(
context_->pkgid.get().c_str(),
context_->is_preload_request.get() ?
free(encrypted_data);
}
inChunk.reset(new unsigned char[chunkSize]);
-
} while (!std::feof(input));
fclose(output);
// create default icon if there is no icon at all
bf::path icon_path = common_icon_location / app->appid;
icon_path += ".png";
- bf::copy_file(kDefaultIconPath, icon_path, bf::copy_option::overwrite_if_exists, error);
+ bf::copy_file(kDefaultIconPath, icon_path,
+ bf::copy_option::overwrite_if_exists, error);
if (error) {
LOG(ERROR) << "Failed to create default icon for web application";
return Status::ICON_ERROR;