manifest->ns = strdup(pkg_info->xmlns().c_str());
manifest->package = strdup(pkg_info->package().c_str());
manifest->version = strdup(pkg_info->version().c_str());
+ manifest->api_version = strdup(pkg_info->api_version().c_str());
/*
// TODO: add this code when manifest has variables for these
const char kVersion[] = "@version";
const char kResourceType[] = "@res-type";
const char kResourceVersion[] = "@res-version";
+const char kApiVersion[] = "@api-version";
const char kManifestKey[] = "manifest";
const std::set<std::string> kPackageTypeAllowedValues =
{"rpk"};
manifest_dict.GetString(kResourceType, &res_type);
std::string res_version;
manifest_dict.GetString(kResourceVersion, &res_version);
+ std::string api_version;
+ manifest_dict.GetString(kApiVersion, &api_version);
pkg_info->set_xmlns(xmlns);
pkg_info->set_package(package);
pkg_info->set_version(version);
pkg_info->set_res_type(res_type);
pkg_info->set_res_version(res_version);
+ pkg_info->set_api_version(api_version);
return true;
}
res_version_ = std::move(res_version);
}
+ void set_api_version(std::string api_version) {
+ api_version_ = std::move(api_version);
+ }
+
/**
* @brief xmlns
* @return xmlns string
const std::string& res_type() const {
return res_type_;
}
+
const std::string& res_version() const {
return res_version_;
}
+ const std::string& api_version() const {
+ return api_version_;
+ }
+
private:
std::string xmlns_;
std::string package_;
std::string version_;
std::string res_type_;
std::string res_version_;
+ std::string api_version_;
};
/**