Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AMF
Commits
ddcaaab0
Commit
ddcaaab0
authored
Aug 16, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Associate EventExposure with AMF App
parent
50003832
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
481 additions
and
149 deletions
+481
-149
src/common/3gpp_29.518.h
src/common/3gpp_29.518.h
+1
-0
src/sbi/amf_server/AMFApiServer.cpp
src/sbi/amf_server/AMFApiServer.cpp
+4
-0
src/sbi/amf_server/AMFApiServer.hpp
src/sbi/amf_server/AMFApiServer.hpp
+6
-10
src/sbi/amf_server/api/IndividualSubscriptionDocumentApi.cpp
src/sbi/amf_server/api/IndividualSubscriptionDocumentApi.cpp
+38
-72
src/sbi/amf_server/api/IndividualSubscriptionDocumentApi.h
src/sbi/amf_server/api/IndividualSubscriptionDocumentApi.h
+18
-38
src/sbi/amf_server/api/IndividualSubscriptionDocumentApiEventExposure.cpp
...er/api/IndividualSubscriptionDocumentApiEventExposure.cpp
+154
-0
src/sbi/amf_server/api/IndividualSubscriptionDocumentApiEventExposure.h
...rver/api/IndividualSubscriptionDocumentApiEventExposure.h
+110
-0
src/sbi/amf_server/api/SubscriptionsCollectionDocumentApiEventExposure.cpp
...r/api/SubscriptionsCollectionDocumentApiEventExposure.cpp
+0
-3
src/sbi/amf_server/api/SubscriptionsCollectionDocumentApiEventExposure.h
...ver/api/SubscriptionsCollectionDocumentApiEventExposure.h
+1
-1
src/sbi/amf_server/impl/IndividualSubscriptionDocumentApiImpl.cpp
...amf_server/impl/IndividualSubscriptionDocumentApiImpl.cpp
+12
-9
src/sbi/amf_server/impl/IndividualSubscriptionDocumentApiImpl.h
...i/amf_server/impl/IndividualSubscriptionDocumentApiImpl.h
+10
-13
src/sbi/amf_server/impl/IndividualSubscriptionDocumentApiImplEventExposure.cpp
...pl/IndividualSubscriptionDocumentApiImplEventExposure.cpp
+45
-0
src/sbi/amf_server/impl/IndividualSubscriptionDocumentApiImplEventExposure.h
...impl/IndividualSubscriptionDocumentApiImplEventExposure.h
+71
-0
src/sbi/amf_server/impl/SubscriptionsCollectionDocumentApiImplEventExposure.cpp
...l/SubscriptionsCollectionDocumentApiImplEventExposure.cpp
+4
-2
src/sbi/amf_server/impl/SubscriptionsCollectionDocumentApiImplEventExposure.h
...mpl/SubscriptionsCollectionDocumentApiImplEventExposure.h
+7
-1
No files found.
src/common/3gpp_29.518.h
View file @
ddcaaab0
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#define FILE_3GPP_29_518_SEEN
#define FILE_3GPP_29_518_SEEN
#include "amf.hpp"
#include "amf.hpp"
#include <vector>
typedef
enum
amf_event_e
{
typedef
enum
amf_event_e
{
LOCATION_REPORT
=
1
,
LOCATION_REPORT
=
1
,
...
...
src/sbi/amf_server/AMFApiServer.cpp
View file @
ddcaaab0
...
@@ -9,6 +9,7 @@ void AMFApiServer::init(size_t thr) {
...
@@ -9,6 +9,7 @@ void AMFApiServer::init(size_t thr) {
opts
.
maxRequestSize
(
PISTACHE_SERVER_MAX_PAYLOAD
);
opts
.
maxRequestSize
(
PISTACHE_SERVER_MAX_PAYLOAD
);
m_httpEndpoint
->
init
(
opts
);
m_httpEndpoint
->
init
(
opts
);
m_individualSubscriptionDocumentApiImpl
->
init
();
m_individualSubscriptionDocumentApiImpl
->
init
();
m_individualSubscriptionDocumentApiImplEventExposure
->
init
();
m_individualUeContextDocumentApiImpl
->
init
();
m_individualUeContextDocumentApiImpl
->
init
();
m_n1N2IndividualSubscriptionDocumentApiImpl
->
init
();
m_n1N2IndividualSubscriptionDocumentApiImpl
->
init
();
m_n1N2MessageCollectionDocumentApiImpl
->
init
();
m_n1N2MessageCollectionDocumentApiImpl
->
init
();
...
@@ -24,6 +25,9 @@ void AMFApiServer::start() {
...
@@ -24,6 +25,9 @@ void AMFApiServer::start() {
if
(
m_individualSubscriptionDocumentApiImpl
!=
nullptr
)
if
(
m_individualSubscriptionDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
Logger
::
amf_server
().
debug
(
"AMF handler for IndividualSubscriptionDocumentApiImpl"
);
"AMF handler for IndividualSubscriptionDocumentApiImpl"
);
if
(
m_individualSubscriptionDocumentApiImplEventExposure
!=
nullptr
)
Logger
::
amf_server
().
debug
(
"AMF handler for IndividualSubscriptionDocumentApiImpl"
);
if
(
m_individualUeContextDocumentApiImpl
!=
nullptr
)
if
(
m_individualUeContextDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
Logger
::
amf_server
().
debug
(
"AMF handler for IndividualUeContextDocumentApiImpl"
);
"AMF handler for IndividualUeContextDocumentApiImpl"
);
...
...
src/sbi/amf_server/AMFApiServer.hpp
View file @
ddcaaab0
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#endif
#endif
#include "IndividualSubscriptionDocumentApiImpl.h"
#include "IndividualSubscriptionDocumentApiImpl.h"
#include "IndividualSubscriptionDocumentApiImplEventExposure.h"
#include "IndividualUeContextDocumentApiImpl.h"
#include "IndividualUeContextDocumentApiImpl.h"
#include "N1N2IndividualSubscriptionDocumentApiImpl.h"
#include "N1N2IndividualSubscriptionDocumentApiImpl.h"
#include "N1N2MessageCollectionDocumentApiImpl.h"
#include "N1N2MessageCollectionDocumentApiImpl.h"
...
@@ -16,8 +17,6 @@
...
@@ -16,8 +17,6 @@
#include "NonUEN2MessagesCollectionDocumentApiImpl.h"
#include "NonUEN2MessagesCollectionDocumentApiImpl.h"
#include "NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl.h"
#include "NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl.h"
#include "SubscriptionsCollectionDocumentApiImpl.h"
#include "SubscriptionsCollectionDocumentApiImpl.h"
#include "SubscriptionsCollectionApiImpl.h"
#include "NFStatusNotifyApiImpl.h"
#define PISTACHE_SERVER_THREADS 2
#define PISTACHE_SERVER_THREADS 2
#define PISTACHE_SERVER_MAX_PAYLOAD 32768
#define PISTACHE_SERVER_MAX_PAYLOAD 32768
...
@@ -36,6 +35,9 @@ class AMFApiServer {
...
@@ -36,6 +35,9 @@ class AMFApiServer {
m_individualSubscriptionDocumentApiImpl
=
m_individualSubscriptionDocumentApiImpl
=
std
::
make_shared
<
IndividualSubscriptionDocumentApiImpl
>
(
std
::
make_shared
<
IndividualSubscriptionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_router
,
amf_app_inst
);
m_individualSubscriptionDocumentApiImplEventExposure
=
std
::
make_shared
<
IndividualSubscriptionDocumentApiImplEventExposure
>
(
m_router
,
amf_app_inst
);
m_individualUeContextDocumentApiImpl
=
m_individualUeContextDocumentApiImpl
=
std
::
make_shared
<
IndividualUeContextDocumentApiImpl
>
(
std
::
make_shared
<
IndividualUeContextDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_router
,
amf_app_inst
);
...
@@ -62,11 +64,6 @@ class AMFApiServer {
...
@@ -62,11 +64,6 @@ class AMFApiServer {
m_subscriptionsCollectionDocumentApiImpl
=
m_subscriptionsCollectionDocumentApiImpl
=
std
::
make_shared
<
SubscriptionsCollectionDocumentApiImpl
>
(
std
::
make_shared
<
SubscriptionsCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_router
,
amf_app_inst
);
m_subscriptionsCollectionApiImpl
=
std
::
make_shared
<
SubscriptionsCollectionApiImpl
>
(
m_router
,
amf_app_inst
,
m_address
);
m_nfStatusNotifyApiImpl
=
std
::
make_shared
<
NFStatusNotifyApiImpl
>
(
m_router
,
amf_app_inst
,
m_address
);
}
}
void
init
(
size_t
thr
=
1
);
void
init
(
size_t
thr
=
1
);
...
@@ -78,6 +75,8 @@ class AMFApiServer {
...
@@ -78,6 +75,8 @@ class AMFApiServer {
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
m_router
;
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
m_router
;
std
::
shared_ptr
<
IndividualSubscriptionDocumentApiImpl
>
std
::
shared_ptr
<
IndividualSubscriptionDocumentApiImpl
>
m_individualSubscriptionDocumentApiImpl
;
m_individualSubscriptionDocumentApiImpl
;
std
::
shared_ptr
<
IndividualSubscriptionDocumentApiImplEventExposure
>
m_individualSubscriptionDocumentApiImplEventExposure
;
std
::
shared_ptr
<
IndividualUeContextDocumentApiImpl
>
std
::
shared_ptr
<
IndividualUeContextDocumentApiImpl
>
m_individualUeContextDocumentApiImpl
;
m_individualUeContextDocumentApiImpl
;
std
::
shared_ptr
<
N1N2IndividualSubscriptionDocumentApiImpl
>
std
::
shared_ptr
<
N1N2IndividualSubscriptionDocumentApiImpl
>
...
@@ -96,8 +95,5 @@ class AMFApiServer {
...
@@ -96,8 +95,5 @@ class AMFApiServer {
m_nonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
;
m_nonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
;
std
::
shared_ptr
<
SubscriptionsCollectionDocumentApiImpl
>
std
::
shared_ptr
<
SubscriptionsCollectionDocumentApiImpl
>
m_subscriptionsCollectionDocumentApiImpl
;
m_subscriptionsCollectionDocumentApiImpl
;
std
::
shared_ptr
<
SubscriptionsCollectionApiImpl
>
m_subscriptionsCollectionApiImpl
;
std
::
shared_ptr
<
NFStatusNotifyApiImpl
>
m_nfStatusNotifyApiImpl
;
std
::
string
m_address
;
std
::
string
m_address
;
};
};
src/sbi/amf_server/api/IndividualSubscriptionDocumentApi.cpp
View file @
ddcaaab0
...
@@ -25,8 +25,9 @@ using namespace org::openapitools::server::helpers;
...
@@ -25,8 +25,9 @@ using namespace org::openapitools::server::helpers;
using
namespace
oai
::
amf
::
model
;
using
namespace
oai
::
amf
::
model
;
IndividualSubscriptionDocumentApi
::
IndividualSubscriptionDocumentApi
(
IndividualSubscriptionDocumentApi
::
IndividualSubscriptionDocumentApi
(
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
rtr
)
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
)
{
:
router
(
rtr
)
{}
router
=
rtr
;
}
void
IndividualSubscriptionDocumentApi
::
init
()
{
void
IndividualSubscriptionDocumentApi
::
init
()
{
setupRoutes
();
setupRoutes
();
...
@@ -35,17 +36,19 @@ void IndividualSubscriptionDocumentApi::init() {
...
@@ -35,17 +36,19 @@ void IndividualSubscriptionDocumentApi::init() {
void
IndividualSubscriptionDocumentApi
::
setupRoutes
()
{
void
IndividualSubscriptionDocumentApi
::
setupRoutes
()
{
using
namespace
Pistache
::
Rest
;
using
namespace
Pistache
::
Rest
;
Routes
::
Delete
(
Routes
::
Put
(
*
router
,
*
router
,
base
+
amf_cfg
.
sbi_api_version
+
"/subscriptions/:subscriptionId"
,
base
+
amf_cfg
.
sbi_api_version
+
"/subscriptions/:subscriptionId"
,
Routes
::
bind
(
Routes
::
bind
(
&
IndividualSubscriptionDocumentApi
::
delete_subscription_handler
,
&
IndividualSubscriptionDocumentApi
::
a_mf_status_change_subscribe_modfy_handler
,
this
));
this
));
Routes
::
Patch
(
Routes
::
Delete
(
*
router
,
*
router
,
base
+
amf_cfg
.
sbi_api_version
+
"/subscriptions/:subscriptionId"
,
base
+
amf_cfg
.
sbi_api_version
+
"/subscriptions/:subscriptionId"
,
Routes
::
bind
(
Routes
::
bind
(
&
IndividualSubscriptionDocumentApi
::
modify_subscription_handler
,
&
IndividualSubscriptionDocumentApi
::
a_mf_status_change_un_subscribe_handler
,
this
));
this
));
// Default handler, called when a route is not found
// Default handler, called when a route is not found
...
@@ -55,84 +58,47 @@ void IndividualSubscriptionDocumentApi::setupRoutes() {
...
@@ -55,84 +58,47 @@ void IndividualSubscriptionDocumentApi::setupRoutes() {
this
));
this
));
}
}
std
::
pair
<
Pistache
::
Http
::
Code
,
std
::
string
>
void
IndividualSubscriptionDocumentApi
::
IndividualSubscriptionDocumentApi
::
handleParsingException
(
a_mf_status_change_subscribe_modfy_handler
(
const
std
::
exception
&
ex
)
const
noexcept
{
try
{
throw
ex
;
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
return
std
::
make_pair
(
Pistache
::
Http
::
Code
::
Bad_Request
,
e
.
what
());
}
catch
(
org
::
openapitools
::
server
::
helpers
::
ValidationException
&
e
)
{
return
std
::
make_pair
(
Pistache
::
Http
::
Code
::
Bad_Request
,
e
.
what
());
}
}
std
::
pair
<
Pistache
::
Http
::
Code
,
std
::
string
>
IndividualSubscriptionDocumentApi
::
handleOperationException
(
const
std
::
exception
&
ex
)
const
noexcept
{
return
std
::
make_pair
(
Pistache
::
Http
::
Code
::
Internal_Server_Error
,
ex
.
what
());
}
void
IndividualSubscriptionDocumentApi
::
delete_subscription_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Pistache
::
Http
::
ResponseWriter
response
)
{
try
{
// Getting the path params
// Getting the path params
auto
subscriptionId
=
request
.
param
(
":subscriptionId"
).
as
<
std
::
string
>
();
auto
subscriptionId
=
request
.
param
(
":subscriptionId"
).
as
<
std
::
string
>
();
// Getting the body param
SubscriptionData
subscriptionData
;
try
{
try
{
this
->
delete_subscription
(
subscriptionId
,
response
);
nlohmann
::
json
::
parse
(
request
.
body
()).
get_to
(
subscriptionData
);
}
catch
(
Pistache
::
Http
::
HttpError
&
e
)
{
this
->
a_mf_status_change_subscribe_modfy
(
response
.
send
(
static_cast
<
Pistache
::
Http
::
Code
>
(
e
.
code
()),
e
.
what
());
subscriptionId
,
subscriptionData
,
response
);
return
;
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
}
catch
(
std
::
exception
&
e
)
{
// send a 400 error
const
std
::
pair
<
Pistache
::
Http
::
Code
,
std
::
string
>
errorInfo
=
response
.
send
(
Pistache
::
Http
::
Code
::
Bad_Request
,
e
.
what
());
this
->
handleOperationException
(
e
);
response
.
send
(
errorInfo
.
first
,
errorInfo
.
second
);
return
;
return
;
}
}
catch
(
std
::
exception
&
e
)
{
}
catch
(
std
::
exception
&
e
)
{
// send a 500 error
response
.
send
(
Pistache
::
Http
::
Code
::
Internal_Server_Error
,
e
.
what
());
response
.
send
(
Pistache
::
Http
::
Code
::
Internal_Server_Error
,
e
.
what
());
return
;
}
}
}
}
void
IndividualSubscriptionDocumentApi
::
modify_subscription
_handler
(
void
IndividualSubscriptionDocumentApi
::
a_mf_status_change_un_subscribe
_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Pistache
::
Http
::
ResponseWriter
response
)
{
try
{
// Getting the path params
// Getting the path params
auto
subscriptionId
=
request
.
param
(
":subscriptionId"
).
as
<
std
::
string
>
();
auto
subscriptionId
=
request
.
param
(
":subscriptionId"
).
as
<
std
::
string
>
();
// Getting the body param
// UNKNOWN_BASE_TYPE uNKNOWNBASETYPE;
AmfUpdateEventOptionItem
amfUpdateEventOptionItem
;
// TODO:AmfUpdateEventSubscriptionItem
try
{
try
{
nlohmann
::
json
::
parse
(
request
.
body
()).
get_to
(
amfUpdateEventOptionItem
);
this
->
a_mf_status_change_un_subscribe
(
subscriptionId
,
response
);
amfUpdateEventOptionItem
.
validate
();
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
}
catch
(
std
::
exception
&
e
)
{
// send a 400 error
const
std
::
pair
<
Pistache
::
Http
::
Code
,
std
::
string
>
errorInfo
=
response
.
send
(
Pistache
::
Http
::
Code
::
Bad_Request
,
e
.
what
());
this
->
handleParsingException
(
e
);
response
.
send
(
errorInfo
.
first
,
errorInfo
.
second
);
return
;
return
;
}
/*
//TODO:AmfUpdateEventSubscriptionItem
try {
//this->modify_subscription(subscriptionId, uNKNOWNBASETYPE,
response); } catch (Pistache::Http::HttpError &e) {
response.send(static_cast<Pistache::Http::Code>(e.code()),
e.what()); return; } catch (std::exception &e) { const
std::pair<Pistache::Http::Code, std::string> errorInfo =
this->handleOperationException(e); response.send(errorInfo.first,
errorInfo.second); return;
}
*/
}
catch
(
std
::
exception
&
e
)
{
}
catch
(
std
::
exception
&
e
)
{
// send a 500 error
response
.
send
(
Pistache
::
Http
::
Code
::
Internal_Server_Error
,
e
.
what
());
response
.
send
(
Pistache
::
Http
::
Code
::
Internal_Server_Error
,
e
.
what
());
return
;
}
}
}
}
...
...
src/sbi/amf_server/api/IndividualSubscriptionDocumentApi.h
View file @
ddcaaab0
/**
/**
* Namf_
EventExposure
* Namf_
Communication
* AMF
Event Exposure
Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* AMF
Communication
Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
*
* The version of the OpenAPI document: 1.1.0.alpha-1
* The version of the OpenAPI document: 1.1.0.alpha-1
...
@@ -24,13 +24,8 @@
...
@@ -24,13 +24,8 @@
#include <pistache/http_headers.h>
#include <pistache/http_headers.h>
#include <pistache/optional.h>
#include <pistache/optional.h>
#include <utility>
#include "AmfUpdatedEventSubscription.h"
//#include "OneOfarrayAmfUpdateEventOptionItem.h"
#include "ProblemDetails.h"
#include "ProblemDetails.h"
//#include "SubscriptionData.h"
#include "SubscriptionData.h"
#include "AmfUpdateEventOptionItem.h"
#include <string>
#include <string>
namespace
oai
{
namespace
oai
{
...
@@ -41,9 +36,8 @@ using namespace oai::amf::model;
...
@@ -41,9 +36,8 @@ using namespace oai::amf::model;
class
IndividualSubscriptionDocumentApi
{
class
IndividualSubscriptionDocumentApi
{
public:
public:
explicit
IndividualSubscriptionDocumentApi
(
IndividualSubscriptionDocumentApi
(
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
);
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
rtr
);
virtual
~
IndividualSubscriptionDocumentApi
()
{}
virtual
~
IndividualSubscriptionDocumentApi
()
=
default
;
void
init
();
void
init
();
const
std
::
string
base
=
"/namf-comm/"
;
const
std
::
string
base
=
"/namf-comm/"
;
...
@@ -51,55 +45,41 @@ class IndividualSubscriptionDocumentApi {
...
@@ -51,55 +45,41 @@ class IndividualSubscriptionDocumentApi {
private:
private:
void
setupRoutes
();
void
setupRoutes
();
void
delete_subscription
_handler
(
void
a_mf_status_change_subscribe_modfy
_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
);
Pistache
::
Http
::
ResponseWriter
response
);
void
modify_subscription
_handler
(
void
a_mf_status_change_un_subscribe
_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
);
Pistache
::
Http
::
ResponseWriter
response
);
void
individual_subscription_document_api_default_handler
(
void
individual_subscription_document_api_default_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
);
Pistache
::
Http
::
ResponseWriter
response
);
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
router
;
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
router
;
/// <summary>
/// Helper function to handle unexpected Exceptions during Parameter parsing
/// and validation. May be overriden to return custom error formats.
/// </summary>
virtual
std
::
pair
<
Pistache
::
Http
::
Code
,
std
::
string
>
handleParsingException
(
const
std
::
exception
&
ex
)
const
noexcept
;
/// <summary>
/// Helper function to handle unexpected Exceptions during processing of the
/// request in handler functions. May be overriden to return custom error
/// formats.
/// </summary>
virtual
std
::
pair
<
Pistache
::
Http
::
Code
,
std
::
string
>
handleOperationException
(
const
std
::
exception
&
ex
)
const
noexcept
;
/// <summary>
/// <summary>
/// Namf_
EventExposure Unsubscribe
service Operation
/// Namf_
Communication AMF Status Change Subscribe Modify
service Operation
/// </summary>
/// </summary>
/// <remarks>
/// <remarks>
///
///
/// </remarks>
/// </remarks>
/// <param name="subscriptionId">
Unique ID of the subscription to be
/// <param name="subscriptionId">
AMF Status Change Subscription
///
deleted
</param>
///
Identifier</param> <param name="subscriptionData">
</param>
virtual
void
delete_subscription
(
virtual
void
a_mf_status_change_subscribe_modfy
(
const
std
::
string
&
subscriptionId
,
const
std
::
string
&
subscriptionId
,
const
SubscriptionData
&
subscriptionData
,
Pistache
::
Http
::
ResponseWriter
&
response
)
=
0
;
Pistache
::
Http
::
ResponseWriter
&
response
)
=
0
;
/// <summary>
/// <summary>
/// Namf_
EventExposure Subscribe Modify
service Operation
/// Namf_
Communication AMF Status Change UnSubscribe
service Operation
/// </summary>
/// </summary>
/// <remarks>
/// <remarks>
///
///
/// </remarks>
/// </remarks>
/// <param name="subscriptionId">
Unique ID of the subscription to be
/// <param name="subscriptionId">
AMF Status Change Subscription
///
modified</param> <param name="AmfUpdateEventOptionItem">
</param>
///
Identifier
</param>
virtual
void
modify_subscription
(
virtual
void
a_mf_status_change_un_subscribe
(
const
std
::
string
&
subscriptionId
,
const
std
::
string
&
subscriptionId
,
const
oai
::
amf
::
model
::
AmfUpdateEventOptionItem
&
amfUpdateEventOptionItem
,
Pistache
::
Http
::
ResponseWriter
&
response
)
=
0
;
Pistache
::
Http
::
ResponseWriter
&
response
)
=
0
;
};
};
...
...
src/sbi/amf_server/api/IndividualSubscriptionDocumentApiEventExposure.cpp
0 → 100644
View file @
ddcaaab0
/**
* Namf_Communication
* AMF Communication Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "IndividualSubscriptionDocumentApiEventExposure.h"
#include "Helpers.h"
#include "amf_config.hpp"
extern
config
::
amf_config
amf_cfg
;
namespace
oai
{
namespace
amf
{
namespace
api
{
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
oai
::
amf
::
model
;
IndividualSubscriptionDocumentApiEventExposure
::
IndividualSubscriptionDocumentApiEventExposure
(
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
rtr
)
:
router
(
rtr
)
{}
void
IndividualSubscriptionDocumentApiEventExposure
::
init
()
{
setupRoutes
();
}
void
IndividualSubscriptionDocumentApiEventExposure
::
setupRoutes
()
{
using
namespace
Pistache
::
Rest
;
Routes
::
Delete
(
*
router
,
base
+
amf_cfg
.
sbi_api_version
+
"/subscriptions/:subscriptionId"
,
Routes
::
bind
(
&
IndividualSubscriptionDocumentApiEventExposure
::
delete_subscription_handler
,
this
));
Routes
::
Patch
(
*
router
,
base
+
amf_cfg
.
sbi_api_version
+
"/subscriptions/:subscriptionId"
,
Routes
::
bind
(
&
IndividualSubscriptionDocumentApiEventExposure
::
modify_subscription_handler
,
this
));
// Default handler, called when a route is not found
router
->
addCustomHandler
(
Routes
::
bind
(
&
IndividualSubscriptionDocumentApiEventExposure
::
individual_subscription_document_api_default_handler
,
this
));
}
std
::
pair
<
Pistache
::
Http
::
Code
,
std
::
string
>
IndividualSubscriptionDocumentApiEventExposure
::
handleParsingException
(
const
std
::
exception
&
ex
)
const
noexcept
{
try
{
throw
ex
;
}
catch
(
nlohmann
::
detail
::
exception
&
e
)
{
return
std
::
make_pair
(
Pistache
::
Http
::
Code
::
Bad_Request
,
e
.
what
());
}
catch
(
org
::
openapitools
::
server
::
helpers
::
ValidationException
&
e
)
{
return
std
::
make_pair
(
Pistache
::
Http
::
Code
::
Bad_Request
,
e
.
what
());
}
}
std
::
pair
<
Pistache
::
Http
::
Code
,
std
::
string
>
IndividualSubscriptionDocumentApiEventExposure
::
handleOperationException
(
const
std
::
exception
&
ex
)
const
noexcept
{
return
std
::
make_pair
(
Pistache
::
Http
::
Code
::
Internal_Server_Error
,
ex
.
what
());
}
void
IndividualSubscriptionDocumentApiEventExposure
::
delete_subscription_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
try
{
// Getting the path params
auto
subscriptionId
=
request
.
param
(
":subscriptionId"
).
as
<
std
::
string
>
();
try
{
this
->
delete_subscription
(
subscriptionId
,
response
);
}
catch
(
Pistache
::
Http
::
HttpError
&
e
)
{
response
.
send
(
static_cast
<
Pistache
::
Http
::
Code
>
(
e
.
code
()),
e
.
what
());
return
;
}
catch
(
std
::
exception
&
e
)
{
const
std
::
pair
<
Pistache
::
Http
::
Code
,
std
::
string
>
errorInfo
=
this
->
handleOperationException
(
e
);
response
.
send
(
errorInfo
.
first
,
errorInfo
.
second
);
return
;
}
}
catch
(
std
::
exception
&
e
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Internal_Server_Error
,
e
.
what
());
}
}
void
IndividualSubscriptionDocumentApiEventExposure
::
modify_subscription_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
try
{
// Getting the path params
auto
subscriptionId
=
request
.
param
(
":subscriptionId"
).
as
<
std
::
string
>
();
// Getting the body param
// UNKNOWN_BASE_TYPE uNKNOWNBASETYPE;
AmfUpdateEventOptionItem
amfUpdateEventOptionItem
;
// TODO:AmfUpdateEventSubscriptionItem
try
{
nlohmann
::
json
::
parse
(
request
.
body
()).
get_to
(
amfUpdateEventOptionItem
);
amfUpdateEventOptionItem
.
validate
();
}
catch
(
std
::
exception
&
e
)
{
const
std
::
pair
<
Pistache
::
Http
::
Code
,
std
::
string
>
errorInfo
=
this
->
handleParsingException
(
e
);
response
.
send
(
errorInfo
.
first
,
errorInfo
.
second
);
return
;
}
/*
//TODO:AmfUpdateEventSubscriptionItem
try {
//this->modify_subscription(subscriptionId, uNKNOWNBASETYPE,
response); } catch (Pistache::Http::HttpError &e) {
response.send(static_cast<Pistache::Http::Code>(e.code()),
e.what()); return; } catch (std::exception &e) { const
std::pair<Pistache::Http::Code, std::string> errorInfo =
this->handleOperationException(e); response.send(errorInfo.first,
errorInfo.second); return;
}
*/
}
catch
(
std
::
exception
&
e
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Internal_Server_Error
,
e
.
what
());
}
}
void
IndividualSubscriptionDocumentApiEventExposure
::
individual_subscription_document_api_default_handler
(
const
Pistache
::
Rest
::
Request
&
,
Pistache
::
Http
::
ResponseWriter
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
"The requested method does not exist"
);
}
}
// namespace api
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/api/IndividualSubscriptionDocumentApiEventExposure.h
0 → 100644
View file @
ddcaaab0
/**
* Namf_EventExposure
* AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* IndividualSubscriptionDocumentApiEventExposure.h
*
*
*/
#ifndef IndividualSubscriptionDocumentApiEventExposure_H_
#define IndividualSubscriptionDocumentApiEventExposure_H_
#include <pistache/http.h>
#include <pistache/router.h>
#include <pistache/http_headers.h>
#include <pistache/optional.h>
#include <utility>
#include "AmfUpdatedEventSubscription.h"
//#include "OneOfarrayAmfUpdateEventOptionItem.h"
#include "ProblemDetails.h"
//#include "SubscriptionData.h"
#include "AmfUpdateEventOptionItem.h"
#include <string>
namespace
oai
{
namespace
amf
{
namespace
api
{
using
namespace
oai
::
amf
::
model
;
class
IndividualSubscriptionDocumentApiEventExposure
{
public:
explicit
IndividualSubscriptionDocumentApiEventExposure
(
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
rtr
);
virtual
~
IndividualSubscriptionDocumentApiEventExposure
()
=
default
;
void
init
();
const
std
::
string
base
=
"/namf-comm/"
;
private:
void
setupRoutes
();
void
delete_subscription_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
);
void
modify_subscription_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
);
void
individual_subscription_document_api_default_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
);
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
router
;
/// <summary>
/// Helper function to handle unexpected Exceptions during Parameter parsing
/// and validation. May be overriden to return custom error formats.
/// </summary>
virtual
std
::
pair
<
Pistache
::
Http
::
Code
,
std
::
string
>
handleParsingException
(
const
std
::
exception
&
ex
)
const
noexcept
;
/// <summary>
/// Helper function to handle unexpected Exceptions during processing of the
/// request in handler functions. May be overriden to return custom error
/// formats.
/// </summary>
virtual
std
::
pair
<
Pistache
::
Http
::
Code
,
std
::
string
>
handleOperationException
(
const
std
::
exception
&
ex
)
const
noexcept
;
/// <summary>
/// Namf_EventExposure Unsubscribe service Operation
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="subscriptionId">Unique ID of the subscription to be
/// deleted</param>
virtual
void
delete_subscription
(
const
std
::
string
&
subscriptionId
,
Pistache
::
Http
::
ResponseWriter
&
response
)
=
0
;
/// <summary>
/// Namf_EventExposure Subscribe Modify service Operation
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="subscriptionId">Unique ID of the subscription to be
/// modified</param> <param name="AmfUpdateEventOptionItem"></param>
virtual
void
modify_subscription
(
const
std
::
string
&
subscriptionId
,
const
oai
::
amf
::
model
::
AmfUpdateEventOptionItem
&
amfUpdateEventOptionItem
,
Pistache
::
Http
::
ResponseWriter
&
response
)
=
0
;
};
}
// namespace api
}
// namespace amf
}
// namespace oai
#endif
/* IndividualSubscriptionDocumentApiEventExposure_H_ */
src/sbi/amf_server/api/SubscriptionsCollectionDocumentApiEventExposure.cpp
View file @
ddcaaab0
...
@@ -19,9 +19,6 @@ namespace oai::amf::api {
...
@@ -19,9 +19,6 @@ namespace oai::amf::api {
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
org
::
openapitools
::
server
::
helpers
;
using
namespace
oai
::
amf
::
model
;
using
namespace
oai
::
amf
::
model
;
const
std
::
string
SubscriptionsCollectionDocumentApiEventExposure
::
base
=
"/namf-evts/v1"
;
SubscriptionsCollectionDocumentApiEventExposure
::
SubscriptionsCollectionDocumentApiEventExposure
::
SubscriptionsCollectionDocumentApiEventExposure
(
SubscriptionsCollectionDocumentApiEventExposure
(
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
rtr
)
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
rtr
)
...
...
src/sbi/amf_server/api/SubscriptionsCollectionDocumentApiEventExposure.h
View file @
ddcaaab0
...
@@ -39,7 +39,7 @@ class SubscriptionsCollectionDocumentApiEventExposure {
...
@@ -39,7 +39,7 @@ class SubscriptionsCollectionDocumentApiEventExposure {
virtual
~
SubscriptionsCollectionDocumentApiEventExposure
()
=
default
;
virtual
~
SubscriptionsCollectionDocumentApiEventExposure
()
=
default
;
void
init
();
void
init
();
static
const
std
::
string
base
;
const
std
::
string
base
=
"/namf-evts/"
;
private:
private:
void
setupRoutes
();
void
setupRoutes
();
...
...
src/sbi/amf_server/impl/IndividualSubscriptionDocumentApiImpl.cpp
View file @
ddcaaab0
/**
/**
* Namf_
EventExposure
* Namf_
Communication
* AMF
Event Exposure
Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* AMF
Communication
Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
*
* The version of the OpenAPI document: 1.1.0.alpha-1
* The version of the OpenAPI document: 1.1.0.alpha-1
...
@@ -20,22 +20,25 @@ namespace api {
...
@@ -20,22 +20,25 @@ namespace api {
using
namespace
oai
::
amf
::
model
;
using
namespace
oai
::
amf
::
model
;
IndividualSubscriptionDocumentApiImpl
::
IndividualSubscriptionDocumentApiImpl
(
IndividualSubscriptionDocumentApiImpl
::
IndividualSubscriptionDocumentApiImpl
(
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
rtr
,
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
rtr
,
amf_application
::
amf_app
*
amf_app_inst
)
amf_application
::
amf_app
*
amf_app_inst
)
:
IndividualSubscriptionDocumentApi
(
rtr
),
m_amf_app
(
amf_app_inst
)
{}
:
IndividualSubscriptionDocumentApi
(
rtr
),
m_amf_app
(
amf_app_inst
)
{}
void
IndividualSubscriptionDocumentApiImpl
::
delete_subscription
(
void
IndividualSubscriptionDocumentApiImpl
::
a_mf_status_change_subscribe_modfy
(
const
std
::
string
&
subscriptionId
,
const
std
::
string
&
subscriptionId
,
const
SubscriptionData
&
subscriptionData
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"This API has not been implemented yet!
\n
"
);
Pistache
::
Http
::
Code
::
Ok
,
"IndividualSubscriptionDocumentApiImpl::a_mf_status_change_subscribe_"
"modfy API has not been implemented yet!
\n
"
);
}
}
void
IndividualSubscriptionDocumentApiImpl
::
modify_subscription
(
void
IndividualSubscriptionDocumentApiImpl
::
a_mf_status_change_un_subscribe
(
const
std
::
string
&
subscriptionId
,
const
std
::
string
&
subscriptionId
,
const
AmfUpdateEventOptionItem
&
amfUpdateEventOptionItem
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"This API has not been implemented yet!
\n
"
);
Pistache
::
Http
::
Code
::
Ok
,
"IndividualSubscriptionDocumentApiImpl::a_mf_status_change_un_subscribe "
"API has not been implemented yet!
\n
"
);
}
}
}
// namespace api
}
// namespace api
...
...
src/sbi/amf_server/impl/IndividualSubscriptionDocumentApiImpl.h
View file @
ddcaaab0
/**
/**
* Namf_
EventExposure
* Namf_
Communication
* AMF
Event Exposure
Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* AMF
Communication
Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
*
* The version of the OpenAPI document: 1.1.0.alpha-1
* The version of the OpenAPI document: 1.1.0.alpha-1
...
@@ -29,10 +29,8 @@
...
@@ -29,10 +29,8 @@
#include <pistache/optional.h>
#include <pistache/optional.h>
#include "AmfUpdatedEventSubscription.h"
//#include "OneOfarrayAmfUpdateEventOptionItem.h"
#include "ProblemDetails.h"
#include "ProblemDetails.h"
#include "
AmfUpdateEventOptionItem
.h"
#include "
SubscriptionData
.h"
#include <string>
#include <string>
#include "amf_app.hpp"
#include "amf_app.hpp"
...
@@ -42,22 +40,21 @@ namespace amf {
...
@@ -42,22 +40,21 @@ namespace amf {
namespace
api
{
namespace
api
{
using
namespace
oai
::
amf
::
model
;
using
namespace
oai
::
amf
::
model
;
using
namespace
oai
::
amf
::
api
;
class
IndividualSubscriptionDocumentApiImpl
class
IndividualSubscriptionDocumentApiImpl
:
public
IndividualSubscriptionDocumentApi
{
:
public
oai
::
amf
::
api
::
IndividualSubscriptionDocumentApi
{
public:
public:
explicit
IndividualSubscriptionDocumentApiImpl
(
IndividualSubscriptionDocumentApiImpl
(
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
,
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
,
amf_application
::
amf_app
*
amf_app_inst
);
amf_application
::
amf_app
*
amf_app_inst
);
~
IndividualSubscriptionDocumentApiImpl
()
override
=
default
;
~
IndividualSubscriptionDocumentApiImpl
()
{}
void
delete_subscription
(
void
a_mf_status_change_subscribe_modfy
(
const
std
::
string
&
subscriptionId
,
const
std
::
string
&
subscriptionId
,
const
SubscriptionData
&
subscriptionData
,
Pistache
::
Http
::
ResponseWriter
&
response
);
Pistache
::
Http
::
ResponseWriter
&
response
);
void
modify_subscription
(
void
a_mf_status_change_un_subscribe
(
const
std
::
string
&
subscriptionId
,
const
std
::
string
&
subscriptionId
,
const
AmfUpdateEventOptionItem
&
amfUpdateEventOptionItem
,
Pistache
::
Http
::
ResponseWriter
&
response
);
Pistache
::
Http
::
ResponseWriter
&
response
);
private:
private:
...
...
src/sbi/amf_server/impl/IndividualSubscriptionDocumentApiImplEventExposure.cpp
0 → 100644
View file @
ddcaaab0
/**
* Namf_EventExposure
* AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "IndividualSubscriptionDocumentApiImplEventExposure.h"
namespace
oai
{
namespace
amf
{
namespace
api
{
using
namespace
oai
::
amf
::
model
;
IndividualSubscriptionDocumentApiImplEventExposure
::
IndividualSubscriptionDocumentApiImplEventExposure
(
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
rtr
,
amf_application
::
amf_app
*
amf_app_inst
)
:
IndividualSubscriptionDocumentApiEventExposure
(
rtr
),
m_amf_app
(
amf_app_inst
)
{}
void
IndividualSubscriptionDocumentApiImplEventExposure
::
delete_subscription
(
const
std
::
string
&
subscriptionId
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"This API has not been implemented yet!
\n
"
);
}
void
IndividualSubscriptionDocumentApiImplEventExposure
::
modify_subscription
(
const
std
::
string
&
subscriptionId
,
const
AmfUpdateEventOptionItem
&
amfUpdateEventOptionItem
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"This API has not been implemented yet!
\n
"
);
}
}
// namespace api
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/impl/IndividualSubscriptionDocumentApiImplEventExposure.h
0 → 100644
View file @
ddcaaab0
/**
* Namf_EventExposure
* AMF Event Exposure Service © 2019, 3GPP Organizational Partners (ARIB, ATIS,
* CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.0.alpha-1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* IndividualSubscriptionDocumentApiImplEventExposure.h
*
*
*/
#ifndef INDIVIDUAL_SUBSCRIPTION_DOCUMENT_API_IMPL_EVENT_EXPOSURE_H_
#define INDIVIDUAL_SUBSCRIPTION_DOCUMENT_API_IMPL_EVENT_EXPOSURE_H_
#include <pistache/endpoint.h>
#include <pistache/http.h>
#include <pistache/router.h>
#include <memory>
#include <IndividualSubscriptionDocumentApiEventExposure.h>
#include <pistache/optional.h>
#include "AmfUpdatedEventSubscription.h"
//#include "OneOfarrayAmfUpdateEventOptionItem.h"
#include "ProblemDetails.h"
#include "AmfUpdateEventOptionItem.h"
#include <string>
#include "amf_app.hpp"
namespace
oai
{
namespace
amf
{
namespace
api
{
using
namespace
oai
::
amf
::
model
;
using
namespace
oai
::
amf
::
api
;
class
IndividualSubscriptionDocumentApiImplEventExposure
:
public
IndividualSubscriptionDocumentApiEventExposure
{
public:
explicit
IndividualSubscriptionDocumentApiImplEventExposure
(
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
,
amf_application
::
amf_app
*
amf_app_inst
);
~
IndividualSubscriptionDocumentApiImplEventExposure
()
override
=
default
;
void
delete_subscription
(
const
std
::
string
&
subscriptionId
,
Pistache
::
Http
::
ResponseWriter
&
response
);
void
modify_subscription
(
const
std
::
string
&
subscriptionId
,
const
AmfUpdateEventOptionItem
&
amfUpdateEventOptionItem
,
Pistache
::
Http
::
ResponseWriter
&
response
);
private:
amf_application
::
amf_app
*
m_amf_app
;
};
}
// namespace api
}
// namespace amf
}
// namespace oai
#endif
src/sbi/amf_server/impl/SubscriptionsCollectionDocumentApiImplEventExposure.cpp
View file @
ddcaaab0
...
@@ -21,8 +21,10 @@ using namespace oai::amf::model;
...
@@ -21,8 +21,10 @@ using namespace oai::amf::model;
SubscriptionsCollectionDocumentApiImplEventExposure
::
SubscriptionsCollectionDocumentApiImplEventExposure
::
SubscriptionsCollectionDocumentApiImplEventExposure
(
SubscriptionsCollectionDocumentApiImplEventExposure
(
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
rtr
)
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
rtr
,
:
SubscriptionsCollectionDocumentApiEventExposure
(
rtr
)
{}
amf_application
::
amf_app
*
amf_app_inst
)
:
SubscriptionsCollectionDocumentApiEventExposure
(
rtr
),
m_amf_app
(
amf_app_inst
)
{}
void
SubscriptionsCollectionDocumentApiImplEventExposure
::
create_subscription
(
void
SubscriptionsCollectionDocumentApiImplEventExposure
::
create_subscription
(
const
AmfCreateEventSubscription
&
amfCreateEventSubscription
,
const
AmfCreateEventSubscription
&
amfCreateEventSubscription
,
...
...
src/sbi/amf_server/impl/SubscriptionsCollectionDocumentApiImplEventExposure.h
View file @
ddcaaab0
...
@@ -32,21 +32,27 @@
...
@@ -32,21 +32,27 @@
#include "AmfCreateEventSubscription.h"
#include "AmfCreateEventSubscription.h"
#include "AmfCreatedEventSubscription.h"
#include "AmfCreatedEventSubscription.h"
#include "ProblemDetails.h"
#include "ProblemDetails.h"
#include "amf_app.hpp"
namespace
oai
::
amf
::
api
{
namespace
oai
::
amf
::
api
{
using
namespace
oai
::
amf
::
model
;
using
namespace
oai
::
amf
::
model
;
using
namespace
oai
::
amf
::
api
;
class
SubscriptionsCollectionDocumentApiImplEventExposure
class
SubscriptionsCollectionDocumentApiImplEventExposure
:
public
SubscriptionsCollectionDocumentApiEventExposure
{
:
public
SubscriptionsCollectionDocumentApiEventExposure
{
public:
public:
explicit
SubscriptionsCollectionDocumentApiImplEventExposure
(
explicit
SubscriptionsCollectionDocumentApiImplEventExposure
(
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
rtr
);
const
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>&
rtr
,
amf_application
::
amf_app
*
amf_app_inst
);
~
SubscriptionsCollectionDocumentApiImplEventExposure
()
override
=
default
;
~
SubscriptionsCollectionDocumentApiImplEventExposure
()
override
=
default
;
void
create_subscription
(
void
create_subscription
(
const
AmfCreateEventSubscription
&
amfCreateEventSubscription
,
const
AmfCreateEventSubscription
&
amfCreateEventSubscription
,
Pistache
::
Http
::
ResponseWriter
&
response
);
Pistache
::
Http
::
ResponseWriter
&
response
);
private:
amf_application
::
amf_app
*
m_amf_app
;
};
};
}
// namespace oai::amf::api
}
// namespace oai::amf::api
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment