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

#include <modem_service.h>

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

Public Member Functions

 CommandHandler (const std::string &command, f_func handler)
 
 CommandHandler (const std::string &command, p_func handler)
 
 ~CommandHandler ()=default
 
int Compare (const std::string &command) const
 
void HandleCommand (const Client &client, std::string &command) const
 

Private Types

enum  MatchMode { FULL_MATCH = 0 , PARTIAL_MATCH = 1 }
 

Private Attributes

std::string command_prefix
 
MatchMode match_mode
 
std::optional< f_funcf_command_handler
 
std::optional< p_funcp_command_handler
 

Member Enumeration Documentation

◆ MatchMode

Enumerator
FULL_MATCH 
PARTIAL_MATCH 

Constructor & Destructor Documentation

◆ CommandHandler() [1/2]

cuttlefish::CommandHandler::CommandHandler ( const std::string &  command,
f_func  handler 
)

◆ CommandHandler() [2/2]

cuttlefish::CommandHandler::CommandHandler ( const std::string &  command,
p_func  handler 
)

◆ ~CommandHandler()

cuttlefish::CommandHandler::~CommandHandler ( )
default

Member Function Documentation

◆ Compare()

int cuttlefish::CommandHandler::Compare ( const std::string &  command) const

◆ HandleCommand()

void cuttlefish::CommandHandler::HandleCommand ( const Client client,
std::string &  command 
) const

Member Data Documentation

◆ command_prefix

std::string cuttlefish::CommandHandler::command_prefix
private

◆ f_command_handler

std::optional<f_func> cuttlefish::CommandHandler::f_command_handler
private

◆ match_mode

MatchMode cuttlefish::CommandHandler::match_mode
private

◆ p_command_handler

std::optional<p_func> cuttlefish::CommandHandler::p_command_handler
private

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