First public contribution.
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __CSIPURIANDAUTHORITYTEST_H__
17 #define __CSIPURIANDAUTHORITYTEST_H__
24 #include "ctestbase.h"
26 // CSipUriAndAuthorityTest - test class for the Uri and Authority family of classes
28 class CSipUriAndAuthorityTest : public CTestBase
32 // Static factory c'tor. Leaves pointer to created object on the cleanup stack.
34 // Rtn: pointer to newly created object - ownership transfered to caller.
36 static CSipUriAndAuthorityTest* NewLC(CIpuTestHarness* aTestHarness);
38 // Static factory c'tor.
40 // Rtn: pointer to newly created object - ownership transfered to caller.
42 static CSipUriAndAuthorityTest* NewL(CIpuTestHarness* aTestHarness);
46 ~CSipUriAndAuthorityTest();
48 // Runs the defined tests.
54 CSipUriAndAuthorityTest(CIpuTestHarness* aTestHarness);
58 // Non-trivial c'tor. Second part of 2-phase construction - does all allocation.
61 private: // Attributes
63 // Open session and file
64 TInt OpenSipURIFile();
67 // aError - the error code
68 // aSipUri - the SIP URI that is currently being validated
70 void SipLogError(TInt aError, const TDesC16& aSipUri) const;
73 //aSipUri - the sip uri that we are currently using
74 // aError - the error code
76 void LogErrorMessage(const TDesC16& aSipUri, const TInt aError)const;
80 TInt SipUriValidationL();
84 TInt SipUriEquivalenceL();
87 CIpuTestHarness* iTestHarness;
89 TFileText iTUriParserFile;
91 TBool iFoundEquivalence;
94 #endif // __CSIPURIANDAUTHORITYTEST_H__