Update contrib.
1 // Copyright (c) 1997-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.
16 // Public Media Server includes
17 #include <mda/client/utility.h>
19 #include "CompatAids.h"
21 #if defined(__PANIC_COMPAT_IS_ACTIVE)
22 _LIT(KMdaServerName, "CMdaServer");
23 #endif // __PANIC_COMPAT_IS_ACTIVE
25 // --------------------------------------------------------------
26 // CMdaServer member functions
30 Connects to and starts the media server.
32 @return The connected session with the media server.
34 EXPORT_C CMdaServer* CMdaServer::NewL()
36 return new(ELeave) CMdaServer();
40 Destructor. Closes the session with the media server.
42 @panic EMdaUtilServerListenerListNotEmpty
43 Not all event listeners that were added to the server have been removed.
44 @panic EMdaClientBaseSessionHasOpenObjects
45 The client has resources still open in the server.
47 EXPORT_C CMdaServer::~CMdaServer()
52 Adds an object event listener, so that events can be passed to it.
55 The object event listener to add to the list.
57 EXPORT_C void CMdaServer::AddListenerL(MMdaObjectEventListener& /*aListener*/)
59 __PANIC_COMPAT(User::Panic(KMdaServerName, KDummyMdaServerNotImplemented));
60 User::Leave(KErrNotSupported);
64 Removes an object event listener so that events can no longer be passed to it.
65 The specified listener must be in the list, or a panic occurs.
68 The object event listener to remove from the list.
70 EXPORT_C void CMdaServer::RemoveListener(MMdaObjectEventListener& /*aListener*/)
72 __PANIC_COMPAT(User::Panic(KMdaServerName, KDummyMdaServerNotImplemented));