INotification interface
Contents
- Introduction to the Library
- Basic support package (com.kryptel.bslx)
- Kryptel API Commons package (com.kryptel)
- ApiHelpers class
- Constants class
- IComponentCapabilities interface
- IComponentState interface
- ICompressionLevelCallback interface
- IDataSink interface
- IKryptelComponent interface
- INotification interface
- IProgressCallback interface
- IReplaceCallback interface
- Loader class
- Message class
- Progress class
- ProgressCallback class
- Cipher package (com.kryptel.cipher)
- Compressor package (com.kryptel.compressor)
- Exceptions package (com.kryptel.exceptions)
- Hash function package (com.kryptel.hash_function)
- MAC function package (com.kryptel.mac)
- Key-related functions (com.kryptel.key)
- Silver Key engine (com.kryptel.silver_key)
- Kryptel encrypted storage (com.kryptel.storage)
Declaration
package com.kryptel; public interface INotification { void ShowNotification(Message.Code code); void DismissNotification(); }
Description
Some high-level components use this interface to display short informative messages like "Performing antabic circomlization...". It is called when the operation may take a few seconds – too short for displaying a progress bar with Abort button, but long enough to let the user know that some work is being done.
This interface is optional; the client may choose not to implement it. In this case just pass null where the interface pointer is required.
ShowNotification
void ShowNotification(Message.Code code);
Opens a non-modal message box with the specified message and returns. The box should stay after this function returns and should have no buttons. The component will close it by calling DismissNotification when the operation is completed.
If an error occurs in the client code, the client should call DismissNotification to remove the box. In general, it is a good idea to call DismissNotification in the finally block.
Note that ShowNotification may be called again without closing the previous box. In this case the implementation should either close the previous box first, or simply update the message.
See also: Message class.
DismissNotification
void DismissNotification();
Close previously opened notification box. Calling this function when there is no active box is not considered an error; the implementation must simply return without doing anything.