SessionManagementSubscriptionDataApiImpl.h 1.94 KB
Newer Older
yangjian's avatar
yangjian committed
1
/**
2 3 4 5 6 7 8 9 10 11 12
 * Nudr_DataRepository API OpenAPI file
 * 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
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */
yangjian's avatar
yangjian committed
13 14

/*
15 16 17 18
 * SessionManagementSubscriptionDataApiImpl.h
 *
 *
 */
yangjian's avatar
yangjian committed
19 20 21 22 23 24 25 26 27 28 29 30 31

#ifndef SESSION_MANAGEMENT_SUBSCRIPTION_DATA_API_IMPL_H_
#define SESSION_MANAGEMENT_SUBSCRIPTION_DATA_API_IMPL_H_

#include <pistache/endpoint.h>
#include <pistache/http.h>
#include <pistache/router.h>
#include <memory>

#include <SessionManagementSubscriptionDataApi.h>

#include <pistache/optional.h>

32
#include <string>
yangjian's avatar
yangjian committed
33 34 35 36 37
#include "SessionManagementSubscriptionData.h"
#include "Snssai.h"

#include <mysql/mysql.h>

38
#include "udr_app.hpp"
39
namespace oai::udr::api {
yangjian's avatar
yangjian committed
40

41
using namespace oai::udr::model;
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
using namespace oai::udr::app;

class SessionManagementSubscriptionDataApiImpl
    : public oai::udr::api::SessionManagementSubscriptionDataApi {
 private:
  udr_app *m_udr_app;
  std::string m_address;

 public:
  SessionManagementSubscriptionDataApiImpl(
      std::shared_ptr<Pistache::Rest::Router>, udr_app *udr_app_inst,
      std::string address, MYSQL *mysql);
  ~SessionManagementSubscriptionDataApiImpl() {}

  void query_sm_data(
      const std::string &ueId, const std::string &servingPlmnId,
      const Pistache::Optional<Snssai> &singleNssai,
      const Pistache::Optional<std::string> &dnn,
      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;
yangjian's avatar
yangjian committed
68 69
};

70
}  // namespace oai::udr::api
yangjian's avatar
yangjian committed
71 72

#endif