Commit b4db73b6 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

integrate API server

parent 5c24d6a5
cmake_minimum_required (VERSION 3.2)
project(api-server)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pg -g3" )
include(ExternalProject)
set(EXTERNAL_INSTALL_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/external)
ExternalProject_Add(PISTACHE
GIT_REPOSITORY https://github.com/oktal/pistache.git
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
)
ExternalProject_Add(NLOHMANN
GIT_REPOSITORY https://github.com/nlohmann/json.git
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_INSTALL_LOCATION}
)
include_directories(${EXTERNAL_INSTALL_LOCATION}/include)
link_directories(${EXTERNAL_INSTALL_LOCATION}/lib)
include_directories(model)
include_directories(api)
include_directories(impl)
file(GLOB SRCS
${CMAKE_CURRENT_SOURCE_DIR}/api/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/impl/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/model/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
################################################################################
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The OpenAirInterface Software Alliance licenses this file to You under
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
# except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.openairinterface.org/?page_id=698
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-------------------------------------------------------------------------------
# For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org
################################################################################
set(NRF_API_SERVER_DIR "${SRC_TOP_DIR}/api-server")
include_directories(${NRF_API_SERVER_DIR}/api)
include_directories(${NRF_API_SERVER_DIR}/impl)
include_directories(${NRF_API_SERVER_DIR}/model)
include_directories(${NRF_API_SERVER_DIR}/)
include_directories(${SRC_TOP_DIR}/nrf_app)
include_directories(${SRC_TOP_DIR}/common)
include_directories(${SRC_TOP_DIR}/common/utils)
include_directories(${SRC_TOP_DIR}/../build/ext/spdlog/include)
file(GLOB NRF_API_SERVER_src_files
${NRF_API_SERVER_DIR}/nrf-api-server.cpp
${NRF_API_SERVER_DIR}/model/*.cpp
${NRF_API_SERVER_DIR}/api/*.cpp
${NRF_API_SERVER_DIR}/impl/*.cpp
)
add_executable(${PROJECT_NAME} ${SRCS} )
add_dependencies(${PROJECT_NAME} PISTACHE NLOHMANN)
target_link_libraries(${PROJECT_NAME} pistache pthread)
add_library(NRF_API STATIC
${NRF_API_SERVER_src_files})
\ No newline at end of file
......@@ -17,7 +17,7 @@ namespace oai {
namespace nrf {
namespace api {
using namespace org::openapitools::server::helpers;
using namespace oai::nrf::helpers;
using namespace oai::nrf::model;
CompleteStoredSearchDocumentApi::CompleteStoredSearchDocumentApi(std::shared_ptr<Pistache::Rest::Router> rtr) {
......
......@@ -17,7 +17,7 @@ namespace oai {
namespace nrf {
namespace api {
using namespace org::openapitools::server::helpers;
using namespace oai::nrf::helpers;
using namespace oai::nrf::model;
NFInstanceIDDocumentApi::NFInstanceIDDocumentApi(std::shared_ptr<Pistache::Rest::Router> rtr) {
......
......@@ -17,7 +17,7 @@ namespace oai {
namespace nrf {
namespace api {
using namespace org::openapitools::server::helpers;
using namespace oai::nrf;
using namespace oai::nrf::model;
NFInstancesStoreApi::NFInstancesStoreApi(std::shared_ptr<Pistache::Rest::Router> rtr) {
......@@ -41,18 +41,18 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
// Getting the query params
auto targetNfTypeQuery = request.query().get("target-nf-type");
Pistache::Optional<NFType> targetNfType;
Pistache::Optional<std::string> targetNfType;
if(!targetNfTypeQuery.isEmpty()){
NFType valueQuery_instance;
if(fromStringValue(targetNfTypeQuery.get(), valueQuery_instance)){
std::string valueQuery_instance;
if(helpers::fromStringValue(targetNfTypeQuery.get(), valueQuery_instance)){
targetNfType = Pistache::Some(valueQuery_instance);
}
}
auto requesterNfTypeQuery = request.query().get("requester-nf-type");
Pistache::Optional<NFType> requesterNfType;
Pistache::Optional<std::string> requesterNfType;
if(!requesterNfTypeQuery.isEmpty()){
NFType valueQuery_instance;
if(fromStringValue(requesterNfTypeQuery.get(), valueQuery_instance)){
std::string valueQuery_instance;
if(helpers::fromStringValue(requesterNfTypeQuery.get(), valueQuery_instance)){
requesterNfType = Pistache::Some(valueQuery_instance);
}
}
......@@ -60,7 +60,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> requesterNfInstanceId;
if(!requesterNfInstanceIdQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(requesterNfInstanceIdQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(requesterNfInstanceIdQuery.get(), valueQuery_instance)){
requesterNfInstanceId = Pistache::Some(valueQuery_instance);
}
}
......@@ -68,7 +68,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<ServiceName>> serviceNames;
if(!serviceNamesQuery.isEmpty()){
std::vector<ServiceName> valueQuery_instance;
if(fromStringValue(serviceNamesQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(serviceNamesQuery.get(), valueQuery_instance)){
serviceNames = Pistache::Some(valueQuery_instance);
}
}
......@@ -76,7 +76,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> requesterNfInstanceFqdn;
if(!requesterNfInstanceFqdnQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(requesterNfInstanceFqdnQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(requesterNfInstanceFqdnQuery.get(), valueQuery_instance)){
requesterNfInstanceFqdn = Pistache::Some(valueQuery_instance);
}
}
......@@ -84,7 +84,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<PlmnId>> targetPlmnList;
if(!targetPlmnListQuery.isEmpty()){
std::vector<PlmnId> valueQuery_instance;
if(fromStringValue(targetPlmnListQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(targetPlmnListQuery.get(), valueQuery_instance)){
targetPlmnList = Pistache::Some(valueQuery_instance);
}
}
......@@ -92,7 +92,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<PlmnId>> requesterPlmnList;
if(!requesterPlmnListQuery.isEmpty()){
std::vector<PlmnId> valueQuery_instance;
if(fromStringValue(requesterPlmnListQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(requesterPlmnListQuery.get(), valueQuery_instance)){
requesterPlmnList = Pistache::Some(valueQuery_instance);
}
}
......@@ -100,7 +100,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> targetNfInstanceId;
if(!targetNfInstanceIdQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(targetNfInstanceIdQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(targetNfInstanceIdQuery.get(), valueQuery_instance)){
targetNfInstanceId = Pistache::Some(valueQuery_instance);
}
}
......@@ -108,7 +108,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> targetNfFqdn;
if(!targetNfFqdnQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(targetNfFqdnQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(targetNfFqdnQuery.get(), valueQuery_instance)){
targetNfFqdn = Pistache::Some(valueQuery_instance);
}
}
......@@ -116,7 +116,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> hnrfUri;
if(!hnrfUriQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(hnrfUriQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(hnrfUriQuery.get(), valueQuery_instance)){
hnrfUri = Pistache::Some(valueQuery_instance);
}
}
......@@ -124,7 +124,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<Snssai>> snssais;
if(!snssaisQuery.isEmpty()){
std::vector<Snssai> valueQuery_instance;
if(fromStringValue(snssaisQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(snssaisQuery.get(), valueQuery_instance)){
snssais = Pistache::Some(valueQuery_instance);
}
}
......@@ -132,7 +132,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<Snssai>> requesterSnssais;
if(!requesterSnssaisQuery.isEmpty()){
std::vector<Snssai> valueQuery_instance;
if(fromStringValue(requesterSnssaisQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(requesterSnssaisQuery.get(), valueQuery_instance)){
requesterSnssais = Pistache::Some(valueQuery_instance);
}
}
......@@ -140,7 +140,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<PlmnSnssai>> plmnSpecificSnssaiList;
if(!plmnSpecificSnssaiListQuery.isEmpty()){
std::vector<PlmnSnssai> valueQuery_instance;
if(fromStringValue(plmnSpecificSnssaiListQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(plmnSpecificSnssaiListQuery.get(), valueQuery_instance)){
plmnSpecificSnssaiList = Pistache::Some(valueQuery_instance);
}
}
......@@ -148,7 +148,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> dnn;
if(!dnnQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(dnnQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(dnnQuery.get(), valueQuery_instance)){
dnn = Pistache::Some(valueQuery_instance);
}
}
......@@ -156,7 +156,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<std::string>> nsiList;
if(!nsiListQuery.isEmpty()){
std::vector<std::string> valueQuery_instance;
if(fromStringValue(nsiListQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(nsiListQuery.get(), valueQuery_instance)){
nsiList = Pistache::Some(valueQuery_instance);
}
}
......@@ -164,23 +164,25 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> smfServingArea;
if(!smfServingAreaQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(smfServingAreaQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(smfServingAreaQuery.get(), valueQuery_instance)){
smfServingArea = Pistache::Some(valueQuery_instance);
}
}
auto taiQuery = request.query().get("tai");
Pistache::Optional<Tai> tai;
if(!taiQuery.isEmpty()){
Tai valueQuery_instance;
if(fromStringValue(taiQuery.get(), valueQuery_instance)){
//TODO
/* Tai valueQuery_instance;
if(helpers::fromStringValue(taiQuery.get(), valueQuery_instance)){
tai = Pistache::Some(valueQuery_instance);
}
*/
}
auto amfRegionIdQuery = request.query().get("amf-region-id");
Pistache::Optional<std::string> amfRegionId;
if(!amfRegionIdQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(amfRegionIdQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(amfRegionIdQuery.get(), valueQuery_instance)){
amfRegionId = Pistache::Some(valueQuery_instance);
}
}
......@@ -188,23 +190,25 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> amfSetId;
if(!amfSetIdQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(amfSetIdQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(amfSetIdQuery.get(), valueQuery_instance)){
amfSetId = Pistache::Some(valueQuery_instance);
}
}
auto guamiQuery = request.query().get("guami");
Pistache::Optional<Guami> guami;
if(!guamiQuery.isEmpty()){
Guami valueQuery_instance;
if(fromStringValue(guamiQuery.get(), valueQuery_instance)){
//TODO
/* Guami valueQuery_instance;
if(helpers::fromStringValue(guamiQuery.get(), valueQuery_instance)){
guami = Pistache::Some(valueQuery_instance);
}
*/
}
auto supiQuery = request.query().get("supi");
Pistache::Optional<std::string> supi;
if(!supiQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(supiQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(supiQuery.get(), valueQuery_instance)){
supi = Pistache::Some(valueQuery_instance);
}
}
......@@ -212,7 +216,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> ueIpv4Address;
if(!ueIpv4AddressQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(ueIpv4AddressQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(ueIpv4AddressQuery.get(), valueQuery_instance)){
ueIpv4Address = Pistache::Some(valueQuery_instance);
}
}
......@@ -220,23 +224,26 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> ipDomain;
if(!ipDomainQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(ipDomainQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(ipDomainQuery.get(), valueQuery_instance)){
ipDomain = Pistache::Some(valueQuery_instance);
}
}
auto ueIpv6PrefixQuery = request.query().get("ue-ipv6-prefix");
Pistache::Optional<Ipv6Prefix> ueIpv6Prefix;
if(!ueIpv6PrefixQuery.isEmpty()){
//TODO
/*
Ipv6Prefix valueQuery_instance;
if(fromStringValue(ueIpv6PrefixQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(ueIpv6PrefixQuery.get(), valueQuery_instance)){
ueIpv6Prefix = Pistache::Some(valueQuery_instance);
}
*/
}
auto pgwIndQuery = request.query().get("pgw-ind");
Pistache::Optional<bool> pgwInd;
if(!pgwIndQuery.isEmpty()){
bool valueQuery_instance;
if(fromStringValue(pgwIndQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(pgwIndQuery.get(), valueQuery_instance)){
pgwInd = Pistache::Some(valueQuery_instance);
}
}
......@@ -244,7 +251,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> pgw;
if(!pgwQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(pgwQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(pgwQuery.get(), valueQuery_instance)){
pgw = Pistache::Some(valueQuery_instance);
}
}
......@@ -252,7 +259,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> gpsi;
if(!gpsiQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(gpsiQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(gpsiQuery.get(), valueQuery_instance)){
gpsi = Pistache::Some(valueQuery_instance);
}
}
......@@ -260,23 +267,25 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> externalGroupIdentity;
if(!externalGroupIdentityQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(externalGroupIdentityQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(externalGroupIdentityQuery.get(), valueQuery_instance)){
externalGroupIdentity = Pistache::Some(valueQuery_instance);
}
}
auto dataSetQuery = request.query().get("data-set");
Pistache::Optional<DataSetId> dataSet;
if(!dataSetQuery.isEmpty()){
DataSetId valueQuery_instance;
if(fromStringValue(dataSetQuery.get(), valueQuery_instance)){
//TODO
/* DataSetId valueQuery_instance;
if(helpers::fromStringValue(dataSetQuery.get(), valueQuery_instance)){
dataSet = Pistache::Some(valueQuery_instance);
}
*/
}
auto routingIndicatorQuery = request.query().get("routing-indicator");
Pistache::Optional<std::string> routingIndicator;
if(!routingIndicatorQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(routingIndicatorQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(routingIndicatorQuery.get(), valueQuery_instance)){
routingIndicator = Pistache::Some(valueQuery_instance);
}
}
......@@ -284,7 +293,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<std::string>> groupIdList;
if(!groupIdListQuery.isEmpty()){
std::vector<std::string> valueQuery_instance;
if(fromStringValue(groupIdListQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(groupIdListQuery.get(), valueQuery_instance)){
groupIdList = Pistache::Some(valueQuery_instance);
}
}
......@@ -292,7 +301,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<std::string>> dnaiList;
if(!dnaiListQuery.isEmpty()){
std::vector<std::string> valueQuery_instance;
if(fromStringValue(dnaiListQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(dnaiListQuery.get(), valueQuery_instance)){
dnaiList = Pistache::Some(valueQuery_instance);
}
}
......@@ -300,7 +309,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<PduSessionType>> pduSessionTypes;
if(!pduSessionTypesQuery.isEmpty()){
std::vector<PduSessionType> valueQuery_instance;
if(fromStringValue(pduSessionTypesQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(pduSessionTypesQuery.get(), valueQuery_instance)){
pduSessionTypes = Pistache::Some(valueQuery_instance);
}
}
......@@ -308,7 +317,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<EventId>> eventIdList;
if(!eventIdListQuery.isEmpty()){
std::vector<EventId> valueQuery_instance;
if(fromStringValue(eventIdListQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(eventIdListQuery.get(), valueQuery_instance)){
eventIdList = Pistache::Some(valueQuery_instance);
}
}
......@@ -316,7 +325,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<NwdafEvent>> nwdafEventList;
if(!nwdafEventListQuery.isEmpty()){
std::vector<NwdafEvent> valueQuery_instance;
if(fromStringValue(nwdafEventListQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(nwdafEventListQuery.get(), valueQuery_instance)){
nwdafEventList = Pistache::Some(valueQuery_instance);
}
}
......@@ -324,7 +333,7 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::string> supportedFeatures;
if(!supportedFeaturesQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(supportedFeaturesQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(supportedFeaturesQuery.get(), valueQuery_instance)){
supportedFeatures = Pistache::Some(valueQuery_instance);
}
}
......@@ -332,39 +341,42 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<bool> upfIwkEpsInd;
if(!upfIwkEpsIndQuery.isEmpty()){
bool valueQuery_instance;
if(fromStringValue(upfIwkEpsIndQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(upfIwkEpsIndQuery.get(), valueQuery_instance)){
upfIwkEpsInd = Pistache::Some(valueQuery_instance);
}
}
auto chfSupportedPlmnQuery = request.query().get("chf-supported-plmn");
Pistache::Optional<PlmnId> chfSupportedPlmn;
if(!chfSupportedPlmnQuery.isEmpty()){
PlmnId valueQuery_instance;
if(fromStringValue(chfSupportedPlmnQuery.get(), valueQuery_instance)){
//TODO
/* PlmnId valueQuery_instance;
if(helpers::fromStringValue(chfSupportedPlmnQuery.get(), valueQuery_instance)){
chfSupportedPlmn = Pistache::Some(valueQuery_instance);
}
*/
}
auto preferredLocalityQuery = request.query().get("preferred-locality");
Pistache::Optional<std::string> preferredLocality;
if(!preferredLocalityQuery.isEmpty()){
std::string valueQuery_instance;
if(fromStringValue(preferredLocalityQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(preferredLocalityQuery.get(), valueQuery_instance)){
preferredLocality = Pistache::Some(valueQuery_instance);
}
}
auto accessTypeQuery = request.query().get("access-type");
Pistache::Optional<AccessType> accessType;
if(!accessTypeQuery.isEmpty()){
AccessType valueQuery_instance;
if(fromStringValue(accessTypeQuery.get(), valueQuery_instance)){
//TODO
/* AccessType valueQuery_instance;
if(helpers::fromStringValue(accessTypeQuery.get(), valueQuery_instance)){
accessType = Pistache::Some(valueQuery_instance);
}
}*/
}
auto limitQuery = request.query().get("limit");
Pistache::Optional<int32_t> limit;
if(!limitQuery.isEmpty()){
int32_t valueQuery_instance;
if(fromStringValue(limitQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(limitQuery.get(), valueQuery_instance)){
limit = Pistache::Some(valueQuery_instance);
}
}
......@@ -372,39 +384,41 @@ void NFInstancesStoreApi::search_nf_instances_handler(const Pistache::Rest::Requ
Pistache::Optional<std::vector<std::string>> requiredFeatures;
if(!requiredFeaturesQuery.isEmpty()){
std::vector<std::string> valueQuery_instance;
if(fromStringValue(requiredFeaturesQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(requiredFeaturesQuery.get(), valueQuery_instance)){
requiredFeatures = Pistache::Some(valueQuery_instance);
}
}
auto complexQueryQuery = request.query().get("complex-query");
Pistache::Optional<ComplexQuery> complexQuery;
if(!complexQueryQuery.isEmpty()){
ComplexQuery valueQuery_instance;
if(fromStringValue(complexQueryQuery.get(), valueQuery_instance)){
//TODO
/*ComplexQuery valueQuery_instance;
if(helpers::fromStringValue(complexQueryQuery.get(), valueQuery_instance)){
complexQuery = Pistache::Some(valueQuery_instance);
}
} */
}
auto maxPayloadSizeQuery = request.query().get("max-payload-size");
Pistache::Optional<int32_t> maxPayloadSize;
if(!maxPayloadSizeQuery.isEmpty()){
int32_t valueQuery_instance;
if(fromStringValue(maxPayloadSizeQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(maxPayloadSizeQuery.get(), valueQuery_instance)){
maxPayloadSize = Pistache::Some(valueQuery_instance);
}
}
auto atsssCapabilityQuery = request.query().get("atsss-capability");
Pistache::Optional<AtsssCapability> atsssCapability;
if(!atsssCapabilityQuery.isEmpty()){
AtsssCapability valueQuery_instance;
if(fromStringValue(atsssCapabilityQuery.get(), valueQuery_instance)){
//TODO
/* AtsssCapability valueQuery_instance;
if(helpers::fromStringValue(atsssCapabilityQuery.get(), valueQuery_instance)){
atsssCapability = Pistache::Some(valueQuery_instance);
}
}*/
}
auto upfUeIpAddrIndQuery = request.query().get("upf-ue-ip-addr-ind");
Pistache::Optional<bool> upfUeIpAddrInd;
if(!upfUeIpAddrIndQuery.isEmpty()){
bool valueQuery_instance;
if(fromStringValue(upfUeIpAddrIndQuery.get(), valueQuery_instance)){
if(helpers::fromStringValue(upfUeIpAddrIndQuery.get(), valueQuery_instance)){
upfUeIpAddrInd = Pistache::Some(valueQuery_instance);
}
}
......
......@@ -32,7 +32,7 @@
#include "EventId.h"
#include "Guami.h"
#include "Ipv6Prefix.h"
#include "NFType.h"
//#include "NFType.h"
#include "NwdafEvent.h"
#include "PduSessionType.h"
#include "PlmnId.h"
......@@ -40,10 +40,10 @@
#include "ProblemDetails.h"
#include "SearchResult.h"
#include "ServiceName.h"
#include "Set.h"
#include "Snssai.h"
#include "Tai.h"
#include <string>
#include <set>
namespace oai {
namespace nrf {
......@@ -120,7 +120,7 @@ private:
/// <param name="atsssCapability">ATSSS Capability (optional, default to AtsssCapability())</param>
/// <param name="upfUeIpAddrInd">UPF supporting allocating UE IP addresses/prefixes (optional, default to false)</param>
/// <param name="ifNoneMatch">Validator for conditional requests, as described in IETF RFC 7232, 3.2 (optional, default to &quot;&quot;)</param>
virtual void search_nf_instances(const Pistache::Optional<NFType> &targetNfType, const Pistache::Optional<NFType> &requesterNfType, const Pistache::Optional<std::string> &requesterNfInstanceId, const Pistache::Optional<Set<ServiceName>> &serviceNames, const Pistache::Optional<std::string> &requesterNfInstanceFqdn, const Pistache::Optional<std::vector<PlmnId>> &targetPlmnList, const Pistache::Optional<std::vector<PlmnId>> &requesterPlmnList, const Pistache::Optional<std::string> &targetNfInstanceId, const Pistache::Optional<std::string> &targetNfFqdn, const Pistache::Optional<std::string> &hnrfUri, const Pistache::Optional<std::vector<Snssai>> &snssais, const Pistache::Optional<std::vector<Snssai>> &requesterSnssais, const Pistache::Optional<std::vector<PlmnSnssai>> &plmnSpecificSnssaiList, const Pistache::Optional<std::string> &dnn, const Pistache::Optional<std::vector<std::string>> &nsiList, const Pistache::Optional<std::string> &smfServingArea, const Pistache::Optional<Tai> &tai, const Pistache::Optional<std::string> &amfRegionId, const Pistache::Optional<std::string> &amfSetId, const Pistache::Optional<Guami> &guami, const Pistache::Optional<std::string> &supi, const Pistache::Optional<std::string> &ueIpv4Address, const Pistache::Optional<std::string> &ipDomain, const Pistache::Optional<Ipv6Prefix> &ueIpv6Prefix, const Pistache::Optional<bool> &pgwInd, const Pistache::Optional<std::string> &pgw, const Pistache::Optional<std::string> &gpsi, const Pistache::Optional<std::string> &externalGroupIdentity, const Pistache::Optional<DataSetId> &dataSet, const Pistache::Optional<std::string> &routingIndicator, const Pistache::Optional<std::vector<std::string>> &groupIdList, const Pistache::Optional<std::vector<std::string>> &dnaiList, const Pistache::Optional<std::vector<PduSessionType>> &pduSessionTypes, const Pistache::Optional<std::vector<EventId>> &eventIdList, const Pistache::Optional<std::vector<NwdafEvent>> &nwdafEventList, const Pistache::Optional<std::string> &supportedFeatures, const Pistache::Optional<bool> &upfIwkEpsInd, const Pistache::Optional<PlmnId> &chfSupportedPlmn, const Pistache::Optional<std::string> &preferredLocality, const Pistache::Optional<AccessType> &accessType, const Pistache::Optional<int32_t> &limit, const Pistache::Optional<std::vector<std::string>> &requiredFeatures, const Pistache::Optional<ComplexQuery> &complexQuery, const Pistache::Optional<int32_t> &maxPayloadSize, const Pistache::Optional<AtsssCapability> &atsssCapability, const Pistache::Optional<bool> &upfUeIpAddrInd, const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch, Pistache::Http::ResponseWriter &response) = 0;
virtual void search_nf_instances(const Pistache::Optional<std::string> &targetNfType, const Pistache::Optional<std::string> &requesterNfType, const Pistache::Optional<std::string> &requesterNfInstanceId, const Pistache::Optional<std::vector<ServiceName>> &serviceNames, const Pistache::Optional<std::string> &requesterNfInstanceFqdn, const Pistache::Optional<std::vector<PlmnId>> &targetPlmnList, const Pistache::Optional<std::vector<PlmnId>> &requesterPlmnList, const Pistache::Optional<std::string> &targetNfInstanceId, const Pistache::Optional<std::string> &targetNfFqdn, const Pistache::Optional<std::string> &hnrfUri, const Pistache::Optional<std::vector<Snssai>> &snssais, const Pistache::Optional<std::vector<Snssai>> &requesterSnssais, const Pistache::Optional<std::vector<PlmnSnssai>> &plmnSpecificSnssaiList, const Pistache::Optional<std::string> &dnn, const Pistache::Optional<std::vector<std::string>> &nsiList, const Pistache::Optional<std::string> &smfServingArea, const Pistache::Optional<Tai> &tai, const Pistache::Optional<std::string> &amfRegionId, const Pistache::Optional<std::string> &amfSetId, const Pistache::Optional<Guami> &guami, const Pistache::Optional<std::string> &supi, const Pistache::Optional<std::string> &ueIpv4Address, const Pistache::Optional<std::string> &ipDomain, const Pistache::Optional<Ipv6Prefix> &ueIpv6Prefix, const Pistache::Optional<bool> &pgwInd, const Pistache::Optional<std::string> &pgw, const Pistache::Optional<std::string> &gpsi, const Pistache::Optional<std::string> &externalGroupIdentity, const Pistache::Optional<DataSetId> &dataSet, const Pistache::Optional<std::string> &routingIndicator, const Pistache::Optional<std::vector<std::string>> &groupIdList, const Pistache::Optional<std::vector<std::string>> &dnaiList, const Pistache::Optional<std::vector<PduSessionType>> &pduSessionTypes, const Pistache::Optional<std::vector<EventId>> &eventIdList, const Pistache::Optional<std::vector<NwdafEvent>> &nwdafEventList, const Pistache::Optional<std::string> &supportedFeatures, const Pistache::Optional<bool> &upfIwkEpsInd, const Pistache::Optional<PlmnId> &chfSupportedPlmn, const Pistache::Optional<std::string> &preferredLocality, const Pistache::Optional<AccessType> &accessType, const Pistache::Optional<int32_t> &limit, const Pistache::Optional<std::vector<std::string>> &requiredFeatures, const Pistache::Optional<ComplexQuery> &complexQuery, const Pistache::Optional<int32_t> &maxPayloadSize, const Pistache::Optional<AtsssCapability> &atsssCapability, const Pistache::Optional<bool> &upfUeIpAddrInd, const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch, Pistache::Http::ResponseWriter &response) = 0;
};
......
......@@ -17,7 +17,7 @@ namespace oai {
namespace nrf {
namespace api {
using namespace org::openapitools::server::helpers;
using namespace oai::nrf::helpers;
using namespace oai::nrf::model;
StoredSearchDocumentApi::StoredSearchDocumentApi(std::shared_ptr<Pistache::Rest::Router> rtr) {
......
......@@ -17,7 +17,7 @@ namespace oai {
namespace nrf {
namespace api {
using namespace org::openapitools::server::helpers;
using namespace oai::nrf::helpers;
using namespace oai::nrf::model;
SubscriptionIDDocumentApi::SubscriptionIDDocumentApi(std::shared_ptr<Pistache::Rest::Router> rtr) {
......
......@@ -17,7 +17,7 @@ namespace oai {
namespace nrf {
namespace api {
using namespace org::openapitools::server::helpers;
using namespace oai::nrf::helpers;
using namespace oai::nrf::model;
SubscriptionsCollectionApi::SubscriptionsCollectionApi(std::shared_ptr<Pistache::Rest::Router> rtr) {
......
/**
* NRF NFDiscovery Service
* NRF NFDiscovery Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
* NRF NFDiscovery Service
* NRF NFDiscovery Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "CompleteStoredSearchDocumentApiImpl.h"
......@@ -18,12 +18,18 @@ namespace api {
using namespace oai::nrf::model;
CompleteStoredSearchDocumentApiImpl::CompleteStoredSearchDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router> rtr)
: CompleteStoredSearchDocumentApi(rtr)
{ }
CompleteStoredSearchDocumentApiImpl::CompleteStoredSearchDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, nrf::nrf_app *nrf_app_inst,
std::string address)
:
CompleteStoredSearchDocumentApi(rtr),
m_nrf_app(nrf_app_inst),
m_address(address) {
}
void CompleteStoredSearchDocumentApiImpl::retrieve_complete_search(const std::string &searchId, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
void CompleteStoredSearchDocumentApiImpl::retrieve_complete_search(
const std::string &searchId, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
}
}
......
......@@ -30,21 +30,30 @@
#include <pistache/optional.h>
#include "StoredSearchResult.h"
#include "nrf_app.hpp"
#include <string>
namespace oai {
namespace nrf {
namespace api {
using namespace oai::nrf::model;
class CompleteStoredSearchDocumentApiImpl : public oai::nrf::api::CompleteStoredSearchDocumentApi {
public:
CompleteStoredSearchDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>);
~CompleteStoredSearchDocumentApiImpl() {}
void retrieve_complete_search(const std::string &searchId, Pistache::Http::ResponseWriter &response);
class CompleteStoredSearchDocumentApiImpl :
public oai::nrf::api::CompleteStoredSearchDocumentApi {
public:
CompleteStoredSearchDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
oai::nrf::nrf_app *nrf_app_inst,
std::string address);
~CompleteStoredSearchDocumentApiImpl() {
}
void retrieve_complete_search(const std::string &searchId,
Pistache::Http::ResponseWriter &response);
private:
oai::nrf::nrf_app *m_nrf_app;
std::string m_address;
};
}
......@@ -53,4 +62,4 @@ public:
#endif
\ No newline at end of file
#endif
......@@ -18,8 +18,11 @@ namespace api {
using namespace oai::nrf::model;
NFInstanceIDDocumentApiImpl::NFInstanceIDDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router> rtr)
: NFInstanceIDDocumentApi(rtr)
NFInstanceIDDocumentApiImpl::NFInstanceIDDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router> rtr,
oai::nrf::nrf_app *nrf_app_inst,
std::string address)
: NFInstanceIDDocumentApi(rtr), m_nrf_app(nrf_app_inst),
m_address(address)
{ }
void NFInstanceIDDocumentApiImpl::deregister_nf_instance(const std::string &nfInstanceID, Pistache::Http::ResponseWriter &response) {
......
......@@ -32,6 +32,7 @@
#include "NFProfile.h"
#include "PatchItem.h"
#include "ProblemDetails.h"
#include "nrf_app.hpp"
#include <string>
#include <vector>
......@@ -43,14 +44,18 @@ using namespace oai::nrf::model;
class NFInstanceIDDocumentApiImpl : public oai::nrf::api::NFInstanceIDDocumentApi {
public:
NFInstanceIDDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>);
NFInstanceIDDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
oai::nrf::nrf_app *nrf_app_inst,
std::string address);
~NFInstanceIDDocumentApiImpl() {}
void deregister_nf_instance(const std::string &nfInstanceID, Pistache::Http::ResponseWriter &response);
void get_nf_instance(const std::string &nfInstanceID, Pistache::Http::ResponseWriter &response);
void register_nf_instance(const std::string &nfInstanceID, const NFProfile &nFProfile, const Pistache::Optional<Pistache::Http::Header::Raw> &contentEncoding, Pistache::Http::ResponseWriter &response);
void update_nf_instance(const std::string &nfInstanceID, const std::vector<PatchItem> &patchItem, Pistache::Http::ResponseWriter &response);
private:
oai::nrf::nrf_app *m_nrf_app;
std::string m_address;
};
}
......@@ -59,4 +64,4 @@ public:
#endif
\ No newline at end of file
#endif
/**
* NRF NFDiscovery Service
* NRF NFDiscovery Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
* NRF NFDiscovery Service
* NRF NFDiscovery Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "NFInstancesStoreApiImpl.h"
......@@ -18,12 +18,65 @@ namespace api {
using namespace oai::nrf::model;
NFInstancesStoreApiImpl::NFInstancesStoreApiImpl(std::shared_ptr<Pistache::Rest::Router> rtr)
: NFInstancesStoreApi(rtr)
{ }
NFInstancesStoreApiImpl::NFInstancesStoreApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, oai::nrf::nrf_app *nrf_app_inst,
std::string address)
:
NFInstancesStoreApi(rtr),
m_nrf_app(nrf_app_inst),
m_address(address) {
}
void NFInstancesStoreApiImpl::search_nf_instances(const Pistache::Optional<NFType> &targetNfType, const Pistache::Optional<NFType> &requesterNfType, const Pistache::Optional<std::string> &requesterNfInstanceId, const Pistache::Optional<Set<ServiceName>> &serviceNames, const Pistache::Optional<std::string> &requesterNfInstanceFqdn, const Pistache::Optional<std::vector<PlmnId>> &targetPlmnList, const Pistache::Optional<std::vector<PlmnId>> &requesterPlmnList, const Pistache::Optional<std::string> &targetNfInstanceId, const Pistache::Optional<std::string> &targetNfFqdn, const Pistache::Optional<std::string> &hnrfUri, const Pistache::Optional<std::vector<Snssai>> &snssais, const Pistache::Optional<std::vector<Snssai>> &requesterSnssais, const Pistache::Optional<std::vector<PlmnSnssai>> &plmnSpecificSnssaiList, const Pistache::Optional<std::string> &dnn, const Pistache::Optional<std::vector<std::string>> &nsiList, const Pistache::Optional<std::string> &smfServingArea, const Pistache::Optional<Tai> &tai, const Pistache::Optional<std::string> &amfRegionId, const Pistache::Optional<std::string> &amfSetId, const Pistache::Optional<Guami> &guami, const Pistache::Optional<std::string> &supi, const Pistache::Optional<std::string> &ueIpv4Address, const Pistache::Optional<std::string> &ipDomain, const Pistache::Optional<Ipv6Prefix> &ueIpv6Prefix, const Pistache::Optional<bool> &pgwInd, const Pistache::Optional<std::string> &pgw, const Pistache::Optional<std::string> &gpsi, const Pistache::Optional<std::string> &externalGroupIdentity, const Pistache::Optional<DataSetId> &dataSet, const Pistache::Optional<std::string> &routingIndicator, const Pistache::Optional<std::vector<std::string>> &groupIdList, const Pistache::Optional<std::vector<std::string>> &dnaiList, const Pistache::Optional<std::vector<PduSessionType>> &pduSessionTypes, const Pistache::Optional<std::vector<EventId>> &eventIdList, const Pistache::Optional<std::vector<NwdafEvent>> &nwdafEventList, const Pistache::Optional<std::string> &supportedFeatures, const Pistache::Optional<bool> &upfIwkEpsInd, const Pistache::Optional<PlmnId> &chfSupportedPlmn, const Pistache::Optional<std::string> &preferredLocality, const Pistache::Optional<AccessType> &accessType, const Pistache::Optional<int32_t> &limit, const Pistache::Optional<std::vector<std::string>> &requiredFeatures, const Pistache::Optional<ComplexQuery> &complexQuery, const Pistache::Optional<int32_t> &maxPayloadSize, const Pistache::Optional<AtsssCapability> &atsssCapability, const Pistache::Optional<bool> &upfUeIpAddrInd, const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
void NFInstancesStoreApiImpl::search_nf_instances(
const Pistache::Optional<std::string> &targetNfType,
const Pistache::Optional<std::string> &requesterNfType,
const Pistache::Optional<std::string> &requesterNfInstanceId,
const Pistache::Optional<std::vector<ServiceName>> &serviceNames,
const Pistache::Optional<std::string> &requesterNfInstanceFqdn,
const Pistache::Optional<std::vector<PlmnId>> &targetPlmnList,
const Pistache::Optional<std::vector<PlmnId>> &requesterPlmnList,
const Pistache::Optional<std::string> &targetNfInstanceId,
const Pistache::Optional<std::string> &targetNfFqdn,
const Pistache::Optional<std::string> &hnrfUri,
const Pistache::Optional<std::vector<Snssai>> &snssais,
const Pistache::Optional<std::vector<Snssai>> &requesterSnssais,
const Pistache::Optional<std::vector<PlmnSnssai>> &plmnSpecificSnssaiList,
const Pistache::Optional<std::string> &dnn,
const Pistache::Optional<std::vector<std::string>> &nsiList,
const Pistache::Optional<std::string> &smfServingArea,
const Pistache::Optional<Tai> &tai,
const Pistache::Optional<std::string> &amfRegionId,
const Pistache::Optional<std::string> &amfSetId,
const Pistache::Optional<Guami> &guami,
const Pistache::Optional<std::string> &supi,
const Pistache::Optional<std::string> &ueIpv4Address,
const Pistache::Optional<std::string> &ipDomain,
const Pistache::Optional<Ipv6Prefix> &ueIpv6Prefix,
const Pistache::Optional<bool> &pgwInd,
const Pistache::Optional<std::string> &pgw,
const Pistache::Optional<std::string> &gpsi,
const Pistache::Optional<std::string> &externalGroupIdentity,
const Pistache::Optional<DataSetId> &dataSet,
const Pistache::Optional<std::string> &routingIndicator,
const Pistache::Optional<std::vector<std::string>> &groupIdList,
const Pistache::Optional<std::vector<std::string>> &dnaiList,
const Pistache::Optional<std::vector<PduSessionType>> &pduSessionTypes,
const Pistache::Optional<std::vector<EventId>> &eventIdList,
const Pistache::Optional<std::vector<NwdafEvent>> &nwdafEventList,
const Pistache::Optional<std::string> &supportedFeatures,
const Pistache::Optional<bool> &upfIwkEpsInd,
const Pistache::Optional<PlmnId> &chfSupportedPlmn,
const Pistache::Optional<std::string> &preferredLocality,
const Pistache::Optional<AccessType> &accessType,
const Pistache::Optional<int32_t> &limit,
const Pistache::Optional<std::vector<std::string>> &requiredFeatures,
const Pistache::Optional<ComplexQuery> &complexQuery,
const Pistache::Optional<int32_t> &maxPayloadSize,
const Pistache::Optional<AtsssCapability> &atsssCapability,
const Pistache::Optional<bool> &upfUeIpAddrInd,
const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch,
Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
}
}
......
......@@ -36,7 +36,7 @@
#include "EventId.h"
#include "Guami.h"
#include "Ipv6Prefix.h"
#include "NFType.h"
//#include "NFType.h"
#include "NwdafEvent.h"
#include "PduSessionType.h"
#include "PlmnId.h"
......@@ -44,10 +44,12 @@
#include "ProblemDetails.h"
#include "SearchResult.h"
#include "ServiceName.h"
#include "Set.h"
#include "Snssai.h"
#include "Tai.h"
#include "nrf_app.hpp"
#include <string>
#include <set>
namespace oai {
namespace nrf {
......@@ -57,11 +59,15 @@ using namespace oai::nrf::model;
class NFInstancesStoreApiImpl : public oai::nrf::api::NFInstancesStoreApi {
public:
NFInstancesStoreApiImpl(std::shared_ptr<Pistache::Rest::Router>);
NFInstancesStoreApiImpl(std::shared_ptr<Pistache::Rest::Router>,
oai::nrf::nrf_app *nrf_app_inst,
std::string address);
~NFInstancesStoreApiImpl() {}
void search_nf_instances(const Pistache::Optional<NFType> &targetNfType, const Pistache::Optional<NFType> &requesterNfType, const Pistache::Optional<std::string> &requesterNfInstanceId, const Pistache::Optional<Set<ServiceName>> &serviceNames, const Pistache::Optional<std::string> &requesterNfInstanceFqdn, const Pistache::Optional<std::vector<PlmnId>> &targetPlmnList, const Pistache::Optional<std::vector<PlmnId>> &requesterPlmnList, const Pistache::Optional<std::string> &targetNfInstanceId, const Pistache::Optional<std::string> &targetNfFqdn, const Pistache::Optional<std::string> &hnrfUri, const Pistache::Optional<std::vector<Snssai>> &snssais, const Pistache::Optional<std::vector<Snssai>> &requesterSnssais, const Pistache::Optional<std::vector<PlmnSnssai>> &plmnSpecificSnssaiList, const Pistache::Optional<std::string> &dnn, const Pistache::Optional<std::vector<std::string>> &nsiList, const Pistache::Optional<std::string> &smfServingArea, const Pistache::Optional<Tai> &tai, const Pistache::Optional<std::string> &amfRegionId, const Pistache::Optional<std::string> &amfSetId, const Pistache::Optional<Guami> &guami, const Pistache::Optional<std::string> &supi, const Pistache::Optional<std::string> &ueIpv4Address, const Pistache::Optional<std::string> &ipDomain, const Pistache::Optional<Ipv6Prefix> &ueIpv6Prefix, const Pistache::Optional<bool> &pgwInd, const Pistache::Optional<std::string> &pgw, const Pistache::Optional<std::string> &gpsi, const Pistache::Optional<std::string> &externalGroupIdentity, const Pistache::Optional<DataSetId> &dataSet, const Pistache::Optional<std::string> &routingIndicator, const Pistache::Optional<std::vector<std::string>> &groupIdList, const Pistache::Optional<std::vector<std::string>> &dnaiList, const Pistache::Optional<std::vector<PduSessionType>> &pduSessionTypes, const Pistache::Optional<std::vector<EventId>> &eventIdList, const Pistache::Optional<std::vector<NwdafEvent>> &nwdafEventList, const Pistache::Optional<std::string> &supportedFeatures, const Pistache::Optional<bool> &upfIwkEpsInd, const Pistache::Optional<PlmnId> &chfSupportedPlmn, const Pistache::Optional<std::string> &preferredLocality, const Pistache::Optional<AccessType> &accessType, const Pistache::Optional<int32_t> &limit, const Pistache::Optional<std::vector<std::string>> &requiredFeatures, const Pistache::Optional<ComplexQuery> &complexQuery, const Pistache::Optional<int32_t> &maxPayloadSize, const Pistache::Optional<AtsssCapability> &atsssCapability, const Pistache::Optional<bool> &upfUeIpAddrInd, const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch, Pistache::Http::ResponseWriter &response);
void search_nf_instances(const Pistache::Optional<std::string> &targetNfType, const Pistache::Optional<std::string> &requesterNfType, const Pistache::Optional<std::string> &requesterNfInstanceId, const Pistache::Optional<std::vector<ServiceName>> &serviceNames, const Pistache::Optional<std::string> &requesterNfInstanceFqdn, const Pistache::Optional<std::vector<PlmnId>> &targetPlmnList, const Pistache::Optional<std::vector<PlmnId>> &requesterPlmnList, const Pistache::Optional<std::string> &targetNfInstanceId, const Pistache::Optional<std::string> &targetNfFqdn, const Pistache::Optional<std::string> &hnrfUri, const Pistache::Optional<std::vector<Snssai>> &snssais, const Pistache::Optional<std::vector<Snssai>> &requesterSnssais, const Pistache::Optional<std::vector<PlmnSnssai>> &plmnSpecificSnssaiList, const Pistache::Optional<std::string> &dnn, const Pistache::Optional<std::vector<std::string>> &nsiList, const Pistache::Optional<std::string> &smfServingArea, const Pistache::Optional<Tai> &tai, const Pistache::Optional<std::string> &amfRegionId, const Pistache::Optional<std::string> &amfSetId, const Pistache::Optional<Guami> &guami, const Pistache::Optional<std::string> &supi, const Pistache::Optional<std::string> &ueIpv4Address, const Pistache::Optional<std::string> &ipDomain, const Pistache::Optional<Ipv6Prefix> &ueIpv6Prefix, const Pistache::Optional<bool> &pgwInd, const Pistache::Optional<std::string> &pgw, const Pistache::Optional<std::string> &gpsi, const Pistache::Optional<std::string> &externalGroupIdentity, const Pistache::Optional<DataSetId> &dataSet, const Pistache::Optional<std::string> &routingIndicator, const Pistache::Optional<std::vector<std::string>> &groupIdList, const Pistache::Optional<std::vector<std::string>> &dnaiList, const Pistache::Optional<std::vector<PduSessionType>> &pduSessionTypes, const Pistache::Optional<std::vector<EventId>> &eventIdList, const Pistache::Optional<std::vector<NwdafEvent>> &nwdafEventList, const Pistache::Optional<std::string> &supportedFeatures, const Pistache::Optional<bool> &upfIwkEpsInd, const Pistache::Optional<PlmnId> &chfSupportedPlmn, const Pistache::Optional<std::string> &preferredLocality, const Pistache::Optional<AccessType> &accessType, const Pistache::Optional<int32_t> &limit, const Pistache::Optional<std::vector<std::string>> &requiredFeatures, const Pistache::Optional<ComplexQuery> &complexQuery, const Pistache::Optional<int32_t> &maxPayloadSize, const Pistache::Optional<AtsssCapability> &atsssCapability, const Pistache::Optional<bool> &upfUeIpAddrInd, const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch, Pistache::Http::ResponseWriter &response);
private:
oai::nrf::nrf_app *m_nrf_app;
std::string m_address;
};
}
......@@ -70,4 +76,4 @@ public:
#endif
\ No newline at end of file
#endif
/**
* NRF NFDiscovery Service
* NRF NFDiscovery Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
* NRF NFDiscovery Service
* NRF NFDiscovery Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "StoredSearchDocumentApiImpl.h"
......@@ -18,12 +18,18 @@ namespace api {
using namespace oai::nrf::model;
StoredSearchDocumentApiImpl::StoredSearchDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router> rtr)
: StoredSearchDocumentApi(rtr)
{ }
StoredSearchDocumentApiImpl::StoredSearchDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, oai::nrf::nrf_app *nrf_app_inst,
std::string address)
:
StoredSearchDocumentApi(rtr),
m_nrf_app(nrf_app_inst),
m_address(address) {
}
void StoredSearchDocumentApiImpl::retrieve_stored_search(const std::string &searchId, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
void StoredSearchDocumentApiImpl::retrieve_stored_search(
const std::string &searchId, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
}
}
......
......@@ -30,6 +30,7 @@
#include <pistache/optional.h>
#include "StoredSearchResult.h"
#include "nrf_app.hpp"
#include <string>
namespace oai {
......@@ -40,11 +41,15 @@ using namespace oai::nrf::model;
class StoredSearchDocumentApiImpl : public oai::nrf::api::StoredSearchDocumentApi {
public:
StoredSearchDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>);
StoredSearchDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
oai::nrf::nrf_app *nrf_app_inst,
std::string address);
~StoredSearchDocumentApiImpl() {}
void retrieve_stored_search(const std::string &searchId, Pistache::Http::ResponseWriter &response);
private:
oai::nrf::nrf_app *m_nrf_app;
std::string m_address;
};
}
......@@ -53,4 +58,4 @@ public:
#endif
\ No newline at end of file
#endif
/**
* NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
* NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "SubscriptionIDDocumentApiImpl.h"
......@@ -18,15 +18,24 @@ namespace api {
using namespace oai::nrf::model;
SubscriptionIDDocumentApiImpl::SubscriptionIDDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router> rtr)
: SubscriptionIDDocumentApi(rtr)
{ }
SubscriptionIDDocumentApiImpl::SubscriptionIDDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, oai::nrf::nrf_app *nrf_app_inst,
std::string address)
:
SubscriptionIDDocumentApi(rtr),
m_nrf_app(nrf_app_inst),
m_address(address) {
}
void SubscriptionIDDocumentApiImpl::remove_subscription(const std::string &subscriptionID, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
void SubscriptionIDDocumentApiImpl::remove_subscription(
const std::string &subscriptionID,
Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
}
void SubscriptionIDDocumentApiImpl::update_subscription(const std::string &subscriptionID, const std::vector<PatchItem> &patchItem, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
void SubscriptionIDDocumentApiImpl::update_subscription(
const std::string &subscriptionID, const std::vector<PatchItem> &patchItem,
Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
}
}
......
......@@ -32,6 +32,7 @@
#include "PatchItem.h"
#include "ProblemDetails.h"
#include "SubscriptionData.h"
#include "nrf_app.hpp"
#include <string>
#include <vector>
......@@ -43,12 +44,16 @@ using namespace oai::nrf::model;
class SubscriptionIDDocumentApiImpl : public oai::nrf::api::SubscriptionIDDocumentApi {
public:
SubscriptionIDDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>);
SubscriptionIDDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
oai::nrf::nrf_app *nrf_app_inst,
std::string address);
~SubscriptionIDDocumentApiImpl() {}
void remove_subscription(const std::string &subscriptionID, Pistache::Http::ResponseWriter &response);
void update_subscription(const std::string &subscriptionID, const std::vector<PatchItem> &patchItem, Pistache::Http::ResponseWriter &response);
private:
oai::nrf::nrf_app *m_nrf_app;
std::string m_address;
};
}
......@@ -57,4 +62,4 @@ public:
#endif
\ No newline at end of file
#endif
/**
* NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
* NRF NFManagement Service
* NRF NFManagement Service. © 2019, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "SubscriptionsCollectionApiImpl.h"
......@@ -18,12 +18,19 @@ namespace api {
using namespace oai::nrf::model;
SubscriptionsCollectionApiImpl::SubscriptionsCollectionApiImpl(std::shared_ptr<Pistache::Rest::Router> rtr)
: SubscriptionsCollectionApi(rtr)
{ }
SubscriptionsCollectionApiImpl::SubscriptionsCollectionApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, oai::nrf::nrf_app *nrf_app_inst,
std::string address)
:
SubscriptionsCollectionApi(rtr),
m_nrf_app(nrf_app_inst),
m_address(address) {
}
void SubscriptionsCollectionApiImpl::create_subscription(const SubscriptionData &subscriptionData, Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
void SubscriptionsCollectionApiImpl::create_subscription(
const SubscriptionData &subscriptionData,
Pistache::Http::ResponseWriter &response) {
response.send(Pistache::Http::Code::Ok, "Do some magic\n");
}
}
......
......@@ -31,6 +31,7 @@
#include "ProblemDetails.h"
#include "SubscriptionData.h"
#include "nrf_app.hpp"
namespace oai {
namespace nrf {
......@@ -40,11 +41,15 @@ using namespace oai::nrf::model;
class SubscriptionsCollectionApiImpl : public oai::nrf::api::SubscriptionsCollectionApi {
public:
SubscriptionsCollectionApiImpl(std::shared_ptr<Pistache::Rest::Router>);
SubscriptionsCollectionApiImpl(std::shared_ptr<Pistache::Rest::Router>,
oai::nrf::nrf_app *nrf_app_inst,
std::string address);
~SubscriptionsCollectionApiImpl() {}
void create_subscription(const SubscriptionData &subscriptionData, Pistache::Http::ResponseWriter &response);
private:
oai::nrf::nrf_app *m_nrf_app;
std::string m_address;
};
}
......@@ -53,4 +58,4 @@ public:
#endif
\ No newline at end of file
#endif
......@@ -62,11 +62,11 @@ void Atom::setAttr(std::string const& value)
{
m_Attr = value;
}
AnyType Atom::getValue() const
std::string Atom::getValue() const
{
return m_Value;
}
void Atom::setValue(AnyType const& value)
void Atom::setValue(std::string const& value)
{
m_Value = value;
}
......
......@@ -20,7 +20,7 @@
#include <string>
#include "AnyType.h"
//#include "AnyType.h"
#include <nlohmann/json.hpp>
namespace oai {
......@@ -49,8 +49,8 @@ public:
/// <summary>
///
/// </summary>
AnyType getValue() const;
void setValue(AnyType const& value);
std::string getValue() const;
void setValue(std::string const& value);
/// <summary>
///
/// </summary>
......@@ -64,7 +64,7 @@ public:
protected:
std::string m_Attr;
AnyType m_Value;
std::string m_Value;
bool m_Negative;
bool m_NegativeIsSet;
......
......@@ -103,11 +103,11 @@ void ChangeItem::unsetFrom()
{
m_FromIsSet = false;
}
AnyType ChangeItem::getOrigValue() const
std::string ChangeItem::getOrigValue() const
{
return m_OrigValue;
}
void ChangeItem::setOrigValue(AnyType const& value)
void ChangeItem::setOrigValue(std::string const& value)
{
m_OrigValue = value;
m_OrigValueIsSet = true;
......@@ -120,11 +120,11 @@ void ChangeItem::unsetOrigValue()
{
m_OrigValueIsSet = false;
}
AnyType ChangeItem::getNewValue() const
std::string ChangeItem::getNewValue() const
{
return m_NewValue;
}
void ChangeItem::setNewValue(AnyType const& value)
void ChangeItem::setNewValue(std::string const& value)
{
m_NewValue = value;
m_NewValueIsSet = true;
......
......@@ -21,7 +21,7 @@
#include "ChangeType.h"
#include <string>
#include "AnyType.h"
//#include "AnyType.h"
#include <nlohmann/json.hpp>
namespace oai {
......@@ -62,15 +62,15 @@ public:
/// <summary>
///
/// </summary>
AnyType getOrigValue() const;
void setOrigValue(AnyType const& value);
std::string getOrigValue() const;
void setOrigValue(std::string const& value);
bool origValueIsSet() const;
void unsetOrigValue();
/// <summary>
///
/// </summary>
AnyType getNewValue() const;
void setNewValue(AnyType const& value);
std::string getNewValue() const;
void setNewValue(std::string const& value);
bool newValueIsSet() const;
void unsetNewValue();
......@@ -83,9 +83,9 @@ protected:
std::string m_From;
bool m_FromIsSet;
AnyType m_OrigValue;
std::string m_OrigValue;
bool m_OrigValueIsSet;
AnyType m_NewValue;
std::string m_NewValue;
bool m_NewValueIsSet;
};
......
......@@ -11,9 +11,8 @@
*/
#include "Helpers.h"
namespace org {
namespace openapitools {
namespace server {
namespace oai {
namespace nrf {
namespace helpers {
......@@ -92,7 +91,49 @@ bool fromStringValue(const std::string &inStr, double &value){
return true;
}
bool fromStringValue(const std::string &inStr, oai::nrf::model::ServiceName &value) {
//TODO
return true;
}
bool fromStringValue(const std::string &inStr, oai::nrf::model::PlmnId &value){
//TODO
return true;
}
bool fromStringValue(const std::string &inStr, oai::nrf::model::Snssai &value){
//TODO
return true;
}
bool fromStringValue(const std::string &inStr, oai::nrf::model::PlmnSnssai &value){
//TODO
return true;
}
bool fromStringValue(const std::string &inStr, oai::nrf::model::PduSessionType &value){
//TODO
return true;
}
bool fromStringValue(const std::string &inStr, oai::nrf::model::EventId &value){
//TODO
return true;
}
bool fromStringValue(const std::string &inStr, oai::nrf::model::NwdafEvent &value){
//TODO
return true;
}
bool fromStringValue(const std::string &inStr, oai::nrf::model::AccessType &value){
//TODO
return true;
}
bool fromStringValue(const std::string &inStr, oai::nrf::model::ComplexQuery &value){
//TODO
return true;
}
bool fromStringValue(const std::string &inStr, oai::nrf::model::AtsssCapability &value){
//TODO
return true;
}
}
}
}
......@@ -23,10 +23,19 @@
#include <sstream>
#include <vector>
#include <map>
#include "ServiceName.h"
#include "PlmnId.h"
#include "Snssai.h"
#include "PlmnSnssai.h"
#include "PduSessionType.h"
#include "EventId.h"
#include "NwdafEvent.h"
#include "AccessType.h"
#include "ComplexQuery.h"
#include "AtsssCapability.h"
namespace org {
namespace openapitools {
namespace server {
namespace oai {
namespace nrf {
namespace helpers {
std::string toStringValue(const std::string &value);
......@@ -42,6 +51,17 @@ namespace helpers {
bool fromStringValue(const std::string &inStr, bool &value);
bool fromStringValue(const std::string &inStr, float &value);
bool fromStringValue(const std::string &inStr, double &value);
bool fromStringValue(const std::string &inStr, oai::nrf::model::ServiceName &value);
bool fromStringValue(const std::string &inStr, oai::nrf::model::PlmnId &value);
bool fromStringValue(const std::string &inStr, oai::nrf::model::Snssai &value);
bool fromStringValue(const std::string &inStr, oai::nrf::model::PlmnSnssai &value);
bool fromStringValue(const std::string &inStr, oai::nrf::model::PduSessionType &value);
bool fromStringValue(const std::string &inStr, oai::nrf::model::EventId &value);
bool fromStringValue(const std::string &inStr, oai::nrf::model::NwdafEvent &value);
bool fromStringValue(const std::string &inStr, oai::nrf::model::AccessType &value);
bool fromStringValue(const std::string &inStr, oai::nrf::model::ComplexQuery &value);
bool fromStringValue(const std::string &inStr, oai::nrf::model::AtsssCapability &value);
template<typename T>
bool fromStringValue(const std::vector<std::string> &inStr, std::vector<T> &value){
try{
......@@ -71,6 +91,5 @@ namespace helpers {
}
}
}
}
#endif // Helpers_H_
\ No newline at end of file
#endif // Helpers_H_
......@@ -57,7 +57,7 @@ NFProfile::NFProfile()
m_ChfInfoIsSet = false;
m_ChfInfoExtIsSet = false;
m_NwdafInfoIsSet = false;
m_CustomInfoIsSet = false;
//m_CustomInfoIsSet = false;
m_RecoveryTime = "";
m_RecoveryTimeIsSet = false;
m_NfServicePersistence = false;
......@@ -144,8 +144,8 @@ void to_json(nlohmann::json& j, const NFProfile& o)
j["chfInfoExt"] = o.m_ChfInfoExt;
if(o.nwdafInfoIsSet())
j["nwdafInfo"] = o.m_NwdafInfo;
if(o.customInfoIsSet())
j["customInfo"] = o.m_CustomInfo;
//if(o.customInfoIsSet())
// j["customInfo"] = o.m_CustomInfo;
if(o.recoveryTimeIsSet())
j["recoveryTime"] = o.m_RecoveryTime;
if(o.nfServicePersistenceIsSet())
......@@ -316,11 +316,11 @@ void from_json(const nlohmann::json& j, NFProfile& o)
j.at("nwdafInfo").get_to(o.m_NwdafInfo);
o.m_NwdafInfoIsSet = true;
}
if(j.find("customInfo") != j.end())
/*if(j.find("customInfo") != j.end())
{
j.at("customInfo").get_to(o.m_CustomInfo);
o.m_CustomInfoIsSet = true;
}
} */
if(j.find("recoveryTime") != j.end())
{
j.at("recoveryTime").get_to(o.m_RecoveryTime);
......@@ -368,11 +368,11 @@ void NFProfile::unsetNfInstanceName()
{
m_NfInstanceNameIsSet = false;
}
NFType NFProfile::getNfType() const
std::string NFProfile::getNfType() const
{
return m_NfType;
}
void NFProfile::setNfType(NFType const& value)
void NFProfile::setNfType(std::string const& value)
{
m_NfType = value;
}
......@@ -894,23 +894,27 @@ void NFProfile::unsetNwdafInfo()
{
m_NwdafInfoIsSet = false;
}
Object NFProfile::getCustomInfo() const
/*Object NFProfile::getCustomInfo() const
{
return m_CustomInfo;
}
*/
/*
void NFProfile::setCustomInfo(Object const& value)
{
m_CustomInfo = value;
m_CustomInfoIsSet = true;
}
bool NFProfile::customInfoIsSet() const
}*/
/* bool NFProfile::customInfoIsSet() const
{
return m_CustomInfoIsSet;
}
}*/
/*
void NFProfile::unsetCustomInfo()
{
m_CustomInfoIsSet = false;
}
}*/
std::string NFProfile::getRecoveryTime() const
{
return m_RecoveryTime;
......
......@@ -35,8 +35,8 @@
#include <vector>
#include "AmfInfo.h"
#include "UdrInfo.h"
#include "NFType.h"
#include "Object.h"
//#include "NFType.h"
//#include "Object.h"
#include "PlmnSnssai.h"
#include "AusfInfo.h"
#include "NwdafInfo.h"
......@@ -75,8 +75,8 @@ public:
/// <summary>
///
/// </summary>
NFType getNfType() const;
void setNfType(NFType const& value);
std::string getNfType() const;
void setNfType(std::string const& value);
/// <summary>
///
/// </summary>
......@@ -295,10 +295,10 @@ public:
/// <summary>
///
/// </summary>
Object getCustomInfo() const;
void setCustomInfo(Object const& value);
bool customInfoIsSet() const;
void unsetCustomInfo();
//Object getCustomInfo() const;
//void setCustomInfo(Object const& value);
//bool customInfoIsSet() const;
//void unsetCustomInfo();
/// <summary>
///
/// </summary>
......@@ -335,7 +335,7 @@ protected:
std::string m_NfInstanceName;
bool m_NfInstanceNameIsSet;
NFType m_NfType;
std::string m_NfType;
NFStatus m_NfStatus;
......@@ -399,8 +399,8 @@ protected:
bool m_ChfInfoExtIsSet;
NwdafInfo m_NwdafInfo;
bool m_NwdafInfoIsSet;
Object m_CustomInfo;
bool m_CustomInfoIsSet;
//Object m_CustomInfo;
//bool m_CustomInfoIsSet;
std::string m_RecoveryTime;
bool m_RecoveryTimeIsSet;
bool m_NfServicePersistence;
......
......@@ -42,11 +42,11 @@ void from_json(const nlohmann::json& j, NfTypeCond& o)
j.at("nfType").get_to(o.m_NfType);
}
NFType NfTypeCond::getNfType() const
std::string NfTypeCond::getNfType() const
{
return m_NfType;
}
void NfTypeCond::setNfType(NFType const& value)
void NfTypeCond::setNfType(std::string const& value)
{
m_NfType = value;
}
......
......@@ -19,7 +19,8 @@
#define NfTypeCond_H_
#include "NFType.h"
//#include "NFType.h"
#include <string>
#include <nlohmann/json.hpp>
namespace oai {
......@@ -43,13 +44,13 @@ public:
/// <summary>
///
/// </summary>
NFType getNfType() const;
void setNfType(NFType const& value);
std::string getNfType() const;
void setNfType(std::string const& value);
friend void to_json(nlohmann::json& j, const NfTypeCond& o);
friend void from_json(const nlohmann::json& j, NfTypeCond& o);
protected:
NFType m_NfType;
std::string m_NfType;
};
......
......@@ -95,11 +95,11 @@ void PatchItem::unsetFrom()
{
m_FromIsSet = false;
}
AnyType PatchItem::getValue() const
std::string PatchItem::getValue() const
{
return m_Value;
}
void PatchItem::setValue(AnyType const& value)
void PatchItem::setValue(std::string const& value)
{
m_Value = value;
m_ValueIsSet = true;
......
......@@ -21,7 +21,7 @@
#include <string>
#include "PatchOperation.h"
#include "AnyType.h"
//#include "AnyType.h"
#include <nlohmann/json.hpp>
namespace oai {
......@@ -62,8 +62,8 @@ public:
/// <summary>
///
/// </summary>
AnyType getValue() const;
void setValue(AnyType const& value);
std::string getValue() const;
void setValue(std::string const& value);
bool valueIsSet() const;
void unsetValue();
......@@ -76,7 +76,7 @@ protected:
std::string m_From;
bool m_FromIsSet;
AnyType m_Value;
std::string m_Value;
bool m_ValueIsSet;
};
......
......@@ -33,6 +33,7 @@ SubscriptionData::SubscriptionData()
m_ReqNfFqdn = "";
m_ReqNfFqdnIsSet = false;
m_ReqSnssaisIsSet = false;
//m_SubscrCond;
}
......@@ -51,8 +52,9 @@ void to_json(nlohmann::json& j, const SubscriptionData& o)
j["nfStatusNotificationUri"] = o.m_NfStatusNotificationUri;
if(o.reqNfInstanceIdIsSet())
j["reqNfInstanceId"] = o.m_ReqNfInstanceId;
if(o.subscrCondIsSet())
/* if(o.subscrCondIsSet())
j["subscrCond"] = o.m_SubscrCond;
*/
j["subscriptionId"] = o.m_SubscriptionId;
if(o.validityTimeIsSet())
j["validityTime"] = o.m_ValidityTime;
......@@ -78,11 +80,13 @@ void from_json(const nlohmann::json& j, SubscriptionData& o)
j.at("reqNfInstanceId").get_to(o.m_ReqNfInstanceId);
o.m_ReqNfInstanceIdIsSet = true;
}
/*
if(j.find("subscrCond") != j.end())
{
j.at("subscrCond").get_to(o.m_SubscrCond);
o.m_SubscrCondIsSet = true;
}
*/
j.at("subscriptionId").get_to(o.m_SubscriptionId);
if(j.find("validityTime") != j.end())
{
......@@ -146,15 +150,20 @@ void SubscriptionData::unsetReqNfInstanceId()
{
m_ReqNfInstanceIdIsSet = false;
}
OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond SubscriptionData::getSubscrCond() const
/*
m_SubscrCond SubscriptionData::getSubscrCond() const
{
return m_SubscrCond;
}
void SubscriptionData::setSubscrCond(OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond const& value)
*/
/*
void SubscriptionData::setSubscrCond(m_SubscrCond const& value)
{
m_SubscrCond = value;
m_SubscrCondIsSet = true;
}
*/
bool SubscriptionData::subscrCondIsSet() const
{
return m_SubscrCondIsSet;
......@@ -239,11 +248,11 @@ void SubscriptionData::unsetNotifCondition()
{
m_NotifConditionIsSet = false;
}
NFType SubscriptionData::getReqNfType() const
std::string SubscriptionData::getReqNfType() const
{
return m_ReqNfType;
}
void SubscriptionData::setReqNfType(NFType const& value)
void SubscriptionData::setReqNfType(std::string const& value)
{
m_ReqNfType = value;
m_ReqNfTypeIsSet = true;
......
......@@ -19,8 +19,7 @@
#define SubscriptionData_H_
#include "OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond.h"
#include "NFType.h"
//#include "OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond.h"
#include <string>
#include "NotificationEventType.h"
#include "PlmnId.h"
......@@ -29,10 +28,51 @@
#include "NotifCondition.h"
#include <nlohmann/json.hpp>
#include "NfInstanceIdCond.h"
#include "NfTypeCond.h"
#include "ServiceNameCond.h"
#include "AmfCond.h"
#include "GuamiListCond.h"
#include "NetworkSliceCond.h"
#include "NfGroupCond.h"
namespace oai {
namespace nrf {
namespace model {
typedef struct subscription_condition_s {
uint8_t type;
union {
NfInstanceIdCond nfInstanceIdCond;
NfTypeCond nfTypeCond;
ServiceNameCond serviceNameCond;
AmfCond amfCond;
GuamiListCond guamiListCond;
NetworkSliceCond networkSliceCond;
NfGroupCond nfGroupCond;
};
subscription_condition_s()
: type(0) {
}
subscription_condition_s(uint8_t t)
: type(t) {
}
bool operator==(const struct subscription_condition_s &s) const {
return (s.type == type);
}
//------------------------------------------------------------------------------
bool operator==(const uint8_t &t) const {
return (t == type);
}
virtual ~subscription_condition_s() {};
} subscription_condition_t;
/// <summary>
///
/// </summary>
......@@ -62,8 +102,11 @@ public:
/// <summary>
///
/// </summary>
OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond getSubscrCond() const;
void setSubscrCond(OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond const& value);
//OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond getSubscrCond() const;
subscription_condition_t getSubscrCond() const;
void setSubscrCond(subscription_condition_t const& value);
bool subscrCondIsSet() const;
void unsetSubscrCond();
/// <summary>
......@@ -102,8 +145,8 @@ public:
/// <summary>
///
/// </summary>
NFType getReqNfType() const;
void setReqNfType(NFType const& value);
std::string getReqNfType() const;
void setReqNfType(std::string const& value);
bool reqNfTypeIsSet() const;
void unsetReqNfType();
/// <summary>
......@@ -128,7 +171,8 @@ protected:
std::string m_ReqNfInstanceId;
bool m_ReqNfInstanceIdIsSet;
OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond m_SubscrCond;
//OneOfNfInstanceIdCondNfTypeCondServiceNameCondAmfCondGuamiListCondNetworkSliceCondNfGroupCond m_SubscrCond;
subscription_condition_t m_SubscrCond;
bool m_SubscrCondIsSet;
std::string m_SubscriptionId;
......@@ -140,7 +184,7 @@ protected:
bool m_PlmnIdIsSet;
NotifCondition m_NotifCondition;
bool m_NotifConditionIsSet;
NFType m_ReqNfType;
std::string m_ReqNfType;
bool m_ReqNfTypeIsSet;
std::string m_ReqNfFqdn;
bool m_ReqNfFqdnIsSet;
......
/**
* RNI API
* The ETSI MEC ISG MEC012 Radio Network Information API described using OpenAPI
*
* OpenAPI spec version: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "nrf-api-server.h"
#include "logger.hpp"
#include "pistache/endpoint.h"
#include "pistache/http.h"
#include "pistache/router.h"
#ifdef __linux__
#include <vector>
#include <signal.h>
#include <unistd.h>
#endif
#define PISTACHE_SERVER_MAX_PAYLOAD 32768
#ifdef __linux__
void sigHandler(int sig) {
switch (sig) {
case SIGINT:
case SIGQUIT:
case SIGTERM:
case SIGHUP:
default:
break;
}
exit(0);
}
void setUpUnixSignals(std::vector<int> quitSignals) {
sigset_t blocking_mask;
sigemptyset(&blocking_mask);
for (auto sig : quitSignals)
sigaddset(&blocking_mask, sig);
struct sigaction sa;
sa.sa_handler = sigHandler;
sa.sa_mask = blocking_mask;
sa.sa_flags = 0;
for (auto sig : quitSignals)
sigaction(sig, &sa, nullptr);
}
#endif
using namespace oai::nrf::api;
void NRFApiServer::init(size_t thr) {
auto opts = Pistache::Http::Endpoint::options().threads(thr);
opts.flags(Pistache::Tcp::Options::ReuseAddr);
opts.maxRequestSize(PISTACHE_SERVER_MAX_PAYLOAD);
m_httpEndpoint->init(opts);
m_completeStoredSearchDocumentApiImpl->init();
m_nfInstancesStoreApiImpl->init();
m_storedSearchDocumentApiImpl->init();
}
void NRFApiServer::start() {
Logger::nrf_sbi().info("HTTP1 server started");
m_httpEndpoint->setHandler(m_router->handler());
m_httpEndpoint->serve();
}
void NRFApiServer::shutdown() {
m_httpEndpoint->shutdown();
}
/**
* RNI API
* The ETSI MEC ISG MEC012 Radio Network Information API described using OpenAPI
*
* OpenAPI spec version: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef FILE_NRF_API_SERVER_SEEN
#define FILE_NRF_API_SERVER_SEEN
#include "pistache/endpoint.h"
#include "pistache/http.h"
#include "pistache/router.h"
#ifdef __linux__
#include <vector>
#include <signal.h>
#include <unistd.h>
#endif
#include "CompleteStoredSearchDocumentApiImpl.h"
#include "NFInstancesStoreApiImpl.h"
#include "StoredSearchDocumentApiImpl.h"
#include "nrf_app.hpp"
using namespace oai::nrf::api;
class NRFApiServer {
public:
NRFApiServer(Pistache::Address address, oai::nrf::nrf_app *nrf_app_inst)
:
m_httpEndpoint(std::make_shared<Pistache::Http::Endpoint>(address)) {
m_router = std::make_shared<Pistache::Rest::Router>();
m_address = address.host() + ":" + (address.port()).toString();
m_completeStoredSearchDocumentApiImpl = std::make_shared<
CompleteStoredSearchDocumentApiImpl>(m_router, nrf_app_inst, m_address);
m_nfInstancesStoreApiImpl = std::make_shared<NFInstancesStoreApiImpl>(
m_router, nrf_app_inst, m_address);
m_storedSearchDocumentApiImpl = std::make_shared<
StoredSearchDocumentApiImpl>(m_router, nrf_app_inst, m_address);
}
void init(size_t thr = 1);
void start();
void shutdown();
private:
std::shared_ptr<Pistache::Http::Endpoint> m_httpEndpoint;
std::shared_ptr<Pistache::Rest::Router> m_router;
std::shared_ptr<CompleteStoredSearchDocumentApiImpl> m_completeStoredSearchDocumentApiImpl;
std::shared_ptr<NFInstancesStoreApiImpl> m_nfInstancesStoreApiImpl;
std::shared_ptr<StoredSearchDocumentApiImpl> m_storedSearchDocumentApiImpl;
std::string m_address;
};
#endif
......@@ -20,9 +20,6 @@
################################################################################
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/msg)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nas)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ngap)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common/utils)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
include_directories(${SRC_TOP_DIR}/../build/ext/spdlog/include)
......
......@@ -59,15 +59,8 @@ void Logger::_init(const char *app, const bool log_stdout,
m_itti = new _Logger("itti ", m_sinks, ss.str().c_str());
m_smf_app = new _Logger("smf_app", m_sinks, ss.str().c_str());
m_system = new _Logger("system ", m_sinks, ss.str().c_str());
m_udp = new _Logger("udp ", m_sinks, ss.str().c_str());
m_pfcp = new _Logger("pfcp ", m_sinks, ss.str().c_str());
m_pfcp_switch = new _Logger("pfcp_sw ", m_sinks, ss.str().c_str());
m_smf_n1 = new _Logger("smf_n1 ", m_sinks, ss.str().c_str());
m_smf_n2 = new _Logger("smf_n2 ", m_sinks, ss.str().c_str());
m_smf_n4 = new _Logger("smf_n4 ", m_sinks, ss.str().c_str());
m_smf_n10 = new _Logger("smf_n10", m_sinks, ss.str().c_str());
m_smf_n11 = new _Logger("smf_n11", m_sinks, ss.str().c_str());
m_smf_api_server = new _Logger("sbi_srv", m_sinks, ss.str().c_str());
m_nrf_sbi = new _Logger("sbi_srv", m_sinks, ss.str().c_str());
}
////////////////////////////////////////////////////////////////////////////////
......
......@@ -98,33 +98,11 @@ class Logger {
static _Logger& system() {
return *singleton().m_system;
}
static _Logger& udp() {
return *singleton().m_udp;
}
static _Logger& pfcp() {
return *singleton().m_pfcp;
}
static _Logger& pfcp_switch() {
return *singleton().m_pfcp_switch;
}
static _Logger& smf_n1() {
return *singleton().m_smf_n1;
}
static _Logger& smf_n2() {
return *singleton().m_smf_n2;
}
static _Logger& smf_n4() {
return *singleton().m_smf_n4;
}
static _Logger& smf_n10() {
return *singleton().m_smf_n10;
}
static _Logger& smf_n11() {
return *singleton().m_smf_n11;
}
static _Logger& smf_api_server() {
return *singleton().m_smf_api_server;
static _Logger& nrf_sbi() {
return *singleton().m_nrf_sbi;
}
private:
......@@ -150,15 +128,8 @@ class Logger {
_Logger *m_itti;
_Logger *m_smf_app;
_Logger *m_system;
_Logger *m_udp;
_Logger *m_pfcp;
_Logger *m_pfcp_switch;
_Logger *m_smf_n1;
_Logger *m_smf_n2;
_Logger *m_smf_n4;
_Logger *m_smf_n10;
_Logger *m_smf_n11;
_Logger *m_smf_api_server;
_Logger *m_nrf_sbi;
};
#endif // __LOGGER_H
......@@ -43,8 +43,8 @@ bool util::get_iface_l2_addr(const std::string &iface, std::string &mac) {
char wb[32];
mac_address_in.get(wb, 32);
mac.assign(wb);
Logger::pfcp_switch().error("Found IFace %s MAC %s", iface.c_str(),
mac.c_str());
//Logger::pfcp_switch().error("Found IFace %s MAC %s", iface.c_str(),
// mac.c_str());
mac.erase(std::remove(mac.begin(), mac.end(), ':'), mac.end());
return true;
// ifr = {};
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file smf_app.cpp
\brief
\author Lionel GAUTHIER, Tien-Thinh NGUYEN
\company Eurecom
\date 2019
\email: lionel.gauthier@eurecom.fr, tien-thinh.nguyen@eurecom.fr
*/
#include "nrf_app.hpp"
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file smf_app.hpp
\brief
\author Lionel GAUTHIER, Tien-Thinh NGUYEN
\company Eurecom
\date 2019
\email: lionel.gauthier@eurecom.fr, tien-thinh.nguyen@eurecom.fr
*/
#ifndef FILE_NRF_APP_HPP_SEEN
#define FILE_NRF_APP_HPP_SEEN
namespace oai{
namespace nrf {
class nrf_app{
};
}
}
#include "nrf_config.hpp"
#endif /* FILE_SMF_APP_HPP_SEEN */
......@@ -49,7 +49,7 @@
using namespace std;
//using namespace libconfig;
using namespace nrf;
using namespace oai::nrf;
//extern smf_config smf_cfg;
......
......@@ -39,8 +39,10 @@
#include <vector>
//#include "thread_sched.hpp"
namespace oai{
namespace nrf {
namespace nrf {} // namespace nrf
} // namespace nrf
}
#endif /* FILE_NRF_CONFIG_HPP_SEEN */
......@@ -314,5 +314,5 @@ IF(STATIC_LINKING)
ENDIF(STATIC_LINKING)
target_link_libraries (nrf ${ASAN}
-Wl,--start-group NRF 3GPP_COMMON_TYPES CN_UTILS -lnettle ${NETTLE_LIBRARIES} ${CRYPTO_LIBRARIES} -lnghttp2_asio -lboost_system -lboost_thread -lssl -lcrypto gflags glog dl double-conversion folly -Wl,--end-group pthread m rt config++ event boost_system pistache curl)
-Wl,--start-group NRF 3GPP_COMMON_TYPES NRF_API CN_UTILS -lnettle ${NETTLE_LIBRARIES} ${CRYPTO_LIBRARIES} -lnghttp2_asio -lboost_system -lboost_thread -lssl -lcrypto gflags glog dl double-conversion folly -Wl,--end-group pthread m rt config++ event boost_system pistache curl)
\ No newline at end of file
......@@ -31,7 +31,9 @@
#include <stdlib.h> // srand
#include <unistd.h> // get_pid(), pause()
//using namespace smf;
#include "logger.hpp"
//using namespace nrf;
//using namespace util;
using namespace std;
//using namespace oai::smf_server::api;
......@@ -94,9 +96,9 @@ int main(int argc, char **argv)
}
// Logger
// Logger::init( "smf" , Options::getlogStdout() , Options::getlogRotFilelog());
Logger::init( "smf" , Options::getlogStdout() , Options::getlogRotFilelog());
// Logger::smf_app().startup( "Options parsed" );
Logger::smf_app().startup( "Options parsed" );
struct sigaction sigIntHandler;
sigIntHandler.sa_handler = my_app_signal_handler;
......
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