smsprotocols/smsstack/test/smsstackbasetestserver.h
author srilekhas <srilekhas@symbian.org>
Fri, 17 Sep 2010 17:35:51 +0100
branchRCL_3
changeset 71 b10722dbe19e
parent 14 7ef16719d8cb
child 24 6638e7f4bd8f
permissions -rw-r--r--
Merge RCL_3 fix to Bug 1398 with the latest delivery.

// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

// @file
// @test

#ifndef SMSSTACKBASETESTSERVER_H
#define SMSSTACKBASETESTSERVER_H

#include <test\testexecuteserverbase.h>
#include <etelmm.h>

class CSmsStackTestServer : public CTestServer
/**
    Describes the base test server for the SMS stack test harness.
 */
    {
public:
    IMPORT_C virtual ~CSmsStackTestServer();
    
protected:
    IMPORT_C CSmsStackTestServer();
    IMPORT_C void InitializeTsyAndPhonesL();

private:
    void GetTsyNamesFromCommsdatL(RArray<TName>& aTsyNameList);
    void LoadTsyL(RTelServer& aServer, RPhone& aPhone, const TDesC& aTsyName);
    
private:
    /**
     * SMS stack first interrogates ETel server to get information about available SIMs,
     * and then opens phone sessions by using the retrieved available SIM info.
     * ETel returns the SIM info based on the loaded TSYs. If there is no connection to a phone,
     * ETel unloads the corresponding TSY. To keep TSYs required by SMS tests loaded, the test code
     * opens connection to the required phones and keep them alive throughout all test steps.
     * In a real device, this is done as a part of the system start.
     */
    RTelServer iTelServer;
    RMobilePhone iPhone1;
    RMobilePhone iPhone2;
    };
 
#endif // SMSSTACKBASETESTSERVER_H