pnpmobileservices/pnpms/PnpPaosFilter/src/HdcToPaosInterface.h
changeset 0 3ce708148e4d
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     1 /*
       
     2 * Copyright (c) 2005 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:  A interface definition for reading HDC related parameters
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef HDC_TO_PAOS_INTERFACE_H
       
    22 #define HDC_TO_PAOS_INTERFACE_H
       
    23 
       
    24 //INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 const TInt KMaxHdcVersionStringLength(40); 
       
    28 const TInt KHdcNonceLength(8); 
       
    29 _LIT( KHdcDllFileName, "hdcutil.dll" ); 
       
    30 const TUid KHdcUtilDllUid = { 0x10272D3A };
       
    31 
       
    32 const TInt KMaxHdcKeyInfoLength(20);
       
    33 typedef TBuf8<KMaxHdcKeyInfoLength> HdcKeyInfo;
       
    34 typedef RArray<HdcKeyInfo> HdcKeyInfoList;
       
    35 
       
    36 const TInt KMaxURLLength(255);
       
    37 typedef TBuf8<KMaxURLLength> HdcTrustedDomain;
       
    38 typedef RArray<HdcTrustedDomain> HdcTrustedDomainList;
       
    39 
       
    40 
       
    41 /*!
       
    42 MHdcToPaosInterface implementor is assumed to be part of a DLL that can be
       
    43 loaded dynamically using RLibrary::Load. It should have <KHdcUtilDllUid> as
       
    44 its uid3 and it should be named <KHdcDllFileName>. There should be a NewLC
       
    45 implementation in the first ordinal of the DLL that returns a pointer to
       
    46 a CHdcToPaosInterface derived object to allow dynamic loading.
       
    47 */
       
    48 
       
    49 class CHdcToPaosInterface : public CBase
       
    50     {
       
    51     public:
       
    52     
       
    53         /**
       
    54         * Returns HDC version string
       
    55         * @param aVersion Current version of the HDC. max length of version is 
       
    56         *    KMaxHdcVersionStringLength
       
    57         * @return KErrNone, KErrArgument
       
    58         */
       
    59         virtual TInt Version( TDes8& aVersion ) const = 0;
       
    60 
       
    61         /**
       
    62         * Create and save new nonce. 
       
    63         * @param aNonce Nonce. Length of nonce is KHdcNonceLength
       
    64         */
       
    65         virtual void CreateNewNonceL( TDes8& aNonce ) = 0;
       
    66         
       
    67         /**
       
    68         * Get current nonce value from the database which has been created using
       
    69         *    CreateNonceL().
       
    70         * @param aNonce Nonce. Length of nonce is KHdcNonceLength
       
    71         */
       
    72         virtual void NonceL( TDes8& aNonce ) const = 0;
       
    73         
       
    74         /**
       
    75         * Return Keyinfo list array which are defined in HDCKeyInfo.h
       
    76         * @param aList Keyinfo list. 0..N keyinfos. See typedefinitions.
       
    77         */
       
    78         virtual void HdcKeyInfos( HdcKeyInfoList& aList) = 0;
       
    79         
       
    80         /**
       
    81         * Get a list of trusted domains which PAOS can use to determine valid domains.
       
    82         * @param aList See typedefinitions.
       
    83         **/
       
    84         virtual void TrustedDomainsL( HdcTrustedDomainList& aList ) = 0;    
       
    85     };
       
    86 
       
    87 #endif // HDC_TO_PAOS_INTERFACE_H