multimediacommsengine/mmcesrv/mmceserver/inc/mcecsreceivequeue.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2005 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 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef CMCECSRECEIVEQUEUE_H
       
    23 #define CMCECSRECEIVEQUEUE_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include <e32base.h>
       
    27 #include "mcesrv.h"
       
    28 #include "mcecsreceiveitem.h"
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  Provides receive queue for the MCE server.
       
    34 *
       
    35 *  @lib 
       
    36 *  @since
       
    37 */
       
    38 class CMceCsReceiveQueue : public CBase
       
    39 	{
       
    40 public: // Constructors and destructor
       
    41 
       
    42     /**
       
    43     * Default constructor
       
    44     */
       
    45     CMceCsReceiveQueue ();
       
    46 
       
    47     /**
       
    48     * Destructor
       
    49     */
       
    50     ~CMceCsReceiveQueue ();
       
    51 
       
    52 public: // new
       
    53 
       
    54     /**
       
    55     * Checks if queue is empty
       
    56     * @return ETrue if queue is empty
       
    57     */
       
    58     TBool IsEmpty() const;
       
    59 
       
    60     /**
       
    61     * Gets first item from the queue, panics
       
    62     * if empty.
       
    63     * @return first item from the queue
       
    64     */
       
    65     TMceCSReceiveItem& First ();
       
    66 
       
    67     /**
       
    68     * Adds item to the end of the queue
       
    69     * @param aItem item to be added
       
    70     * @return KErrNone if succesfull
       
    71     */
       
    72     TInt AddLast (const TMceCSReceiveItem& aItem);
       
    73 
       
    74     /**
       
    75     * Removes first item from the queue.
       
    76     */
       
    77     void RemoveFirst ();
       
    78 
       
    79 private: // Data
       
    80 
       
    81     RArray<TMceCSReceiveItem> iReceiveItems;
       
    82 
       
    83     //definitions for unit testing
       
    84     MCESRV_UT_DEFINITIONS
       
    85 		
       
    86 	};
       
    87 
       
    88 
       
    89 #endif
       
    90 
       
    91 // End of File