libzypp 17.32.5
messagestream.h File Reference
#include <zypp-core/zyppng/base/Base>
#include <zypp-core/zyppng/base/Signals>
#include <zypp-core/zyppng/base/Timer>
#include <zypp-core/zyppng/io/IODevice>
#include <zypp-core/zyppng/pipelines/expected.h>
#include <zypp-core/zyppng/rpc/rpc.h>
#include <deque>
#include <optional>
Include dependency graph for messagestream.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  zyppng::InvalidMessageReceivedException
 
class  zyppng::RpcBaseType
 
class  zyppng::RpcMessage
 
class  zyppng::RpcMessageStream
 

Namespaces

namespace  zypp
 Easy-to use interface to the ZYPP dependency resolver.
 
namespace  zypp::proto
 
namespace  zyppng
 
namespace  zyppng::rpc
 

Macros

#define ZYPP_RPCBASE
 
#define ZYPP_IMPL_RPCBASE(Class, ImplClass, implVar)
 

Functions

template<typename T >
const std::string & zyppng::rpc::messageTypeName ()
 
template<typename T >
expected< voidzyppng::rpc::deserializeMessageInto (const RpcMessage &message, T &target)
 
template<typename T >
expected< T > zyppng::rpc::deserializeMessage (const RpcMessage &message)
 
template<typename T >
RpcMessage zyppng::rpc::serializeIntoMessage (const T &data)
 
template<>
zypp::proto::Envelope * zypp::rwcowClone< zypp::proto::Envelope > (const zypp::proto::Envelope *rhs)
 

Macro Definition Documentation

◆ ZYPP_RPCBASE

#define ZYPP_RPCBASE
Value:
public: \
static const std::string &staticTypeName(); \
const std::string &typeName() const override; \
bool deserialize(const std::string &data) override; \
void serializeInto(std::string &str) const override; \
std::string serialize( ) const override; \
private: \
String related utilities and Regular expression matching.

Helper macro to be added into the class declaration for a zyppng::RpcBase subclass

Definition at line 251 of file messagestream.h.

◆ ZYPP_IMPL_RPCBASE

#define ZYPP_IMPL_RPCBASE ( Class,
ImplClass,
implVar )
Value:
const std::string &Class::staticTypeName() \
{ \
return rpc::messageTypeName<ImplClass>(); \
} \
\
const std::string &Class::typeName() const \
{ \
return staticTypeName(); \
} \
\
bool Class::deserialize(const std::string &data) \
{ \
return implVar->ParseFromString( data ); \
} \
\
void Class::serializeInto(std::string &str) const \
{ \
implVar->SerializeToString( &str ); \
} \
\
std::string Class::serialize( ) const \
{ \
return implVar->SerializeAsString( ); \
}

Helper macro to be added into the class cc file for a zyppng::RpcBase subclass. Generates the default implementation for the virtual functions if the impl is a protobuf type

Definition at line 266 of file messagestream.h.