diff options
Diffstat (limited to 'src/components/formatters/include/formatters/CSmartFactory.h')
-rw-r--r-- | src/components/formatters/include/formatters/CSmartFactory.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/components/formatters/include/formatters/CSmartFactory.h b/src/components/formatters/include/formatters/CSmartFactory.h index 9fed89253b..a459f179c0 100644 --- a/src/components/formatters/include/formatters/CSmartFactory.h +++ b/src/components/formatters/include/formatters/CSmartFactory.h @@ -82,6 +82,10 @@ extern const std::string S_PROTOCOL_TYPE; extern const std::string S_CORRELATION_ID; /** + * @brief String constant for RPC_MSG_VERSION. + */ +extern const std::string S_RPC_MSG_VERSION; +/** * @brief String constant for "code" param name. */ extern const std::string kCode; @@ -149,8 +153,10 @@ class CSmartFactory { * * @return True if operation was successful or false otherwise. */ - bool attachSchema(NsSmartDeviceLink::NsSmartObjects::SmartObject& object, - const bool RemoveFakeParameters); + bool attachSchema( + NsSmartDeviceLink::NsSmartObjects::SmartObject& object, + const bool RemoveFakeParameters, + const utils::SemanticVersion& MessageVersion = utils::SemanticVersion()); /** * @brief Attach schema to the struct SmartObject. @@ -269,7 +275,8 @@ CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::CSmartFactory( template <class FunctionIdEnum, class MessageTypeEnum, class StructIdEnum> bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::attachSchema( NsSmartDeviceLink::NsSmartObjects::SmartObject& object, - const bool RemoveFakeParameters) { + const bool RemoveFakeParameters, + const utils::SemanticVersion& MessageVersion) { if (false == object.keyExists(strings::S_PARAMS)) return false; if (false == object[strings::S_PARAMS].keyExists(strings::S_MESSAGE_TYPE)) @@ -295,7 +302,9 @@ bool CSmartFactory<FunctionIdEnum, MessageTypeEnum, StructIdEnum>::attachSchema( } object.setSchema(schemaIterator->second); - schemaIterator->second.applySchema(object, RemoveFakeParameters); + + schemaIterator->second.applySchema( + object, RemoveFakeParameters, MessageVersion); return true; } |