X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fdiameter.comm%2FEngine.hpp;h=72e3ad96fdb18d60e7da3da2c82c9163ba7257c1;hb=d723d5bf571eb48c641b092058eaa38bb6c4fcc8;hp=dcc31618bb2d9eb86dd7d053060247eb6902bd5f;hpb=5bf5055ab79aaf464e2491cfbab173ba37ba3419;p=anna.git diff --git a/include/anna/diameter.comm/Engine.hpp b/include/anna/diameter.comm/Engine.hpp index dcc3161..72e3ad9 100644 --- a/include/anna/diameter.comm/Engine.hpp +++ b/include/anna/diameter.comm/Engine.hpp @@ -103,32 +103,32 @@ public: /** Diameter application node origin realm - @param originRealm Used to configure the Origin-Realm for outgoing messages. + @param originRealmName Used to configure the Origin-Realm for outgoing messages. If not configured or empty string provided, host domainname will be set. */ - void setOriginRealm(const std::string & originRealm) throw(); + void setOriginRealmName(const std::string & originRealmName) throw(); /** Diameter application origin host - @param originHost Used to configure the Origin-Host for outgoing messages. + @param originHostName Used to configure the Origin-Host for outgoing messages. If not configured or empty string provided, hostname (system name) will be set. */ - void setOriginHost(const std::string & originHost) throw(); + void setOriginHostName(const std::string & originHostName) throw(); /** Gets the configured diameter application node origin realm @return Diameter application node origin realm */ - const std::string & getOriginRealm() const throw() { return a_originRealm; } + const std::string & getOriginRealmName() const throw() { return a_originRealm; } /** Gets the configured diameter application origin host @return Diameter application node origin host */ - const std::string & getOriginHost() const throw() { return a_originHost; } + const std::string & getOriginHostName() const throw() { return a_originHost; } /** @@ -573,12 +573,20 @@ public: */ virtual void readDPA(anna::DataBlock &dpa, const anna::DataBlock & dpr) throw(); + /** + * Sets optional CEA from file, when default is not enough + * + * @param &ceaPathfile Path file for the CEA xml message provided + */ + void setCEA(const std::string &ceaPathfile) throw() { a_ceaPathfile = ceaPathfile; } + /** * Class user should implement this method in order to define Capabilities-Exchange-Answer for received CER over server socket. * Origin-Host and Origin-Realm are configured at comm::Engine with hostname and FQDN (Fully Qualified Domain Name). * Default implementation imply CEA with DIAMETER_SUCCESS Result-Code, and own domain node parameters, but application should * analyze the CER message in order to accept it or not (with apropiate non-success Result-Code). - * Any other implementation is responsible to build a valid CEA diameter message: + * If @setCEA was invoked, a message from file is used instead of default implementation. + * Any other implementation is responsible to build a valid CEA diameter message, even ignoring a possible cea from file when @setCEA is used: * * If one peer sends a CER message to another Peer and receiver does not have support for * @@ -704,6 +712,13 @@ protected: */ virtual void releaseLocalServer(LocalServer*) throw() {;} + // Gets the base protocol codec engine used internally. + // This engine is initializaed on constructor with the base protocol dictionary. + // The reason to not reuse any other codec engine from the application is to have this one isolated with no interference + // regarding configuration changes (validation depth/mode, fix mode, etc.). + // + // @return Pointer to the internal base protocol codec engine + codec::Engine *getBaseProtocolCodecEngine() const throw() { return const_cast(&a_baseProtocolCodecEngine); } private: @@ -722,6 +737,7 @@ private: anna::Millisecond a_watchdogPeriod; // // ServerSessions messages: + std::string a_ceaPathfile; // path file to optional CEA (diameter local server configuration) // anna::DataBlock a_cea; // anna::DataBlock a_dwa; @@ -751,14 +767,6 @@ private: void assertBaseProtocolHealth() throw(anna::RuntimeException); // checks the dictionary - // Gets the base protocol codec engine used internally. - // This engine is initializaed on constructor with the base protocol dictionary. - // The reason to not reuse any other codec engine from the application is to have this one isolated with no interference - // regarding configuration changes (validation depth/mode, fix mode, etc.). - // - // @return Pointer to the internal base protocol codec engine - codec::Engine *getBaseProtocolCodecEngine() const throw() { return const_cast(&a_baseProtocolCodecEngine); } - ////////////////////////// // CLIENT FUNCTIONALITY // //////////////////////////