1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
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 //
9 #ifndef example_diameter_launcher_TestCondition_hpp
10 #define example_diameter_launcher_TestCondition_hpp
16 #include <anna/core/DataBlock.hpp>
30 struct Type { enum _v { Generic, Basic }; };
31 static const char* asText(const Type::_v type) throw();
33 TestCondition() : a_rcvFromEntity(true),
35 a_code(""), a_bitR(""), a_hopByHop(""), a_applicationId(""),
36 a_sessionId(""), a_resultCode(""),
37 a_msisdn(""), a_imsi(""), a_serviceContextId("") { a_type = Type::Basic; }
40 // Source of the received message
41 void setReceivedFromEntity(bool rfe) throw() { a_rcvFromEntity = rfe; }
42 bool receivedFromEntity() const throw() { return a_rcvFromEntity; }
45 void setRegexp(const std::string ®exp) throw() { a_regexp = regexp; }
47 void setCode(const std::string &value) throw() { a_code = value; }
48 void setBitR(const std::string &value) throw() { a_bitR = value; }
49 void setHopByHop(const std::string &value) throw() { a_hopByHop = value; }
50 void setApplicationId(const std::string &value) throw() { a_applicationId = value; }
51 void setSessionId(const std::string &value) throw() { a_sessionId = value; }
52 void setResultCode(const std::string &value) throw() { a_resultCode = value; }
53 void setMsisdn(const std::string &value) throw() { a_msisdn = value; }
54 void setImsi(const std::string &value) throw() { a_imsi = value; }
55 void setServiceContextId(const std::string &value) throw() { a_serviceContextId = value; }
57 bool exists() const throw();
58 friend bool operator==(const TestCondition &c1, const TestCondition &c2) throw();
61 const std::string & getRegexp() const throw() { return a_regexp; }
63 const std::string & getCode() const throw() { return a_code; }
64 const std::string & getBitR() const throw() { return a_bitR; }
65 const std::string & getHopByHop() const throw() { return a_hopByHop; }
66 const std::string & getApplicationId() const throw() { return a_applicationId; }
67 const std::string & getSessionId() const throw() { return a_sessionId; }
68 const std::string & getResultCode() const throw() { return a_resultCode; }
69 const std::string & getMsisdn() const throw() { return a_msisdn; }
70 const std::string & getImsi() const throw() { return a_imsi; }
71 const std::string & getServiceContextId() const throw() { return a_serviceContextId; }
74 bool comply (const anna::DataBlock &message/*, bool matchSessionId*/) const throw();
77 anna::xml::Node* asXML(anna::xml::Node* parent) const throw();
82 // Source of the received message
94 std::string a_hopByHop;
95 std::string a_applicationId;
96 std::string a_sessionId;
97 std::string a_resultCode;
100 std::string a_serviceContextId;