#include <uloggerinputplugin.h>
class Ulogger::MInputPlugin |
Abstract class for input plug-ins.
Public Attributes | |
---|---|
const CPlugin::TPluginInterface | iInterfaceId |
Public Member Functions | |
---|---|
virtual | ~MInputPlugin() |
pure virtual void | CancelReadData() |
pure virtual void | CloseInputPlugin() |
pure virtual TInt | ConfigureInputPlugin(const RPointerArray< TPluginConfiguration > &) |
pure virtual TInt | ReadData(TRequestStatus &, TDes8 &) |
pure virtual TInt | SendAcknowledgment(const TDesC8 &) |
A ULogger input plug-in listens for ULogger commands on some communication medium, such as serial, usb or a TCP socket. Whenever a command is received by the input plug-in, it passes this command to ULogger, which then interprets the command, acts on it, and returns a response to the input plug-in. The input plug-in sends any response coming from ULogger back to the client that sent the command in the first place.
All input plug-ins must derive from this class in order to be compatible with ULogger. They must also derive from ULogger::CPlugin (whose header is already included by this header, for convenience) in order to be compatible with the ECom framework, which ULogger uses to load its input plug-ins.
const CPlugin::TPluginInterface | iInterfaceId | [static] |
Input plug-in interface id. This is for ULogger to distinguish between the different types of plug-ins (e.g. Intput vs Output plug-ins).
void | CancelReadData | ( | ) | [pure virtual] |
Cancels asynchronous operation issued by ReadData method.
void | CloseInputPlugin | ( | ) | [pure virtual] |
Called by ULogger to indicate that the input plug-in must flush all buffers and release any locked resources. Any resources may be locked only after any other method is called.
TInt | ConfigureInputPlugin | ( | const RPointerArray< TPluginConfiguration > & | aConfigs | ) | [pure virtual] |
Called by ULogger as first method after construction or after changes in config file. This allows the input plug-in to initialize itself with its private settings.
Parameter | Description |
---|---|
aConfigs | actual configurations valid for this instance |
Returns: KErrNone, if successful; otherwise one of the other system wide error codes.
TInt | ReadData | ( | TRequestStatus & | aStatus, |
TDes8 & | aData | |||
) | [pure virtual] |
Asynchronous method that reads command data from the input medium. ULogger calls this when it's ready to receive command data from the input plug-in. When the input plug-in completes the read operation it notifies the caller via the TRequestStatus that is passed into this method by reference. It provides the command data that has been received in the descriptor that is passed into this method by reference. Input plug-ins typically implement this method by simply passing the TRequestStatus and descriptor arguments on to another asynchronous method, such as for example a socket's ReadOneOrMore method.
Parameter | Description |
---|---|
aStatus | The request status used to contain completion information for the function. On completion, contains a system-wide error code. |
aData | A descriptor reference to store data obtained from input channel. |
Returns: KErrNone if operation was finished without any problems, system wide error code otherwise.
Synchronous Method that sends the given acknowledgment data back to the client that is sending command data to the input plug-in. ULogger calls this method whenever it needs to send a response to a previously received command.
Parameter | Description |
---|---|
aData | A descriptor which contains error code or other results, for example, array of filters. Format of this data depends on previously obtained command. |
Returns: KErrNone is send operation finished with success otherwise system wide error code.