rtp/rtpstack/inc/localaddrresolver.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2004 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 __LOCALADDRRESOLVER_H__
       
    23 #define __LOCALADDRRESOLVER_H__
       
    24 
       
    25 //Includes
       
    26 #include <in_sock.h>
       
    27 
       
    28 //Class declaration
       
    29 class CLocalAddrResolver : public CBase
       
    30 	{ 
       
    31     #if defined( _DEBUG ) && defined( RTP_UNIT_TEST )
       
    32 	    //Friend class used for testing
       
    33 	    friend class CRtpUtCLocalAddrResolver; 
       
    34     #endif 
       
    35 	 
       
    36 	public:
       
    37 		static CLocalAddrResolver* NewL( RSocketServ& aServer );
       
    38 		static CLocalAddrResolver* NewLC( RSocketServ& aServer );
       
    39 		
       
    40 		void GetLocalAddrL(TInetAddr& aAddr, TUint32 aIap);
       
    41 		~CLocalAddrResolver();
       
    42 
       
    43 	private://functions
       
    44 		CLocalAddrResolver(RSocketServ& aServer);
       
    45 		void ConstructL();
       
    46 	    
       
    47 	    void SetAddr( TInetAddr& aTarget, TInetAddr& aSource );
       
    48 	    void CheckAndSetAddr( TInetAddr& aTarget, TInetAddr& aCandidate,
       
    49 	                          TUint32 aCandidateIap, TUint32 aSpecifiedIap );
       
    50 
       
    51 	private: //data
       
    52 		RSocketServ* iServer;
       
    53 		TInetAddr iResultAddr;
       
    54 		TUint iCount;
       
    55 	
       
    56 	private: 	
       
    57 	
       
    58 	#ifdef EUNIT_TESTING
       
    59 	  friend class UT_CLocalAddrResolver;
       
    60 	#endif     	
       
    61 	};
       
    62 #endif // end of __LOCALADDRRESOLVER_H__
       
    63 
       
    64 // End of File
       
    65