|
This method checks whether the given name resolves to a medium of this type. 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:
-
name |
Name which identifies the medium (similar to HBCI::Medium::mediumName(). For a file plugin this parameter MUST be the filename of the medium and MUST NOT be empty. For a card medium this parameter may be empty, and on success the found card medium's name will be returned in this string. |
|