Added compile time deprecation markers, fixed typo
authorPhilip Rauwolf <rauwolf@itestra.de>
Mon, 3 Jun 2013 16:54:38 +0000 (18:54 +0200)
committerPhilip Rauwolf <rauwolf@itestra.de>
Mon, 3 Jun 2013 16:54:38 +0000 (18:54 +0200)
README
src/CommonAPI/Factory.h
src/CommonAPI/types.h

diff --git a/README b/README
index ade361f..0813efb 100644 (file)
--- a/README
+++ b/README
@@ -31,7 +31,7 @@ The current version can be taken from the git.
 == Common API Overview
 
 Common API and its mechanism specific bindings (e.g. Common API D-Bus) provide a set of libraries and tools to work with 
-RPC communication in a way independent of wich mechanism is used. It consist currently consists of four subprojects:
+RPC communication in a way independent of wich mechanism is used. It currently consists of four subprojects:
 ----
 CommonAPI - This is the base C++ library, which provides the application interface for users and can
             load runtime bindings such as dbus. (This is the current package.) 
@@ -80,6 +80,6 @@ Start working, best practice is to commit smaller, compilable pieces during the
 .If you want to commit you changes, send them to the author, you can create a patch like this:
         git format-patch working_branch <your branch>
 
-This creates a set of patches that are published via the mailing list.The patches will be discussed and then merged & uploaded on the git by the maintainer.
+This creates a set of patches that are published via the mailing list. The patches will be discussed and then merged & uploaded on the git by the maintainer.
 
 Patches can be accepted either under GENIVI Cla or MPL 2.0 (see section License). Please be sure that the signed-off-by is set correctly. For more, check out http://gerrit.googlecode.com/svn/documentation/2.0/user-signedoffby.html
index e06b59e..fa7a8ad 100644 (file)
@@ -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;
index 13c36aa..413f428 100644 (file)
 #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 {