Android-cuttlefish cvd tool
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
cuttlefish::CvdClient Class Reference

#include <client.h>

Collaboration diagram for cuttlefish::CvdClient:
Collaboration graph
[legend]

Classes

struct  OverrideFd
 

Public Member Functions

 CvdClient (android::base::LogSeverity verbosity, const std::string &server_socket_path=ServerSocketPath())
 
Result< void > ConnectToServer ()
 
Result< void > StopCvdServer (bool clear)
 
Result< void > RestartServerMatchClient ()
 

Private Member Functions

Result< void > SetServer (const SharedFD &server)
 
Result< cvd::Response > SendRequest (const cvd::Request &request, const OverrideFd &new_control_fds={}, std::optional< SharedFD > extra_fd={})
 
Result< void > CheckStatus (const cvd::Status &status, const std::string &rpc)
 

Private Attributes

std::optional< UnixMessageSocketserver_
 
std::string server_socket_path_
 
android::base::LogSeverity verbosity_
 

Detailed Description

Client to the (old) cvd servers.

Even though cvd doesn't use a server anymore, it could encounter one (after a package update, for example). This class allows talking to those servers, mainly to stop them cleanly.

Constructor & Destructor Documentation

◆ CvdClient()

cuttlefish::CvdClient::CvdClient ( android::base::LogSeverity  verbosity,
const std::string &  server_socket_path = ServerSocketPath() 
)

Member Function Documentation

◆ CheckStatus()

Result< void > cuttlefish::CvdClient::CheckStatus ( const cvd::Status status,
const std::string &  rpc 
)
private

◆ ConnectToServer()

Result< void > cuttlefish::CvdClient::ConnectToServer ( )

◆ RestartServerMatchClient()

Result< void > cuttlefish::CvdClient::RestartServerMatchClient ( )

◆ SendRequest()

Result< cvd::Response > cuttlefish::CvdClient::SendRequest ( const cvd::Request &  request,
const OverrideFd new_control_fds = {},
std::optional< SharedFD extra_fd = {} 
)
private

◆ SetServer()

Result< void > cuttlefish::CvdClient::SetServer ( const SharedFD server)
private

◆ StopCvdServer()

Result< void > cuttlefish::CvdClient::StopCvdServer ( bool  clear)

Member Data Documentation

◆ server_

std::optional<UnixMessageSocket> cuttlefish::CvdClient::server_
private

◆ server_socket_path_

std::string cuttlefish::CvdClient::server_socket_path_
private

◆ verbosity_

android::base::LogSeverity cuttlefish::CvdClient::verbosity_
private

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