mmserv/tms/tmsserver/inc/tmsserversession.h
changeset 0 71ca22bcf22a
child 7 3d8c721bf319
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2  * Copyright (c) 2009 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: Telephony Multimedia Service
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef __TMSSERVERSESSION_H
       
    19 #define __TMSSERVERSESSION_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <sounddevice.h>
       
    23 #include <e32msgqueue.h>
       
    24 #include "tmsserver.h"
       
    25 #include "tmsshared.h"
       
    26 
       
    27 namespace TMS {
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class TMSServerThread;
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 //  Class Name:  TMSServerSession
       
    34 //
       
    35 //  TMS server session class.
       
    36 // -----------------------------------------------------------------------------
       
    37 class TMSServerSession : public CSession2
       
    38     {
       
    39 public:
       
    40 
       
    41     // Constractor
       
    42     static TMSServerSession* NewL(TMSServer &aServer);
       
    43 
       
    44     // Destructor
       
    45     ~TMSServerSession();
       
    46 
       
    47     void HandleGlobalEffectChange(TInt globalevent);
       
    48     void HandleRoutingChange(TRoutingMsgBufPckg routinginfo);
       
    49 
       
    50 private:
       
    51 
       
    52     // Symbian constructors
       
    53     void ConstructL();
       
    54     TMSServerSession(TMSServer& aServer);
       
    55 
       
    56     // Client-server message handlers
       
    57     void ServiceL(const RMessage2& aMessage);
       
    58     void DispatchMessageL(const RMessage2& aMessage);
       
    59     void SetMessageQueueHandleL(const RMessage2& aMessage);
       
    60     void GetTMSCallSessionHandleL(const RMessage2& aMessage);
       
    61     void GetCodecsCountL(const RMessage2& aMessage, TMSStreamType strmType);
       
    62     void GetSupportedCodecsL(const RMessage2& aMessage, TMSStreamType strmType);
       
    63     void SetOutput(const RMessage2& aMessage);
       
    64     void SetVolLevel(const RMessage2& aMessage);
       
    65     void SetMicGain(const RMessage2& aMessage);
       
    66 
       
    67     // Send notification to the client
       
    68     void NotifyClient();
       
    69 
       
    70 private:
       
    71     TMSServer& iServer;
       
    72     RHandleBase iTMSCallSessionHandle;
       
    73     TSharedData iShared;
       
    74     CMMFDevSound* iDevSound; // To get supported codecs
       
    75     TBool iMsgQueued;
       
    76     RMsgQueue<TmsMsgBuf> iMsgQueue;
       
    77     TmsMsgBuf iMsgBuffer;
       
    78     };
       
    79 
       
    80 } //namespace TMS
       
    81 
       
    82 #endif //__TMSSERVERSESSION_H
       
    83 
       
    84 // End of file