mmserv/voipaudioservices/VoIPServer/inc/VoIPQueueHandlerSrv.h
changeset 0 71ca22bcf22a
child 18 a36789189b53
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2  * Copyright (c) 2007-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:  CQueueHandler class declaration.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef __VOIPSERVERCALLBACKHANDLERSRV_H
       
    19 #define __VOIPSERVERCALLBACKHANDLERSRV_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 #include <e32msgqueue.h>
       
    24 #include "VoIPAudioClientServer.h"   // for TVoIPMsgBuf
       
    25 // FORWARD DECLARATIONS
       
    26 
       
    27 
       
    28 /**
       
    29  *  MQueueHandlerObserver
       
    30  *  Responsible for sending callbacks to the VoIP client app
       
    31  */
       
    32 class MQueueHandlerObserverSrv
       
    33     {
       
    34 public:
       
    35     virtual void Event(TInt aEventType, TInt aError) = 0;
       
    36     };
       
    37 
       
    38 /**
       
    39  *  CQueueHandler
       
    40  *
       
    41  */
       
    42 class CQueueHandlerSrv : public CActive
       
    43     {
       
    44 public:
       
    45 
       
    46     /**
       
    47      * NewL()
       
    48      * Contructor that takes single queue pointer
       
    49      *
       
    50      */
       
    51     static CQueueHandlerSrv* NewL(MQueueHandlerObserverSrv* aObserver,
       
    52             RMsgQueue<TVoIPMsgBuf>* aMsgQueue);
       
    53 
       
    54     /**
       
    55      * destructor
       
    56      */
       
    57     ~CQueueHandlerSrv();
       
    58 
       
    59     /**
       
    60      * Start
       
    61      * Starts listening for events.
       
    62      *
       
    63      */
       
    64     void Start();
       
    65 
       
    66     /**
       
    67      * Returns request status.
       
    68      */
       
    69     TRequestStatus* Status();
       
    70 
       
    71 private:
       
    72 
       
    73     /**
       
    74      * constructor
       
    75      */
       
    76     CQueueHandlerSrv(RMsgQueue<TVoIPMsgBuf>* aMsgQueue);
       
    77 
       
    78     void ConstructL(MQueueHandlerObserverSrv* aObserver);
       
    79 
       
    80     // from CActive
       
    81     void DoCancel();
       
    82     void RunL();
       
    83     TInt RunError(TInt aError);
       
    84 
       
    85 private:
       
    86     // data
       
    87 
       
    88     MQueueHandlerObserverSrv* iObserver; // (not owned)
       
    89     RMsgQueue<TVoIPMsgBuf>* iMsgQueue;
       
    90 
       
    91     };
       
    92 
       
    93 #endif      // __VOIPSERVERCALLBACKHANDLERSRV_H
       
    94 
       
    95 // End of File