ServiceMethodSignature

class kanzi::connect::ServiceMethodSignature

Class to encapsulate a service and method in a manner it can be compared to match the network message.

Public Functions

const string &getMangledName() const

Retrieve mangled name that is calculated.

Returns

mangled name

bool 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.

Public Static Functions

static ServiceMethodSignatureSharedPtr createEvent(const string &completeName)

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.

static ServiceMethodSignatureSharedPtr createEvent(const string &service, const string &invokableName)

Factory function to create instance of class.

Parameters
  • service – the service. For example “Cluster”

  • invokableName – the name of the event

Returns

newly allocated object.

static ServiceMethodSignatureSharedPtr createMethod(const string &completeName)

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.

static ServiceMethodSignatureSharedPtr createMethod(const string &service, const string &invokableName)

Factory function to create instance of class.

Parameters
  • service – the service. For example “Cluster”

  • invokableName – the name of the method.

Returns

newly allocated object.

static ServiceMethodSignatureSharedPtr createPropertySetter(const string &completeName)

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.

static ServiceMethodSignatureSharedPtr createPropertySetter(const string &service, const string &dottedPathToAttribute)

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.