os/mm/mmlibs/mmfw/tsrc/mmfintegrationtest/SDevSound/src/captestinfosession.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2008-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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #include <e32base.h>
    17 #include "captestinfoserver.h"
    18 #include "captestinfosession.h"
    19 
    20 RCapTestInfoSession::RCapTestInfoSession()
    21 	{
    22 	}
    23 
    24 // Create the server, if one with this name does not already exist.
    25 TInt RCapTestInfoSession::Connect()
    26 	{
    27 	TFindServer findCountServer(KInfoServerName);
    28 	TFullName name;
    29 	TInt err = KErrNone;
    30 	
    31 	 // Need to check that the server exists.
    32     if (findCountServer.Next(name)==KErrNone)
    33     	{
    34     	err = CreateSession(KInfoServerName, TVersion());
    35     	}
    36     else
    37     	{
    38     	err = KErrNotReady;
    39     	}
    40     
    41 	return err;
    42     }
    43 
    44 void RCapTestInfoSession::Close()
    45 	{
    46 	RSessionBase::Close();
    47 	}
    48 
    49 TThreadId RCapTestInfoSession::InfoServerTidL()
    50 	{
    51 	TPckgBuf<TThreadId> tid;
    52 	TIpcArgs args(&tid);
    53     User::LeaveIfError(SendReceive(ECapTestInfoThreadId, args));
    54     return tid();
    55 	}