Msrp/MsrpServer/inc/MMSRPConnectionManager.h
branchMSRP_FrameWork
changeset 25 505ad3f0ce5c
child 58 cdb720e67852
equal deleted inserted replaced
22:f1578314b8da 25:505ad3f0ce5c
       
     1 /*
       
     2 * Copyright (c) 2009-2010 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 * Initial Contributors:
       
     9 * Nokia Corporation - initial contribution.
       
    10 * Contributors:
       
    11 *
       
    12 * Description:
       
    13 * MSRP Implementation
       
    14 *
       
    15 */
       
    16 
       
    17 #ifndef __MMMSRPCONNECTIONMANAGER_H
       
    18 #define __MMMSRPCONNECTIONMANAGER_H
       
    19 
       
    20 #include <in_sock.h>
       
    21 #include <e32base.h>
       
    22 
       
    23 /* 
       
    24  * subsession to ensure no connect call after listen
       
    25  * or multiple connect/listen calls
       
    26  * make call to connmngr only if iConn not null
       
    27  * stop association of multiple connections with single session
       
    28  * stop association of single session multiple times with varying conns
       
    29  * stopping assocation of same session id twice or more with the same connection needs to be taken care by connmgr
       
    30  * done automatically by subsession, 506 (session already in use) response scenario doesnot arise
       
    31  */
       
    32 // FORWARD DECLARATIONS
       
    33 class MMSRPConnection;
       
    34 
       
    35 // CLASS DECLARATIONS
       
    36 class MMSRPConnectionManager
       
    37 	{
       
    38 	public:
       
    39 	    inline virtual ~MMSRPConnectionManager(){}
       
    40         
       
    41 	    /**
       
    42         * Get local ip address to form msrp path
       
    43         * @out param aLocalAddress 
       
    44         */	    
       
    45 	    virtual void ResolveLocalIPAddressL( TInetAddr& aLocalAddr ) = 0;
       
    46 
       
    47         /**
       
    48         * Connection request to a specified address
       
    49         * @param aHost host address, direct ip address or host name
       
    50 		* @param 
       
    51         */
       
    52 	    
       
    53 	    virtual MMSRPConnection& getConnectionL( TDesC8& aHost, TUint aPort ) = 0;
       
    54 
       
    55 	    //take care of case where listen completes before connect
       
    56 	    //and connect completes before listen to same host
       
    57 	    //virtual MMSRPConnection& ListenL( TDesC8& aHost, TUint aPort, MMSRPConnectionObserver& aSubsession ) = 0;
       
    58 	    
       
    59 	    /**
       
    60 	     * Start listener if not running
       
    61 	     * else call listen to increment listen count
       
    62 	     */	    
       
    63 	    virtual void ListenL(MMSRPConnection* /*aConnection*/) = 0;
       
    64 	    
       
    65        /**
       
    66          * issue listener cancel and remove connection
       
    67          */     
       
    68         virtual void ListenCancel(MMSRPConnection* aConnection) = 0;    
       
    69 	    
       
    70 	    /**
       
    71 	     * should we move to CMSRPConnectionManager, 
       
    72 	     * and keep a ref to the actual object in conn rather than access through interface class
       
    73 	     */
       
    74 	    virtual void Remove(MMSRPConnection* aConnection) = 0;
       
    75 	    
       
    76 	    
       
    77 	    /*to be moved to C class?*/
       
    78 	    
       
    79 	    virtual RSocketServ& SocketServer() = 0;               
       
    80 	            
       
    81 	    virtual RConnection& SocketServerConn() = 0 ;
       
    82 	    
       
    83 	    //virtual TBool MatchIapId(TUint32 aIapID);
       
    84 	    
       
    85 	};
       
    86 
       
    87 #endif // __MMMSRPCONNECTIONMANAGER_H
       
    88 
       
    89 // End of file