sl@0: // Copyright (c) 1997-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: // Public Media Server includes sl@0: #include <mda/client/utility.h> sl@0: sl@0: #include "CompatAids.h" sl@0: sl@0: #if defined(__PANIC_COMPAT_IS_ACTIVE) sl@0: _LIT(KMdaServerName, "CMdaServer"); sl@0: #endif // __PANIC_COMPAT_IS_ACTIVE sl@0: sl@0: // -------------------------------------------------------------- sl@0: // CMdaServer member functions sl@0: // Public sl@0: sl@0: /** sl@0: Connects to and starts the media server. sl@0: sl@0: @return The connected session with the media server. sl@0: */ sl@0: EXPORT_C CMdaServer* CMdaServer::NewL() sl@0: { sl@0: return new(ELeave) CMdaServer(); sl@0: } sl@0: sl@0: /** sl@0: Destructor. Closes the session with the media server. sl@0: sl@0: @panic EMdaUtilServerListenerListNotEmpty sl@0: Not all event listeners that were added to the server have been removed. sl@0: @panic EMdaClientBaseSessionHasOpenObjects sl@0: The client has resources still open in the server. sl@0: */ sl@0: EXPORT_C CMdaServer::~CMdaServer() sl@0: { sl@0: } sl@0: sl@0: /** sl@0: Adds an object event listener, so that events can be passed to it. sl@0: sl@0: @param aListener sl@0: The object event listener to add to the list. sl@0: */ sl@0: EXPORT_C void CMdaServer::AddListenerL(MMdaObjectEventListener& /*aListener*/) sl@0: { sl@0: __PANIC_COMPAT(User::Panic(KMdaServerName, KDummyMdaServerNotImplemented)); sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: /** sl@0: Removes an object event listener so that events can no longer be passed to it. sl@0: The specified listener must be in the list, or a panic occurs. sl@0: sl@0: @param aListener sl@0: The object event listener to remove from the list. sl@0: */ sl@0: EXPORT_C void CMdaServer::RemoveListener(MMdaObjectEventListener& /*aListener*/) sl@0: { sl@0: __PANIC_COMPAT(User::Panic(KMdaServerName, KDummyMdaServerNotImplemented)); sl@0: }