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.
sl@0
     1
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
#ifndef __MMFDATAPATHPROXY_SERVER_H__
sl@0
    17
#define __MMFDATAPATHPROXY_SERVER_H__
sl@0
    18
sl@0
    19
#include <e32base.h>
sl@0
    20
#include <e32std.h>
sl@0
    21
#include <ecom/ecom.h>
sl@0
    22
#include <mmf/server/mmfdatapath.h>
sl@0
    23
#include <mmf/server/mmfsubthreadbase.h>
sl@0
    24
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
sl@0
    25
#include <mmf/server/mmfsubthreadbaseimpl.h>
sl@0
    26
#endif
sl@0
    27
sl@0
    28
sl@0
    29
/**
sl@0
    30
@internalComponent
sl@0
    31
 
sl@0
    32
The server running in the datapath subthread.
sl@0
    33
The subthread is owned by the main thread and shares the same heap.
sl@0
    34
*/
sl@0
    35
class CMMFDataPathProxyServer : public CMMFSubThreadServer
sl@0
    36
	{
sl@0
    37
public:
sl@0
    38
	static CMMFDataPathProxyServer* NewL();
sl@0
    39
	~CMMFDataPathProxyServer();
sl@0
    40
	static TInt StartThread(TAny* aAny);
sl@0
    41
	static void DoStartThreadL();
sl@0
    42
private:
sl@0
    43
	CMmfIpcSession* NewSessionL(const TVersion& aVersion) const;
sl@0
    44
	CMMFDataPathProxyServer();
sl@0
    45
	void ConstructL();
sl@0
    46
	};
sl@0
    47
sl@0
    48
sl@0
    49
/**
sl@0
    50
@internalComponent
sl@0
    51
sl@0
    52
The session used to transmit messages between the main thread and the subthread.
sl@0
    53
Only one session can be created with a datapath subthread.
sl@0
    54
Once this session is closed, the subthread will be killed.
sl@0
    55
*/
sl@0
    56
class CMMFDataPathProxySession : public CMMFSubThreadSession
sl@0
    57
	{
sl@0
    58
public:
sl@0
    59
	static CMMFDataPathProxySession* NewL();
sl@0
    60
	~CMMFDataPathProxySession();
sl@0
    61
	void ServiceL(const RMmfIpcMessage& aMessage);
sl@0
    62
private:
sl@0
    63
	CMMFDataPathProxySession();
sl@0
    64
	TBool LoadDataPathByL(const RMmfIpcMessage& aMessage);
sl@0
    65
	TBool LoadDataPathByMediaIdL(const RMmfIpcMessage& aMessage);
sl@0
    66
	TBool LoadDataPathByCodecUidL(const RMmfIpcMessage& aMessage);
sl@0
    67
	TBool LoadDataPathByMediaIdCodecUidL(const RMmfIpcMessage& aMessage);
sl@0
    68
	TBool AddDataSourceL(const RMmfIpcMessage& aMessage);
sl@0
    69
	TBool AddDataSinkL(const RMmfIpcMessage& aMessage);
sl@0
    70
	TBool PrimeL(const RMmfIpcMessage& aMessage);
sl@0
    71
	TBool PlayL(const RMmfIpcMessage& aMessage);
sl@0
    72
	TBool PauseL(const RMmfIpcMessage& aMessage);
sl@0
    73
	TBool StopL(const RMmfIpcMessage& aMessage);
sl@0
    74
	TBool GetPositionL(const RMmfIpcMessage& aMessage) const;
sl@0
    75
	TBool SetPositionL(const RMmfIpcMessage& aMessage);
sl@0
    76
	TBool SetPlayWindowL(const RMmfIpcMessage& aMessage) ;
sl@0
    77
	TBool ClearPlayWindowL(const RMmfIpcMessage& aMessage) ;
sl@0
    78
	TBool StateL(const RMmfIpcMessage& aMessage) ;
sl@0
    79
sl@0
    80
	void CheckDataPathExistsL() const {if (!iDataPath) User::Leave(KErrNotReady);};
sl@0
    81
private:
sl@0
    82
	CMMFDataPath* iDataPath;
sl@0
    83
	};
sl@0
    84
sl@0
    85
sl@0
    86
sl@0
    87
#endif
sl@0
    88