sl@0: // Copyright (c) 2008-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: #include sl@0: #include "captestinfoserver.h" sl@0: #include "captestinfosession.h" sl@0: sl@0: RCapTestInfoSession::RCapTestInfoSession() sl@0: { sl@0: } sl@0: sl@0: // Create the server, if one with this name does not already exist. sl@0: TInt RCapTestInfoSession::Connect() sl@0: { sl@0: TFindServer findCountServer(KInfoServerName); sl@0: TFullName name; sl@0: TInt err = KErrNone; sl@0: sl@0: // Need to check that the server exists. sl@0: if (findCountServer.Next(name)==KErrNone) sl@0: { sl@0: err = CreateSession(KInfoServerName, TVersion()); sl@0: } sl@0: else sl@0: { sl@0: err = KErrNotReady; sl@0: } sl@0: sl@0: return err; sl@0: } sl@0: sl@0: void RCapTestInfoSession::Close() sl@0: { sl@0: RSessionBase::Close(); sl@0: } sl@0: sl@0: TThreadId RCapTestInfoSession::InfoServerTidL() sl@0: { sl@0: TPckgBuf tid; sl@0: TIpcArgs args(&tid); sl@0: User::LeaveIfError(SendReceive(ECapTestInfoThreadId, args)); sl@0: return tid(); sl@0: }