libzypp: zyppng::rpc Namespace Reference

libzypp 17.38.14

zyppng::rpc Namespace Reference

## Functions
template<typename T>
expected< zypp::PluginFrame > | toStompMessage (const T &msg)
template<typename T>
expected< T > | fromStompMessage (const zypp::PluginFrame &message)
template<typename T>
void | parseDataIntoField (const std::string &headerVal, T &target)
template<typename T>
void | parseHeaderIntoField (const zypp::PluginFrame &msg, const std::string &name, T &target)
template<typename T>
zypp::PluginFrame | prepareFrame ()
| Constructs a zypp::PluginFrame based on the static type information of T.

## Function Documentation

## ◆ toStompMessage()

template<typename T>

expected< zypp::PluginFrame > zyppng::rpc::toStompMessage | ( | const T & | msg | ) |

Definition at line 44 of file stompframestream.h.

## ◆ fromStompMessage()

template<typename T>

expected< T > zyppng::rpc::fromStompMessage | ( | const zypp::PluginFrame & | message | ) |

Definition at line 49 of file stompframestream.h.

## ◆ parseDataIntoField()

template<typename T>

void zyppng::rpc::parseDataIntoField | ( | const std::string & | headerVal,
|  | T & | target )

Definition at line 56 of file stompframestream.h.

## ◆ parseHeaderIntoField()

template<typename T>

void zyppng::rpc::parseHeaderIntoField | ( | const zypp::PluginFrame & | msg,
|  | const std::string & | name,
|  | T & | target )

Definition at line 77 of file stompframestream.h.

## ◆ prepareFrame()

template<typename T>

zypp::PluginFrame zyppng::rpc::prepareFrame | ( |  | ) |
| inline

Constructs a zypp::PluginFrame based on the static type information of T.

This helper function creates a new PluginFrame, initializing its command/header using the string data provided by the template argument's typeName member.

Template Parameters

  T | A type representing a command or protocol message. T must satisfy the following requirements: Must have a static public member named typeName. typeName must provide .data() (returning char*) and .length() (returning size_t). Typically, typeName is a std::string_view or constexpr string wrapper.

Returns
  zypp::PluginFrame A generic frame initialized with T's command string.

Definition at line 97 of file stompframestream.h.