contextframework/cfw/inc/cfserver/CFServSession.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2002-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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CFSERVSESSION_H
       
    20 #define C_CFSERVSESSION_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class MCFExtendedContextInterface;
       
    25 class MCFActionInterface;
       
    26 class MCFScriptInterface;
       
    27 class CCFContextObject;
       
    28 class CCFMessageHandlerBase;
       
    29 class CCFContextSubscription;
       
    30 class CCFContextIndication;
       
    31 
       
    32 /**
       
    33 * Serverside client session.
       
    34 */
       
    35 NONSHARABLE_CLASS( CCFServSession ): public CSession2
       
    36     {
       
    37     public:
       
    38     
       
    39         // Symbian two phased constructors
       
    40         static CCFServSession* NewL( MCFExtendedContextInterface& aCFContext,
       
    41             MCFActionInterface& aCFAction,
       
    42             MCFScriptInterface& aScriptInterface );
       
    43         static CCFServSession* NewLC( MCFExtendedContextInterface& aCFContext,
       
    44             MCFActionInterface& aCFAction,
       
    45             MCFScriptInterface& aScriptInterface );
       
    46         
       
    47         // C++ destructor
       
    48         ~CCFServSession();
       
    49         
       
    50     public:
       
    51     
       
    52         // panic the client
       
    53         static void PanicClient( const RMessage2& aMessage, TInt aPanic );
       
    54         
       
    55         // safewrite between client and server
       
    56         static void Write( const RMessage2& aMessage,TInt aParam,const TDesC8& aDes,TInt anOffset=0 );
       
    57         
       
    58     private: // From base classes
       
    59     
       
    60         // From CSession2
       
    61         void ServiceL( const RMessage2 &aMessage );
       
    62         
       
    63     private: // New methods
       
    64     
       
    65         // Dispatches message
       
    66         void DispatchMessageL( const RMessage2 &aMessage );
       
    67         
       
    68     private:
       
    69     
       
    70         // Symbian 2nd phase constructor
       
    71         void ConstructL( MCFExtendedContextInterface& aCFContext,
       
    72             MCFActionInterface& aCFAction,
       
    73             MCFScriptInterface& aScriptInterface );
       
    74         
       
    75         // C++ constrcutor
       
    76         CCFServSession();
       
    77 
       
    78     private:
       
    79     
       
    80         // Own: Message handlers
       
    81         RPointerArray<CCFMessageHandlerBase> iMessageHandlers;
       
    82     };
       
    83 
       
    84 #endif // C_CFSERVSESSION_H
       
    85 
       
    86