os/graphics/windowing/windowserver/nga/CLIENT/rtfxeffect.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2010 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: Wserv client side local header file.
sl@0
    14
//
sl@0
    15
sl@0
    16
sl@0
    17
#if !defined(__RTFXEFFECTS_H__)
sl@0
    18
#define __RTFXEFFECTS_H__
sl@0
    19
sl@0
    20
#include <w32std.h>
sl@0
    21
#include "../SERVER/w32cmd.h"
sl@0
    22
sl@0
    23
/** 
sl@0
    24
Class is used for passing data sent to TFX APIs RegisterEffect and OverrideEffect
sl@0
    25
from client to server of wserv. Another purpose of this class is to avoid code 
sl@0
    26
duplication, when these APIs are called from RWsSession and RWindowBase.
sl@0
    27
*/
sl@0
    28
class RTFXEffect : public MWsClientClass
sl@0
    29
	{
sl@0
    30
public:
sl@0
    31
	/**
sl@0
    32
	TFXEffect Enum is used to distinguish when OverrideEffect API is called from 
sl@0
    33
	Session class or Window class. 
sl@0
    34
	*/
sl@0
    35
	enum TFXEffect
sl@0
    36
		{
sl@0
    37
		ENone,
sl@0
    38
		/**
sl@0
    39
		Used in OverrideTFXEffect() when called from RWsSession
sl@0
    40
		*/
sl@0
    41
		ETFXSession,
sl@0
    42
		/**
sl@0
    43
		Used in OverrideTFXEffect() when called from RWindowBase
sl@0
    44
		*/
sl@0
    45
		ETFXWindow
sl@0
    46
		};
sl@0
    47
	RTFXEffect(TInt aHandle, RWsBuffer* aBuffer);
sl@0
    48
	void CheckFileNameAndSetSizes(const TFileName& aResourceDir, const TFileName& aFilenameOutgoing, const TFileName& aFilenameIncoming);
sl@0
    49
	void RegisterTFXEffect(TInt aAction, TInt aPurpose, const TFileName& aResourceDir, const TFileName& aFilenameOutgoing, const TFileName& aFilenameIncoming, TUint aAppUid=0, TBitFlags aFlags=0);
sl@0
    50
	void OverrideTFXEffect(TFXEffect aCalledFrom, TInt aAction, TInt aPurpose, const TFileName& aResourceDir, const TFileName& aFilenameOutgoing, const TFileName& aFilenameIncoming, TBitFlags aFlags=0);
sl@0
    51
	void AppendFileNameData(const TFileName& aResourceDir, const TFileName& aFilenameOutgoing, const TFileName& aFilenameIncoming);
sl@0
    52
	void WriteDataUsingIPC(TWsClCmdRegisterEffect* aForRegister, TWsClCmdOverrideEffect* aForOverride, const TFileName& aResourceDir, const TFileName& aFilenameOutgoing, const TFileName& aFilenameIncoming, TFXEffect aCalledFrom);
sl@0
    53
	TBool CheckCombinedSizeWithCurrentBuffer(TInt aSize) const;
sl@0
    54
	
sl@0
    55
private:
sl@0
    56
	TInt iDirPathSizePaded;
sl@0
    57
	TInt iFileName1SizePaded;
sl@0
    58
	TInt iFileName2SizePaded;
sl@0
    59
	TInt iCombSizePaded;
sl@0
    60
	};
sl@0
    61
sl@0
    62
#endif