BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Member Functions | Protected Member Functions
BeeeOn::CredentialsTool Class Reference

Standalone tool that can be used to manipulate the credentials storage directly. It parses the given command and performs the given action. More...

#include <CredentialsTool.h>

Inheritance diagram for BeeeOn::CredentialsTool:
BeeeOn::Tool BeeeOn::StoppableLoop BeeeOn::Loggable

Public Member Functions

void setCryptoConfig (Poco::SharedPtr< CryptoConfig > config)
 
void setStorage (CredentialsStorage::Ptr storage)
 
- Public Member Functions inherited from BeeeOn::Tool
 Tool (bool terminate=true, bool repeat=false)
 
void setTerminate (bool terminate)
 
void setRepeat (bool repeat)
 
void setCommand (const std::string &command)
 
void setConsole (Console::Ptr console)
 
void start () override
 
void stop () override
 

Protected Member Functions

void main (ConsoleSession &session, const std::vector< std::string > &args) override
 
void actionClear ()
 
void actionRemove (const std::vector< std::string > &args)
 
void actionSet (const std::vector< std::string > &args)
 
- Protected Member Functions inherited from BeeeOn::Tool
bool shouldStop () const
 
void parseAndRun ()
 
void startSession (const std::vector< std::string > &args)
 
std::string command () const
 
StopControlstopControl ()
 
- Protected Member Functions inherited from BeeeOn::Loggable
void setupLogger (Poco::Logger *logger=0) const
 
Poco::Logger & logger () const
 
 Loggable (const ClassInfo &info)
 
 Loggable (const std::type_info &info)
 

Additional Inherited Members

- Public Types inherited from BeeeOn::Tool
typedef Poco::SharedPtr< ToolPtr
 
- Public Types inherited from BeeeOn::StoppableLoop
typedef Poco::SharedPtr
< StoppableLoop
Ptr
 
- Static Protected Member Functions inherited from BeeeOn::Loggable
static Poco::Logger & forMethod (const char *name)
 
static Poco::Logger & forClass (const ClassInfo &info)
 
static Poco::Logger & forClass (const std::type_info &info)
 
template<typename T >
static Poco::Logger & forInstance (const T *i)
 
static void configureSimple (Poco::Logger &logger, const std::string &level)
 
static void logException (Poco::Logger &logger, const Poco::Message::Priority priority, const Poco::Exception &e, const char *file, size_t line)
 

Detailed Description

Standalone tool that can be used to manipulate the credentials storage directly. It parses the given command and performs the given action.

Supported commands:

Member Function Documentation

void CredentialsTool::main ( ConsoleSession session,
const std::vector< std::string > &  args 
)
overrideprotectedvirtual

The main method of the tool that is executed in the Tool's loop thread with pre-parsed args. The original command line can be obtained by method command() if needed.

All I/O should be done via the given ConsoleSession instance. Exceptions are cougth by the caller of the main method.

Implements BeeeOn::Tool.


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