sl@0: // Copyright (c) 2004-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 "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: // sl@0: sl@0: #ifndef __CSIPURIANDAUTHORITYTEST_H__ sl@0: #define __CSIPURIANDAUTHORITYTEST_H__ sl@0: sl@0: // System includes sl@0: // sl@0: #include sl@0: sl@0: // Local includes sl@0: #include "ctestbase.h" sl@0: sl@0: // CSipUriAndAuthorityTest - test class for the Uri and Authority family of classes sl@0: // sl@0: class CSipUriAndAuthorityTest : public CTestBase sl@0: { sl@0: public: sl@0: sl@0: // Static factory c'tor. Leaves pointer to created object on the cleanup stack. sl@0: // sl@0: // Rtn: pointer to newly created object - ownership transfered to caller. sl@0: // sl@0: static CSipUriAndAuthorityTest* NewLC(CIpuTestHarness* aTestHarness); sl@0: sl@0: // Static factory c'tor. sl@0: // sl@0: // Rtn: pointer to newly created object - ownership transfered to caller. sl@0: // sl@0: static CSipUriAndAuthorityTest* NewL(CIpuTestHarness* aTestHarness); sl@0: sl@0: // D'tor sl@0: // sl@0: ~CSipUriAndAuthorityTest(); sl@0: sl@0: // Runs the defined tests. sl@0: // sl@0: void DoTestsL(); sl@0: sl@0: // Default c'tor. sl@0: // sl@0: CSipUriAndAuthorityTest(CIpuTestHarness* aTestHarness); sl@0: sl@0: private: // Methods sl@0: sl@0: // Non-trivial c'tor. Second part of 2-phase construction - does all allocation. sl@0: // sl@0: void ConstructL(); sl@0: private: // Attributes sl@0: sl@0: // Open session and file sl@0: TInt OpenSipURIFile(); sl@0: sl@0: // In: sl@0: // aError - the error code sl@0: // aSipUri - the SIP URI that is currently being validated sl@0: // sl@0: void SipLogError(TInt aError, const TDesC16& aSipUri) const; sl@0: sl@0: // In: sl@0: //aSipUri - the sip uri that we are currently using sl@0: // aError - the error code sl@0: // sl@0: void LogErrorMessage(const TDesC16& aSipUri, const TInt aError)const; sl@0: sl@0: //Validate SIP URIs sl@0: // sl@0: TInt SipUriValidationL(); sl@0: sl@0: //Compare 2 SIP URIs sl@0: // sl@0: TInt SipUriEquivalenceL(); sl@0: sl@0: // Test harness sl@0: CIpuTestHarness* iTestHarness; sl@0: sl@0: TFileText iTUriParserFile; sl@0: RFs iFsSession; sl@0: TBool iFoundEquivalence; sl@0: }; sl@0: sl@0: #endif // __CSIPURIANDAUTHORITYTEST_H__