epoc32/include/mctcertapps.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mctcertapps.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mctcertapps.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,86 @@
     1.4 -mctcertapps.h
     1.5 +/*
     1.6 +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Eclipse Public License v1.0"
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description: 
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +
    1.24 +
    1.25 +/**
    1.26 + @file 
    1.27 + @internalAll
    1.28 +*/
    1.29 + 
    1.30 +#ifndef __MCTCERTAPPS_H__
    1.31 +#define __MCTCERTAPPS_H__
    1.32 +
    1.33 +#include <e32base.h>
    1.34 +#include <f32file.h>
    1.35 +#include <s32file.h>
    1.36 +#include <ct/mcttokeninterface.h>
    1.37 +
    1.38 +/** The UID of certificate application token type */
    1.39 +const TInt KTokenTypeCertApps = 0x101f7a37;
    1.40 +
    1.41 +/** The UID of certificate application interface */
    1.42 +const TInt KInterfaceCertApps = 0x101f7a38;
    1.43 +
    1.44 +/**
    1.45 + * Information about a certificate application.
    1.46 + *
    1.47 + * Certificate applications are used to represent classes of certificate use,
    1.48 + * for example Software Install, TLS, WTLS, WMLScript, SignText, etc.
    1.49 + *
    1.50 + * CA Certificates are associated with zero or more applications, and this
    1.51 + * information is used to determine which certificates are used when building
    1.52 + * and validating certificate chains.
    1.53 + *
    1.54 + * An application is identified by a UID.  A TCertificateAppInfo contains this
    1.55 + * and the name of the application.
    1.56 + * 
    1.57 + * @publishedAll
    1.58 + * @released
    1.59 + */
    1.60 +class TCertificateAppInfo
    1.61 +	{
    1.62 +public:
    1.63 +	IMPORT_C TCertificateAppInfo(const TUid& aUid, const TName& aName);
    1.64 +	IMPORT_C TCertificateAppInfo& operator = (const TCertificateAppInfo& aClient);
    1.65 +	IMPORT_C TCertificateAppInfo();
    1.66 +	IMPORT_C const TUid& Id() const;
    1.67 +	IMPORT_C const TName& Name() const;
    1.68 +	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
    1.69 +	IMPORT_C void InternalizeL(RReadStream& aStream);
    1.70 +
    1.71 +private:
    1.72 +	TUid iUid;                    
    1.73 +	TName iName;
    1.74 +	};
    1.75 +
    1.76 +/**
    1.77 + * Interface for certificate applications manager token.
    1.78 + */
    1.79 +class MCTCertApps : public MCTTokenInterface
    1.80 +	{
    1.81 +public:
    1.82 +	virtual void AddL(const TCertificateAppInfo& aClient) = 0;
    1.83 +	virtual void RemoveL(const TUid& aUid) = 0;
    1.84 +	virtual TInt ApplicationCountL() const = 0;
    1.85 +	virtual void ApplicationsL(RArray<TCertificateAppInfo>& aAppArray) const = 0;
    1.86 +	virtual void ApplicationL(const TUid& aUid, TCertificateAppInfo& aInfo) const = 0;
    1.87 +	};
    1.88 +
    1.89 +
    1.90 +#endif // __MCTCERTAPPS_H__