|
1 /* |
|
2 * Copyright (c) 2010 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 * |
|
15 */ |
|
16 |
|
17 #ifndef HSPSFAMILY_H_ |
|
18 #define HSPSFAMILY_H_ |
|
19 |
|
20 #include <e32base.h> |
|
21 #include <w32std.h> |
|
22 |
|
23 #include "hspsthememanagement.h" |
|
24 |
|
25 |
|
26 |
|
27 /** |
|
28 * @ingroup group_hspsserver |
|
29 * ChspsFamily is used to get UI's resolution and orientation. |
|
30 * |
|
31 * @lib hspsThemeServer.exe |
|
32 * @since S60 9.2 |
|
33 */ |
|
34 class ChspsFamily |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 |
|
38 /** |
|
39 * NewL |
|
40 * Two-phased constructor. |
|
41 */ |
|
42 static ChspsFamily* NewL(); |
|
43 |
|
44 /** |
|
45 * ~ChspsFamilyListener |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~ChspsFamily(); |
|
49 |
|
50 /** |
|
51 * Retrieves family type from a string |
|
52 * @since S60 9.2 |
|
53 */ |
|
54 static ThspsFamily GetFamilyType( |
|
55 const TDesC8& aFamilyString ); |
|
56 |
|
57 /** |
|
58 * Retrieves family type from the current resolution. |
|
59 * @since S60 5.0 |
|
60 * @return Family id |
|
61 */ |
|
62 ThspsFamily GetFamilyType(); |
|
63 |
|
64 /** |
|
65 * Retrieves window server session |
|
66 * @since S60 9.2 |
|
67 * @return Window server session |
|
68 */ |
|
69 inline RWsSession& WsSession(); |
|
70 |
|
71 protected: |
|
72 |
|
73 /** |
|
74 * ConstructL |
|
75 * By default Symbian 2nd phase constructor is private. |
|
76 */ |
|
77 void ConstructL(); |
|
78 |
|
79 protected: |
|
80 /** |
|
81 * C++ default constructor. |
|
82 */ |
|
83 ChspsFamily(); |
|
84 |
|
85 |
|
86 /** |
|
87 * Retrieves used display code. |
|
88 */ |
|
89 void GetFamilyString( |
|
90 TDes8& aFamily ); |
|
91 |
|
92 private: // Data |
|
93 |
|
94 // Window server session. |
|
95 RWsSession iWsSession; |
|
96 |
|
97 // Client-side handle to a server-side window group. |
|
98 RWindowGroup iWindowGroup; |
|
99 |
|
100 // Screen device, own. |
|
101 CWsScreenDevice* iScreenDevice; |
|
102 |
|
103 }; |
|
104 |
|
105 |
|
106 // Inline methods |
|
107 |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // ChspsFamily::WsSession |
|
111 // ----------------------------------------------------------------------------- |
|
112 // |
|
113 RWsSession& ChspsFamily::WsSession() |
|
114 { |
|
115 return iWsSession; |
|
116 } |
|
117 |
|
118 |
|
119 |
|
120 #endif /* HSPSFAMILY_H_ */ |
|
121 |
|
122 // End of File |