Class to encapsulate a service and method in a manner it can be compared to match the network message.
More...
#include <messageutil.hpp>
|
static void | split (const string &completeName, string &service, string &entity) |
| Splits a string into parts "Connect.Service.Media.play_track" => service=Media, entity="play_track" "Connect.CoreService.Cluster.engine.rpm" => service=Cluster, entity="engine.rpm" "Media.next" => service=Media, entity="next".
|
|
Class to encapsulate a service and method in a manner it can be compared to match the network message.
◆ calculateMangledName()
void kanzi::connect::ServiceMethodSignature::calculateMangledName |
( |
| ) |
|
|
protected |
◆ createEvent() [1/2]
Factory function to create instance of class.
- Parameters
-
completeName | complete name to method, i.e. can be like: "Media.playback_state" or "Connect.Service.Media.playback_state" or "Connect.CoreService.Content.notify_result" |
- Returns
- newly allocated object.
◆ createEvent() [2/2]
Factory function to create instance of class.
- Parameters
-
service | the service. For example "Cluster" |
invokableName | the name of the event |
- Returns
- newly allocated object.
◆ createMethod() [1/2]
Factory function to create instance of class.
- Parameters
-
completeName | complete name to method, i.e. can be like: "Media.play_track" or "Connect.Service.Media.play_track" or "Connect.CoreService.Media.play_track" |
- Returns
- newly allocated object.
◆ createMethod() [2/2]
Factory function to create instance of class.
- Parameters
-
service | the service. For example "Cluster" |
invokableName | the name of the method. |
- Returns
- newly allocated object.
◆ createPropertySetter() [1/2]
Factory function to create instance of class.
- Parameters
-
completeName | complete name to method, i.e. can be like: "Media.playback.position" or "Connect.Service.Media.playback.position" |
- Returns
- newly allocated object.
◆ createPropertySetter() [2/2]
static ServiceMethodSignatureSharedPtr kanzi::connect::ServiceMethodSignature::createPropertySetter |
( |
const string & | service, |
|
|
const string & | dottedPathToAttribute ) |
|
static |
Factory function to create instance of class.
- Parameters
-
service | the service. For example "Cluster" |
dottedPathToAttribute | dot separated path to attribute that is to be mangled (E.g. engine.gear.value) |
- Returns
- newly allocated object.
◆ getMangledName()
const string & kanzi::connect::ServiceMethodSignature::getMangledName |
( |
| ) |
const |
Retrieve mangled name that is calculated.
- Returns
- mangled name
◆ matchToMessage()
bool kanzi::connect::ServiceMethodSignature::matchToMessage |
( |
const MessagePackage & | message | ) |
const |
Tries to match this object to a message.
- Parameters
-
message | the message to match |
- Returns
- true if matched, false otherwise.
◆ split()
static void kanzi::connect::ServiceMethodSignature::split |
( |
const string & | completeName, |
|
|
string & | service, |
|
|
string & | entity ) |
|
staticprotected |
Splits a string into parts "Connect.Service.Media.play_track" => service=Media, entity="play_track" "Connect.CoreService.Cluster.engine.rpm" => service=Cluster, entity="engine.rpm" "Media.next" => service=Media, entity="next".
- Parameters
-
completeName | complete name that may include "Connect.Service." or "Connect.CoreService." prefix that will be removed. |
service | will be filled with service information |
entity | will be filled with everything after service. |
◆ toCamelCase()
string kanzi::connect::ServiceMethodSignature::toCamelCase |
( |
const string & | candidate, |
|
|
const string & | separator ) |
|
protected |
Capitalizes a string.
E.g. "this_and_that" will become "ThisAndThat" Also "camel" will become "Camel"
- Parameters
-
candidate | string candidate |
separator | the separator character |
- Returns
- camel cased string
The documentation for this class was generated from the following file: