Leosac  0.8.0
Open Source Access Control
Leosac::Module::TCPNotifier::ProtocolHandler Class Referenceabstract

Implements a given (TCP) protocol for notifying clients. More...

#include <ProtocolHandler.hpp>

+ Inheritance diagram for Leosac::Module::TCPNotifier::ProtocolHandler:

Public Member Functions

virtual ByteVector build_cred_msg (const Cred::RFIDCard &card)=0
 Returns a binary buffer containing the data that shall be sent over the network to notify the client. More...
 

Static Public Member Functions

static ProtocolHandlerUPtr create (int protocol_id)
 Create an instance of a protocol handler depending on the requested protocol id. More...
 

Protected Member Functions

 ProtocolHandler ()
 ProtocolHandler shall not be created directly. More...
 

Detailed Description

Implements a given (TCP) protocol for notifying clients.

The ProtocolHandler is supposed to format on-the-wire data to notify a client of a credential read.

One instance of protocol handler is created by client.

Definition at line 65 of file ProtocolHandler.hpp.

Constructor & Destructor Documentation

◆ ProtocolHandler()

Leosac::Module::TCPNotifier::ProtocolHandler::ProtocolHandler ( )
inlineprotected

ProtocolHandler shall not be created directly.

Call create() instead.

Definition at line 72 of file ProtocolHandler.hpp.

Member Function Documentation

◆ build_cred_msg()

virtual ByteVector Leosac::Module::TCPNotifier::ProtocolHandler::build_cred_msg ( const Cred::RFIDCard card)
pure virtual

Returns a binary buffer containing the data that shall be sent over the network to notify the client.

Implemented in Leosac::Module::TCPNotifier::PushSimpleCardNumber.

◆ create()

ProtocolHandlerUPtr ProtocolHandler::create ( int  protocol_id)
static

Create an instance of a protocol handler depending on the requested protocol id.

Definition at line 27 of file ProtocolHandler.cpp.


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