wim/inc/DigSigningNote.h
changeset 0 164170e6151a
equal deleted inserted replaced
-1:000000000000 0:164170e6151a
       
     1 /*
       
     2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Interface for Digital Signing Note
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MDIGSIGNINGNOTE_H
       
    21 #define MDIGSIGNINGNOTE_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <secdlg.h>
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 *  Digital Signing Note interface
       
    31 *  
       
    32 *  @since Series60 2.6
       
    33 */
       
    34 class MDigSigningNote 
       
    35     {
       
    36     public:
       
    37         
       
    38         /**
       
    39         * TNoteType defines different possible note types.
       
    40         */
       
    41         enum TNoteType
       
    42             {
       
    43             ESignatureRequested = 0xFF00,   // Digital signature requested
       
    44             ESignatureDone,                 // Digital signature done.
       
    45             ESigningCancelled,              // Digital signing cancelled   
       
    46             ENoMatchCert,                   // No matchig certificate found
       
    47             ENoSecurityModule,              // Security Module unvailable
       
    48             EInternalError                  // Error note in any other case
       
    49             };
       
    50 
       
    51     public: // New functions
       
    52         
       
    53         /**
       
    54         * Informs the user during digital signing.
       
    55         * @param aNoteType Identifies the note type.
       
    56         * @param aStatus KErrNone or KErrNotSupported
       
    57         * @return void
       
    58         */
       
    59         virtual void ShowNote( MDigSigningNote::TNoteType aNoteType,
       
    60                                TRequestStatus& aStatus ) = 0;
       
    61         
       
    62         /**
       
    63         * Saves receipt to Notepad if receipt saving is on in .ini-file and
       
    64         * informs user about this.
       
    65         * @param aSignedText Signed text in readable form.
       
    66         * @param aStatus KErrNone or KErrNotSupported
       
    67         * @return void
       
    68         */
       
    69         virtual void SaveSignedText( const TDesC& aSignedText,
       
    70                                      TRequestStatus& aStatus ) = 0;
       
    71         
       
    72         /**
       
    73         * Shows instructions how to unblock PIN.
       
    74         * @param aLabel Label of the PIN.
       
    75         * @param aStatus KErrNone or KErrNotSupported
       
    76         * @return void
       
    77         */
       
    78         virtual void ShowPINBlockedInfo( const TPINLabel& aLabel,
       
    79                                          TRequestStatus& aStatus ) = 0;
       
    80 
       
    81         /**
       
    82         * Release is called to free resources of the MDigSigningNote class
       
    83         */
       
    84         virtual void Release() = 0;
       
    85 
       
    86     protected: 
       
    87         
       
    88         // Destructor
       
    89         inline virtual ~MDigSigningNote() = 0;
       
    90 
       
    91     };
       
    92 
       
    93 inline MDigSigningNote::~MDigSigningNote(){}
       
    94 
       
    95 /**
       
    96 * Factory for creating the relevant concrete subclass
       
    97 * of the digital signing note.
       
    98 */
       
    99 class DigSigningNoteFactory
       
   100     {
       
   101     public:
       
   102     
       
   103     /**
       
   104      * Creates an instance of a subclass of MDigSigningNote. 
       
   105      * Implement to create the appropriate security dialog.
       
   106      * 
       
   107      * @param returns an object that implements MDigSigningNote methods
       
   108      */
       
   109     IMPORT_C static MDigSigningNote* CreateNoteL(); 
       
   110     
       
   111     };
       
   112 
       
   113 #endif      // MDIGSIGNINGNOTE_H   
       
   114             
       
   115 // End of File