applayerpluginsandutils/httptransportplugins/httptransporthandler/mcommsinfoprovider.h
changeset 0 b16258d2340f
child 22 26ce6fb6aee2
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __MCOMMSINFOPROVIDER_H__
       
    17 #define __MCOMMSINFOPROVIDER_H__
       
    18 
       
    19 #include <e32std.h>
       
    20 #include <in_sock.h>
       
    21 
       
    22 class MSecurityPolicy;
       
    23 
       
    24 class MCommsInfoProvider
       
    25 /** 
       
    26 	The MCommsInfoProvider API provides accessors to a connected socket server
       
    27 	session and the protocol description for a particular protocol.
       
    28 	@internalComponent
       
    29 */
       
    30 	{
       
    31 public:	// methods
       
    32 
       
    33 /**	
       
    34 	Accessor to the socket server session.
       
    35 	@return		A reference to the connected socket server session.
       
    36 */
       
    37 	virtual RSocketServ& SocketServer() =0;
       
    38 
       
    39 /**
       
    40 	Accessor to the protocol description.
       
    41 	@return		A reference to the protocol description.
       
    42 */
       
    43 	virtual TProtocolDesc& ProtocolDescription() =0;
       
    44 
       
    45 /**
       
    46 	Accessor to the comms connection.
       
    47 	@return		A reference to the connected comms connection.
       
    48 */
       
    49 	virtual RConnection& Connection() =0;
       
    50 
       
    51 /**	
       
    52 	Accessor to the security preferences.
       
    53 	@param		aDialogPrompt Boolean indicating whether a secure dialog prompt should be used.
       
    54 	@param		aSecurityPolicy The security policy, can be NULL if not provided
       
    55 */
       
    56 	virtual void SecurityPreferences(TBool& aDialogPrompt, MSecurityPolicy*& aSecurityPolicy) =0;
       
    57 
       
    58 /**	
       
    59 	Indicates whether the connection is owned by the transport layer or not.
       
    60 	@return		A boolean indicating whether the connection is owned.
       
    61 */
       
    62 	virtual TBool OwnsConnection() =0;	
       
    63 	
       
    64 	/**
       
    65 	Returns the protocal layer session ID. 
       
    66 	
       
    67 	@return		A negative error code or the Session ID. This returns KErrNotSupported
       
    68 				if the implementation does not support session IDs
       
    69 */
       
    70 	virtual TInt SessionId() =0;
       
    71 
       
    72 	/**
       
    73 	Returns ETrue if there is a connection, otherwise returns EFalse				
       
    74 	*/
       
    75 	virtual TBool HasConnection () =0;
       
    76 	
       
    77 	/**
       
    78 	Starts a default RConnection
       
    79 	*/
       
    80 	virtual void StartDefaultCommsConnectionL () =0;
       
    81 	};
       
    82 
       
    83 #endif	// __MCOMMSINFOPROVIDER_H__