mmserv/sts/stsserver/src/stsserversession.h
branchRCL_3
changeset 20 0ac9a5310753
parent 19 095bea5f582e
child 21 999b2818a0eb
equal deleted inserted replaced
19:095bea5f582e 20:0ac9a5310753
     1 /*
       
     2  * Copyright (c) 2010 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:
       
    15  * This file defines the interface for the STS server side session.
       
    16  */
       
    17 #ifndef STSSERVERSESSION_H_
       
    18 #define STSSERVERSESSION_H_
       
    19 
       
    20 #include <e32base.h>
       
    21 #include <e32msgqueue.h>
       
    22 #include <map>
       
    23 
       
    24 #include "stsclientservercommon.h"
       
    25 
       
    26 class CSts;
       
    27 class CStsServer;
       
    28 class CStsPlayAlarmObserver;
       
    29 
       
    30 class CStsServerSession : public CSession2, private MStsPlayAlarmObserver
       
    31     {
       
    32 public:
       
    33 
       
    34     CStsServerSession(CStsServer& aServer, CSts& aSts);
       
    35 
       
    36     virtual ~CStsServerSession();
       
    37 
       
    38     // inherited from CSession2
       
    39     void CreateL();
       
    40     void ServiceL(const RMessage2& aMessage);
       
    41     void ServiceError(const RMessage2& aMessage, TInt aError);
       
    42 
       
    43 private:
       
    44 
       
    45     void DoRegisterMsgQueueL(const RMessage2& aMessage);
       
    46     void DoPlayToneL(const RMessage2& aMessage);
       
    47     void DoPlayAlarmL(const RMessage2& aMessage);
       
    48     void DoPlayToneAlarmL(const RMessage2& aMessage);
       
    49     void DoStopAlarmL(const RMessage2& aMessage);
       
    50 
       
    51     void CleanUpObservers();
       
    52 
       
    53     // inherited from MPlayAlarmObserver
       
    54     virtual void PlayAlarmComplete(unsigned int aAlarmContext);
       
    55 
       
    56     CStsServer& iServer;
       
    57     CSts& iSts;
       
    58 
       
    59     typedef std::map<unsigned int, MStsPlayAlarmObserver*> TObserverMap;
       
    60     TObserverMap iObserverMap;
       
    61     RMsgQueue<TStsCallBack> iMsgQueue;
       
    62     };
       
    63 
       
    64 #endif // STSSERVERSESSION_H_