Android-cuttlefish cvd tool
Namespaces | Functions | Variables
utils.cpp File Reference
#include "utils.h"
#include <cstdint>
#include <optional>
#include "cuttlefish/common/libs/fs/shared_buf.h"
#include "cuttlefish/common/libs/fs/shared_fd.h"
#include "request.h"
Include dependency graph for utils.cpp:

Namespaces

namespace  cuttlefish
 

Functions

bool cuttlefish::SendJsonMsg (SharedFD client_socket, const Json::Value &resp)
 
std::optional< Json::Value > cuttlefish::RecvJsonMsg (SharedFD client_socket)
 
std::string cuttlefish::ReqTyToStr (RequestType req_ty)
 
RequestType cuttlefish::StrToReqTy (const std::string &req)
 
RequestStatus cuttlefish::StrToStatus (const std::string &st)
 
std::string cuttlefish::StatusToStr (RequestStatus st)
 
std::string cuttlefish::IfaceTyToStr (IfaceType iface)
 
IfaceType cuttlefish::StrToIfaceTy (const std::string &iface)
 

Variables

constexpr uint16_t cuttlefish::kCurHeaderVersion = 1
 Current supported Header version number. More...
 
constexpr uint16_t cuttlefish::kMinHeaderVersion = 1
 Oldest compatible header version number. More...
 
const std::map< RequestType, const char * > cuttlefish::RequestTyToStrMap
 
const std::map< std::string, RequestType > cuttlefish::StrToRequestTyMap
 
const std::map< std::string, IfaceType > cuttlefish::StrToIfaceTyMap
 
const std::map< IfaceType, std::string > cuttlefish::IfaceTyToStrMap
 
const std::map< RequestStatus, std::string > cuttlefish::ReqStatusToStrMap
 
const std::map< std::string, RequestStatus > cuttlefish::StrToReqStatusMap