williamr@2
|
1 |
// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
#ifndef __VIEWCLI_H__
|
williamr@2
|
17 |
#define __VIEWCLI_H__
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#include <e32base.h>
|
williamr@2
|
20 |
#include <gdi.h>
|
williamr@2
|
21 |
#include <vwsdef.h>
|
williamr@2
|
22 |
|
williamr@2
|
23 |
//
|
williamr@2
|
24 |
// Forward declarations.
|
williamr@2
|
25 |
//
|
williamr@2
|
26 |
|
williamr@2
|
27 |
class RVwsSession;
|
williamr@2
|
28 |
class CVwsSessionEventHandler;
|
williamr@2
|
29 |
class MVwsAppStarter;
|
williamr@4
|
30 |
class TVwsViewEvent;
|
williamr@2
|
31 |
|
williamr@2
|
32 |
class MVwsSessionWrapperObserver
|
williamr@2
|
33 |
/**
|
williamr@2
|
34 |
The MVwsSessionObserver specifies an interface through which server events to be handled by the owner of
|
williamr@2
|
35 |
a client session are notified
|
williamr@2
|
36 |
|
williamr@2
|
37 |
@publishedAll
|
williamr@2
|
38 |
@deprecated
|
williamr@2
|
39 |
*/
|
williamr@2
|
40 |
//@internalTechnology @released
|
williamr@2
|
41 |
|
williamr@2
|
42 |
{
|
williamr@2
|
43 |
public:
|
williamr@2
|
44 |
|
williamr@2
|
45 |
/**
|
williamr@2
|
46 |
* Handles the view event aEvent for a view added through the client session being observed.
|
williamr@2
|
47 |
* Handles events for all the views added by the client.
|
williamr@2
|
48 |
*/
|
williamr@2
|
49 |
virtual void HandleViewEventL(const TVwsViewEvent& aEvent)=0;
|
williamr@2
|
50 |
};
|
williamr@2
|
51 |
|
williamr@4
|
52 |
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
|
williamr@2
|
53 |
|
williamr@2
|
54 |
class CVwsSessionWrapper : public CBase
|
williamr@2
|
55 |
/**
|
williamr@2
|
56 |
The CVwsSessionWrapper class mediates access to the view server client session which it creates, and wraps in
|
williamr@2
|
57 |
support for notification of server events. A session observer will be called back with server events if
|
williamr@2
|
58 |
it maintains an outstanding request for asynchronous event notification.
|
williamr@2
|
59 |
|
williamr@2
|
60 |
@publishedPartner
|
williamr@2
|
61 |
@released
|
williamr@2
|
62 |
*/
|
williamr@2
|
63 |
//@internalTechnology @released
|
williamr@2
|
64 |
|
williamr@2
|
65 |
{
|
williamr@2
|
66 |
public:
|
williamr@2
|
67 |
IMPORT_C static CVwsSessionWrapper* NewL();
|
williamr@2
|
68 |
IMPORT_C static CVwsSessionWrapper* NewLC();
|
williamr@2
|
69 |
IMPORT_C static CVwsSessionWrapper* NewL(MVwsSessionWrapperObserver& aObserver);
|
williamr@2
|
70 |
IMPORT_C static CVwsSessionWrapper* NewLC(MVwsSessionWrapperObserver& aObserver);
|
williamr@2
|
71 |
IMPORT_C ~CVwsSessionWrapper();
|
williamr@2
|
72 |
IMPORT_C static TInt StartViewServer(MVwsAppStarter& aAppStarter);
|
williamr@2
|
73 |
IMPORT_C TInt ShutdownViewServer();
|
williamr@2
|
74 |
IMPORT_C TInt AddView(const TVwsViewId& aViewId);
|
williamr@2
|
75 |
IMPORT_C TInt RemoveView(const TVwsViewId& aViewId) const;
|
williamr@2
|
76 |
IMPORT_C TInt SetSystemDefaultView(const TVwsViewId& aViewId,TInt aMode);
|
williamr@2
|
77 |
IMPORT_C TInt SetSystemDefaultView(const TVwsViewId& aViewId);
|
williamr@2
|
78 |
IMPORT_C TInt ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage);
|
williamr@2
|
79 |
IMPORT_C TInt ActivateViewViaViewEvent(const TVwsViewIdAndMessage& aViewIdAndMessage);
|
williamr@2
|
80 |
IMPORT_C TInt RequestCustomMessage(TDes8& aMessageBufPtr) const;
|
williamr@2
|
81 |
IMPORT_C void QueueAsyncRequest();
|
williamr@2
|
82 |
IMPORT_C TInt StartApp(TUid aAppToStart);
|
williamr@2
|
83 |
IMPORT_C TInt DeactivateActiveView();
|
williamr@2
|
84 |
IMPORT_C TInt DeactivateActiveViewIfOwnerMatch();
|
williamr@2
|
85 |
IMPORT_C TInt NotifyNextDeactivation(const TVwsViewId& aViewId);
|
williamr@2
|
86 |
IMPORT_C TInt NotifyNextDeactivation();
|
williamr@2
|
87 |
IMPORT_C TInt NotifyNextActivation(const TVwsViewId& aViewId);
|
williamr@2
|
88 |
IMPORT_C TInt NotifyNextActivation();
|
williamr@2
|
89 |
IMPORT_C TInt SetDefaultView(const TVwsViewId& aViewId,TInt aMode) const;
|
williamr@2
|
90 |
IMPORT_C TInt SetDefaultView(const TVwsViewId& aViewId) const;
|
williamr@2
|
91 |
IMPORT_C TInt GetSystemDefaultView(TVwsViewId& aViewId);
|
williamr@2
|
92 |
IMPORT_C TInt CreateActivateViewEvent(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage);
|
williamr@2
|
93 |
IMPORT_C TInt SetClientRequestTimeOut(TTimeIntervalMicroSeconds32 aDuration);
|
williamr@2
|
94 |
IMPORT_C TInt SetServerEventTimeOut(TTimeIntervalMicroSeconds32 aDuration);
|
williamr@2
|
95 |
IMPORT_C TInt EnableServerEventTimeOut(TBool aEnable);
|
williamr@2
|
96 |
IMPORT_C TInt CheckSourceOfViewSwitch(TBool& aResult,const TSecurityPolicy& aSecurityPolicy,const char* aDiagnostic);
|
williamr@2
|
97 |
IMPORT_C TInt EnableServerBlankScreen(TBool aEnable);
|
williamr@2
|
98 |
IMPORT_C TInt EnableExternalViewSwitches(TBool aEnable);
|
williamr@2
|
99 |
IMPORT_C void ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TRequestStatus& aStatus);
|
williamr@2
|
100 |
IMPORT_C TInt SetCrossCheckUid(const TUid& aCrossCheckUid);
|
williamr@2
|
101 |
IMPORT_C TInt SetWindowBackgroundColor(const TRgb& aBgColor);
|
williamr@2
|
102 |
public:
|
williamr@2
|
103 |
/**
|
williamr@2
|
104 |
@internalComponent
|
williamr@2
|
105 |
@released
|
williamr@2
|
106 |
*/
|
williamr@2
|
107 |
IMPORT_C TInt ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TInt aCustomControl);
|
williamr@2
|
108 |
/**
|
williamr@2
|
109 |
@internalComponent
|
williamr@2
|
110 |
@released
|
williamr@2
|
111 |
*/
|
williamr@2
|
112 |
IMPORT_C void ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TRequestStatus& aStatus, TInt aCustomControl);
|
williamr@2
|
113 |
/**
|
williamr@2
|
114 |
@internalComponent
|
williamr@2
|
115 |
@released
|
williamr@2
|
116 |
*/IMPORT_C TInt CreateActivateViewEvent(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TInt aCustomControl);
|
williamr@2
|
117 |
/**
|
williamr@2
|
118 |
@internalComponent
|
williamr@2
|
119 |
@released
|
williamr@2
|
120 |
*/
|
williamr@2
|
121 |
IMPORT_C TInt GetCurrentActiveViewInSystem(TVwsViewId& aActiveViewId);
|
williamr@2
|
122 |
private:
|
williamr@2
|
123 |
CVwsSessionWrapper();
|
williamr@2
|
124 |
CVwsSessionWrapper(MVwsSessionWrapperObserver& aObserver);
|
williamr@2
|
125 |
void ConstructL();
|
williamr@2
|
126 |
TInt CheckCreateViewServerSession();
|
williamr@2
|
127 |
TBool IsSchedulerRunning();
|
williamr@2
|
128 |
private:
|
williamr@2
|
129 |
RVwsSession* iVwsSession;
|
williamr@2
|
130 |
CVwsSessionEventHandler* iViewEventHandler;
|
williamr@2
|
131 |
MVwsSessionWrapperObserver* iObserver;
|
williamr@2
|
132 |
};
|
williamr@2
|
133 |
|
williamr@2
|
134 |
//
|
williamr@2
|
135 |
// Panic.
|
williamr@2
|
136 |
//
|
williamr@2
|
137 |
/**
|
williamr@2
|
138 |
@internalComponent
|
williamr@2
|
139 |
*/
|
williamr@2
|
140 |
enum TVwsPanic
|
williamr@2
|
141 |
{
|
williamr@2
|
142 |
EVwsCreateScheduler=1,
|
williamr@2
|
143 |
EVwsThreadRename
|
williamr@2
|
144 |
};
|
williamr@2
|
145 |
|
williamr@2
|
146 |
/**
|
williamr@2
|
147 |
@internalComponent
|
williamr@2
|
148 |
*/
|
williamr@2
|
149 |
GLREF_C void Panic(TVwsPanic aPanic);
|
williamr@2
|
150 |
|
williamr@2
|
151 |
/**
|
williamr@2
|
152 |
Server thread start.
|
williamr@2
|
153 |
|
williamr@2
|
154 |
@internalComponent
|
williamr@2
|
155 |
*/
|
williamr@2
|
156 |
GLDEF_C TInt ViewServerThreadStart(TAny* aPtr);
|
williamr@2
|
157 |
|
williamr@2
|
158 |
/**
|
williamr@2
|
159 |
@internalComponent
|
williamr@2
|
160 |
*/
|
williamr@2
|
161 |
struct SVwsCommandLine
|
williamr@2
|
162 |
{
|
williamr@2
|
163 |
MVwsAppStarter* iAppStarter;
|
williamr@2
|
164 |
};
|
williamr@2
|
165 |
|
williamr@4
|
166 |
#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
|
williamr@2
|
167 |
|
williamr@2
|
168 |
#endif
|
williamr@4
|
169 |
|