Commit 8b6feda9 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Re-organize code/move control logic to udr_app

parent 331708ed
################################################################################
# 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 build_helper
# brief
# author Laurent Thomas, Lionel GAUTHIER
#
#######################################
#SUPPORTED_DISTRO="Ubuntu 18.04, CentOS 7, RHEL 7"
SUPPORTED_DISTRO="Ubuntu 18.04,RHEL8"
if [ ! -f /etc/os-release ]; then
echo_fatal "No /etc/os-release file found. You're likely on an unsupported distro."
fi
OS_DISTRO=$(grep "^ID=" /etc/os-release | sed "s/ID=//" | sed "s/\"//g")
OS_RELEASE=$(grep "^VERSION_ID=" /etc/os-release | sed "s/VERSION_ID=//" | sed "s/\"//g")
case "$OS_DISTRO" in
fedora) OS_BASEDISTRO="fedora"; INSTALLER="dnf"; CMAKE="cmake3" ;;
rhel) OS_BASEDISTRO="fedora"; INSTALLER="yum"; CMAKE="cmake3" ;;
centos) OS_BASEDISTRO="fedora"; INSTALLER="yum"; CMAKE="cmake3" ;;
debian) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
ubuntu) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
esac
IS_CONTAINER=`egrep -c "docker|kubepods|podman|buildah|libpod" /proc/self/cgroup || true`
if [ $IS_CONTAINER -eq 0 ]
then
SUDO='sudo -S -E'
else
SUDO=''
fi
###############################
## echo and family
###############################
black='\E[30m'
red='\E[31m'
green='\E[32m'
yellow='\E[33m'
blue='\E[1;34m'
magenta='\E[35m'
cyan='\E[36m'
white='\E[37m'
reset_color='\E[00m'
COLORIZE=1
#-------------------------------------------------------------------------------
cecho() {
# Color-echo
# arg1 = message
# arg2 = color
local default_msg="No Message."
message=${1:-$default_msg}
color=${2:-$green}
[ "$COLORIZE" = "1" ] && message="$color$message$reset_color"
echo -e "$message"
return
}
echo_error() { cecho "$*" $red ;}
echo_fatal() { cecho "$*" $red; exit -1 ;}
echo_warning() { cecho "$*" $yellow ;}
echo_success() { cecho "$*" $green ;}
echo_info() { cecho "$*" $blue ;}
#-------------------------------------------------------------------------------
# From https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash
# arg1 is a dotted (or not) version number (ex 4.10.6.56-ubunutu)
# arg2 is a dotted (or not) version number (ex 4.10.6.56-ubunutu)
# return 0 if $1 lower or equal $2, else 1
version_le() {
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}
# From https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash
version_lt() {
[ "$1" = "$2" ] && return 1 || version_le $1 $2
}
# From https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash
version_ge() {
[ "$1" = "`echo -e "$1\n$2" | sort -V | tail -n1`" ]
}
# From https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash
version_gt() {
[ "$1" = "$2" ] && return 1 || version_ge $1 $2
}
########################
# distribution helpers #
########################
#-------------------------------------------------------------------------------
# This function return a string to identify the distribution we are running
# If we can't check the distribution, it returns "Unknown"
# This function return always true as exit code by design
# Examples:
# ubuntu18.04
# debian8.5
get_distribution_release() {
if [[ ! -z "$OS_DISTRO$OS_RELEASE" ]]; then
echo -n "$OS_DISTRO$OS_RELEASE"
else
echo -n Unknown
fi
}
check_supported_distribution() {
local distribution=$(get_distribution_release)
case "$distribution" in
"ubuntu18.04") return 0 ;;
"ubuntu20.04") return 0 ;;
"rhel8") return 0 ;;
"rhel8.2") return 0 ;;
"rhel8.3") return 0 ;;
"rhel8.4") return 0 ;;
#"centos7") return 0 ;;
esac
return 1
}
###########################
# Cleaners
###########################
#-------------------------------------------------------------------------------
clean_kernel() {
$SUDO modprobe ip_tables
$SUDO modprobe x_tables
$SUDO iptables -P INPUT ACCEPT
$SUDO iptables -F INPUT
$SUDO iptables -P OUTPUT ACCEPT
$SUDO iptables -F OUTPUT
$SUDO iptables -P FORWARD ACCEPT
$SUDO iptables -F FORWARD
$SUDO iptables -t nat -F
$SUDO iptables -t mangle -F
$SUDO iptables -t filter -F
$SUDO iptables -t raw -F
echo_info "Flushed iptables"
}
#-------------------------------------------------------------------------------
disable_ipv6() {
$SUDO sysctl -w net.ipv6.conf.all.disable_ipv6=1
}
#-------------------------------------------------------------------------------
# Compare two versions of software. Returns true if $version is greater than $req_version
# arg1 = version
# arg2 = req_version
#
function version_gt() {
test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1";
}
###################################
# Compilers
###################################
# From https://stackoverflow.com/a/20473191
# test if a list include item
# arg1 is list, ex "item1 item2 ..."
# arg2 is item
function list_include_item {
local list="$1"
local item="$2"
if [[ $list =~ (^|[[:space:]])"$item"($|[[:space:]]) ]] ; then
# yes, list include item
result=0
else
result=1
fi
return $result
}
# arg 1 Build directory OPENAIR_DIR/build/?/build
# arg 2 Executable target name
# arg 3 Executable name (no path)
# arg 4 Verbose (1 or 0)
compilations() {
echo_info "Compilation log for $3 is here: $dlog/$2.txt"
cd $OPENAIRCN_DIR/build/$1/build
if [ "a$4" == "a1" ]; then
set -o pipefail
{
rm -f $3
make $make_args $2
} | tee $dlog/$2.txt
else
{
rm -f $3
make $make_args $2
} > $dlog/$2.txt 2>&1
fi
if [ $? == 0 -a -s $3 ] ; then
echo_success "$2 compiled"
return 0
else
echo_error "$2 compilation failed"
return 1
fi
}
###################################
# make test
###################################
# arg 1 Build directory OPENAIRCN_DIR/build/?/build
# arg 2 Executable target name
# arg 3 Executable name (no path)
# arg 4 Verbose (1 or 0)
make_test() {
echo_success "unit tests start"
cd $OPENAIRCN_DIR/build/$1/build
if [ "a$4" == "a1" ]; then
{
make test ARGS="-V"
} | tee $dlog/$2_test.txt
else
{
make test
} > $dlog/$2_test.txt 2>&1
fi
echo_success "unit tests end"
}
#-------------------------------------------------------------------------------
# arg1 is package name
test_install_package() {
# usage: test_install_package package_name
if [ $# -eq 1 ]; then
dpkg -s "$1" > /dev/null 2>&1 && {
echo "$1 is installed."
} || {
echo "$1 is not installed."
$SUDO apt-get install --force-yes $1
}
fi
}
#-------------------------------------------------------------------------------
update_package_db() {
if [ ! -f /tmp/no_more_update_package_db ]; then
$SUDO $INSTALLER update
[[ $? -ne 0 ]] && return $?
touch /tmp/no_more_update_package_db
[[ $? -ne 0 ]] && return $?
else
let elapsed_time=$(expr `date +%s` - `stat -c %Y /tmp/no_more_update_package_db`)
if [ $elapsed_time -gt 3600 ]; then
$SUDO $INSTALLER update
[[ $? -ne 0 ]] && return $?
touch /tmp/no_more_update_package_db
[[ $? -ne 0 ]] && return $?
fi
fi
return 0
}
#-------------------------------------------------------------------------------
check_enable_epel_repos() {
# on Enterprise Linuxes, ensure EPEL repos are installed
# (provides: libidn2-devel, vconfig, iperf, phpMyAdmin, dkms, ...)
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
if rpm -q epel-release > /dev/null; then
echo "EPEL repos already present. Good."
else
echo "EPEL repos not present. Installing them."
$SUDO $INSTALLER install $OPTION https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
fi
fi
}
################################
# set_openair_env
###############################
#-------------------------------------------------------------------------------
set_openair_env(){
fullpath=`readlink -f $BASH_SOURCE`
[ -f "/.$fullpath" ] || fullpath=`readlink -f $PWD/$fullpath`
openair_path=${fullpath%/build/*}
openair_path=${openair_path%/scripts/*}
openair_path=${openair_path%/src/nas/*}
openair_path=${openair_path%/src/s6a/*}
export OPENAIRCN_DIR=$openair_path
}
################################################################################
# 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 build_helper.libconfig
# brief
# author Lionel GAUTHIER
#
#######################################
SCRIPT=$(readlink -f ${BASH_SOURCE})
THIS_SCRIPT_PATH=`dirname $SCRIPT`
source $THIS_SCRIPT_PATH/build_helper
#-------------------------------------------------------------------------------
# Motivation: seems libconfig++ need to be compiled with same application C++ compiler,
# otherwise you encounter strange linker errors. (ubuntu 16.04)
#arg1 is force (0 or 1) (no interactive script)
#arg2 is debug (0 or 1) (install debug libraries)
install_libconfig_from_source(){
if [ $1 -eq 0 ]; then
OPTION=""
read -p "Do you want to install libconfig (github)? <y/N> " prompt
else
prompt='y'
OPTION="-y"
fi
if [ $2 -eq 0 ]; then
debug=0
else
debug=1
fi
if [[ $prompt =~ [yY](es)* ]]
then
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
PACKAGE_LIST="\
autoconf \
automake \
bison \
build-essential \
flex \
gcc \
libtool"
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
PACKAGE_LIST="\
autoconf \
automake \
bison \
patch \
flex \
gcc \
libtool \
textinfo"
else
echo_fatal "$OS_DISTRO is not a supported distribution."
fi
$SUDO $INSTALLER install $OPTION $PACKAGE_LIST
pushd /tmp
$SUDO rm -rf /tmp/libconfig
git clone https://github.com/hyperrealm/libconfig.git
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
cd libconfig
autoreconf -fi
./configure
ret=$?;[[ $ret -ne 0 ]] && return $ret
make -j `nproc` > /tmp/log_compile_config 2>&1
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
$SUDO make install
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd
fi
return 0
}
This diff is collapsed.
#!/bin/bash
################################################################################
# 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 build_udr
# brief
# author Lionel Gauthier
# company Eurecom
# email: lionel.gauthier@eurecom.fr
#
set -o pipefail
INSTALL_DIR=/usr/local/bin
################################
# include helper functions
################################
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
source $THIS_SCRIPT_PATH/build_helper.udr
function help()
{
echo_error " "
echo_error "Usage: build_udr [OPTION]..."
echo_error "Build the UDR executable."
echo_error " "
echo_error "Options:"
echo_error "Mandatory arguments to long options are mandatory for short options too."
echo_error " -b, --build-type Build type as defined in cmake, allowed values are: Debug Release RelWithDebInfo MinSizeRel"
echo_error " -c, --clean Clean the build generated files: config, object, executable files (build from scratch)"
echo_error " -f, --force No interactive script for installation of software packages."
echo_error " -h, --help Print this help."
echo_error " -I, --install-deps Check installed software necessary to build and run UDR (support $SUPPORTED_DISTRO)."
echo_error " -i, --install-min-deps Check installed software necessary to run a statically linked UDR (support $SUPPORTED_DISTRO)."
echo_error " -j, --jobs Multiple jobs for compiling."
echo_error " -v, --verbose Build process verbose."
echo_error " -V, --Verbose CMake only build process verbose, display compilation warnings and errors."
echo_error " "
}
function main()
{
local -i clean=0
local -i force=0
local -i debug=0
local -i verbose=0
local -i var_check_install_min_deps=0
local -i var_check_install_deps=0
local cmake_args=" "
export make_args=" "
until [ -z "$1" ]
do
case "$1" in
-a | --auto-test)
cmake_args="$cmake_args -DSGW_AUTOTEST=1"
shift;
;;
-b | --build-type)
list_include_item "Debug Release RelWithDebInfo MinSizeRel" $2
[[ $? -ne 0 ]] && echo_error "Build type $2 not recognized" && return $?
cmake_args="$cmake_args -DCMAKE_BUILD_TYPE=$2"
list_include_item "Debug" $2
[[ $? -ne 0 ]] && debug=1
shift 2;
;;
-c | --clean)
clean=1
echo "Clean the build generated files (build from scratch)"
shift;
;;
-f | --force)
force=1
echo "Force set (no interactive)"
shift;
;;
-h | --help)
help
shift;
return 0
;;
-I | --install-deps)
echo "Check installed software necessary to build and run UDR (support $SUPPORTED_DISTRO):"
set_openair_env
var_check_install_deps=1
shift;
;;
-i | --install-min-deps)
echo "Check installed software necessary to run UDR (support $SUPPORTED_DISTRO):"
set_openair_env
var_check_install_min_deps=1
shift;
;;
-j | --jobs)
make_args="$make_args -j`nproc`"
shift;
;;
-v | --verbose)
echo "Make build process verbose"
cmake_args="$cmake_args -DCMAKE_VERBOSE_MAKEFILE=ON"
make_args="VERBOSE=1 $make_args"
verbose=1
shift;
;;
-V | --Verbose)
echo "CMake build process verbose"
verbose=1
shift;
;;
*)
echo "Unknown option $1"
help
return 1
;;
esac
done
if [ ! -d /usr/local/etc/oai ]; then
$SUDO mkdir -m 777 -p /usr/local/etc/oai
fi
set_openair_env
local dlog=$OPENAIRCN_DIR/build/log
local dext=$OPENAIRCN_DIR/build/ext
mkdir -m 777 -p $dlog
mkdir -m 777 -p $dext
if [ $var_check_install_min_deps -gt 0 ];then
disable_ipv6
check_install_udr_min_deps $force $debug
if [[ $? -ne 0 ]]; then
echo_error "Error: UDR minimal deps installation failed"
return 1
else
echo_success "UDR minimal deps installation successful"
echo_warning "UDR not compiled, to compile it, re-run build_udr without -i option"
return 0
fi
fi
if [ $var_check_install_deps -gt 0 ];then
disable_ipv6
check_install_udr_deps $force $debug
if [[ $? -ne 0 ]]; then
echo_error "Error: UDR deps installation failed"
return 1
else
echo_success "UDR deps installation successful"
echo_warning "UDR not compiled, to compile it, re-run build_udr without -I option"
return 0
fi
fi
cmake_args="$cmake_args -DBUILD_SHARED_LIBS=OFF"
##############################################################################
# Clean
##############################################################################
cd $OPENAIRCN_DIR/build/udr
if [ $clean -ne 0 ]; then
if [[ $verbose -eq 1 ]]; then
echo "Cleaning UDR: generated configuration files, obj files, executable"
fi
rm -Rf $OPENAIRCN_DIR/build/udr/build 2>&1
mkdir -m 777 -p -v build
fi
##############################################################################
# Compile UDR
##############################################################################
cd $OPENAIRCN_DIR/build/udr
if [ ! -d ./build ]; then
mkdir -m 777 -p -v build
fi
cd ./build
$CMAKE $cmake_args .. > /dev/null
ret=$?;[[ $ret -ne 0 ]] && return $ret
compilations udr udr $OPENAIRCN_DIR/build/udr/build/udr $verbose
ret=$?;[[ $ret -ne 0 ]] && return $ret
# For daemon should not be group writable
$SUDO chmod 755 $OPENAIRCN_DIR/build/udr/build/udr
$SUDO cp -upv $OPENAIRCN_DIR/build/udr/build/udr $INSTALL_DIR && $SUDO chmod 755 $INSTALL_DIR/udr && echo_success "udr installed"
return 0
}
main "$@"
################################################################################
# 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(UDR_API_SERVER_DIR "${SRC_TOP_DIR}/api_server")
include_directories(${UDR_API_SERVER_DIR}/api)
include_directories(${UDR_API_SERVER_DIR}/impl)
include_directories(${UDR_API_SERVER_DIR}/model)
include_directories(${UDR_API_SERVER_DIR}/)
include_directories(${SRC_TOP_DIR}/udr_app)
include_directories(${SRC_TOP_DIR}/common)
include_directories(${SRC_TOP_DIR}/../build/ext/spdlog/include)
file(GLOB UDR_API_SERVER_src_files
${UDR_API_SERVER_DIR}/udr-api-server.cpp
${UDR_API_SERVER_DIR}/model/*.cpp
${UDR_API_SERVER_DIR}/api/*.cpp
${UDR_API_SERVER_DIR}/impl/*.cpp
)
add_library(UDR_API STATIC
${UDR_API_SERVER_src_files})
...@@ -14,14 +14,22 @@ ...@@ -14,14 +14,22 @@
#include "AMF3GPPAccessRegistrationDocumentApiImpl.h" #include "AMF3GPPAccessRegistrationDocumentApiImpl.h"
#include "logger.hpp" #include "logger.hpp"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
AMF3GPPAccessRegistrationDocumentApiImpl:: AMF3GPPAccessRegistrationDocumentApiImpl::
AMF3GPPAccessRegistrationDocumentApiImpl( AMF3GPPAccessRegistrationDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, MYSQL *mysql) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: AMF3GPPAccessRegistrationDocumentApi(rtr) { std::string address, MYSQL *mysql)
: AMF3GPPAccessRegistrationDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {
mysql_WitcommUDRDB = mysql; mysql_WitcommUDRDB = mysql;
} }
...@@ -29,7 +37,6 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::amf_context3gpp( ...@@ -29,7 +37,6 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::amf_context3gpp(
const std::string &ueId, const std::vector<PatchItem> &patchItem, const std::string &ueId, const std::vector<PatchItem> &patchItem,
const Pistache::Optional<std::string> &supportedFeatures, const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response) { Pistache::Http::ResponseWriter &response) {
/************************ test ************************/ /************************ test ************************/
nlohmann::json j, j1; nlohmann::json j, j1;
for (int i = 0; i < patchItem.size(); i++) { for (int i = 0; i < patchItem.size(); i++) {
...@@ -413,4 +420,4 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp( ...@@ -413,4 +420,4 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(
mysql_free_result(res); mysql_free_result(res);
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* AMF3GPPAccessRegistrationDocumentApiImpl.h * AMF3GPPAccessRegistrationDocumentApiImpl.h
* *
* *
*/ */
#ifndef AMF3_GPP_ACCESS_REGISTRATION_DOCUMENT_API_IMPL_H_ #ifndef AMF3_GPP_ACCESS_REGISTRATION_DOCUMENT_API_IMPL_H_
#define AMF3_GPP_ACCESS_REGISTRATION_DOCUMENT_API_IMPL_H_ #define AMF3_GPP_ACCESS_REGISTRATION_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,37 +29,51 @@ ...@@ -29,37 +29,51 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include <string>
#include <vector>
#include "Amf3GppAccessRegistration.h" #include "Amf3GppAccessRegistration.h"
#include "PatchItem.h" #include "PatchItem.h"
#include "PatchResult.h" #include "PatchResult.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string>
#include <vector>
#include <mysql/mysql.h> #include <mysql/mysql.h>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class AMF3GPPAccessRegistrationDocumentApiImpl : public oai::udr::api::AMF3GPPAccessRegistrationDocumentApi {
public: class AMF3GPPAccessRegistrationDocumentApiImpl
AMF3GPPAccessRegistrationDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>, MYSQL *mysql); : public oai::udr::api::AMF3GPPAccessRegistrationDocumentApi {
~AMF3GPPAccessRegistrationDocumentApiImpl() {} private:
udr_app *m_udr_app;
void amf_context3gpp(const std::string &ueId, const std::vector<PatchItem> &patchItem, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); std::string m_address;
void create_amf_context3gpp(const std::string &ueId, Amf3GppAccessRegistration &amf3GppAccessRegistration, Pistache::Http::ResponseWriter &response);
void query_amf_context3gpp(const std::string &ueId, const Pistache::Optional<std::vector<std::string>> &fields, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); public:
AMF3GPPAccessRegistrationDocumentApiImpl(
private: std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
MYSQL *mysql_WitcommUDRDB; std::string address, MYSQL *mysql);
~AMF3GPPAccessRegistrationDocumentApiImpl() {}
void amf_context3gpp(const std::string &ueId,
const std::vector<PatchItem> &patchItem,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
void create_amf_context3gpp(
const std::string &ueId,
Amf3GppAccessRegistration &amf3GppAccessRegistration,
Pistache::Http::ResponseWriter &response);
void query_amf_context3gpp(
const std::string &ueId,
const Pistache::Optional<std::vector<std::string>> &fields,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
private:
MYSQL *mysql_WitcommUDRDB;
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,14 +13,22 @@ ...@@ -13,14 +13,22 @@
#include "AMFNon3GPPAccessRegistrationDocumentApiImpl.h" #include "AMFNon3GPPAccessRegistrationDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
AMFNon3GPPAccessRegistrationDocumentApiImpl:: AMFNon3GPPAccessRegistrationDocumentApiImpl::
AMFNon3GPPAccessRegistrationDocumentApiImpl( AMFNon3GPPAccessRegistrationDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: AMFNon3GPPAccessRegistrationDocumentApi(rtr) {} std::string address)
: AMFNon3GPPAccessRegistrationDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void AMFNon3GPPAccessRegistrationDocumentApiImpl::amf_context_non3gpp( void AMFNon3GPPAccessRegistrationDocumentApiImpl::amf_context_non3gpp(
const std::string &ueId, const std::vector<PatchItem> &patchItem, const std::string &ueId, const std::vector<PatchItem> &patchItem,
...@@ -42,4 +50,4 @@ void AMFNon3GPPAccessRegistrationDocumentApiImpl::query_amf_context_non3gpp( ...@@ -42,4 +50,4 @@ void AMFNon3GPPAccessRegistrationDocumentApiImpl::query_amf_context_non3gpp(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* AMFNon3GPPAccessRegistrationDocumentApiImpl.h * AMFNon3GPPAccessRegistrationDocumentApiImpl.h
* *
* *
*/ */
#ifndef AMF_NON3_GPP_ACCESS_REGISTRATION_DOCUMENT_API_IMPL_H_ #ifndef AMF_NON3_GPP_ACCESS_REGISTRATION_DOCUMENT_API_IMPL_H_
#define AMF_NON3_GPP_ACCESS_REGISTRATION_DOCUMENT_API_IMPL_H_ #define AMF_NON3_GPP_ACCESS_REGISTRATION_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,34 +29,47 @@ ...@@ -29,34 +29,47 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include <string>
#include <vector>
#include "Amf3GppAccessRegistration.h" #include "Amf3GppAccessRegistration.h"
#include "AmfNon3GppAccessRegistration.h" #include "AmfNon3GppAccessRegistration.h"
#include "PatchItem.h" #include "PatchItem.h"
#include "PatchResult.h" #include "PatchResult.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string>
#include <vector>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class AMFNon3GPPAccessRegistrationDocumentApiImpl : public oai::udr::api::AMFNon3GPPAccessRegistrationDocumentApi {
public: class AMFNon3GPPAccessRegistrationDocumentApiImpl
AMFNon3GPPAccessRegistrationDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::AMFNon3GPPAccessRegistrationDocumentApi {
~AMFNon3GPPAccessRegistrationDocumentApiImpl() {} private:
udr_app *m_udr_app;
void amf_context_non3gpp(const std::string &ueId, const std::vector<PatchItem> &patchItem, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); std::string m_address;
void create_amf_context_non3gpp(const std::string &ueId, const AmfNon3GppAccessRegistration &amfNon3GppAccessRegistration, Pistache::Http::ResponseWriter &response);
void query_amf_context_non3gpp(const std::string &ueId, const Pistache::Optional<std::vector<std::string>> &fields, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); public:
AMFNon3GPPAccessRegistrationDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
std::string address);
~AMFNon3GPPAccessRegistrationDocumentApiImpl() {}
void amf_context_non3gpp(
const std::string &ueId, const std::vector<PatchItem> &patchItem,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
void create_amf_context_non3gpp(
const std::string &ueId,
const AmfNon3GppAccessRegistration &amfNon3GppAccessRegistration,
Pistache::Http::ResponseWriter &response);
void query_amf_context_non3gpp(
const std::string &ueId,
const Pistache::Optional<std::vector<std::string>> &fields,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,21 @@ ...@@ -13,13 +13,21 @@
#include "AccessAndMobilityDataApiImpl.h" #include "AccessAndMobilityDataApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
AccessAndMobilityDataApiImpl::AccessAndMobilityDataApiImpl( AccessAndMobilityDataApiImpl::AccessAndMobilityDataApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: AccessAndMobilityDataApi(rtr) {} std::string address)
: AccessAndMobilityDataApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void AccessAndMobilityDataApiImpl::create_or_replace_access_and_mobility_data( void AccessAndMobilityDataApiImpl::create_or_replace_access_and_mobility_data(
const std::string &ueId, const AccessAndMobilityData &accessAndMobilityData, const std::string &ueId, const AccessAndMobilityData &accessAndMobilityData,
...@@ -41,4 +49,4 @@ void AccessAndMobilityDataApiImpl::update_access_and_mobility_data( ...@@ -41,4 +49,4 @@ void AccessAndMobilityDataApiImpl::update_access_and_mobility_data(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* AccessAndMobilityDataApiImpl.h * AccessAndMobilityDataApiImpl.h
* *
* *
*/ */
#ifndef ACCESS_AND_MOBILITY_DATA_API_IMPL_H_ #ifndef ACCESS_AND_MOBILITY_DATA_API_IMPL_H_
#define ACCESS_AND_MOBILITY_DATA_API_IMPL_H_ #define ACCESS_AND_MOBILITY_DATA_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,31 +29,42 @@ ...@@ -29,31 +29,42 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include <string>
#include "AccessAndMobilityData.h" #include "AccessAndMobilityData.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class AccessAndMobilityDataApiImpl : public oai::udr::api::AccessAndMobilityDataApi {
public: class AccessAndMobilityDataApiImpl
AccessAndMobilityDataApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::AccessAndMobilityDataApi {
~AccessAndMobilityDataApiImpl() {} private:
udr_app *m_udr_app;
void create_or_replace_access_and_mobility_data(const std::string &ueId, const AccessAndMobilityData &accessAndMobilityData, Pistache::Http::ResponseWriter &response); std::string m_address;
void delete_access_and_mobility_data(const std::string &ueId, Pistache::Http::ResponseWriter &response);
void query_access_and_mobility_data(const std::string &ueId, const Pistache::Optional<std::string> &suppFeat, Pistache::Http::ResponseWriter &response); public:
void update_access_and_mobility_data(const std::string &ueId, const AccessAndMobilityData &accessAndMobilityData, Pistache::Http::ResponseWriter &response); AccessAndMobilityDataApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst, std::string address);
~AccessAndMobilityDataApiImpl() {}
void create_or_replace_access_and_mobility_data(
const std::string &ueId,
const AccessAndMobilityData &accessAndMobilityData,
Pistache::Http::ResponseWriter &response);
void delete_access_and_mobility_data(
const std::string &ueId, Pistache::Http::ResponseWriter &response);
void query_access_and_mobility_data(
const std::string &ueId, const Pistache::Optional<std::string> &suppFeat,
Pistache::Http::ResponseWriter &response);
void update_access_and_mobility_data(
const std::string &ueId,
const AccessAndMobilityData &accessAndMobilityData,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,14 +13,22 @@ ...@@ -13,14 +13,22 @@
#include "AccessAndMobilityPolicyDataDocumentApiImpl.h" #include "AccessAndMobilityPolicyDataDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
AccessAndMobilityPolicyDataDocumentApiImpl:: AccessAndMobilityPolicyDataDocumentApiImpl::
AccessAndMobilityPolicyDataDocumentApiImpl( AccessAndMobilityPolicyDataDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: AccessAndMobilityPolicyDataDocumentApi(rtr) {} std::string address)
: AccessAndMobilityPolicyDataDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void AccessAndMobilityPolicyDataDocumentApiImpl:: void AccessAndMobilityPolicyDataDocumentApiImpl::
read_access_and_mobility_policy_data( read_access_and_mobility_policy_data(
...@@ -28,4 +36,4 @@ void AccessAndMobilityPolicyDataDocumentApiImpl:: ...@@ -28,4 +36,4 @@ void AccessAndMobilityPolicyDataDocumentApiImpl::
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* AccessAndMobilityPolicyDataDocumentApiImpl.h * AccessAndMobilityPolicyDataDocumentApiImpl.h
* *
* *
*/ */
#ifndef ACCESS_AND_MOBILITY_POLICY_DATA_DOCUMENT_API_IMPL_H_ #ifndef ACCESS_AND_MOBILITY_POLICY_DATA_DOCUMENT_API_IMPL_H_
#define ACCESS_AND_MOBILITY_POLICY_DATA_DOCUMENT_API_IMPL_H_ #define ACCESS_AND_MOBILITY_POLICY_DATA_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,28 +29,32 @@ ...@@ -29,28 +29,32 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include <string>
#include "AmPolicyData.h" #include "AmPolicyData.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class AccessAndMobilityPolicyDataDocumentApiImpl : public oai::udr::api::AccessAndMobilityPolicyDataDocumentApi {
public: class AccessAndMobilityPolicyDataDocumentApiImpl
AccessAndMobilityPolicyDataDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::AccessAndMobilityPolicyDataDocumentApi {
~AccessAndMobilityPolicyDataDocumentApiImpl() {} private:
udr_app* m_udr_app;
void read_access_and_mobility_policy_data(const std::string &ueId, Pistache::Http::ResponseWriter &response); std::string m_address;
public:
AccessAndMobilityPolicyDataDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router>, udr_app* udr_app_inst,
std::string address);
~AccessAndMobilityPolicyDataDocumentApiImpl() {}
void read_access_and_mobility_policy_data(
const std::string& ueId, Pistache::Http::ResponseWriter& response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -12,16 +12,24 @@ ...@@ -12,16 +12,24 @@
*/ */
#include "AccessAndMobilitySubscriptionDataDocumentApiImpl.h" #include "AccessAndMobilitySubscriptionDataDocumentApiImpl.h"
#include "logger.hpp" #include <nlohmann/json.hpp>
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
AccessAndMobilitySubscriptionDataDocumentApiImpl:: AccessAndMobilitySubscriptionDataDocumentApiImpl::
AccessAndMobilitySubscriptionDataDocumentApiImpl( AccessAndMobilitySubscriptionDataDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, MYSQL *mysql) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: AccessAndMobilitySubscriptionDataDocumentApi(rtr) { std::string address, MYSQL *mysql)
: AccessAndMobilitySubscriptionDataDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {
mysql_WitcommUDRDB = mysql; mysql_WitcommUDRDB = mysql;
} }
...@@ -32,6 +40,14 @@ void AccessAndMobilitySubscriptionDataDocumentApiImpl::query_am_data( ...@@ -32,6 +40,14 @@ void AccessAndMobilitySubscriptionDataDocumentApiImpl::query_am_data(
const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch, const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch,
const Pistache::Optional<Pistache::Http::Header::Raw> &ifModifiedSince, const Pistache::Optional<Pistache::Http::Header::Raw> &ifModifiedSince,
Pistache::Http::ResponseWriter &response) { Pistache::Http::ResponseWriter &response) {
nlohmann::json response_data = {};
Pistache::Http::Code code = {};
m_udr_app->handle_access_mobility_subscription_data_document(
ueId, servingPlmnId, response_data, code);
Logger::udr_server().debug("HTTP reponse code %d.\n", code);
response.send(code, response_data.dump());
MYSQL_RES *res = NULL; MYSQL_RES *res = NULL;
MYSQL_ROW row; MYSQL_ROW row;
MYSQL_FIELD *field = nullptr; MYSQL_FIELD *field = nullptr;
...@@ -40,8 +56,8 @@ void AccessAndMobilitySubscriptionDataDocumentApiImpl::query_am_data( ...@@ -40,8 +56,8 @@ void AccessAndMobilitySubscriptionDataDocumentApiImpl::query_am_data(
AccessAndMobilitySubscriptionData accessandmobilitysubscriptiondata; AccessAndMobilitySubscriptionData accessandmobilitysubscriptiondata;
const std::string query = const std::string query =
"select * from AccessAndMobilitySubscriptionData WHERE ueid='" + "select * from AccessAndMobilitySubscriptionData WHERE ueid='" + ueId +
ueId + "' and servingPlmnid='" + servingPlmnId + "'"; "' and servingPlmnid='" + servingPlmnId + "'";
if (mysql_real_query(mysql_WitcommUDRDB, query.c_str(), if (mysql_real_query(mysql_WitcommUDRDB, query.c_str(),
(unsigned long)query.size())) { (unsigned long)query.size())) {
...@@ -296,4 +312,4 @@ void AccessAndMobilitySubscriptionDataDocumentApiImpl::query_am_data( ...@@ -296,4 +312,4 @@ void AccessAndMobilitySubscriptionDataDocumentApiImpl::query_am_data(
mysql_free_result(res); mysql_free_result(res);
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* AccessAndMobilitySubscriptionDataDocumentApiImpl.h * AccessAndMobilitySubscriptionDataDocumentApiImpl.h
* *
* *
*/ */
#ifndef ACCESS_AND_MOBILITY_SUBSCRIPTION_DATA_DOCUMENT_API_IMPL_H_ #ifndef ACCESS_AND_MOBILITY_SUBSCRIPTION_DATA_DOCUMENT_API_IMPL_H_
#define ACCESS_AND_MOBILITY_SUBSCRIPTION_DATA_DOCUMENT_API_IMPL_H_ #define ACCESS_AND_MOBILITY_SUBSCRIPTION_DATA_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,32 +29,41 @@ ...@@ -29,32 +29,41 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "AccessAndMobilitySubscriptionData.h"
#include <string> #include <string>
#include "AccessAndMobilitySubscriptionData.h"
#include <mysql/mysql.h> #include <mysql/mysql.h>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class AccessAndMobilitySubscriptionDataDocumentApiImpl : public oai::udr::api::AccessAndMobilitySubscriptionDataDocumentApi {
public: class AccessAndMobilitySubscriptionDataDocumentApiImpl
AccessAndMobilitySubscriptionDataDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,MYSQL *mysql); : public oai::udr::api::AccessAndMobilitySubscriptionDataDocumentApi {
~AccessAndMobilitySubscriptionDataDocumentApiImpl() {} private:
udr_app *m_udr_app;
void query_am_data(const std::string &ueId, const std::string &servingPlmnId, const Pistache::Optional<std::vector<std::string>> &fields, const Pistache::Optional<std::string> &supportedFeatures, const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch, const Pistache::Optional<Pistache::Http::Header::Raw> &ifModifiedSince, Pistache::Http::ResponseWriter &response); std::string m_address;
private: public:
MYSQL *mysql_WitcommUDRDB; AccessAndMobilitySubscriptionDataDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
std::string address, MYSQL *mysql);
~AccessAndMobilitySubscriptionDataDocumentApiImpl() {}
void query_am_data(
const std::string &ueId, const std::string &servingPlmnId,
const Pistache::Optional<std::vector<std::string>> &fields,
const Pistache::Optional<std::string> &supportedFeatures,
const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch,
const Pistache::Optional<Pistache::Http::Header::Raw> &ifModifiedSince,
Pistache::Http::ResponseWriter &response);
private:
MYSQL *mysql_WitcommUDRDB;
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,21 @@ ...@@ -13,13 +13,21 @@
#include "AmfSubscriptionInfoDocumentApiImpl.h" #include "AmfSubscriptionInfoDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
AmfSubscriptionInfoDocumentApiImpl::AmfSubscriptionInfoDocumentApiImpl( AmfSubscriptionInfoDocumentApiImpl::AmfSubscriptionInfoDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: AmfSubscriptionInfoDocumentApi(rtr) {} std::string address)
: AmfSubscriptionInfoDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void AmfSubscriptionInfoDocumentApiImpl::modify_amf_subscription_info( void AmfSubscriptionInfoDocumentApiImpl::modify_amf_subscription_info(
const std::string &ueId, const std::string &subsId, const std::string &ueId, const std::string &subsId,
...@@ -29,4 +37,4 @@ void AmfSubscriptionInfoDocumentApiImpl::modify_amf_subscription_info( ...@@ -29,4 +37,4 @@ void AmfSubscriptionInfoDocumentApiImpl::modify_amf_subscription_info(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* AmfSubscriptionInfoDocumentApiImpl.h * AmfSubscriptionInfoDocumentApiImpl.h
* *
* *
*/ */
#ifndef _AMF_SUBSCRIPTION_INFO_DOCUMENT_API_IMPL_H_ #ifndef _AMF_SUBSCRIPTION_INFO_DOCUMENT_API_IMPL_H_
#define _AMF_SUBSCRIPTION_INFO_DOCUMENT_API_IMPL_H_ #define _AMF_SUBSCRIPTION_INFO_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,30 +29,37 @@ ...@@ -29,30 +29,37 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include <string>
#include <vector>
#include "PatchItem.h" #include "PatchItem.h"
#include "PatchResult.h" #include "PatchResult.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string>
#include <vector>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class AmfSubscriptionInfoDocumentApiImpl : public oai::udr::api::AmfSubscriptionInfoDocumentApi {
public: class AmfSubscriptionInfoDocumentApiImpl
AmfSubscriptionInfoDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::AmfSubscriptionInfoDocumentApi {
~AmfSubscriptionInfoDocumentApiImpl() {} private:
udr_app *m_udr_app;
void modify_amf_subscription_info(const std::string &ueId, const std::string &subsId, const std::vector<PatchItem> &patchItem, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); std::string m_address;
public:
AmfSubscriptionInfoDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst,
std::string address);
~AmfSubscriptionInfoDocumentApiImpl() {}
void modify_amf_subscription_info(
const std::string &ueId, const std::string &subsId,
const std::vector<PatchItem> &patchItem,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,14 +13,22 @@ ...@@ -13,14 +13,22 @@
#include "ApplicationDataSubscriptionsCollectionApiImpl.h" #include "ApplicationDataSubscriptionsCollectionApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
ApplicationDataSubscriptionsCollectionApiImpl:: ApplicationDataSubscriptionsCollectionApiImpl::
ApplicationDataSubscriptionsCollectionApiImpl( ApplicationDataSubscriptionsCollectionApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: ApplicationDataSubscriptionsCollectionApi(rtr) {} std::string address)
: ApplicationDataSubscriptionsCollectionApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void ApplicationDataSubscriptionsCollectionApiImpl:: void ApplicationDataSubscriptionsCollectionApiImpl::
create_individual_application_data_subscription( create_individual_application_data_subscription(
...@@ -35,4 +43,4 @@ void ApplicationDataSubscriptionsCollectionApiImpl:: ...@@ -35,4 +43,4 @@ void ApplicationDataSubscriptionsCollectionApiImpl::
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* ApplicationDataSubscriptionsCollectionApiImpl.h * ApplicationDataSubscriptionsCollectionApiImpl.h
* *
* *
*/ */
#ifndef APPLICATION_DATA_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_ #ifndef APPLICATION_DATA_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_
#define APPLICATION_DATA_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_ #define APPLICATION_DATA_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -33,25 +33,32 @@ ...@@ -33,25 +33,32 @@
#include "DataFilter.h" #include "DataFilter.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class ApplicationDataSubscriptionsCollectionApiImpl : public oai::udr::api::ApplicationDataSubscriptionsCollectionApi {
public: class ApplicationDataSubscriptionsCollectionApiImpl
ApplicationDataSubscriptionsCollectionApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::ApplicationDataSubscriptionsCollectionApi {
~ApplicationDataSubscriptionsCollectionApiImpl() {} private:
udr_app *m_udr_app;
void create_individual_application_data_subscription(const ApplicationDataSubs &applicationDataSubs, Pistache::Http::ResponseWriter &response); std::string m_address;
void read_application_data_change_subscriptions(const Pistache::Optional<DataFilter> &dataFilter, Pistache::Http::ResponseWriter &response);
public:
ApplicationDataSubscriptionsCollectionApiImpl(
std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
std::string address);
~ApplicationDataSubscriptionsCollectionApiImpl() {}
void create_individual_application_data_subscription(
const ApplicationDataSubs &applicationDataSubs,
Pistache::Http::ResponseWriter &response);
void read_application_data_change_subscriptions(
const Pistache::Optional<DataFilter> &dataFilter,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,21 @@ ...@@ -13,13 +13,21 @@
#include "AuthenticationSoRDocumentApiImpl.h" #include "AuthenticationSoRDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
AuthenticationSoRDocumentApiImpl::AuthenticationSoRDocumentApiImpl( AuthenticationSoRDocumentApiImpl::AuthenticationSoRDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: AuthenticationSoRDocumentApi(rtr) {} std::string address)
: AuthenticationSoRDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void AuthenticationSoRDocumentApiImpl::create_authentication_so_r( void AuthenticationSoRDocumentApiImpl::create_authentication_so_r(
const std::string &ueId, const std::string &ueId,
...@@ -34,4 +42,4 @@ void AuthenticationSoRDocumentApiImpl::query_auth_so_r( ...@@ -34,4 +42,4 @@ void AuthenticationSoRDocumentApiImpl::query_auth_so_r(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* AuthenticationSoRDocumentApiImpl.h * AuthenticationSoRDocumentApiImpl.h
* *
* *
*/ */
#ifndef AUTHENTICATION_SO_R_DOCUMENT_API_IMPL_H_ #ifndef AUTHENTICATION_SO_R_DOCUMENT_API_IMPL_H_
#define AUTHENTICATION_SO_R_DOCUMENT_API_IMPL_H_ #define AUTHENTICATION_SO_R_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,28 +29,35 @@ ...@@ -29,28 +29,35 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "SorData.h"
#include <string> #include <string>
#include "SorData.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class AuthenticationSoRDocumentApiImpl : public oai::udr::api::AuthenticationSoRDocumentApi {
public: class AuthenticationSoRDocumentApiImpl
AuthenticationSoRDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::AuthenticationSoRDocumentApi {
~AuthenticationSoRDocumentApiImpl() {} private:
udr_app *m_udr_app;
void create_authentication_so_r(const std::string &ueId, const Pistache::Optional<std::string> &supportedFeatures, const SorData &sorData, Pistache::Http::ResponseWriter &response); std::string m_address;
void query_auth_so_r(const std::string &ueId, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response);
public:
AuthenticationSoRDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst, std::string address);
~AuthenticationSoRDocumentApiImpl() {}
void create_authentication_so_r(
const std::string &ueId,
const Pistache::Optional<std::string> &supportedFeatures,
const SorData &sorData, Pistache::Http::ResponseWriter &response);
void query_auth_so_r(const std::string &ueId,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -14,13 +14,21 @@ ...@@ -14,13 +14,21 @@
#include "AuthenticationStatusDocumentApiImpl.h" #include "AuthenticationStatusDocumentApiImpl.h"
#include "logger.hpp" #include "logger.hpp"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
AuthenticationStatusDocumentApiImpl::AuthenticationStatusDocumentApiImpl( AuthenticationStatusDocumentApiImpl::AuthenticationStatusDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, MYSQL *mysql) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: AuthenticationStatusDocumentApi(rtr) { std::string address, MYSQL *mysql)
: AuthenticationStatusDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {
mysql_WitcommUDRDB = mysql; mysql_WitcommUDRDB = mysql;
} }
...@@ -94,7 +102,6 @@ void AuthenticationStatusDocumentApiImpl::create_authentication_status( ...@@ -94,7 +102,6 @@ void AuthenticationStatusDocumentApiImpl::create_authentication_status(
void AuthenticationStatusDocumentApiImpl::delete_authentication_status( void AuthenticationStatusDocumentApiImpl::delete_authentication_status(
const std::string &ueId, Pistache::Http::ResponseWriter &response) { const std::string &ueId, Pistache::Http::ResponseWriter &response) {
const std::string query = const std::string query =
"DELETE from AuthenticationStatus WHERE ueid='" + ueId + "'"; "DELETE from AuthenticationStatus WHERE ueid='" + ueId + "'";
...@@ -175,4 +182,4 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status( ...@@ -175,4 +182,4 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status(
mysql_free_result(res); mysql_free_result(res);
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* AuthenticationStatusDocumentApiImpl.h * AuthenticationStatusDocumentApiImpl.h
* *
* *
*/ */
#ifndef AUTHENTICATION_STATUS_DOCUMENT_API_IMPL_H_ #ifndef AUTHENTICATION_STATUS_DOCUMENT_API_IMPL_H_
#define AUTHENTICATION_STATUS_DOCUMENT_API_IMPL_H_ #define AUTHENTICATION_STATUS_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,34 +29,45 @@ ...@@ -29,34 +29,45 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "AuthEvent.h"
#include <string> #include <string>
#include "AuthEvent.h"
#include <mysql/mysql.h> #include <mysql/mysql.h>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class AuthenticationStatusDocumentApiImpl : public oai::udr::api::AuthenticationStatusDocumentApi {
public: class AuthenticationStatusDocumentApiImpl
AuthenticationStatusDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,MYSQL *mysql); : public oai::udr::api::AuthenticationStatusDocumentApi {
~AuthenticationStatusDocumentApiImpl() {} private:
udr_app *m_udr_app;
void create_authentication_status(const std::string &ueId, const AuthEvent &authEvent, Pistache::Http::ResponseWriter &response); std::string m_address;
void delete_authentication_status(const std::string &ueId, Pistache::Http::ResponseWriter &response); public:
void query_authentication_status(const std::string &ueId, const Pistache::Optional<std::vector<std::string>> &fields, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); AuthenticationStatusDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst,
private: std::string address, MYSQL *mysql);
MYSQL *mysql_WitcommUDRDB; ~AuthenticationStatusDocumentApiImpl() {}
void create_authentication_status(const std::string &ueId,
const AuthEvent &authEvent,
Pistache::Http::ResponseWriter &response);
void delete_authentication_status(const std::string &ueId,
Pistache::Http::ResponseWriter &response);
void query_authentication_status(
const std::string &ueId,
const Pistache::Optional<std::vector<std::string>> &fields,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
private:
MYSQL *mysql_WitcommUDRDB;
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -17,14 +17,22 @@ ...@@ -17,14 +17,22 @@
#include <AuthenticationSubscription.h> #include <AuthenticationSubscription.h>
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
AuthenticationSubscriptionDocumentApiImpl:: AuthenticationSubscriptionDocumentApiImpl::
AuthenticationSubscriptionDocumentApiImpl( AuthenticationSubscriptionDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr, MYSQL *mysql) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: AuthenticationSubscriptionDocumentApi(rtr) { std::string address, MYSQL *mysql)
: AuthenticationSubscriptionDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {
mysql_WitcommUDRDB = mysql; mysql_WitcommUDRDB = mysql;
} }
...@@ -33,7 +41,6 @@ void AuthenticationSubscriptionDocumentApiImpl:: ...@@ -33,7 +41,6 @@ void AuthenticationSubscriptionDocumentApiImpl::
const std::string &ueId, const std::vector<PatchItem> &patchItem, const std::string &ueId, const std::vector<PatchItem> &patchItem,
const Pistache::Optional<std::string> &supportedFeatures, const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response) { Pistache::Http::ResponseWriter &response) {
MYSQL_RES *res = NULL; MYSQL_RES *res = NULL;
MYSQL_ROW row; MYSQL_ROW row;
...@@ -192,4 +199,4 @@ void AuthenticationSubscriptionDocumentApiImpl:: ...@@ -192,4 +199,4 @@ void AuthenticationSubscriptionDocumentApiImpl::
mysql_free_result(res); mysql_free_result(res);
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* AuthenticationSubscriptionDocumentApiImpl.h * AuthenticationSubscriptionDocumentApiImpl.h
* *
* *
*/ */
#ifndef AUTHENTICATION_SUBSCRIPTION_DOCUMENT_API_IMPL_H_ #ifndef AUTHENTICATION_SUBSCRIPTION_DOCUMENT_API_IMPL_H_
#define AUTHENTICATION_SUBSCRIPTION_DOCUMENT_API_IMPL_H_ #define AUTHENTICATION_SUBSCRIPTION_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,36 +29,45 @@ ...@@ -29,36 +29,45 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include <string>
#include <vector>
#include "PatchItem.h" #include "PatchItem.h"
#include "PatchResult.h" #include "PatchResult.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string>
#include <vector>
#include <mysql/mysql.h> #include <mysql/mysql.h>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class AuthenticationSubscriptionDocumentApiImpl : public oai::udr::api::AuthenticationSubscriptionDocumentApi {
public: class AuthenticationSubscriptionDocumentApiImpl
AuthenticationSubscriptionDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,MYSQL *mysql); : public oai::udr::api::AuthenticationSubscriptionDocumentApi {
~AuthenticationSubscriptionDocumentApiImpl() {} private:
udr_app *m_udr_app;
void modify_authentication_subscription(const std::string &ueId, const std::vector<PatchItem> &patchItem, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); std::string m_address;
void read_authentication_subscription(const std::string &ueId, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response);
public:
private: AuthenticationSubscriptionDocumentApiImpl(
MYSQL *mysql_WitcommUDRDB; std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
std::string address, MYSQL *mysql);
~AuthenticationSubscriptionDocumentApiImpl() {}
void modify_authentication_subscription(
const std::string &ueId, const std::vector<PatchItem> &patchItem,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
void read_authentication_subscription(
const std::string &ueId,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
private:
MYSQL *mysql_WitcommUDRDB;
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,21 @@ ...@@ -13,13 +13,21 @@
#include "AuthenticationUPUDocumentApiImpl.h" #include "AuthenticationUPUDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
AuthenticationUPUDocumentApiImpl::AuthenticationUPUDocumentApiImpl( AuthenticationUPUDocumentApiImpl::AuthenticationUPUDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: AuthenticationUPUDocumentApi(rtr) {} std::string address)
: AuthenticationUPUDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void AuthenticationUPUDocumentApiImpl::create_authentication_upu( void AuthenticationUPUDocumentApiImpl::create_authentication_upu(
const std::string &ueId, const std::string &ueId,
...@@ -34,4 +42,4 @@ void AuthenticationUPUDocumentApiImpl::query_auth_upu( ...@@ -34,4 +42,4 @@ void AuthenticationUPUDocumentApiImpl::query_auth_upu(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* AuthenticationUPUDocumentApiImpl.h * AuthenticationUPUDocumentApiImpl.h
* *
* *
*/ */
#ifndef AUTHENTICATION_UPU_DOCUMENT_API_IMPL_H_ #ifndef AUTHENTICATION_UPU_DOCUMENT_API_IMPL_H_
#define AUTHENTICATION_UPU_DOCUMENT_API_IMPL_H_ #define AUTHENTICATION_UPU_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,28 +29,35 @@ ...@@ -29,28 +29,35 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "UpuData.h"
#include <string> #include <string>
#include "UpuData.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class AuthenticationUPUDocumentApiImpl : public oai::udr::api::AuthenticationUPUDocumentApi {
public: class AuthenticationUPUDocumentApiImpl
AuthenticationUPUDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::AuthenticationUPUDocumentApi {
~AuthenticationUPUDocumentApiImpl() {} private:
udr_app *m_udr_app;
void create_authentication_upu(const std::string &ueId, const Pistache::Optional<std::string> &supportedFeatures, const UpuData &upuData, Pistache::Http::ResponseWriter &response); std::string m_address;
void query_auth_upu(const std::string &ueId, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response);
public:
AuthenticationUPUDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst, std::string address);
~AuthenticationUPUDocumentApiImpl() {}
void create_authentication_upu(
const std::string &ueId,
const Pistache::Optional<std::string> &supportedFeatures,
const UpuData &upuData, Pistache::Http::ResponseWriter &response);
void query_auth_upu(const std::string &ueId,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,19 @@ ...@@ -13,13 +13,19 @@
#include "BdtDataStoreApiImpl.h" #include "BdtDataStoreApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
BdtDataStoreApiImpl::BdtDataStoreApiImpl( BdtDataStoreApiImpl::BdtDataStoreApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: BdtDataStoreApi(rtr) {} std::string address)
: BdtDataStoreApi(rtr), m_udr_app(udr_app_inst), m_address(address) {}
void BdtDataStoreApiImpl::read_bdt_data( void BdtDataStoreApiImpl::read_bdt_data(
const Pistache::Optional<std::vector<std::string>> &bdtRefIds, const Pistache::Optional<std::vector<std::string>> &bdtRefIds,
...@@ -28,4 +34,4 @@ void BdtDataStoreApiImpl::read_bdt_data( ...@@ -28,4 +34,4 @@ void BdtDataStoreApiImpl::read_bdt_data(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* BdtDataStoreApiImpl.h * BdtDataStoreApiImpl.h
* *
* *
*/ */
#ifndef BDT_DATA_STORE_API_IMPL_H_ #ifndef BDT_DATA_STORE_API_IMPL_H_
#define BDT_DATA_STORE_API_IMPL_H_ #define BDT_DATA_STORE_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,28 +29,32 @@ ...@@ -29,28 +29,32 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include <string>
#include "BdtData.h" #include "BdtData.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class BdtDataStoreApiImpl : public oai::udr::api::BdtDataStoreApi { class BdtDataStoreApiImpl : public oai::udr::api::BdtDataStoreApi {
public: private:
BdtDataStoreApiImpl(std::shared_ptr<Pistache::Rest::Router>); udr_app *m_udr_app;
~BdtDataStoreApiImpl() {} std::string m_address;
void read_bdt_data(const Pistache::Optional<std::vector<std::string>> &bdtRefIds, const Pistache::Optional<std::string> &suppFeat, Pistache::Http::ResponseWriter &response); public:
BdtDataStoreApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst, std::string address);
~BdtDataStoreApiImpl() {}
void read_bdt_data(
const Pistache::Optional<std::vector<std::string>> &bdtRefIds,
const Pistache::Optional<std::string> &suppFeat,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,19 @@ ...@@ -13,13 +13,19 @@
#include "BdtPolicyDataStoreApiImpl.h" #include "BdtPolicyDataStoreApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
BdtPolicyDataStoreApiImpl::BdtPolicyDataStoreApiImpl( BdtPolicyDataStoreApiImpl::BdtPolicyDataStoreApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: BdtPolicyDataStoreApi(rtr) {} std::string address)
: BdtPolicyDataStoreApi(rtr), m_udr_app(udr_app_inst), m_address(address) {}
void BdtPolicyDataStoreApiImpl::read_bdt_policy_data( void BdtPolicyDataStoreApiImpl::read_bdt_policy_data(
const Pistache::Optional<std::vector<std::string>> &bdtPolicyIds, const Pistache::Optional<std::vector<std::string>> &bdtPolicyIds,
...@@ -29,4 +35,4 @@ void BdtPolicyDataStoreApiImpl::read_bdt_policy_data( ...@@ -29,4 +35,4 @@ void BdtPolicyDataStoreApiImpl::read_bdt_policy_data(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* BdtPolicyDataStoreApiImpl.h * BdtPolicyDataStoreApiImpl.h
* *
* *
*/ */
#ifndef BDT_POLICY_DATA_STORE_API_IMPL_H_ #ifndef BDT_POLICY_DATA_STORE_API_IMPL_H_
#define BDT_POLICY_DATA_STORE_API_IMPL_H_ #define BDT_POLICY_DATA_STORE_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,28 +29,33 @@ ...@@ -29,28 +29,33 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include <string>
#include "BdtPolicyData.h" #include "BdtPolicyData.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class BdtPolicyDataStoreApiImpl : public oai::udr::api::BdtPolicyDataStoreApi { class BdtPolicyDataStoreApiImpl : public oai::udr::api::BdtPolicyDataStoreApi {
public: private:
BdtPolicyDataStoreApiImpl(std::shared_ptr<Pistache::Rest::Router>); udr_app *m_udr_app;
~BdtPolicyDataStoreApiImpl() {} std::string m_address;
void read_bdt_policy_data(const Pistache::Optional<std::vector<std::string>> &bdtPolicyIds, const Pistache::Optional<std::vector<std::string>> &internalGroupIds, const Pistache::Optional<std::vector<std::string>> &supis, Pistache::Http::ResponseWriter &response); public:
BdtPolicyDataStoreApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst, std::string address);
~BdtPolicyDataStoreApiImpl() {}
void read_bdt_policy_data(
const Pistache::Optional<std::vector<std::string>> &bdtPolicyIds,
const Pistache::Optional<std::vector<std::string>> &internalGroupIds,
const Pistache::Optional<std::vector<std::string>> &supis,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,19 @@ ...@@ -13,13 +13,19 @@
#include "CAGACKDocumentApiImpl.h" #include "CAGACKDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
CAGACKDocumentApiImpl::CAGACKDocumentApiImpl( CAGACKDocumentApiImpl::CAGACKDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: CAGACKDocumentApi(rtr) {} std::string address)
: CAGACKDocumentApi(rtr), m_udr_app(udr_app_inst), m_address(address) {}
void CAGACKDocumentApiImpl::query_cag_ack( void CAGACKDocumentApiImpl::query_cag_ack(
const std::string &ueId, const std::string &ueId,
...@@ -28,4 +34,4 @@ void CAGACKDocumentApiImpl::query_cag_ack( ...@@ -28,4 +34,4 @@ void CAGACKDocumentApiImpl::query_cag_ack(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* CAGACKDocumentApiImpl.h * CAGACKDocumentApiImpl.h
* *
* *
*/ */
#ifndef CAGACK_DOCUMENT_API_IMPL_H_ #ifndef CAGACK_DOCUMENT_API_IMPL_H_
#define CAGACK_DOCUMENT_API_IMPL_H_ #define CAGACK_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,27 +29,30 @@ ...@@ -29,27 +29,30 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "CagAckData.h"
#include <string> #include <string>
#include "CagAckData.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class CAGACKDocumentApiImpl : public oai::udr::api::CAGACKDocumentApi { class CAGACKDocumentApiImpl : public oai::udr::api::CAGACKDocumentApi {
public: private:
CAGACKDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); udr_app *m_udr_app;
~CAGACKDocumentApiImpl() {} std::string m_address;
void query_cag_ack(const std::string &ueId, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); public:
CAGACKDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst, std::string address);
~CAGACKDocumentApiImpl() {}
void query_cag_ack(const std::string &ueId,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,21 @@ ...@@ -13,13 +13,21 @@
#include "CAGUpdateAckDocumentApiImpl.h" #include "CAGUpdateAckDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
CAGUpdateAckDocumentApiImpl::CAGUpdateAckDocumentApiImpl( CAGUpdateAckDocumentApiImpl::CAGUpdateAckDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: CAGUpdateAckDocumentApi(rtr) {} std::string address)
: CAGUpdateAckDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void CAGUpdateAckDocumentApiImpl::create_cag_update_ack( void CAGUpdateAckDocumentApiImpl::create_cag_update_ack(
const std::string &ueId, const std::string &ueId,
...@@ -28,4 +36,4 @@ void CAGUpdateAckDocumentApiImpl::create_cag_update_ack( ...@@ -28,4 +36,4 @@ void CAGUpdateAckDocumentApiImpl::create_cag_update_ack(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* CAGUpdateAckDocumentApiImpl.h * CAGUpdateAckDocumentApiImpl.h
* *
* *
*/ */
#ifndef CAG_UPDATE_ACK_DOCUMENT_API_IMPL_H_ #ifndef CAG_UPDATE_ACK_DOCUMENT_API_IMPL_H_
#define CAG_UPDATE_ACK_DOCUMENT_API_IMPL_H_ #define CAG_UPDATE_ACK_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,27 +29,32 @@ ...@@ -29,27 +29,32 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "CagAckData.h"
#include <string> #include <string>
#include "CagAckData.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class CAGUpdateAckDocumentApiImpl : public oai::udr::api::CAGUpdateAckDocumentApi {
public: class CAGUpdateAckDocumentApiImpl
CAGUpdateAckDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::CAGUpdateAckDocumentApi {
~CAGUpdateAckDocumentApiImpl() {} private:
udr_app *m_udr_app;
void create_cag_update_ack(const std::string &ueId, const Pistache::Optional<std::string> &supportedFeatures, const CagAckData &cagAckData, Pistache::Http::ResponseWriter &response); std::string m_address;
public:
CAGUpdateAckDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst, std::string address);
~CAGUpdateAckDocumentApiImpl() {}
void create_cag_update_ack(
const std::string &ueId,
const Pistache::Optional<std::string> &supportedFeatures,
const CagAckData &cagAckData, Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,21 @@ ...@@ -13,13 +13,21 @@
#include "Class5GVNGroupsInternalDocumentApiImpl.h" #include "Class5GVNGroupsInternalDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
Class5GVNGroupsInternalDocumentApiImpl::Class5GVNGroupsInternalDocumentApiImpl( Class5GVNGroupsInternalDocumentApiImpl::Class5GVNGroupsInternalDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: Class5GVNGroupsInternalDocumentApi(rtr) {} std::string address)
: Class5GVNGroupsInternalDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void Class5GVNGroupsInternalDocumentApiImpl::query5_g_vn_group_internal( void Class5GVNGroupsInternalDocumentApiImpl::query5_g_vn_group_internal(
const Pistache::Optional<std::vector<std::string>> &internalGroupIds, const Pistache::Optional<std::vector<std::string>> &internalGroupIds,
...@@ -27,4 +35,4 @@ void Class5GVNGroupsInternalDocumentApiImpl::query5_g_vn_group_internal( ...@@ -27,4 +35,4 @@ void Class5GVNGroupsInternalDocumentApiImpl::query5_g_vn_group_internal(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* Class5GVNGroupsInternalDocumentApiImpl.h * Class5GVNGroupsInternalDocumentApiImpl.h
* *
* *
*/ */
#ifndef CLASS5_GVN_GROUPS_INTERNAL_DOCUMENT_API_IMPL_H_ #ifndef CLASS5_GVN_GROUPS_INTERNAL_DOCUMENT_API_IMPL_H_
#define CLASS5_GVN_GROUPS_INTERNAL_DOCUMENT_API_IMPL_H_ #define CLASS5_GVN_GROUPS_INTERNAL_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,27 +29,32 @@ ...@@ -29,27 +29,32 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "5GVnGroupConfiguration.h"
#include <string> #include <string>
#include "5GVnGroupConfiguration.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class Class5GVNGroupsInternalDocumentApiImpl : public oai::udr::api::Class5GVNGroupsInternalDocumentApi {
public: class Class5GVNGroupsInternalDocumentApiImpl
Class5GVNGroupsInternalDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::Class5GVNGroupsInternalDocumentApi {
~Class5GVNGroupsInternalDocumentApiImpl() {} private:
udr_app* m_udr_app;
void query5_g_vn_group_internal(const Pistache::Optional<std::vector<std::string>> &internalGroupIds, Pistache::Http::ResponseWriter &response); std::string m_address;
public:
Class5GVNGroupsInternalDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router>, udr_app* udr_app_inst,
std::string address);
~Class5GVNGroupsInternalDocumentApiImpl() {}
void query5_g_vn_group_internal(
const Pistache::Optional<std::vector<std::string>>& internalGroupIds,
Pistache::Http::ResponseWriter& response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,21 @@ ...@@ -13,13 +13,21 @@
#include "Class5GVNGroupsStoreApiImpl.h" #include "Class5GVNGroupsStoreApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
Class5GVNGroupsStoreApiImpl::Class5GVNGroupsStoreApiImpl( Class5GVNGroupsStoreApiImpl::Class5GVNGroupsStoreApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: Class5GVNGroupsStoreApi(rtr) {} std::string address)
: Class5GVNGroupsStoreApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void Class5GVNGroupsStoreApiImpl::query5_g_vn_group( void Class5GVNGroupsStoreApiImpl::query5_g_vn_group(
const Pistache::Optional<std::vector<std::string>> &gpsis, const Pistache::Optional<std::vector<std::string>> &gpsis,
...@@ -27,4 +35,4 @@ void Class5GVNGroupsStoreApiImpl::query5_g_vn_group( ...@@ -27,4 +35,4 @@ void Class5GVNGroupsStoreApiImpl::query5_g_vn_group(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* Class5GVNGroupsStoreApiImpl.h * Class5GVNGroupsStoreApiImpl.h
* *
* *
*/ */
#ifndef CLASS5_GVN_GROUPS_STORE_API_IMPL_H_ #ifndef CLASS5_GVN_GROUPS_STORE_API_IMPL_H_
#define CLASS5_GVN_GROUPS_STORE_API_IMPL_H_ #define CLASS5_GVN_GROUPS_STORE_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,27 +29,31 @@ ...@@ -29,27 +29,31 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "5GVnGroupConfiguration.h"
#include <string> #include <string>
#include "5GVnGroupConfiguration.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class Class5GVNGroupsStoreApiImpl : public oai::udr::api::Class5GVNGroupsStoreApi {
public: class Class5GVNGroupsStoreApiImpl
Class5GVNGroupsStoreApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::Class5GVNGroupsStoreApi {
~Class5GVNGroupsStoreApiImpl() {} private:
udr_app* m_udr_app;
void query5_g_vn_group(const Pistache::Optional<std::vector<std::string>> &gpsis, Pistache::Http::ResponseWriter &response); std::string m_address;
public:
Class5GVNGroupsStoreApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app* udr_app_inst, std::string address);
~Class5GVNGroupsStoreApiImpl() {}
void query5_g_vn_group(
const Pistache::Optional<std::vector<std::string>>& gpsis,
Pistache::Http::ResponseWriter& response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,14 +13,22 @@ ...@@ -13,14 +13,22 @@
#include "Class5GVnGroupConfigurationDocumentApiImpl.h" #include "Class5GVnGroupConfigurationDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
Class5GVnGroupConfigurationDocumentApiImpl:: Class5GVnGroupConfigurationDocumentApiImpl::
Class5GVnGroupConfigurationDocumentApiImpl( Class5GVnGroupConfigurationDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: Class5GVnGroupConfigurationDocumentApi(rtr) {} std::string address)
: Class5GVnGroupConfigurationDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void Class5GVnGroupConfigurationDocumentApiImpl::create5_g_vn_group( void Class5GVnGroupConfigurationDocumentApiImpl::create5_g_vn_group(
const std::string &externalGroupId, const std::string &externalGroupId,
...@@ -29,4 +37,4 @@ void Class5GVnGroupConfigurationDocumentApiImpl::create5_g_vn_group( ...@@ -29,4 +37,4 @@ void Class5GVnGroupConfigurationDocumentApiImpl::create5_g_vn_group(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* Class5GVnGroupConfigurationDocumentApiImpl.h * Class5GVnGroupConfigurationDocumentApiImpl.h
* *
* *
*/ */
#ifndef CLASS5_G_VN_GROUP_CONFIGURATION_DOCUMENT_API_IMPL_H_ #ifndef CLASS5_G_VN_GROUP_CONFIGURATION_DOCUMENT_API_IMPL_H_
#define CLASS5_G_VN_GROUP_CONFIGURATION_DOCUMENT_API_IMPL_H_ #define CLASS5_G_VN_GROUP_CONFIGURATION_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,28 +29,34 @@ ...@@ -29,28 +29,34 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include <string>
#include "5GVnGroupConfiguration.h" #include "5GVnGroupConfiguration.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class Class5GVnGroupConfigurationDocumentApiImpl : public oai::udr::api::Class5GVnGroupConfigurationDocumentApi {
public: class Class5GVnGroupConfigurationDocumentApiImpl
Class5GVnGroupConfigurationDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::Class5GVnGroupConfigurationDocumentApi {
~Class5GVnGroupConfigurationDocumentApiImpl() {} private:
udr_app *m_udr_app;
void create5_g_vn_group(const std::string &externalGroupId, const _5GVnGroupConfiguration &r_5GVnGroupConfiguration, Pistache::Http::ResponseWriter &response); std::string m_address;
public:
Class5GVnGroupConfigurationDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
std::string address);
~Class5GVnGroupConfigurationDocumentApiImpl() {}
void create5_g_vn_group(
const std::string &externalGroupId,
const _5GVnGroupConfiguration &r_5GVnGroupConfiguration,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,21 @@ ...@@ -13,13 +13,21 @@
#include "ContextDataDocumentApiImpl.h" #include "ContextDataDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
ContextDataDocumentApiImpl::ContextDataDocumentApiImpl( ContextDataDocumentApiImpl::ContextDataDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app* udr_app_inst,
: ContextDataDocumentApi(rtr) {} std::string address)
: ContextDataDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
// void ContextDataDocumentApiImpl::query_context_data(const std::string &ueId, // void ContextDataDocumentApiImpl::query_context_data(const std::string &ueId,
// const Pistache::Optional<Set<ContextDataSetName>> &contextDatasetNames, // const Pistache::Optional<Set<ContextDataSetName>> &contextDatasetNames,
...@@ -27,4 +35,4 @@ ContextDataDocumentApiImpl::ContextDataDocumentApiImpl( ...@@ -27,4 +35,4 @@ ContextDataDocumentApiImpl::ContextDataDocumentApiImpl(
// response.send(Pistache::Http::Code::Ok, "Do some magic\n"); // response.send(Pistache::Http::Code::Ok, "Do some magic\n");
//} //}
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* ContextDataDocumentApiImpl.h * ContextDataDocumentApiImpl.h
* *
* *
*/ */
#ifndef CONTEXT_DATA_DOCUMENT_API_IMPL_H_ #ifndef CONTEXT_DATA_DOCUMENT_API_IMPL_H_
#define CONTEXT_DATA_DOCUMENT_API_IMPL_H_ #define CONTEXT_DATA_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -34,24 +34,28 @@ ...@@ -34,24 +34,28 @@
//#include "Set.h" //#include "Set.h"
#include <string> #include <string>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class ContextDataDocumentApiImpl : public oai::udr::api::ContextDataDocumentApi {
public: class ContextDataDocumentApiImpl
ContextDataDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::ContextDataDocumentApi {
~ContextDataDocumentApiImpl() {} private:
udr_app* m_udr_app;
// void query_context_data(const std::string &ueId, const Pistache::Optional<Set<ContextDataSetName>> &contextDatasetNames, Pistache::Http::ResponseWriter &response); std::string m_address;
public:
ContextDataDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app* udr_app_inst, std::string address);
~ContextDataDocumentApiImpl() {}
// void query_context_data(const std::string &ueId, const
// Pistache::Optional<Set<ContextDataSetName>> &contextDatasetNames,
// Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,11 +13,17 @@ ...@@ -13,11 +13,17 @@
#include "Delete5GVnGroupApiImpl.h" #include "Delete5GVnGroupApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
Delete5GVnGroupApiImpl::Delete5GVnGroupApiImpl( Delete5GVnGroupApiImpl::Delete5GVnGroupApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: Delete5GVnGroupApi(rtr) {} std::string address)
: Delete5GVnGroupApi(rtr), m_udr_app(udr_app_inst), m_address(address) {}
void Delete5GVnGroupApiImpl::delete5_g_vn_group( void Delete5GVnGroupApiImpl::delete5_g_vn_group(
const std::string &externalGroupId, const std::string &externalGroupId,
...@@ -25,4 +31,4 @@ void Delete5GVnGroupApiImpl::delete5_g_vn_group( ...@@ -25,4 +31,4 @@ void Delete5GVnGroupApiImpl::delete5_g_vn_group(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* Delete5GVnGroupApiImpl.h * Delete5GVnGroupApiImpl.h
* *
* *
*/ */
#ifndef DELETE5_G_VN_GROUP_API_IMPL_H_ #ifndef DELETE5_G_VN_GROUP_API_IMPL_H_
#define DELETE5_G_VN_GROUP_API_IMPL_H_ #define DELETE5_G_VN_GROUP_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -31,24 +31,24 @@ ...@@ -31,24 +31,24 @@
#include <string> #include <string>
#include "udr_app.hpp"
using namespace oai::udr::app;
namespace oai::udr::api { namespace oai::udr::api {
class Delete5GVnGroupApiImpl : public oai::udr::api::Delete5GVnGroupApi { class Delete5GVnGroupApiImpl : public oai::udr::api::Delete5GVnGroupApi {
public: private:
Delete5GVnGroupApiImpl(std::shared_ptr<Pistache::Rest::Router>); udr_app* m_udr_app;
~Delete5GVnGroupApiImpl() {} std::string m_address;
void delete5_g_vn_group(const std::string &externalGroupId, Pistache::Http::ResponseWriter &response); public:
Delete5GVnGroupApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app* udr_app_inst, std::string address);
~Delete5GVnGroupApiImpl() {}
void delete5_g_vn_group(const std::string& externalGroupId,
Pistache::Http::ResponseWriter& response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,21 @@ ...@@ -13,13 +13,21 @@
#include "EnhancedCoverageRestrictionDataApiImpl.h" #include "EnhancedCoverageRestrictionDataApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
EnhancedCoverageRestrictionDataApiImpl::EnhancedCoverageRestrictionDataApiImpl( EnhancedCoverageRestrictionDataApiImpl::EnhancedCoverageRestrictionDataApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: EnhancedCoverageRestrictionDataApi(rtr) {} std::string address)
: EnhancedCoverageRestrictionDataApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void EnhancedCoverageRestrictionDataApiImpl::query_coverage_restriction_data( void EnhancedCoverageRestrictionDataApiImpl::query_coverage_restriction_data(
const std::string &ueId, const std::string &ueId,
...@@ -30,4 +38,4 @@ void EnhancedCoverageRestrictionDataApiImpl::query_coverage_restriction_data( ...@@ -30,4 +38,4 @@ void EnhancedCoverageRestrictionDataApiImpl::query_coverage_restriction_data(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* EnhancedCoverageRestrictionDataApiImpl.h * EnhancedCoverageRestrictionDataApiImpl.h
* *
* *
*/ */
#ifndef ENHANCED_COVERAGE_RESTRICTION_DATA_API_IMPL_H_ #ifndef ENHANCED_COVERAGE_RESTRICTION_DATA_API_IMPL_H_
#define ENHANCED_COVERAGE_RESTRICTION_DATA_API_IMPL_H_ #define ENHANCED_COVERAGE_RESTRICTION_DATA_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,27 +29,35 @@ ...@@ -29,27 +29,35 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "EnhancedCoverageRestrictionData.h"
#include <string> #include <string>
#include "EnhancedCoverageRestrictionData.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class EnhancedCoverageRestrictionDataApiImpl : public oai::udr::api::EnhancedCoverageRestrictionDataApi {
public: class EnhancedCoverageRestrictionDataApiImpl
EnhancedCoverageRestrictionDataApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::EnhancedCoverageRestrictionDataApi {
~EnhancedCoverageRestrictionDataApiImpl() {} private:
udr_app *m_udr_app;
void query_coverage_restriction_data(const std::string &ueId, const Pistache::Optional<std::string> &supportedFeatures, const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch, const Pistache::Optional<Pistache::Http::Header::Raw> &ifModifiedSince, Pistache::Http::ResponseWriter &response); std::string m_address;
public:
EnhancedCoverageRestrictionDataApiImpl(
std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
std::string address);
~EnhancedCoverageRestrictionDataApiImpl() {}
void query_coverage_restriction_data(
const std::string &ueId,
const Pistache::Optional<std::string> &supportedFeatures,
const Pistache::Optional<Pistache::Http::Header::Raw> &ifNoneMatch,
const Pistache::Optional<Pistache::Http::Header::Raw> &ifModifiedSince,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,12 +13,20 @@ ...@@ -13,12 +13,20 @@
#include "EventAMFSubscriptionInfoDocumentApiImpl.h" #include "EventAMFSubscriptionInfoDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
EventAMFSubscriptionInfoDocumentApiImpl:: EventAMFSubscriptionInfoDocumentApiImpl::
EventAMFSubscriptionInfoDocumentApiImpl( EventAMFSubscriptionInfoDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: EventAMFSubscriptionInfoDocumentApi(rtr) {} std::string address)
: EventAMFSubscriptionInfoDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void EventAMFSubscriptionInfoDocumentApiImpl::remove_amf_subscriptions_info( void EventAMFSubscriptionInfoDocumentApiImpl::remove_amf_subscriptions_info(
const std::string &ueId, const std::string &subsId, const std::string &ueId, const std::string &subsId,
...@@ -26,4 +34,4 @@ void EventAMFSubscriptionInfoDocumentApiImpl::remove_amf_subscriptions_info( ...@@ -26,4 +34,4 @@ void EventAMFSubscriptionInfoDocumentApiImpl::remove_amf_subscriptions_info(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* EventAMFSubscriptionInfoDocumentApiImpl.h * EventAMFSubscriptionInfoDocumentApiImpl.h
* *
* *
*/ */
#ifndef EVENT_AMF_SUBSCRIPTION_INFO_DOCUMENT_API_IMPL_H_ #ifndef EVENT_AMF_SUBSCRIPTION_INFO_DOCUMENT_API_IMPL_H_
#define EVENT_AMF_SUBSCRIPTION_INFO_DOCUMENT_API_IMPL_H_ #define EVENT_AMF_SUBSCRIPTION_INFO_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -31,24 +31,28 @@ ...@@ -31,24 +31,28 @@
#include <string> #include <string>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::app;
class EventAMFSubscriptionInfoDocumentApiImpl
: public oai::udr::api::EventAMFSubscriptionInfoDocumentApi {
private:
udr_app *m_udr_app;
std::string m_address;
class EventAMFSubscriptionInfoDocumentApiImpl : public oai::udr::api::EventAMFSubscriptionInfoDocumentApi { public:
public: EventAMFSubscriptionInfoDocumentApiImpl(
EventAMFSubscriptionInfoDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
~EventAMFSubscriptionInfoDocumentApiImpl() {} std::string address);
~EventAMFSubscriptionInfoDocumentApiImpl() {}
void remove_amf_subscriptions_info(const std::string &ueId, const std::string &subsId, Pistache::Http::ResponseWriter &response);
void remove_amf_subscriptions_info(const std::string &ueId,
const std::string &subsId,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,21 @@ ...@@ -13,13 +13,21 @@
#include "EventExposureDataDocumentApiImpl.h" #include "EventExposureDataDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
EventExposureDataDocumentApiImpl::EventExposureDataDocumentApiImpl( EventExposureDataDocumentApiImpl::EventExposureDataDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: EventExposureDataDocumentApi(rtr) {} std::string address)
: EventExposureDataDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void EventExposureDataDocumentApiImpl::query_ee_data( void EventExposureDataDocumentApiImpl::query_ee_data(
const std::string &ueId, const std::string &ueId,
...@@ -29,4 +37,4 @@ void EventExposureDataDocumentApiImpl::query_ee_data( ...@@ -29,4 +37,4 @@ void EventExposureDataDocumentApiImpl::query_ee_data(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* EventExposureDataDocumentApiImpl.h * EventExposureDataDocumentApiImpl.h
* *
* *
*/ */
#ifndef EVENT_EXPOSURE_DATA_DOCUMENT_API_IMPL_H_ #ifndef EVENT_EXPOSURE_DATA_DOCUMENT_API_IMPL_H_
#define EVENT_EXPOSURE_DATA_DOCUMENT_API_IMPL_H_ #define EVENT_EXPOSURE_DATA_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,27 +29,32 @@ ...@@ -29,27 +29,32 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "EeProfileData.h"
#include <string> #include <string>
#include "EeProfileData.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class EventExposureDataDocumentApiImpl : public oai::udr::api::EventExposureDataDocumentApi {
public: class EventExposureDataDocumentApiImpl
EventExposureDataDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::EventExposureDataDocumentApi {
~EventExposureDataDocumentApiImpl() {} private:
udr_app *m_udr_app;
void query_ee_data(const std::string &ueId, const Pistache::Optional<std::vector<std::string>> &fields, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); std::string m_address;
public:
EventExposureDataDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst, std::string address);
~EventExposureDataDocumentApiImpl() {}
void query_ee_data(const std::string &ueId,
const Pistache::Optional<std::vector<std::string>> &fields,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,14 +13,22 @@ ...@@ -13,14 +13,22 @@
#include "EventExposureGroupSubscriptionDocumentApiImpl.h" #include "EventExposureGroupSubscriptionDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
EventExposureGroupSubscriptionDocumentApiImpl:: EventExposureGroupSubscriptionDocumentApiImpl::
EventExposureGroupSubscriptionDocumentApiImpl( EventExposureGroupSubscriptionDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: EventExposureGroupSubscriptionDocumentApi(rtr) {} std::string address)
: EventExposureGroupSubscriptionDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void EventExposureGroupSubscriptionDocumentApiImpl:: void EventExposureGroupSubscriptionDocumentApiImpl::
modify_ee_group_subscription( modify_ee_group_subscription(
...@@ -49,4 +57,4 @@ void EventExposureGroupSubscriptionDocumentApiImpl:: ...@@ -49,4 +57,4 @@ void EventExposureGroupSubscriptionDocumentApiImpl::
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* EventExposureGroupSubscriptionDocumentApiImpl.h * EventExposureGroupSubscriptionDocumentApiImpl.h
* *
* *
*/ */
#ifndef EVENT_EXPOSURE_GROUP_SUBSCRIPTION_DOCUMENT_API_IMPL_H_ #ifndef EVENT_EXPOSURE_GROUP_SUBSCRIPTION_DOCUMENT_API_IMPL_H_
#define EVENT_EXPOSURE_GROUP_SUBSCRIPTION_DOCUMENT_API_IMPL_H_ #define EVENT_EXPOSURE_GROUP_SUBSCRIPTION_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -31,33 +31,47 @@ ...@@ -31,33 +31,47 @@
#include "EeSubscription.h" #include "EeSubscription.h"
//#include "Object.h" //#include "Object.h"
#include <string>
#include <vector>
#include "PatchItem.h" #include "PatchItem.h"
#include "PatchResult.h" #include "PatchResult.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string>
#include <vector>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class EventExposureGroupSubscriptionDocumentApiImpl : public oai::udr::api::EventExposureGroupSubscriptionDocumentApi {
public: class EventExposureGroupSubscriptionDocumentApiImpl
EventExposureGroupSubscriptionDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::EventExposureGroupSubscriptionDocumentApi {
~EventExposureGroupSubscriptionDocumentApiImpl() {} private:
udr_app *m_udr_app;
void modify_ee_group_subscription(const std::string &ueGroupId, const std::string &subsId, const std::vector<PatchItem> &patchItem, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); std::string m_address;
void query_ee_group_subscription(const std::string &ueGroupId, const std::string &subsId, Pistache::Http::ResponseWriter &response);
void remove_ee_group_subscriptions(const std::string &ueGroupId, const std::string &subsId, Pistache::Http::ResponseWriter &response); public:
void update_ee_group_subscriptions(const std::string &ueGroupId, const std::string &subsId, const EeSubscription &eeSubscription, Pistache::Http::ResponseWriter &response); EventExposureGroupSubscriptionDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
std::string address);
~EventExposureGroupSubscriptionDocumentApiImpl() {}
void modify_ee_group_subscription(
const std::string &ueGroupId, const std::string &subsId,
const std::vector<PatchItem> &patchItem,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
void query_ee_group_subscription(const std::string &ueGroupId,
const std::string &subsId,
Pistache::Http::ResponseWriter &response);
void remove_ee_group_subscriptions(const std::string &ueGroupId,
const std::string &subsId,
Pistache::Http::ResponseWriter &response);
void update_ee_group_subscriptions(const std::string &ueGroupId,
const std::string &subsId,
const EeSubscription &eeSubscription,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,14 +13,22 @@ ...@@ -13,14 +13,22 @@
#include "EventExposureGroupSubscriptionsCollectionApiImpl.h" #include "EventExposureGroupSubscriptionsCollectionApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
EventExposureGroupSubscriptionsCollectionApiImpl:: EventExposureGroupSubscriptionsCollectionApiImpl::
EventExposureGroupSubscriptionsCollectionApiImpl( EventExposureGroupSubscriptionsCollectionApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: EventExposureGroupSubscriptionsCollectionApi(rtr) {} std::string address)
: EventExposureGroupSubscriptionsCollectionApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void EventExposureGroupSubscriptionsCollectionApiImpl:: void EventExposureGroupSubscriptionsCollectionApiImpl::
create_ee_group_subscriptions(const std::string &ueGroupId, create_ee_group_subscriptions(const std::string &ueGroupId,
...@@ -36,4 +44,4 @@ void EventExposureGroupSubscriptionsCollectionApiImpl:: ...@@ -36,4 +44,4 @@ void EventExposureGroupSubscriptionsCollectionApiImpl::
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* EventExposureGroupSubscriptionsCollectionApiImpl.h * EventExposureGroupSubscriptionsCollectionApiImpl.h
* *
* *
*/ */
#ifndef EVENT_EXPOSURE_GROUP_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_ #ifndef EVENT_EXPOSURE_GROUP_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_
#define EVENT_EXPOSURE_GROUP_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_ #define EVENT_EXPOSURE_GROUP_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,28 +29,36 @@ ...@@ -29,28 +29,36 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "EeSubscription.h"
#include <string> #include <string>
#include "EeSubscription.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class EventExposureGroupSubscriptionsCollectionApiImpl : public oai::udr::api::EventExposureGroupSubscriptionsCollectionApi {
public: class EventExposureGroupSubscriptionsCollectionApiImpl
EventExposureGroupSubscriptionsCollectionApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::EventExposureGroupSubscriptionsCollectionApi {
~EventExposureGroupSubscriptionsCollectionApiImpl() {} private:
udr_app *m_udr_app;
void create_ee_group_subscriptions(const std::string &ueGroupId, const EeSubscription &eeSubscription, Pistache::Http::ResponseWriter &response); std::string m_address;
void query_ee_group_subscriptions(const std::string &ueGroupId, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response);
public:
EventExposureGroupSubscriptionsCollectionApiImpl(
std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
std::string address);
~EventExposureGroupSubscriptionsCollectionApiImpl() {}
void create_ee_group_subscriptions(const std::string &ueGroupId,
const EeSubscription &eeSubscription,
Pistache::Http::ResponseWriter &response);
void query_ee_group_subscriptions(
const std::string &ueGroupId,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,14 +13,22 @@ ...@@ -13,14 +13,22 @@
#include "EventExposureSubscriptionDocumentApiImpl.h" #include "EventExposureSubscriptionDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
EventExposureSubscriptionDocumentApiImpl:: EventExposureSubscriptionDocumentApiImpl::
EventExposureSubscriptionDocumentApiImpl( EventExposureSubscriptionDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: EventExposureSubscriptionDocumentApi(rtr) {} std::string address)
: EventExposureSubscriptionDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void EventExposureSubscriptionDocumentApiImpl::modify_eesubscription( void EventExposureSubscriptionDocumentApiImpl::modify_eesubscription(
const std::string &ueId, const std::string &subsId, const std::string &ueId, const std::string &subsId,
...@@ -46,4 +54,4 @@ void EventExposureSubscriptionDocumentApiImpl::update_eesubscriptions( ...@@ -46,4 +54,4 @@ void EventExposureSubscriptionDocumentApiImpl::update_eesubscriptions(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* EventExposureSubscriptionDocumentApiImpl.h * EventExposureSubscriptionDocumentApiImpl.h
* *
* *
*/ */
#ifndef EVENT_EXPOSURE_SUBSCRIPTION_DOCUMENT_API_IMPL_H_ #ifndef EVENT_EXPOSURE_SUBSCRIPTION_DOCUMENT_API_IMPL_H_
#define EVENT_EXPOSURE_SUBSCRIPTION_DOCUMENT_API_IMPL_H_ #define EVENT_EXPOSURE_SUBSCRIPTION_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -31,33 +31,46 @@ ...@@ -31,33 +31,46 @@
#include "EeSubscription.h" #include "EeSubscription.h"
//#include "Object.h" //#include "Object.h"
#include <string>
#include <vector>
#include "PatchItem.h" #include "PatchItem.h"
#include "PatchResult.h" #include "PatchResult.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string>
#include <vector>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class EventExposureSubscriptionDocumentApiImpl : public oai::udr::api::EventExposureSubscriptionDocumentApi {
public: class EventExposureSubscriptionDocumentApiImpl
EventExposureSubscriptionDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::EventExposureSubscriptionDocumentApi {
~EventExposureSubscriptionDocumentApiImpl() {} private:
udr_app *m_udr_app;
void modify_eesubscription(const std::string &ueId, const std::string &subsId, const std::vector<PatchItem> &patchItem, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); std::string m_address;
void queryee_subscription(const std::string &ueId, const std::string &subsId, Pistache::Http::ResponseWriter &response);
void removeee_subscriptions(const std::string &ueId, const std::string &subsId, Pistache::Http::ResponseWriter &response); public:
void update_eesubscriptions(const std::string &ueId, const std::string &subsId, const EeSubscription &eeSubscription, Pistache::Http::ResponseWriter &response); EventExposureSubscriptionDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
std::string address);
~EventExposureSubscriptionDocumentApiImpl() {}
void modify_eesubscription(
const std::string &ueId, const std::string &subsId,
const std::vector<PatchItem> &patchItem,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
void queryee_subscription(const std::string &ueId, const std::string &subsId,
Pistache::Http::ResponseWriter &response);
void removeee_subscriptions(const std::string &ueId,
const std::string &subsId,
Pistache::Http::ResponseWriter &response);
void update_eesubscriptions(const std::string &ueId,
const std::string &subsId,
const EeSubscription &eeSubscription,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,14 +13,22 @@ ...@@ -13,14 +13,22 @@
#include "EventExposureSubscriptionsCollectionApiImpl.h" #include "EventExposureSubscriptionsCollectionApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
EventExposureSubscriptionsCollectionApiImpl:: EventExposureSubscriptionsCollectionApiImpl::
EventExposureSubscriptionsCollectionApiImpl( EventExposureSubscriptionsCollectionApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: EventExposureSubscriptionsCollectionApi(rtr) {} std::string address)
: EventExposureSubscriptionsCollectionApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void EventExposureSubscriptionsCollectionApiImpl::create_ee_subscriptions( void EventExposureSubscriptionsCollectionApiImpl::create_ee_subscriptions(
const std::string &ueId, const EeSubscription &eeSubscription, const std::string &ueId, const EeSubscription &eeSubscription,
...@@ -34,4 +42,4 @@ void EventExposureSubscriptionsCollectionApiImpl::queryeesubscriptions( ...@@ -34,4 +42,4 @@ void EventExposureSubscriptionsCollectionApiImpl::queryeesubscriptions(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* EventExposureSubscriptionsCollectionApiImpl.h * EventExposureSubscriptionsCollectionApiImpl.h
* *
* *
*/ */
#ifndef EVENT_EXPOSURE_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_ #ifndef EVENT_EXPOSURE_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_
#define EVENT_EXPOSURE_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_ #define EVENT_EXPOSURE_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,28 +29,36 @@ ...@@ -29,28 +29,36 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "EeSubscription.h"
#include <string> #include <string>
#include "EeSubscription.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class EventExposureSubscriptionsCollectionApiImpl : public oai::udr::api::EventExposureSubscriptionsCollectionApi {
public: class EventExposureSubscriptionsCollectionApiImpl
EventExposureSubscriptionsCollectionApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::EventExposureSubscriptionsCollectionApi {
~EventExposureSubscriptionsCollectionApiImpl() {} private:
udr_app *m_udr_app;
void create_ee_subscriptions(const std::string &ueId, const EeSubscription &eeSubscription, Pistache::Http::ResponseWriter &response); std::string m_address;
void queryeesubscriptions(const std::string &ueId, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response);
public:
EventExposureSubscriptionsCollectionApiImpl(
std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
std::string address);
~EventExposureSubscriptionsCollectionApiImpl() {}
void create_ee_subscriptions(const std::string &ueId,
const EeSubscription &eeSubscription,
Pistache::Http::ResponseWriter &response);
void queryeesubscriptions(
const std::string &ueId,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,14 +13,22 @@ ...@@ -13,14 +13,22 @@
#include "ExposureDataSubscriptionsCollectionApiImpl.h" #include "ExposureDataSubscriptionsCollectionApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
ExposureDataSubscriptionsCollectionApiImpl:: ExposureDataSubscriptionsCollectionApiImpl::
ExposureDataSubscriptionsCollectionApiImpl( ExposureDataSubscriptionsCollectionApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: ExposureDataSubscriptionsCollectionApi(rtr) {} std::string address)
: ExposureDataSubscriptionsCollectionApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void ExposureDataSubscriptionsCollectionApiImpl:: void ExposureDataSubscriptionsCollectionApiImpl::
create_individual_exposure_data_subscription( create_individual_exposure_data_subscription(
...@@ -29,4 +37,4 @@ void ExposureDataSubscriptionsCollectionApiImpl:: ...@@ -29,4 +37,4 @@ void ExposureDataSubscriptionsCollectionApiImpl::
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* ExposureDataSubscriptionsCollectionApiImpl.h * ExposureDataSubscriptionsCollectionApiImpl.h
* *
* *
*/ */
#ifndef EXPOSURE_DATA_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_ #ifndef EXPOSURE_DATA_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_
#define EXPOSURE_DATA_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_ #define EXPOSURE_DATA_SUBSCRIPTIONS_COLLECTION_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -32,24 +32,29 @@ ...@@ -32,24 +32,29 @@
#include "ExposureDataSubscription.h" #include "ExposureDataSubscription.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class ExposureDataSubscriptionsCollectionApiImpl : public oai::udr::api::ExposureDataSubscriptionsCollectionApi {
public: class ExposureDataSubscriptionsCollectionApiImpl
ExposureDataSubscriptionsCollectionApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::ExposureDataSubscriptionsCollectionApi {
~ExposureDataSubscriptionsCollectionApiImpl() {} private:
udr_app* m_udr_app;
void create_individual_exposure_data_subscription(const ExposureDataSubscription &exposureDataSubscription, Pistache::Http::ResponseWriter &response); std::string m_address;
public:
ExposureDataSubscriptionsCollectionApiImpl(
std::shared_ptr<Pistache::Rest::Router>, udr_app* udr_app_inst,
std::string address);
~ExposureDataSubscriptionsCollectionApiImpl() {}
void create_individual_exposure_data_subscription(
const ExposureDataSubscription& exposureDataSubscription,
Pistache::Http::ResponseWriter& response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,19 @@ ...@@ -13,13 +13,19 @@
#include "GroupIdentifiersApiImpl.h" #include "GroupIdentifiersApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
GroupIdentifiersApiImpl::GroupIdentifiersApiImpl( GroupIdentifiersApiImpl::GroupIdentifiersApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: GroupIdentifiersApi(rtr) {} std::string address)
: GroupIdentifiersApi(rtr), m_udr_app(udr_app_inst), m_address(address) {}
void GroupIdentifiersApiImpl::get_group_identifiers( void GroupIdentifiersApiImpl::get_group_identifiers(
const Pistache::Optional<std::string> &extGroupId, const Pistache::Optional<std::string> &extGroupId,
...@@ -30,4 +36,4 @@ void GroupIdentifiersApiImpl::get_group_identifiers( ...@@ -30,4 +36,4 @@ void GroupIdentifiersApiImpl::get_group_identifiers(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* GroupIdentifiersApiImpl.h * GroupIdentifiersApiImpl.h
* *
* *
*/ */
#ifndef GROUP_IDENTIFIERS_API_IMPL_H_ #ifndef GROUP_IDENTIFIERS_API_IMPL_H_
#define GROUP_IDENTIFIERS_API_IMPL_H_ #define GROUP_IDENTIFIERS_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,27 +29,33 @@ ...@@ -29,27 +29,33 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include "GroupIdentifiers.h"
#include <string> #include <string>
#include "GroupIdentifiers.h"
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class GroupIdentifiersApiImpl : public oai::udr::api::GroupIdentifiersApi { class GroupIdentifiersApiImpl : public oai::udr::api::GroupIdentifiersApi {
public: private:
GroupIdentifiersApiImpl(std::shared_ptr<Pistache::Rest::Router>); udr_app *m_udr_app;
~GroupIdentifiersApiImpl() {} std::string m_address;
void get_group_identifiers(const Pistache::Optional<std::string> &extGroupId, const Pistache::Optional<std::string> &intGroupId, const Pistache::Optional<bool> &ueIdInd, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); public:
GroupIdentifiersApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst, std::string address);
~GroupIdentifiersApiImpl() {}
void get_group_identifiers(
const Pistache::Optional<std::string> &extGroupId,
const Pistache::Optional<std::string> &intGroupId,
const Pistache::Optional<bool> &ueIdInd,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,21 @@ ...@@ -13,13 +13,21 @@
#include "IPSMGWRegistrationDocumentApiImpl.h" #include "IPSMGWRegistrationDocumentApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
IPSMGWRegistrationDocumentApiImpl::IPSMGWRegistrationDocumentApiImpl( IPSMGWRegistrationDocumentApiImpl::IPSMGWRegistrationDocumentApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: IPSMGWRegistrationDocumentApi(rtr) {} std::string address)
: IPSMGWRegistrationDocumentApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void IPSMGWRegistrationDocumentApiImpl::create_ip_sm_gw_context( void IPSMGWRegistrationDocumentApiImpl::create_ip_sm_gw_context(
const std::string &ueId, const IpSmGwRegistration &ipSmGwRegistration, const std::string &ueId, const IpSmGwRegistration &ipSmGwRegistration,
...@@ -43,4 +51,4 @@ void IPSMGWRegistrationDocumentApiImpl::query_ip_sm_gw_context( ...@@ -43,4 +51,4 @@ void IPSMGWRegistrationDocumentApiImpl::query_ip_sm_gw_context(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* IPSMGWRegistrationDocumentApiImpl.h * IPSMGWRegistrationDocumentApiImpl.h
* *
* *
*/ */
#ifndef IPSMGW_REGISTRATION_DOCUMENT_API_IMPL_H_ #ifndef IPSMGW_REGISTRATION_DOCUMENT_API_IMPL_H_
#define IPSMGW_REGISTRATION_DOCUMENT_API_IMPL_H_ #define IPSMGW_REGISTRATION_DOCUMENT_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,33 +29,44 @@ ...@@ -29,33 +29,44 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include <string>
#include <vector>
#include "IpSmGwRegistration.h" #include "IpSmGwRegistration.h"
#include "PatchItem.h" #include "PatchItem.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include <string>
#include <vector>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class IPSMGWRegistrationDocumentApiImpl : public oai::udr::api::IPSMGWRegistrationDocumentApi {
public: class IPSMGWRegistrationDocumentApiImpl
IPSMGWRegistrationDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::IPSMGWRegistrationDocumentApi {
~IPSMGWRegistrationDocumentApiImpl() {} private:
udr_app *m_udr_app;
void create_ip_sm_gw_context(const std::string &ueId, const IpSmGwRegistration &ipSmGwRegistration, Pistache::Http::ResponseWriter &response); std::string m_address;
void delete_ip_sm_gw_context(const std::string &ueId, Pistache::Http::ResponseWriter &response);
void modify_ip_sm_gw_context(const std::string &ueId, const std::vector<PatchItem> &patchItem, Pistache::Http::ResponseWriter &response); public:
void query_ip_sm_gw_context(const std::string &ueId, const Pistache::Optional<std::vector<std::string>> &fields, const Pistache::Optional<std::string> &supportedFeatures, Pistache::Http::ResponseWriter &response); IPSMGWRegistrationDocumentApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst, std::string address);
~IPSMGWRegistrationDocumentApiImpl() {}
void create_ip_sm_gw_context(const std::string &ueId,
const IpSmGwRegistration &ipSmGwRegistration,
Pistache::Http::ResponseWriter &response);
void delete_ip_sm_gw_context(const std::string &ueId,
Pistache::Http::ResponseWriter &response);
void modify_ip_sm_gw_context(const std::string &ueId,
const std::vector<PatchItem> &patchItem,
Pistache::Http::ResponseWriter &response);
void query_ip_sm_gw_context(
const std::string &ueId,
const Pistache::Optional<std::vector<std::string>> &fields,
const Pistache::Optional<std::string> &supportedFeatures,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
...@@ -13,13 +13,21 @@ ...@@ -13,13 +13,21 @@
#include "IPTVConfigurationDataStoreApiImpl.h" #include "IPTVConfigurationDataStoreApiImpl.h"
#include "logger.hpp"
#include "udr_app.hpp"
#include "udr_config.hpp"
using namespace config;
extern config::udr_config udr_cfg;
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
IPTVConfigurationDataStoreApiImpl::IPTVConfigurationDataStoreApiImpl( IPTVConfigurationDataStoreApiImpl::IPTVConfigurationDataStoreApiImpl(
std::shared_ptr<Pistache::Rest::Router> rtr) std::shared_ptr<Pistache::Rest::Router> rtr, udr_app *udr_app_inst,
: IPTVConfigurationDataStoreApi(rtr) {} std::string address)
: IPTVConfigurationDataStoreApi(rtr),
m_udr_app(udr_app_inst),
m_address(address) {}
void IPTVConfigurationDataStoreApiImpl::read_iptv_congifuration_data( void IPTVConfigurationDataStoreApiImpl::read_iptv_congifuration_data(
const Pistache::Optional<std::vector<std::string>> &configIds, const Pistache::Optional<std::vector<std::string>> &configIds,
...@@ -31,4 +39,4 @@ void IPTVConfigurationDataStoreApiImpl::read_iptv_congifuration_data( ...@@ -31,4 +39,4 @@ void IPTVConfigurationDataStoreApiImpl::read_iptv_congifuration_data(
response.send(Pistache::Http::Code::Ok, "Do some magic\n"); response.send(Pistache::Http::Code::Ok, "Do some magic\n");
} }
} // namespace oai::udr::model } // namespace oai::udr::api
/** /**
* Nudr_DataRepository API OpenAPI file * Nudr_DataRepository API OpenAPI file
* Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved. * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
* * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* The version of the OpenAPI document: 2.1.2 *
* * The version of the OpenAPI document: 2.1.2
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). *
* https://openapi-generator.tech * NOTE: This class is auto generated by OpenAPI Generator
* Do not edit the class manually. * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
*/ * the class manually.
*/
/* /*
* IPTVConfigurationDataStoreApiImpl.h * IPTVConfigurationDataStoreApiImpl.h
* *
* *
*/ */
#ifndef IPTV_CONFIGURATION_DATA_STORE_API_IMPL_H_ #ifndef IPTV_CONFIGURATION_DATA_STORE_API_IMPL_H_
#define IPTV_CONFIGURATION_DATA_STORE_API_IMPL_H_ #define IPTV_CONFIGURATION_DATA_STORE_API_IMPL_H_
#include <pistache/endpoint.h> #include <pistache/endpoint.h>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
...@@ -29,29 +29,37 @@ ...@@ -29,29 +29,37 @@
#include <pistache/optional.h> #include <pistache/optional.h>
#include <string>
#include "IptvConfigData.h" #include "IptvConfigData.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include "Snssai.h" #include "Snssai.h"
#include <string>
#include "udr_app.hpp"
namespace oai::udr::api { namespace oai::udr::api {
using namespace oai::udr::model; using namespace oai::udr::model;
using namespace oai::udr::app;
class IPTVConfigurationDataStoreApiImpl : public oai::udr::api::IPTVConfigurationDataStoreApi {
public: class IPTVConfigurationDataStoreApiImpl
IPTVConfigurationDataStoreApiImpl(std::shared_ptr<Pistache::Rest::Router>); : public oai::udr::api::IPTVConfigurationDataStoreApi {
~IPTVConfigurationDataStoreApiImpl() {} private:
udr_app *m_udr_app;
void read_iptv_congifuration_data(const Pistache::Optional<std::vector<std::string>> &configIds, const Pistache::Optional<std::vector<std::string>> &dnns, const Pistache::Optional<std::vector<Snssai>> &snssais, const Pistache::Optional<std::vector<std::string>> &supis, const Pistache::Optional<std::vector<std::string>> &interGroupIds, Pistache::Http::ResponseWriter &response); std::string m_address;
public:
IPTVConfigurationDataStoreApiImpl(std::shared_ptr<Pistache::Rest::Router>,
udr_app *udr_app_inst, std::string address);
~IPTVConfigurationDataStoreApiImpl() {}
void read_iptv_congifuration_data(
const Pistache::Optional<std::vector<std::string>> &configIds,
const Pistache::Optional<std::vector<std::string>> &dnns,
const Pistache::Optional<std::vector<Snssai>> &snssais,
const Pistache::Optional<std::vector<std::string>> &supis,
const Pistache::Optional<std::vector<std::string>> &interGroupIds,
Pistache::Http::ResponseWriter &response);
}; };
} } // namespace oai::udr::api
#endif #endif
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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