Commit 463ea1a6 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

code cleanup

parent 74d26e15
......@@ -102,6 +102,7 @@ void DiscNFInstancesStoreApiImpl::search_nf_instances(
Logger::nrf_sbi().debug("\tRequested NF instance id: %s",
requester_nf_instance_id.c_str());
}
// TODO: other query parameters
int http_code = 0;
ProblemDetails problem_details = {};
......
......@@ -41,36 +41,44 @@ void nrf_search_result::set_search_id(const std::string &id) { search_id = id; }
//------------------------------------------------------------------------------
void nrf_search_result::get_search_id(std::string &id) const { id = search_id; }
//------------------------------------------------------------------------------
std::string nrf_search_result::get_search_id() const { return search_id; }
//------------------------------------------------------------------------------
void nrf_search_result::set_nf_instances(
const std::vector<std::shared_ptr<nrf_profile>> &instances) {
nf_instances = instances;
}
//------------------------------------------------------------------------------
void nrf_search_result::add_nf_instance(
const std::shared_ptr<nrf_profile> &instance) {
nf_instances.push_back(instance);
}
//------------------------------------------------------------------------------
void nrf_search_result::get_nf_instances(
std::vector<std::shared_ptr<nrf_profile>> &instances) const {
instances = nf_instances;
}
//------------------------------------------------------------------------------
std::vector<std::shared_ptr<nrf_profile>> nrf_search_result::get_nf_instances()
const {
return nf_instances;
}
//------------------------------------------------------------------------------
void nrf_search_result::set_validity_period(const uint64_t &p) {
validity_period = p;
}
//------------------------------------------------------------------------------
void nrf_search_result::get_validity_period(uint64_t &p) const {
p = validity_period;
}
//------------------------------------------------------------------------------
uint64_t nrf_search_result::get_validity_period() const {
return validity_period;
}
......
......@@ -41,11 +41,10 @@ using namespace std;
class nrf_search_result {
public:
nrf_search_result() {
nrf_search_result(){
};
nrf_search_result(nrf_search_result const &) = delete;
nrf_search_result(nrf_search_result const &) = delete;
virtual ~nrf_search_result() {
Logger::nrf_app().debug("Delete NRF Subscription instance...");
......@@ -76,29 +75,35 @@ class nrf_search_result {
/*
* Set the nf instances
* @param [std::vector<std::shared_ptr<nrf_profile>> &]: instances: Array of nrf profile instances
* @param [std::vector<std::shared_ptr<nrf_profile>> &]: instances: Array of
* nrf profile instances
* @return void
*/
void set_nf_instances(const std::vector<std::shared_ptr<nrf_profile>> &instances);
void set_nf_instances(
const std::vector<std::shared_ptr<nrf_profile>> &instances);
/*
* Add an nf instance to the list of nrf profile instances
* @param [const std::shared_ptr<nrf_profile> &]: instance: A nrf profile instance
* @param [const std::shared_ptr<nrf_profile> &]: instance: A nrf profile
* instance
* @return void
*/
void add_nf_instance(const std::shared_ptr<nrf_profile> &instance);
/*
* Get the nf instances
* @param [std::vector<std::shared_ptr<nrf_profile>> &]: instances: Store array of nrf profile instances
* @param [std::vector<std::shared_ptr<nrf_profile>> &]: instances: Store
* array of nrf profile instances
* @return void
*/
void get_nf_instances(std::vector<std::shared_ptr<nrf_profile>> &instances) const;
void get_nf_instances(
std::vector<std::shared_ptr<nrf_profile>> &instances) const;
/*
* Get the nf instances
* @param [void]
* @return std::vector<std::shared_ptr<nrf_profile>>: array of nrf profile instances
* @return std::vector<std::shared_ptr<nrf_profile>>: array of nrf profile
* instances
*/
std::vector<std::shared_ptr<nrf_profile>> get_nf_instances() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment