ANNA Suite  2020b
Multipurpose development suite for Telco applications
functions.hpp
Go to the documentation of this file.
1 // ANNA - Anna is Not Nothingness Anymore //
2 // //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
4 // //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7 
8 
9 #ifndef anna_diameter_helpers_dcca_functions_hpp
10 #define anna_diameter_helpers_dcca_functions_hpp
11 
12 
14 
16 
17 // STL
18 #include <string>
19 
20 //------------------------------------------------------------------------------
21 //---------------------------------------------------------------------- #define
22 //------------------------------------------------------------------------------
23 
24 namespace anna {
25 class DataBlock;
26 }
27 
28 
29 
30 namespace anna {
31 
32 namespace diameter {
33 
34 namespace helpers {
35 
36 namespace dcca {
37 
41 struct ChargingContext { enum _v { Unknown = -1, Data, Voice, Content, SMS, MMS }; };
42 
43 
45 
47  static const char Data[];
48 
50  static const char Voice[];
51 
53  static const char Content[];
54 
56  static const char SMS[];
57 
59  static const char MMS[];
60 };
61 
62 
63 struct functions {
64 
65  // getters & helpers
66 
75  static std::string getSubscriptionIdData(const anna::DataBlock &db,
76  int subscriptionIdType = AVPVALUES__Subscription_Id_Type::END_USER_E164) noexcept(false);
77 
78 
87  static std::string getServiceContextId(const anna::DataBlock &db, ChargingContext::_v &chargingContext) noexcept(false);
88 
96  static std::string getServiceContextId(const anna::DataBlock &db) noexcept(false) {
97  ChargingContext::_v dummy;
98  return getServiceContextId(db, dummy);
99  }
100 };
101 
102 
103 }
104 }
105 }
106 }
107 
108 
109 #endif
110 
Definition: functions.hpp:63
Definition: app.hpp:12
Definition: DataBlock.hpp:24
static std::string getServiceContextId(const anna::DataBlock &db) noexcept(false)
Definition: functions.hpp:96