sl@0: /* sl@0: * Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * CApaCertificateRecognizer implementation sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #if !defined(__RECTXT_H__) sl@0: #define __RECTXT_H__ sl@0: sl@0: #include sl@0: sl@0: sl@0: sl@0: /** sl@0: * A recogniser that recognises the following MIME types: sl@0: * application/vnd.wap.cert-response sl@0: * application/x-x509-ca-cert sl@0: * application/vnd.wap.wtls-ca-certificate sl@0: */ sl@0: class CApaCertificateRecognizer : public CApaDataRecognizerType sl@0: { sl@0: public: sl@0: CApaCertificateRecognizer(); sl@0: sl@0: public: // from CApaDataRecognizerType sl@0: TUint PreferredBufSize(); sl@0: TDataType SupportedDataTypeL( TInt aIndex ) const; sl@0: sl@0: static CApaDataRecognizerType* CreateRecognizerL(); sl@0: sl@0: private: // from CApaDataRecognizerType sl@0: void DoRecognizeL( const TDesC& aName, const TDesC8& aBuffer ); sl@0: sl@0: private: sl@0: void DoRecognizeBufferL(const TDesC8& aBuffer, TBool aIsFile, RFile& aFile); sl@0: void RecognizeX509CertL( const TDesC8& aBuffer, TBool aIsFile, RFile& aFile ); sl@0: void RecognizeWTLSCertOrCertResponse( const TDesC8& aBuffer, TBool aIsFile, RFile& aFile); sl@0: void RecognizeWholeX509CertificateL(const TDesC8& aBuffer); sl@0: void ReadFileAndRecognizeL(RFile& aFileToRead); sl@0: sl@0: }; sl@0: sl@0: sl@0: sl@0: #endif