diff options
-rw-r--r-- | src/CommonAPI/Factory.h | 14 | ||||
-rw-r--r-- | src/CommonAPI/Runtime.h | 4 | ||||
-rw-r--r-- | src/CommonAPI/types.h | 31 |
3 files changed, 31 insertions, 18 deletions
diff --git a/src/CommonAPI/Factory.h b/src/CommonAPI/Factory.h index e5d5993..ede8536 100644 --- a/src/CommonAPI/Factory.h +++ b/src/CommonAPI/Factory.h @@ -22,6 +22,7 @@ #include "MiddlewareInfo.h" #include "Proxy.h" #include "Stub.h" +#include "types.h" namespace CommonAPI { @@ -61,6 +62,19 @@ class Factory { middlewareInfo_(middlewareInfo) { } + /** + * \brief Creates factory. Don't call manually. + * + * Creates factory. Don't call manually. + */ + Factory(const std::shared_ptr<Runtime> runtime, + const MiddlewareInfo* middlewareInfo, + const std::string factoryName, + const bool nullOnInvalidName) : + runtime_(runtime), + middlewareInfo_(middlewareInfo) { + } + virtual ~Factory() {} /** diff --git a/src/CommonAPI/Runtime.h b/src/CommonAPI/Runtime.h index 7b666b6..5cf7afa 100644 --- a/src/CommonAPI/Runtime.h +++ b/src/CommonAPI/Runtime.h @@ -90,7 +90,9 @@ class Runtime { * * @return Factory object for this runtime */ - virtual std::shared_ptr<Factory> createFactory(std::shared_ptr<MainLoopContext> = std::shared_ptr<MainLoopContext>(NULL)) = 0; + virtual std::shared_ptr<Factory> createFactory(std::shared_ptr<MainLoopContext> = std::shared_ptr<MainLoopContext>(NULL), + const std::string factoryName = "", + const bool nullOnInvalidName = false) = 0; /** * \brief Returns the ServicePublisher object for this runtime. diff --git a/src/CommonAPI/types.h b/src/CommonAPI/types.h index c7fdeb8..ae2836e 100644 --- a/src/CommonAPI/types.h +++ b/src/CommonAPI/types.h @@ -14,7 +14,6 @@ #include <cstdint> - #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) # define COMMONAPI_DEPRECATED __attribute__ ((__deprecated__)) #elif defined(_MSC_VER) && (_MSC_VER >= 1300) @@ -27,33 +26,31 @@ namespace CommonAPI { enum class AvailabilityStatus { - UNKNOWN, - AVAILABLE, - NOT_AVAILABLE + UNKNOWN, + AVAILABLE, + NOT_AVAILABLE }; - enum class CallStatus { - SUCCESS, - OUT_OF_MEMORY, - NOT_AVAILABLE, - CONNECTION_FAILED, - REMOTE_ERROR + SUCCESS, + OUT_OF_MEMORY, + NOT_AVAILABLE, + CONNECTION_FAILED, + REMOTE_ERROR }; struct Version { - Version() = default; + Version() = default; - Version(const uint32_t& majorValue, const uint32_t& minorValue): - Major(majorValue), - Minor(minorValue) { } + Version(const uint32_t& majorValue, const uint32_t& minorValue): + Major(majorValue), + Minor(minorValue) {} - uint32_t Major; - uint32_t Minor; + uint32_t Major; + uint32_t Minor; }; - } // namespace CommonAPI #endif // COMMONAPI_TYPES_H_ |