cryptoservices/certificateandkeymgmt/recog/CertRecog.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 1999-2009 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 the License "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: 
       
    15 * CApaCertificateRecognizer implementation
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file 
       
    24  @internalTechnology
       
    25 */
       
    26  
       
    27 #if !defined(__RECTXT_H__)
       
    28 #define __RECTXT_H__
       
    29 
       
    30 #include <apmrec.h>
       
    31 
       
    32 
       
    33 
       
    34 /**
       
    35  * A recogniser that recognises the following MIME types:
       
    36  * application/vnd.wap.cert-response
       
    37  * application/x-x509-ca-cert
       
    38  * application/vnd.wap.wtls-ca-certificate
       
    39  */
       
    40 class CApaCertificateRecognizer : public CApaDataRecognizerType
       
    41 	{
       
    42 public:
       
    43 	CApaCertificateRecognizer();
       
    44 
       
    45 public: // from CApaDataRecognizerType
       
    46 	TUint PreferredBufSize();
       
    47 	TDataType SupportedDataTypeL( TInt aIndex ) const;
       
    48 
       
    49 	static CApaDataRecognizerType* CreateRecognizerL();
       
    50 
       
    51 private: // from CApaDataRecognizerType
       
    52 	void DoRecognizeL( const TDesC& aName, const TDesC8& aBuffer );
       
    53 
       
    54 private:
       
    55 	void DoRecognizeBufferL(const TDesC8& aBuffer, TBool aIsFile, RFile& aFile);
       
    56  	void RecognizeX509CertL( const TDesC8& aBuffer,  TBool aIsFile, RFile& aFile );
       
    57  	void RecognizeWTLSCertOrCertResponse( const TDesC8& aBuffer, TBool aIsFile, RFile& aFile);
       
    58  	void RecognizeWholeX509CertificateL(const TDesC8& aBuffer);
       
    59  	void ReadFileAndRecognizeL(RFile& aFileToRead);
       
    60 
       
    61 	};
       
    62 
       
    63 
       
    64 
       
    65 #endif