ipappsrv_plat/media_control_api/inc/mmccnetworksettings.h
author vnuitven <>
Mon, 06 Sep 2010 17:32:13 +0530
branchrcs
changeset 49 64c62431ac08
parent 0 1bce908db942
permissions -rw-r--r--
RCS feature support in MCE/MCC. Provides APIs to do RCS chat and file transfer as per RCS specificaitons. For both os these MCE uses the MSRP protocol.

/*
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:    Class is used for configuring network access.
*
*/




#ifndef MMCCNETWORKSETTINGS_H
#define MMCCNETWORKSETTINGS_H

// INCLUDES
#include <e32def.h>
#include <in_sock.h>
#include <e32cmn.h>

// CONSTANTS
const TInt KDefaultMediaQos = 184;
const TInt KDefaultRtpPort = 17000;
const TInt KDefaultRtcpPort = 17001;

// MACROS

// DATA TYPES
    
// FUNCTION PROTOTYPES

// FORWARD DECLARATIONS

// CLASS DECLARATION

/**
* The TMccNetSettings captures the MCC network settings
* into one class. MCC keeps local public addresses uptodate. 
* If NAT traversal is supported by the system, local and local
* public addresses may be different.
*
*  @lib mmccinterface.dll
*/
class TMccNetSettings
{
public: // Constructors and destructor
    
    inline TMccNetSettings() : 
        iRemoteAddress( KInetAddrAny ), 
        iRemoteRtcpPort( KDefaultRtcpPort ), 
        iLocalAddress( KInetAddrAny ), 
        iLocalPublicAddress( KInetAddrAny ), 
        iLocalRtcpPort( KDefaultRtcpPort ),
        iLocalPublicRtcpPort( KDefaultRtcpPort ), 
        iMediaQosValue( KDefaultMediaQos ), 
        iIapId( -1 ),
        iReserved1( 0 ),
        iReserved2( 0 )
        {};

public: // Data
    
    TInetAddr iRemoteAddress;
    TUint iRemoteRtcpPort;

    TInetAddr iLocalAddress;
    TInetAddr iLocalPublicAddress;
    TUint iLocalRtcpPort;
    TUint iLocalPublicRtcpPort;

    TInt iMediaQosValue;
    TInt iIapId;
    
    TUint32 iReserved1;
    TUint32 iReserved2;
    
};

typedef TPckgBuf<TMccNetSettings> TMccNetSettingsPackage;

class TMccMsrpSettings: public TMccNetSettings
    {
public:
    
    inline TMccMsrpSettings(TMccNetSettings& aMccNetSettings)
    {
    iRemoteAddress = aMccNetSettings.iRemoteAddress;
    iRemoteRtcpPort = aMccNetSettings.iRemoteRtcpPort;
    iLocalAddress = aMccNetSettings.iLocalAddress;
    iLocalPublicAddress = aMccNetSettings.iLocalPublicAddress;
    iLocalRtcpPort = aMccNetSettings.iLocalRtcpPort;
    iLocalPublicRtcpPort = aMccNetSettings.iLocalPublicRtcpPort;
    iMediaQosValue = aMccNetSettings.iMediaQosValue;
    iIapId = aMccNetSettings.iIapId;
    
    iLocalMsrpPath = NULL ;
    iFileName = NULL;
    iFileSize = 0;
    iFileType= NULL;
    iFileShare= EFalse;
    iFTProgressNotification = EFalse;
    };
    
    
    inline TMccMsrpSettings() :
        TMccNetSettings()
        {
        iLocalMsrpPath = NULL;
        iFileName = NULL;
        iFileSize = 0;
        iFileType=NULL;
        iFileShare = EFalse;
        iFTProgressNotification = EFalse;
        };
            
    public:
        //not owned
        HBufC8*    iLocalMsrpPath;
        //not owned
        HBufC16*   iFileName;
        TInt       iFileSize; 
        // not owned
        HBufC8*    iFileType;
        TBool      iFileShare;
        TBool      iFTProgressNotification;
    };

#endif /* MMCCNETWORKSETTINGS_H */

// End of File