|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of alfred server side text style message handlers. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef ALFTEXTSTYLEHANDLERS_H |
|
21 #define ALFTEXTSTYLEHANDLERS_H |
|
22 |
|
23 #include <alf/alfextensionfactory.h> |
|
24 |
|
25 class THuiTextStyle; |
|
26 |
|
27 /** |
|
28 * Server - side handler object for CAlfTextStyle. Processes CAlfTextStyle commands |
|
29 * and passes them onwards to Hitchcockcore THuiTextStyle. |
|
30 */ |
|
31 NONSHARABLE_CLASS(TAlfTextStyleHandler) : public MAlfExtension |
|
32 { |
|
33 public: |
|
34 |
|
35 /** |
|
36 * Creates a new platform text style handler |
|
37 * |
|
38 * @param aResolver The alf interface provider. |
|
39 * |
|
40 * The meaning of parameters aId1 and aId2 depends on the requested construction type. |
|
41 * |
|
42 * When aConstructionType is EAlfPlatformTextStyleCreate: |
|
43 * |
|
44 * Creates a new platform text style handler based on passed in font style id and |
|
45 * parent id. |
|
46 * |
|
47 * @param aId1 The platform specific font style id to be used to create this platform |
|
48 * text style. |
|
49 * @param aId2 Id of the parent text style. |
|
50 * |
|
51 * |
|
52 * When aConstructionType is EAlfPreconfiguredTextStyleCreate: |
|
53 * |
|
54 * Creates a representation of a preconfigured text style. |
|
55 * |
|
56 * @param aId1 Id of the preconfigured text style to represent with this handler. |
|
57 * |
|
58 * |
|
59 * When aConstructionType is EAlfPlatformTextStyleCopy: |
|
60 * |
|
61 * Creates a new platform text style handler for new text style created from an existing |
|
62 * text style. |
|
63 * |
|
64 * @param aId1 Id of the existing text style to be used to create this text style. |
|
65 */ |
|
66 TAlfTextStyleHandler(MAlfInterfaceProvider& aResolver, TInt aId1, TInt aId2, TInt aConstructionType); |
|
67 |
|
68 |
|
69 /** |
|
70 * Releases this text style handler. |
|
71 */ |
|
72 void Release(); |
|
73 |
|
74 /** |
|
75 * Returns the associated Hithcockcore interface object. |
|
76 */ |
|
77 TAny* GetInterface(const THuiInterfaceSupport& aInterface); |
|
78 |
|
79 /** |
|
80 * Handles the incoming commands from the client side associated with this text style. |
|
81 */ |
|
82 void HandleCmdL(TInt aCommandId, const TDesC8& aInputBuffer, TDes8& aResponse); |
|
83 |
|
84 /** |
|
85 * Returns the text style id of associated THuiTextStyle object. |
|
86 */ |
|
87 TInt TextStyleId() const; |
|
88 |
|
89 private: |
|
90 |
|
91 MAlfInterfaceProvider& iResolver; // Not owned |
|
92 THuiTextStyle* iTextStyle; // Not owned |
|
93 }; |
|
94 |
|
95 #endif // ALFTEXTSTYLEHANDLERS_H |