vpnc_plat/vpnapi/inc/softtokenpluginif.h
branchRCL_3
changeset 46 29c8f9bc68e1
equal deleted inserted replaced
44:735de8341ce4 46:29c8f9bc68e1
       
     1 /*
       
     2 * Copyright (c) 2010 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: Soft Token plugin interface.
       
    15 * 
       
    16 */
       
    17 
       
    18 #ifndef __SOFTTOKENPLUGIN_H
       
    19 #define __SOFTTOKENPLUGIN_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <ecom/ecom.h>
       
    23  
       
    24 const TUid KCSoftTokenImplUid = {0x20031614};
       
    25 /**
       
    26  *  Soft Token plugin interface.
       
    27  *
       
    28  *  Soft Token plugin interface provides functionality for generating OTPs
       
    29  *  (One Time Passwords).
       
    30  *
       
    31  */
       
    32 
       
    33 class CSoftTokenPluginIf : public CBase
       
    34     {
       
    35     public:
       
    36         /**
       
    37          * Instantiates an object of this type .
       
    38          */
       
    39         static CSoftTokenPluginIf* NewL();
       
    40         /**
       
    41          * Destructor.
       
    42          */
       
    43         virtual ~CSoftTokenPluginIf();
       
    44         /**
       
    45          * Checks if default token is found.
       
    46          * @return True if there is a token available.
       
    47          */
       
    48         virtual TBool DefaultFoundL() = 0;
       
    49         /**
       
    50          * Gets code from default token.
       
    51          * @param aPin PIN of token.
       
    52          * @param aOTP One Time Password.
       
    53          * @param aNextCode True if next code is requested.
       
    54          * @return KErrNone if the OTP received or a system-wide error code.
       
    55          */
       
    56         virtual TInt CodeL(const TDesC8& aPin, HBufC8*& aOTP, TBool aNextCode = EFalse) = 0;
       
    57         
       
    58     private:
       
    59         TUid iDtor_ID_Key;
       
    60     };
       
    61 
       
    62 #include "softtokenpluginif.inl"
       
    63 
       
    64 #endif // __SOFTTOKENPLUGIN_H