diff options
| author | Philip Rauwolf <rauwolf@itestra.de> | 2013-06-03 18:54:38 +0200 |
|---|---|---|
| committer | Philip Rauwolf <rauwolf@itestra.de> | 2013-06-03 18:54:38 +0200 |
| commit | 66e45588704f1929c92e2c561a8b460c97869fb9 (patch) | |
| tree | 7b175559ce89bc45757454f2a641b2eee4caad14 /src | |
| parent | 8045c85726a34c14188dc8d0d64028156e1df917 (diff) | |
| download | genivi-common-api-runtime-66e45588704f1929c92e2c561a8b460c97869fb9.tar.gz | |
Added compile time deprecation markers, fixed typo
Diffstat (limited to 'src')
| -rw-r--r-- | src/CommonAPI/Factory.h | 8 | ||||
| -rw-r--r-- | src/CommonAPI/types.h | 9 |
2 files changed, 13 insertions, 4 deletions
diff --git a/src/CommonAPI/Factory.h b/src/CommonAPI/Factory.h index e06b59e..fa7a8ad 100644 --- a/src/CommonAPI/Factory.h +++ b/src/CommonAPI/Factory.h @@ -178,7 +178,7 @@ class Factory { * from factory instances. */ template<typename _Stub> - bool registerService(std::shared_ptr<_Stub> stub, + COMMONAPI_DEPRECATED bool registerService(std::shared_ptr<_Stub> stub, const std::string& participantId, const std::string& serviceName, const std::string& domain) { @@ -204,7 +204,7 @@ class Factory { * from factory instances. */ template<typename _Stub> - bool registerService(std::shared_ptr<_Stub> stub, const std::string& serviceAddress) { + COMMONAPI_DEPRECATED bool registerService(std::shared_ptr<_Stub> stub, const std::string& serviceAddress) { std::string domain; std::string serviceName; std::string participantId; @@ -229,7 +229,7 @@ class Factory { * Purpose for this change is to make service management (esp. deregistering) independent * from factory instances. */ - virtual bool unregisterService(const std::string& participantId, const std::string& serviceName, const std::string& domain) = 0; + COMMONAPI_DEPRECATED virtual bool unregisterService(const std::string& participantId, const std::string& serviceName, const std::string& domain) = 0; /** * \brief Unregister a service stub associated with a specified address @@ -243,7 +243,7 @@ class Factory { * Purpose for this change is to make service management (esp. deregistering) independent * from factory instances. */ - inline bool unregisterService(const std::string& serviceAddress) { + COMMONAPI_DEPRECATED inline bool unregisterService(const std::string& serviceAddress) { std::string domain; std::string serviceName; std::string participantId; diff --git a/src/CommonAPI/types.h b/src/CommonAPI/types.h index 13c36aa..413f428 100644 --- a/src/CommonAPI/types.h +++ b/src/CommonAPI/types.h @@ -10,6 +10,15 @@ #include <cstdint> +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +# define COMMONAPI_DEPRECATED __attribute__ ((__deprecated__)) +#elif defined(_MSC_VER) && (_MSC_VER >= 1300) +# define COMMONAPI_DEPRECATED __declspec(deprecated) +#else +# define COMMONAPI_DEPRECATED +#endif + + namespace CommonAPI { enum class AvailabilityStatus { |
