realtimenetprots/sipfw/SIP/ServerResolver/inc/CRequestQueue.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2004-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:
       
    15 * Name          : CRequestQueue.h
       
    16 * Part of       : ServerResolver
       
    17 * Version       : SIP/4.0 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 #ifndef CREQUESTQUEUE_H
       
    28 #define CREQUESTQUEUE_H
       
    29 
       
    30 //INCLUDES
       
    31 #include <e32base.h>
       
    32 #include <e32std.h>
       
    33 #include "_sipcodecdefs.h"
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class CServerQuery;
       
    37 class MSIPServerResolverObserver;
       
    38 
       
    39 // CLASS DEFINITION
       
    40 /**
       
    41  * CRequestQueue implements a
       
    42  */
       
    43 class CRequestQueue : public CBase
       
    44 	{
       
    45 	public:// Constructors and destructor
       
    46 
       
    47 		/**
       
    48 	 	* Creates a new CRequestQueue instance
       
    49 	 	* @returns a new instance of CRequestQueue
       
    50 	 	*/
       
    51 		static CRequestQueue* NewL();
       
    52 		
       
    53 		/**
       
    54 	 	* Creates a new CRequestQueue instance 
       
    55 	 	* and pushes it to CleanupStack
       
    56 	 	* @returns a new instance of CRequestQueue
       
    57 	 	*/
       
    58 		static CRequestQueue* NewLC();
       
    59 		
       
    60 		/**
       
    61 	 	* Destructor.
       
    62 	 	*/
       
    63 		~CRequestQueue();
       
    64 		
       
    65 	public:
       
    66 	
       
    67 		void AddL( CServerQuery& aQuery );
       
    68 		
       
    69 		CServerQuery* NextQuery();
       
    70 		
       
    71 		void CancelQuery( MSIPServerResolverObserver* aObserver );
       
    72 
       
    73 	private:// Constructors and destructor
       
    74 
       
    75 		CRequestQueue();
       
    76 		
       
    77 	private:// data
       
    78 	
       
    79 		TSglQue<CServerQuery> iList;
       
    80 		
       
    81 		TSglQueIter<CServerQuery> iListIter;
       
    82 
       
    83 	private: // For testing purposes
       
    84 
       
    85 		UNIT_TEST(CHostResolverTest)
       
    86 	};
       
    87 
       
    88 #endif // end of CREQUESTQUEUE_H
       
    89 
       
    90 // End of File