Update contrib.
1 // Copyright (c) 2001-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 #ifndef __MMFDATAPATHPROXY_SERVER_H__
17 #define __MMFDATAPATHPROXY_SERVER_H__
21 #include <ecom/ecom.h>
22 #include <mmf/server/mmfdatapath.h>
23 #include <mmf/server/mmfsubthreadbase.h>
24 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
25 #include <mmf/server/mmfsubthreadbaseimpl.h>
32 The server running in the datapath subthread.
33 The subthread is owned by the main thread and shares the same heap.
35 class CMMFDataPathProxyServer : public CMMFSubThreadServer
38 static CMMFDataPathProxyServer* NewL();
39 ~CMMFDataPathProxyServer();
40 static TInt StartThread(TAny* aAny);
41 static void DoStartThreadL();
43 CMmfIpcSession* NewSessionL(const TVersion& aVersion) const;
44 CMMFDataPathProxyServer();
52 The session used to transmit messages between the main thread and the subthread.
53 Only one session can be created with a datapath subthread.
54 Once this session is closed, the subthread will be killed.
56 class CMMFDataPathProxySession : public CMMFSubThreadSession
59 static CMMFDataPathProxySession* NewL();
60 ~CMMFDataPathProxySession();
61 void ServiceL(const RMmfIpcMessage& aMessage);
63 CMMFDataPathProxySession();
64 TBool LoadDataPathByL(const RMmfIpcMessage& aMessage);
65 TBool LoadDataPathByMediaIdL(const RMmfIpcMessage& aMessage);
66 TBool LoadDataPathByCodecUidL(const RMmfIpcMessage& aMessage);
67 TBool LoadDataPathByMediaIdCodecUidL(const RMmfIpcMessage& aMessage);
68 TBool AddDataSourceL(const RMmfIpcMessage& aMessage);
69 TBool AddDataSinkL(const RMmfIpcMessage& aMessage);
70 TBool PrimeL(const RMmfIpcMessage& aMessage);
71 TBool PlayL(const RMmfIpcMessage& aMessage);
72 TBool PauseL(const RMmfIpcMessage& aMessage);
73 TBool StopL(const RMmfIpcMessage& aMessage);
74 TBool GetPositionL(const RMmfIpcMessage& aMessage) const;
75 TBool SetPositionL(const RMmfIpcMessage& aMessage);
76 TBool SetPlayWindowL(const RMmfIpcMessage& aMessage) ;
77 TBool ClearPlayWindowL(const RMmfIpcMessage& aMessage) ;
78 TBool StateL(const RMmfIpcMessage& aMessage) ;
80 void CheckDataPathExistsL() const {if (!iDataPath) User::Leave(KErrNotReady);};
82 CMMFDataPath* iDataPath;