os/mm/mmlibs/mmfw/inc/mmf/server/mmfdatapathproxyserver.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __MMFDATAPATHPROXY_SERVER_H__
    17 #define __MMFDATAPATHPROXY_SERVER_H__
    18 
    19 #include <e32base.h>
    20 #include <e32std.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>
    26 #endif
    27 
    28 
    29 /**
    30 @internalComponent
    31  
    32 The server running in the datapath subthread.
    33 The subthread is owned by the main thread and shares the same heap.
    34 */
    35 class CMMFDataPathProxyServer : public CMMFSubThreadServer
    36 	{
    37 public:
    38 	static CMMFDataPathProxyServer* NewL();
    39 	~CMMFDataPathProxyServer();
    40 	static TInt StartThread(TAny* aAny);
    41 	static void DoStartThreadL();
    42 private:
    43 	CMmfIpcSession* NewSessionL(const TVersion& aVersion) const;
    44 	CMMFDataPathProxyServer();
    45 	void ConstructL();
    46 	};
    47 
    48 
    49 /**
    50 @internalComponent
    51 
    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.
    55 */
    56 class CMMFDataPathProxySession : public CMMFSubThreadSession
    57 	{
    58 public:
    59 	static CMMFDataPathProxySession* NewL();
    60 	~CMMFDataPathProxySession();
    61 	void ServiceL(const RMmfIpcMessage& aMessage);
    62 private:
    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) ;
    79 
    80 	void CheckDataPathExistsL() const {if (!iDataPath) User::Leave(KErrNotReady);};
    81 private:
    82 	CMMFDataPath* iDataPath;
    83 	};
    84 
    85 
    86 
    87 #endif
    88