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

#include <misc_service.h>

Inheritance diagram for cuttlefish::MiscService:
Inheritance graph
[legend]
Collaboration diagram for cuttlefish::MiscService:
Collaboration graph
[legend]

Public Member Functions

 MiscService (int32_t service_id, ChannelMonitor *channel_monitor, ThreadLooper *thread_looper)
 
 ~MiscService ()=default
 
 MiscService (const MiscService &)=delete
 
MiscServiceoperator= (const MiscService &)=delete
 
void HandleGetIMEI (const Client &client, std::string &command)
 
void HandleTimeUpdate (const Client &client, std::string &command)
 
void TimeUpdate ()
 
void SetTimeZone (std::string timezone)
 
- Public Member Functions inherited from cuttlefish::ModemService
virtual ~ModemService ()=default
 
 ModemService (const ModemService &)=delete
 
ModemServiceoperator= (const ModemService &)=delete
 
bool HandleModemCommand (const Client &client, std::string command)
 
void CloseRemoteConnection (ClientId remote_client)
 

Private Member Functions

void ParseTimeZone ()
 
long TimeZoneOffset (time_t *utctime)
 
void FixTimeZone (std::string &line)
 
std::vector< CommandHandlerInitializeCommandHandlers ()
 

Private Attributes

std::string timezone_
 

Additional Inherited Members

- Static Public Attributes inherited from cuttlefish::ModemService
static constexpr char kCmeErrorOperationNotAllowed [] = "+CME ERROR: 3"
 
static constexpr char kCmeErrorOperationNotSupported [] = "+CME ERROR: 4"
 
static constexpr char kCmeErrorSimNotInserted [] = "+CME ERROR: 10"
 
static constexpr char kCmeErrorSimPinRequired [] = "+CME ERROR: 11"
 
static constexpr char kCmeErrorSimPukRequired [] = "+CME ERROR: 12"
 
static constexpr char kCmeErrorSimBusy [] = "+CME ERROR: 14"
 
static constexpr char kCmeErrorIncorrectPassword [] = "+CME ERROR: 16"
 
static constexpr char kCmeErrorMemoryFull [] = "+CME ERROR: 20"
 
static constexpr char kCmeErrorInvalidIndex [] = "+CME ERROR: 21"
 
static constexpr char kCmeErrorNotFound [] = "+CME ERROR: 22"
 
static constexpr char kCmeErrorInvalidCharactersInTextString []
 
static constexpr char kCmeErrorNoNetworkService [] = "+CME ERROR: 30"
 
static constexpr char kCmeErrorNetworkNotAllowedEmergencyCallsOnly []
 
static constexpr char kCmeErrorInCorrectParameters [] = "+CME ERROR: 50"
 
static constexpr char kCmeErrorNetworkNotAttachedDueToMTFunctionalRestrictions []
 
static constexpr char kCmeErrorFixedDialNumberOnlyAllowed []
 
static constexpr char kCmsErrorOperationNotAllowed [] = "+CMS ERROR: 302"
 
static constexpr char kCmsErrorOperationNotSupported [] = "+CMS ERROR: 303"
 
static constexpr char kCmsErrorInvalidPDUModeParam [] = "+CMS ERROR: 304"
 
static constexpr char kCmsErrorSCAddressUnknown [] = "+CMS ERROR: 304"
 
static constexpr std::pair< int, int > kRemotePortRange {6520, 6527}
 
- Protected Member Functions inherited from cuttlefish::ModemService
 ModemService (int32_t service_id, std::vector< CommandHandler > command_handlers, ChannelMonitor *channel_monitor, ThreadLooper *thread_looper)
 
void HandleCommandDefaultSupported (const Client &client)
 
void SendUnsolicitedCommand (std::string unsol_command)
 
cuttlefish::SharedFD ConnectToRemoteCvd (std::string port)
 
void SendCommandToRemote (ClientId remote_client, std::string response)
 
- Static Protected Member Functions inherited from cuttlefish::ModemService
static std::string GetHostId ()
 
- Protected Attributes inherited from cuttlefish::ModemService
int32_t service_id_
 
const std::vector< CommandHandlercommand_handlers_
 
ThreadLooperthread_looper_
 
ChannelMonitorchannel_monitor_
 

Constructor & Destructor Documentation

◆ MiscService() [1/2]

cuttlefish::MiscService::MiscService ( int32_t  service_id,
ChannelMonitor channel_monitor,
ThreadLooper thread_looper 
)

◆ ~MiscService()

cuttlefish::MiscService::~MiscService ( )
default

◆ MiscService() [2/2]

cuttlefish::MiscService::MiscService ( const MiscService )
delete

Member Function Documentation

◆ FixTimeZone()

void cuttlefish::MiscService::FixTimeZone ( std::string &  line)
private

◆ HandleGetIMEI()

void cuttlefish::MiscService::HandleGetIMEI ( const Client client,
std::string &  command 
)

◆ HandleTimeUpdate()

void cuttlefish::MiscService::HandleTimeUpdate ( const Client client,
std::string &  command 
)

◆ InitializeCommandHandlers()

std::vector< CommandHandler > cuttlefish::MiscService::InitializeCommandHandlers ( )
private

◆ operator=()

MiscService & cuttlefish::MiscService::operator= ( const MiscService )
delete

◆ ParseTimeZone()

void cuttlefish::MiscService::ParseTimeZone ( )
private

◆ SetTimeZone()

void cuttlefish::MiscService::SetTimeZone ( std::string  timezone)

◆ TimeUpdate()

void cuttlefish::MiscService::TimeUpdate ( )

◆ TimeZoneOffset()

long cuttlefish::MiscService::TimeZoneOffset ( time_t *  utctime)
private

Member Data Documentation

◆ timezone_

std::string cuttlefish::MiscService::timezone_
private

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