realtimenetprots/sipfw/SIP/ServerResolver/inc/CSIPQueryData.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          : CSIPQueryData.h
       
    16 * Part of       : ServerResolver
       
    17 * Version       : SIP/4.0 
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 #ifndef CSIPQUERYDATA_H
       
    28 #define CSIPQUERYDATA_H
       
    29 
       
    30 //INCLUDES
       
    31 #include <stringpool.h>
       
    32 #include <dns_qry.h>
       
    33 #include "CSIPQueryConditionBase.h"
       
    34 #include "CSIPQueryBase.h"
       
    35 #include "_sipcodecdefs.h"
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 class MSIPServerResolverObserver;
       
    39 class MSIPHostResolver;
       
    40 class MSIPResolvingResult;
       
    41 class CSIPQueryA_AAAA;
       
    42 
       
    43 // CLASS DEFINITION
       
    44 /**
       
    45  * CSIPQueryData implements a
       
    46  */
       
    47 class CSIPQueryData : public CBase
       
    48 	{
       
    49 	public:// Constructors and destructor
       
    50 
       
    51 		static CSIPQueryData* NewL( MSIPServerResolverObserver* aObserver,
       
    52                      				TUint aPort,
       
    53                      				RStringF aProtocol,
       
    54                      				const TDesC8& aOriginalTarget,
       
    55 				     				MSIPHostResolver& aResolver,
       
    56 				     				RPointerArray< MSIPResolvingResult >& aResult,
       
    57 				     				TBool aSipsUri,
       
    58 				     				TBool aForceUDP );
       
    59 
       
    60 	
       
    61 	
       
    62 		~CSIPQueryData();
       
    63 		
       
    64 	public:
       
    65 	
       
    66 		RPointerArray<MSIPResolvingResult>& ResultArray();
       
    67 		 
       
    68 		MSIPServerResolverObserver* Observer();
       
    69 		
       
    70 		TUint Port();
       
    71 		
       
    72 		RStringF Protocol();
       
    73 		
       
    74 		const TDesC8& Target() const;
       
    75 		
       
    76 		const TDesC8& OriginalTarget() const;
       
    77 		
       
    78 		MSIPHostResolver& Resolver();
       
    79 		 
       
    80 		void SetPort( TUint aPort );
       
    81 		
       
    82 		void SetProtocol( RStringF aProtocol );
       
    83 		
       
    84 		void SetTargetL( const TDesC8& aTarget );
       
    85 		
       
    86 		void SetOriginalTargetL( const TDesC8& aOriginalTarget );
       
    87 		
       
    88 		TBool CreateResultL( CSIPQueryA_AAAA& aQuery );
       
    89 		
       
    90 		void CompleteQueryL();
       
    91 		
       
    92 		TBool IsSipsUri();
       
    93 		
       
    94 		void SetForceUDP();
       
    95 
       
    96 	private:// Constructors and destructor
       
    97 	
       
    98 		void ConstructL( MSIPServerResolverObserver* aObserver,
       
    99                          TUint aPort,
       
   100                          RStringF aProtocol,
       
   101                          const TDesC8& aOriginalTarget );
       
   102 
       
   103 		CSIPQueryData( MSIPHostResolver& aResolver,
       
   104 				RPointerArray< MSIPResolvingResult >& aResult,
       
   105 				TBool aSipsUri,
       
   106 				TBool aForceUDP );
       
   107 	
       
   108     	TBool AddResultToArrayL();
       
   109 
       
   110 	private:// Data
       
   111 	
       
   112 		HBufC8* iTarget;
       
   113 		
       
   114 		HBufC8* iOriginalTarget;
       
   115 		
       
   116 		//Not owned
       
   117 		CSIPQueryA_AAAA* iQuery; 
       
   118 		
       
   119 		TUint iPort;
       
   120 		
       
   121 		RStringF iProtocol;
       
   122 		
       
   123 		//Not owned
       
   124 		MSIPServerResolverObserver* iObserver;
       
   125 		
       
   126 		MSIPHostResolver& iResolver;
       
   127 		
       
   128 		RPointerArray<MSIPResolvingResult>& iResultArray;
       
   129 		
       
   130 		TBool iSipsUri;
       
   131 		
       
   132 		TBool iForceUDP;
       
   133 		
       
   134 	private: // For testing purposes
       
   135 
       
   136 		UNIT_TEST(CSIPQueryDataTest)
       
   137 		UNIT_TEST(CSIPA_AAAAOrigDomainTest)		
       
   138 	};
       
   139 #endif // end of CSIPQUERYDATA_H
       
   140 
       
   141 // End of File