Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

mediumplugin.h File Reference

#include <openhbci/plugin.h>
#include <openhbci/medium.h>
#include <openhbci/simpleconfig.h>
#include <string>

Go to the source code of this file.

Namespaces

namespace  HBCI

HBCI_MediumPlugin

const HBCI_PluginHBCI_MediumPlugin_Plugin (const HBCI_MediumPlugin *m)
char * HBCI_MediumPlugin_mediumTypeName (const HBCI_MediumPlugin *m)
MediumType HBCI_MediumPlugin_mediumType (const HBCI_MediumPlugin *m)
HBCI_ErrorHBCI_MediumPlugin_mediumCheck (const HBCI_MediumPlugin *m, const char *check_name)
HBCI_ErrorHBCI_MediumPlugin_mediumCheck_findname (const HBCI_MediumPlugin *m, char **find_name)

Typedefs

typedef HBCI::MediumPlugin HBCI_MediumPlugin


Detailed Description

Declaration of the abstract base class for a medium plugin.


Typedef Documentation

typedef HBCI::MediumPlugin HBCI_MediumPlugin
 


Function Documentation

HBCI_Error* HBCI_MediumPlugin_mediumCheck const HBCI_MediumPlugin   m,
const char *    check_name
 

This method checks whether the given name resolves to a medium of this type.

Note: This C function implements the MediumPlugin::mediumCheck for the case when a medium name is specified by the application.

A file medium might check whether the file has the correct format, a card plugin might check whether the inserted card is the correct type. If the returned error code indicates success, then the medium is a valid medium with regard to this plugin. If the returned error code is HBCI_ERROR_CODE_BAD_MEDIUM then it is suggested that this medium is not supported by the plugin. All other error codes indicate an error, but only HBCI_ERROR_CODE_BAD_MEDIUM will be treated as a definitive NACK. This means any other error code should not lead to the conclusion that the medium is not supported. In such a case it would be best for the application to retry (if the error advise() suggests so). If this medium plugin supports card media, then the following rules additionally apply:

  • If the parameter "name" is empty, then on success this method may set the name of this medium (in most cases this is the serial number of the card
  • If the parameter "name" is NOT empty, then the plugin MUST check whether the name is correct (i.e. if the serial number matches the given card). If the name does not match this method MUST return HBCI_ERROR_CODE_WRONG_MEDIUM.
However, if the plugin does not support this method at all it MUST return HBCI_ERROR_CODE_UNSUPPORTED.

Returns :
Error code
Parameters:
m  The object to perform this action on.
check_name  name which identifies the medium (similar to HBCI::Medium::mediumName(). This MUST NOT be empty in this function.

HBCI_Error* HBCI_MediumPlugin_mediumCheck_findname const HBCI_MediumPlugin   m,
char **    find_name
 

This method checks whether the given name resolves to a medium of this type.

Note: This C function implements the MediumPlugin::mediumCheck for the case when no medium name has been specified by the application and the found medium name is return by OpenHBCI.

For more description see HBCI_MediumPlugin_mediumCheck().

Returns :
Error code
Parameters:
m  The object to perform this action on.
find_name  Pointer to char where the name which identifies the medium is returned (similar to HBCI::Medium::mediumName(). The found card medium's name will be returned in this pointer, or NULL if an exception occurred, was caught, and returned as error. The string will be owned by the caller and has to be free()'d by the caller when no longer needed.

MediumType HBCI_MediumPlugin_mediumType const HBCI_MediumPlugin   m
 

Returns the generalized medium type (either file of card).

char* HBCI_MediumPlugin_mediumTypeName const HBCI_MediumPlugin   m
 

Returns the name of the MediumType (such as "RSACard", "DDVCard").

Note: The returned string will be owned by the caller and has to be free()'d be the caller when no longer needed!

const HBCI_Plugin* HBCI_MediumPlugin_Plugin const HBCI_MediumPlugin   m
 

Upcast


Generated on Mon Jun 23 13:41:08 2003 for openhbci by doxygen1.2.17