First public contribution.
1 // Copyright (c) 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.
14 // MmfAudioPolicyStart.cpp
18 #include <ecom/ecom.h>
19 #include "MmfBtAudioPolicyStart.h"
20 #include "MmfBtAudioPolicyServer.h"
22 EXPORT_C TInt CMMFAudioPolicyServer::StartThread(TAny* aParms)
24 Thread entry-point function.
25 The TServerStart objects is passed as the thread parameter
30 //This line will be used if parameters need to be passed.
31 TServerStart* start = reinterpret_cast<TServerStart*>(aParms);
32 CTrapCleanup* cleanup = CTrapCleanup::New();
37 CActiveScheduler* sched=NULL;
38 TRAP(err, sched=new(ELeave) CActiveScheduler);
41 CActiveScheduler::Install(sched);
42 CMMFAudioPolicyServer* server = NULL;
43 TRAPD(err,server = CMMFAudioPolicyServer::NewL());
47 start->iPolicyServerHandle = server->Server();
48 // Sync with the client and enter the active scheduler
49 RThread::Rendezvous(KErrNone);
57 REComSession::FinalClose();