1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/src/Client/generic/MclUtil.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,73 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +// Public Media Server includes
1.20 +#include <mda/client/utility.h>
1.21 +
1.22 +#include "CompatAids.h"
1.23 +
1.24 +#if defined(__PANIC_COMPAT_IS_ACTIVE)
1.25 +_LIT(KMdaServerName, "CMdaServer");
1.26 +#endif // __PANIC_COMPAT_IS_ACTIVE
1.27 +
1.28 +// --------------------------------------------------------------
1.29 +// CMdaServer member functions
1.30 +// Public
1.31 +
1.32 +/**
1.33 +Connects to and starts the media server.
1.34 +
1.35 +@return The connected session with the media server.
1.36 +*/
1.37 +EXPORT_C CMdaServer* CMdaServer::NewL()
1.38 + {
1.39 + return new(ELeave) CMdaServer();
1.40 + }
1.41 +
1.42 +/**
1.43 +Destructor. Closes the session with the media server.
1.44 +
1.45 +@panic EMdaUtilServerListenerListNotEmpty
1.46 + Not all event listeners that were added to the server have been removed.
1.47 +@panic EMdaClientBaseSessionHasOpenObjects
1.48 + The client has resources still open in the server.
1.49 +*/
1.50 +EXPORT_C CMdaServer::~CMdaServer()
1.51 + {
1.52 + }
1.53 +
1.54 +/**
1.55 +Adds an object event listener, so that events can be passed to it.
1.56 +
1.57 +@param aListener
1.58 + The object event listener to add to the list.
1.59 +*/
1.60 +EXPORT_C void CMdaServer::AddListenerL(MMdaObjectEventListener& /*aListener*/)
1.61 + {
1.62 + __PANIC_COMPAT(User::Panic(KMdaServerName, KDummyMdaServerNotImplemented));
1.63 + User::Leave(KErrNotSupported);
1.64 + }
1.65 +
1.66 +/**
1.67 +Removes an object event listener so that events can no longer be passed to it.
1.68 +The specified listener must be in the list, or a panic occurs.
1.69 +
1.70 +@param aListener
1.71 + The object event listener to remove from the list.
1.72 +*/
1.73 +EXPORT_C void CMdaServer::RemoveListener(MMdaObjectEventListener& /*aListener*/)
1.74 + {
1.75 + __PANIC_COMPAT(User::Panic(KMdaServerName, KDummyMdaServerNotImplemented));
1.76 + }