epoc32/include/viewcli.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/viewcli.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/viewcli.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,166 @@
     1.4 -viewcli.h
     1.5 +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +#ifndef __VIEWCLI_H__
    1.21 +#define __VIEWCLI_H__
    1.22 +
    1.23 +#include <e32base.h>
    1.24 +#include <gdi.h>
    1.25 +#include <vwsdef.h>
    1.26 +
    1.27 +//
    1.28 +// Forward declarations.
    1.29 +//
    1.30 +
    1.31 +class RVwsSession;
    1.32 +class CVwsSessionEventHandler;
    1.33 +class MVwsAppStarter;
    1.34 +
    1.35 +class MVwsSessionWrapperObserver
    1.36 +/**
    1.37 +The MVwsSessionObserver specifies an interface through which server events to be handled by the owner of
    1.38 +a client session are notified
    1.39 +
    1.40 +@publishedAll 
    1.41 +@deprecated
    1.42 +*/
    1.43 +//@internalTechnology @released
    1.44 +
    1.45 +	{
    1.46 +public:	
    1.47 +
    1.48 +	/**
    1.49 +	 * Handles the view event aEvent for a view added through the client session being observed.
    1.50 +	 * Handles events for all the views added by the client.
    1.51 +	 */
    1.52 +	virtual void HandleViewEventL(const TVwsViewEvent& aEvent)=0;
    1.53 +	};
    1.54 +
    1.55 +
    1.56 +class CVwsSessionWrapper : public CBase
    1.57 +/**
    1.58 +The CVwsSessionWrapper class mediates access to the view server client session which it creates, and wraps in
    1.59 +support for notification of server events. A session observer will be called back with server events if
    1.60 +it maintains an outstanding request for asynchronous event notification.
    1.61 +
    1.62 +@publishedPartner 
    1.63 +@released 
    1.64 +*/
    1.65 +//@internalTechnology @released
    1.66 +
    1.67 +	{
    1.68 +public:	
    1.69 +	IMPORT_C static CVwsSessionWrapper* NewL();
    1.70 +	IMPORT_C static CVwsSessionWrapper* NewLC();
    1.71 +	IMPORT_C static CVwsSessionWrapper* NewL(MVwsSessionWrapperObserver& aObserver);
    1.72 +	IMPORT_C static CVwsSessionWrapper* NewLC(MVwsSessionWrapperObserver& aObserver);
    1.73 +	IMPORT_C ~CVwsSessionWrapper();
    1.74 +	IMPORT_C static TInt StartViewServer(MVwsAppStarter& aAppStarter);
    1.75 +	IMPORT_C TInt ShutdownViewServer();
    1.76 +	IMPORT_C TInt AddView(const TVwsViewId& aViewId);
    1.77 +	IMPORT_C TInt RemoveView(const TVwsViewId& aViewId) const;
    1.78 +	IMPORT_C TInt SetSystemDefaultView(const TVwsViewId& aViewId,TInt aMode);
    1.79 +	IMPORT_C TInt SetSystemDefaultView(const TVwsViewId& aViewId);
    1.80 +	IMPORT_C TInt ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage);
    1.81 +	IMPORT_C TInt ActivateViewViaViewEvent(const TVwsViewIdAndMessage& aViewIdAndMessage);
    1.82 +	IMPORT_C TInt RequestCustomMessage(TDes8& aMessageBufPtr) const;
    1.83 +	IMPORT_C void QueueAsyncRequest();
    1.84 +	IMPORT_C TInt StartApp(TUid aAppToStart);
    1.85 +	IMPORT_C TInt DeactivateActiveView();
    1.86 +	IMPORT_C TInt DeactivateActiveViewIfOwnerMatch();
    1.87 +	IMPORT_C TInt NotifyNextDeactivation(const TVwsViewId& aViewId);
    1.88 +	IMPORT_C TInt NotifyNextDeactivation();
    1.89 +	IMPORT_C TInt NotifyNextActivation(const TVwsViewId& aViewId);
    1.90 +	IMPORT_C TInt NotifyNextActivation();
    1.91 +	IMPORT_C TInt SetDefaultView(const TVwsViewId& aViewId,TInt aMode) const;
    1.92 +	IMPORT_C TInt SetDefaultView(const TVwsViewId& aViewId) const;
    1.93 +	IMPORT_C TInt GetSystemDefaultView(TVwsViewId& aViewId);
    1.94 +	IMPORT_C TInt CreateActivateViewEvent(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage);
    1.95 +	IMPORT_C TInt SetClientRequestTimeOut(TTimeIntervalMicroSeconds32 aDuration);
    1.96 +	IMPORT_C TInt SetServerEventTimeOut(TTimeIntervalMicroSeconds32 aDuration);
    1.97 +	IMPORT_C TInt EnableServerEventTimeOut(TBool aEnable);
    1.98 +	IMPORT_C TInt CheckSourceOfViewSwitch(TBool& aResult,const TSecurityPolicy& aSecurityPolicy,const char* aDiagnostic);
    1.99 +	IMPORT_C TInt EnableServerBlankScreen(TBool aEnable);
   1.100 +	IMPORT_C TInt EnableExternalViewSwitches(TBool aEnable);
   1.101 +	IMPORT_C void ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TRequestStatus& aStatus);
   1.102 +	IMPORT_C TInt SetCrossCheckUid(const TUid& aCrossCheckUid);
   1.103 +	IMPORT_C TInt SetWindowBackgroundColor(const TRgb& aBgColor);
   1.104 +public:	
   1.105 +	/**
   1.106 +	@internalComponent
   1.107 +	@released
   1.108 +	*/
   1.109 +	IMPORT_C TInt ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TInt aCustomControl);
   1.110 +	/**
   1.111 +	@internalComponent
   1.112 +	@released
   1.113 +	*/
   1.114 +	IMPORT_C void ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TRequestStatus& aStatus, TInt aCustomControl);
   1.115 +	/**
   1.116 +	@internalComponent
   1.117 +	@released
   1.118 +	*/IMPORT_C TInt CreateActivateViewEvent(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TInt aCustomControl);
   1.119 +	/**
   1.120 +	@internalComponent
   1.121 +	@released
   1.122 +	*/
   1.123 +	IMPORT_C TInt GetCurrentActiveViewInSystem(TVwsViewId& aActiveViewId);
   1.124 +private:
   1.125 +	CVwsSessionWrapper();
   1.126 +	CVwsSessionWrapper(MVwsSessionWrapperObserver& aObserver);
   1.127 +	void ConstructL();
   1.128 +	TInt CheckCreateViewServerSession();
   1.129 +	TBool IsSchedulerRunning();
   1.130 +private:
   1.131 +	RVwsSession* iVwsSession;
   1.132 +	CVwsSessionEventHandler* iViewEventHandler;
   1.133 +	MVwsSessionWrapperObserver* iObserver;
   1.134 +	};
   1.135 +
   1.136 +
   1.137 +//
   1.138 +// Panic.
   1.139 +//
   1.140 +/**
   1.141 +@internalComponent
   1.142 +*/
   1.143 +enum TVwsPanic
   1.144 +	{
   1.145 +	EVwsCreateScheduler=1,
   1.146 +	EVwsThreadRename
   1.147 +	};
   1.148 +
   1.149 +/**
   1.150 +@internalComponent
   1.151 +*/
   1.152 +GLREF_C void Panic(TVwsPanic aPanic);
   1.153 +
   1.154 +/**
   1.155 +Server thread start.
   1.156 +
   1.157 +@internalComponent
   1.158 +*/
   1.159 +GLDEF_C TInt ViewServerThreadStart(TAny* aPtr);
   1.160 +
   1.161 +/**
   1.162 +@internalComponent
   1.163 +*/
   1.164 +struct SVwsCommandLine
   1.165 +	{
   1.166 +	MVwsAppStarter* iAppStarter;
   1.167 +	};
   1.168 +
   1.169 +
   1.170 +#endif