libzypp 17.31.23
zyppng::ProvideMessage Class Reference

#include </home/abuild/rpmbuild/BUILD/libzypp-17.31.23/zypp-media/ng/private/providemessage_p.h>

Public Types

using Code = zypp::proto::MessageCodes
 
using FieldVal = HeaderValue
 

Public Member Functions

uint requestId () const
 
void setRequestId (const uint id)
 
uint code () const
 
void setCode (const uint newCode)
 
std::vector< FieldValvalues (const std::string_view &str) const
 
std::vector< FieldValvalues (const std::string &str) const
 
HeaderValueMap headers () const
 
FieldVal value (const std::string_view &str, const FieldVal &defaultVal=FieldVal()) const
 
FieldVal value (const std::string &str, const FieldVal &defaultVal=FieldVal()) const
 
void setValue (const std::string &name, const FieldVal &value)
 
void setValue (const std::string_view &name, const FieldVal &value)
 
void addValue (const std::string &name, const FieldVal &value)
 
void addValue (const std::string_view &name, const FieldVal &value)
 
void forEachVal (const std::function< bool(const std::string &name, const FieldVal &val)> &cb) const
 
zypp::proto::ProvideMessage & impl ()
 
const zypp::proto::ProvideMessage & impl () const
 

Static Public Member Functions

static expected< ProvideMessagecreate (const zyppng::RpcMessage &message)
 
static expected< ProvideMessagecreate (const zypp::proto::ProvideMessage &message)
 
static ProvideMessage createProvideStarted (const uint32_t reqId, const zypp::Url &url, const std::optional< std::string > &localFilename={}, const std::optional< std::string > &stagingFilename={})
 
static ProvideMessage createProvideFinished (const uint32_t reqId, const std::string &localFilename, bool cacheHit)
 
static ProvideMessage createAttachFinished (const uint32_t reqId)
 
static ProvideMessage createDetachFinished (const uint32_t reqId)
 
static ProvideMessage createAuthInfo (const uint32_t reqId, const std::string &user, const std::string &pw, int64_t timestamp, const std::map< std::string, std::string > &extraValues={})
 
static ProvideMessage createMediaChanged (const uint32_t reqId)
 
static ProvideMessage createRedirect (const uint32_t reqId, const zypp::Url &newUrl)
 
static ProvideMessage createMetalinkRedir (const uint32_t reqId, const std::vector< zypp::Url > &newUrls)
 
static ProvideMessage createErrorResponse (const uint32_t reqId, const uint code, const std::string &reason, bool transient=false)
 
static ProvideMessage createProvide (const uint32_t reqId, const zypp::Url &url, const std::optional< std::string > &filename={}, const std::optional< std::string > &deltaFile={}, const std::optional< int64_t > &expFilesize={}, bool checkExistOnly=false)
 
static ProvideMessage createCancel (const uint32_t reqId)
 
static ProvideMessage createAttach (const uint32_t reqId, const zypp::Url &url, const std::string attachId, const std::string &label, const std::optional< std::string > &verifyType={}, const std::optional< std::string > &verifyData={}, const std::optional< int32_t > &mediaNr={})
 
static ProvideMessage createDetach (const uint32_t reqId, const zypp::Url &attachUrl)
 
static ProvideMessage createAuthDataRequest (const uint32_t reqId, const zypp::Url &effectiveUrl, const std::string &lastTriedUser="", const std::optional< int64_t > &lastAuthTimestamp={}, const std::map< std::string, std::string > &extraValues={})
 
static ProvideMessage createMediaChangeRequest (const uint32_t reqId, const std::string &label, int32_t mediaNr, const std::vector< std::string > &devices, const std::optional< std::string > &desc)
 

Private Member Functions

 ProvideMessage ()
 

Private Attributes

zypp::RWCOW_pointer< zypp::proto::ProvideMessage > _impl
 

Detailed Description

Definition at line 119 of file providemessage_p.h.

Member Typedef Documentation

◆ Code

using zyppng::ProvideMessage::Code = zypp::proto::MessageCodes

Definition at line 122 of file providemessage_p.h.

◆ FieldVal

Constructor & Destructor Documentation

◆ ProvideMessage()

zyppng::ProvideMessage::ProvideMessage ( )
private

Definition at line 325 of file providemessage.cc.

Member Function Documentation

◆ create() [1/2]

static expected< ProvideMessage > zyppng::ProvideMessage::create ( const zyppng::RpcMessage &  message)
static

◆ create() [2/2]

expected< ProvideMessage > zyppng::ProvideMessage::create ( const zypp::proto::ProvideMessage &  message)
static

Definition at line 346 of file providemessage.cc.

◆ createProvideStarted()

ProvideMessage zyppng::ProvideMessage::createProvideStarted ( const uint32_t  reqId,
const zypp::Url url,
const std::optional< std::string > &  localFilename = {},
const std::optional< std::string > &  stagingFilename = {} 
)
static

Definition at line 359 of file providemessage.cc.

◆ createProvideFinished()

ProvideMessage zyppng::ProvideMessage::createProvideFinished ( const uint32_t  reqId,
const std::string &  localFilename,
bool  cacheHit 
)
static

Definition at line 373 of file providemessage.cc.

◆ createAttachFinished()

ProvideMessage zyppng::ProvideMessage::createAttachFinished ( const uint32_t  reqId)
static

Definition at line 384 of file providemessage.cc.

◆ createDetachFinished()

ProvideMessage zyppng::ProvideMessage::createDetachFinished ( const uint32_t  reqId)
static

Definition at line 393 of file providemessage.cc.

◆ createAuthInfo()

ProvideMessage zyppng::ProvideMessage::createAuthInfo ( const uint32_t  reqId,
const std::string &  user,
const std::string &  pw,
int64_t  timestamp,
const std::map< std::string, std::string > &  extraValues = {} 
)
static

Definition at line 402 of file providemessage.cc.

◆ createMediaChanged()

ProvideMessage zyppng::ProvideMessage::createMediaChanged ( const uint32_t  reqId)
static

Definition at line 416 of file providemessage.cc.

◆ createRedirect()

ProvideMessage zyppng::ProvideMessage::createRedirect ( const uint32_t  reqId,
const zypp::Url newUrl 
)
static

Definition at line 425 of file providemessage.cc.

◆ createMetalinkRedir()

ProvideMessage zyppng::ProvideMessage::createMetalinkRedir ( const uint32_t  reqId,
const std::vector< zypp::Url > &  newUrls 
)
static

Definition at line 435 of file providemessage.cc.

◆ createErrorResponse()

ProvideMessage zyppng::ProvideMessage::createErrorResponse ( const uint32_t  reqId,
const uint  code,
const std::string &  reason,
bool  transient = false 
)
static

Definition at line 446 of file providemessage.cc.

◆ createProvide()

ProvideMessage zyppng::ProvideMessage::createProvide ( const uint32_t  reqId,
const zypp::Url url,
const std::optional< std::string > &  filename = {},
const std::optional< std::string > &  deltaFile = {},
const std::optional< int64_t > &  expFilesize = {},
bool  checkExistOnly = false 
)
static

Definition at line 458 of file providemessage.cc.

◆ createCancel()

ProvideMessage zyppng::ProvideMessage::createCancel ( const uint32_t  reqId)
static

Definition at line 476 of file providemessage.cc.

◆ createAttach()

ProvideMessage zyppng::ProvideMessage::createAttach ( const uint32_t  reqId,
const zypp::Url url,
const std::string  attachId,
const std::string &  label,
const std::optional< std::string > &  verifyType = {},
const std::optional< std::string > &  verifyData = {},
const std::optional< int32_t > &  mediaNr = {} 
)
static

Definition at line 485 of file providemessage.cc.

◆ createDetach()

ProvideMessage zyppng::ProvideMessage::createDetach ( const uint32_t  reqId,
const zypp::Url attachUrl 
)
static

Definition at line 506 of file providemessage.cc.

◆ createAuthDataRequest()

ProvideMessage zyppng::ProvideMessage::createAuthDataRequest ( const uint32_t  reqId,
const zypp::Url effectiveUrl,
const std::string &  lastTriedUser = "",
const std::optional< int64_t > &  lastAuthTimestamp = {},
const std::map< std::string, std::string > &  extraValues = {} 
)
static

Definition at line 516 of file providemessage.cc.

◆ createMediaChangeRequest()

ProvideMessage zyppng::ProvideMessage::createMediaChangeRequest ( const uint32_t  reqId,
const std::string &  label,
int32_t  mediaNr,
const std::vector< std::string > &  devices,
const std::optional< std::string > &  desc 
)
static

Definition at line 530 of file providemessage.cc.

◆ requestId()

uint zyppng::ProvideMessage::requestId ( ) const

Definition at line 545 of file providemessage.cc.

◆ setRequestId()

void zyppng::ProvideMessage::setRequestId ( const uint  id)

Definition at line 550 of file providemessage.cc.

◆ code()

uint zyppng::ProvideMessage::code ( ) const

Definition at line 555 of file providemessage.cc.

◆ setCode()

void zyppng::ProvideMessage::setCode ( const uint  newCode)

Definition at line 560 of file providemessage.cc.

◆ values() [1/2]

std::vector< ProvideMessage::FieldVal > zyppng::ProvideMessage::values ( const std::string_view &  str) const

Definition at line 565 of file providemessage.cc.

◆ values() [2/2]

std::vector< ProvideMessage::FieldVal > zyppng::ProvideMessage::values ( const std::string &  str) const

Definition at line 577 of file providemessage.cc.

◆ headers()

HeaderValueMap zyppng::ProvideMessage::headers ( ) const

Definition at line 592 of file providemessage.cc.

◆ value() [1/2]

ProvideMessage::FieldVal zyppng::ProvideMessage::value ( const std::string_view &  str,
const FieldVal defaultVal = FieldVal() 
) const

Returns the last entry with key str in the list of values or the default value specified in defaultVal

Definition at line 582 of file providemessage.cc.

◆ value() [2/2]

ProvideMessage::FieldVal zyppng::ProvideMessage::value ( const std::string &  str,
const FieldVal defaultVal = FieldVal() 
) const

Definition at line 602 of file providemessage.cc.

◆ setValue() [1/2]

void zyppng::ProvideMessage::setValue ( const std::string &  name,
const FieldVal value 
)

Definition at line 607 of file providemessage.cc.

◆ setValue() [2/2]

void zyppng::ProvideMessage::setValue ( const std::string_view &  name,
const FieldVal value 
)

Definition at line 612 of file providemessage.cc.

◆ addValue() [1/2]

void zyppng::ProvideMessage::addValue ( const std::string &  name,
const FieldVal value 
)

Definition at line 624 of file providemessage.cc.

◆ addValue() [2/2]

void zyppng::ProvideMessage::addValue ( const std::string_view &  name,
const FieldVal value 
)

Definition at line 629 of file providemessage.cc.

◆ forEachVal()

void zyppng::ProvideMessage::forEachVal ( const std::function< bool(const std::string &name, const FieldVal &val)> &  cb) const

Definition at line 636 of file providemessage.cc.

◆ impl() [1/2]

zypp::proto::ProvideMessage & zyppng::ProvideMessage::impl ( )

Definition at line 646 of file providemessage.cc.

◆ impl() [2/2]

const zypp::proto::ProvideMessage & zyppng::ProvideMessage::impl ( ) const

Definition at line 651 of file providemessage.cc.

Member Data Documentation

◆ _impl

zypp::RWCOW_pointer<zypp::proto::ProvideMessage> zyppng::ProvideMessage::_impl
private

Definition at line 184 of file providemessage_p.h.


The documentation for this class was generated from the following files: