multimediacommsengine/mmcesrv/mmceserver/inc/mcelocaladdrresolver.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 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:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef CMCELOCALADDRRESOLVER_H
       
    23 #define CMCELOCALADDRRESOLVER_H
       
    24 
       
    25 #include <in_sock.h>
       
    26 #include "mcesrv.h"
       
    27 
       
    28 
       
    29 class CMceLocalAddrResolver : public CBase
       
    30 	{ 
       
    31     public: // Constructors and destructor
       
    32 
       
    33     	static CMceLocalAddrResolver* NewL( 
       
    34     	    RSocketServ& aSocketServ,
       
    35     	    TUint32 aIapId );
       
    36     	
       
    37     	static CMceLocalAddrResolver* NewLC(
       
    38     	    RSocketServ& aSocketServ,
       
    39     	    TUint32 aIapId );    	
       
    40     	
       
    41     	~CMceLocalAddrResolver();
       
    42     	
       
    43     public: // New functions	
       
    44     	
       
    45     	const TInetAddr& Addr() const;
       
    46     	
       
    47     	TBool HasIPv4Addr()	const;
       
    48     	
       
    49     	const TInetAddr& IPv4Addr() const;
       
    50     	
       
    51     	void RefreshLocalAddressesL();
       
    52 
       
    53     private: // Construction
       
    54 
       
    55     	CMceLocalAddrResolver( RSocketServ& aSocketServ );
       
    56         void ConstructL( TUint32 aIapId );
       
    57 
       
    58     private: // New functions
       
    59 
       
    60         TBool Match( const TSoInetInterfaceInfo& aInfo,
       
    61                      const TSoInetIfQuery& aQuery ) const;
       
    62         
       
    63         void SetAddressesIfNotSet( const TInetAddr& aAddr );
       
    64         
       
    65     private: // Data
       
    66 
       
    67         RSocketServ& iSocketServ;
       
    68         TUint32 iIapId;
       
    69     	TInetAddr iAddr;
       
    70     	TInetAddr iIPv4Addr;
       
    71     	
       
    72     private: // For testing purposes
       
    73 
       
    74     	MCESRV_UT_DEFINITIONS
       
    75 	};
       
    76 	
       
    77 #endif // CMCELOCALADDRRESOLVER_H
       
    78 
       
    79 // End of File