diff options
author | Lutz Bichler <Lutz.Bichler@gmx.de> | 2014-07-05 13:10:27 +0200 |
---|---|---|
committer | Lutz Bichler <Lutz.Bichler@gmx.de> | 2014-07-05 13:10:27 +0200 |
commit | b96c81ed7b959452141e98962662908a596cce89 (patch) | |
tree | 473016a05107722774c60abb38abe161e1c06ca6 /interface | |
parent | 999eead3c163c82d7a812c3ae733267007228cf5 (diff) | |
download | vSomeIP-b96c81ed7b959452141e98962662908a596cce89.tar.gz |
Changed passing configuration file from command line option to
environament variable or local file. Configuration file are searched in
the following order:
1. local file (./vsomeip.xml)
2. configuration from environment variable (VSOMEIP_CONFIGURATION_FILE)
3. default (/etc/vsomeip.xml)
Diffstat (limited to 'interface')
-rw-r--r-- | interface/vsomeip/application.hpp | 2 | ||||
-rw-r--r-- | interface/vsomeip/defines.hpp | 4 | ||||
-rw-r--r-- | interface/vsomeip/runtime.hpp | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/interface/vsomeip/application.hpp b/interface/vsomeip/application.hpp index 37899e6..b9c77b7 100644 --- a/interface/vsomeip/application.hpp +++ b/interface/vsomeip/application.hpp @@ -24,7 +24,7 @@ public: virtual ~application() {}; // Lifecycle - virtual bool init(int _argc, char **_argv) = 0; + virtual bool init() = 0; virtual void start() = 0; virtual void stop() = 0; diff --git a/interface/vsomeip/defines.hpp b/interface/vsomeip/defines.hpp index a7dde6c..728f342 100644 --- a/interface/vsomeip/defines.hpp +++ b/interface/vsomeip/defines.hpp @@ -7,7 +7,9 @@ #ifndef VSOMEIP_DEFINES_HPP #define VSOMEIP_DEFINES_HPP -#define VSOMEIP_DEFAULT_CONFIGURATION_FILE_PATH "/etc/vsomeip.conf" +#define VSOMEIP_DEFAULT_CONFIGURATION_FILE_PATH "/etc/vsomeip.xml" +#define VSOMEIP_ENV_CONFIGURATION_FILE_PATH "VSOMEIP_CONFIGURATION_FILE" +#define VSOMEIP_LOCAL_CONFIGURATION_FILE_PATH "./vsomeip.xml" #define VSOMEIP_PROTOCOL_VERSION 0x1 diff --git a/interface/vsomeip/runtime.hpp b/interface/vsomeip/runtime.hpp index bf39882..7de62a2 100644 --- a/interface/vsomeip/runtime.hpp +++ b/interface/vsomeip/runtime.hpp @@ -22,7 +22,7 @@ public: virtual ~runtime() {}; - virtual std::shared_ptr< application > create_application(const std::string &_name) const = 0; + virtual std::shared_ptr< application > create_application(const std::string &_name = "") const = 0; virtual std::shared_ptr< message > create_request() const = 0; virtual std::shared_ptr< message > create_response(const std::shared_ptr< message > &_request) const = 0; |