taskswitcher/contextengine/tsfswserver/server/inc/tsfswsession.h
changeset 4 4d54b72983ae
equal deleted inserted replaced
3:fb3763350a08 4:4d54b72983ae
       
     1 /*
       
     2 * Copyright (c) 2008 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:  session class for server
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TSFSWSESSION_H
       
    20 #define TSFSWSESSION_H
       
    21 
       
    22 #include "tsfswserver.h"
       
    23 #include "tsfswentry.h"
       
    24 
       
    25 /**
       
    26  * Session class.
       
    27  */
       
    28 class CTsFswSession : public CSession2
       
    29     {
       
    30 public:
       
    31     CTsFswSession();
       
    32     void CreateL();
       
    33     
       
    34     /**
       
    35      * Called from the server when fsw content has changed.
       
    36      */
       
    37     void FswDataChanged();
       
    38     
       
    39     /**
       
    40      * Returns true if there is a pending subscribe request to this session.
       
    41      */
       
    42     TBool IsListening();
       
    43 
       
    44 private:
       
    45     ~CTsFswSession();
       
    46     CTsFswServer& Server();
       
    47     void ServiceL( const RMessage2& aMessage );
       
    48     void ServiceError( const RMessage2& aMessage, TInt aError );
       
    49     void CompleteSubscribe( TInt aError );
       
    50 
       
    51     RArray<RMessage2> iSubscribeRequests; // non-completed ETsFswSubscribe messages
       
    52     };
       
    53 
       
    54 #endif