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