1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/inc/mmf/server/mmfdatapathproxyserver.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,88 @@
1.4 +// Copyright (c) 2001-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 +#ifndef __MMFDATAPATHPROXY_SERVER_H__
1.20 +#define __MMFDATAPATHPROXY_SERVER_H__
1.21 +
1.22 +#include <e32base.h>
1.23 +#include <e32std.h>
1.24 +#include <ecom/ecom.h>
1.25 +#include <mmf/server/mmfdatapath.h>
1.26 +#include <mmf/server/mmfsubthreadbase.h>
1.27 +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
1.28 +#include <mmf/server/mmfsubthreadbaseimpl.h>
1.29 +#endif
1.30 +
1.31 +
1.32 +/**
1.33 +@internalComponent
1.34 +
1.35 +The server running in the datapath subthread.
1.36 +The subthread is owned by the main thread and shares the same heap.
1.37 +*/
1.38 +class CMMFDataPathProxyServer : public CMMFSubThreadServer
1.39 + {
1.40 +public:
1.41 + static CMMFDataPathProxyServer* NewL();
1.42 + ~CMMFDataPathProxyServer();
1.43 + static TInt StartThread(TAny* aAny);
1.44 + static void DoStartThreadL();
1.45 +private:
1.46 + CMmfIpcSession* NewSessionL(const TVersion& aVersion) const;
1.47 + CMMFDataPathProxyServer();
1.48 + void ConstructL();
1.49 + };
1.50 +
1.51 +
1.52 +/**
1.53 +@internalComponent
1.54 +
1.55 +The session used to transmit messages between the main thread and the subthread.
1.56 +Only one session can be created with a datapath subthread.
1.57 +Once this session is closed, the subthread will be killed.
1.58 +*/
1.59 +class CMMFDataPathProxySession : public CMMFSubThreadSession
1.60 + {
1.61 +public:
1.62 + static CMMFDataPathProxySession* NewL();
1.63 + ~CMMFDataPathProxySession();
1.64 + void ServiceL(const RMmfIpcMessage& aMessage);
1.65 +private:
1.66 + CMMFDataPathProxySession();
1.67 + TBool LoadDataPathByL(const RMmfIpcMessage& aMessage);
1.68 + TBool LoadDataPathByMediaIdL(const RMmfIpcMessage& aMessage);
1.69 + TBool LoadDataPathByCodecUidL(const RMmfIpcMessage& aMessage);
1.70 + TBool LoadDataPathByMediaIdCodecUidL(const RMmfIpcMessage& aMessage);
1.71 + TBool AddDataSourceL(const RMmfIpcMessage& aMessage);
1.72 + TBool AddDataSinkL(const RMmfIpcMessage& aMessage);
1.73 + TBool PrimeL(const RMmfIpcMessage& aMessage);
1.74 + TBool PlayL(const RMmfIpcMessage& aMessage);
1.75 + TBool PauseL(const RMmfIpcMessage& aMessage);
1.76 + TBool StopL(const RMmfIpcMessage& aMessage);
1.77 + TBool GetPositionL(const RMmfIpcMessage& aMessage) const;
1.78 + TBool SetPositionL(const RMmfIpcMessage& aMessage);
1.79 + TBool SetPlayWindowL(const RMmfIpcMessage& aMessage) ;
1.80 + TBool ClearPlayWindowL(const RMmfIpcMessage& aMessage) ;
1.81 + TBool StateL(const RMmfIpcMessage& aMessage) ;
1.82 +
1.83 + void CheckDataPathExistsL() const {if (!iDataPath) User::Leave(KErrNotReady);};
1.84 +private:
1.85 + CMMFDataPath* iDataPath;
1.86 + };
1.87 +
1.88 +
1.89 +
1.90 +#endif
1.91 +