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