This release addresses the following issues:
1. The crash bug fix when receiving file
2. Now the sending is based on MSRP messages, there is no longer file receiving or sending. Client sends data as MSRP was designed.
3. Soma MSRP stack was created so that the client told the correct session-id, Symbian stack generated it by itself. This is not allowed, it was changed so that clients tell the session-id (same as used in SIP INVITE).
4. Unnecessary division of data to chunks removed when there is no need to interrupt sending. The message is sent in as few chunks as possible.
5. Stack can now receive files and chunks with ?unlimited? size. Old stack wrote the incoming data to memory and did not utilize disk space until the end of chunk was reached (large chunks from another client crashed it).
6. Now when writing the incoming data to file, it will take into account the byte-range header values. So, this complies with the RFC4975 requirements that stack must be able to handle chunks that come in any sequence.
7. Some buffering changes to outgoing/incoming data.
8. The outgoing data is now checked that it does not contain the created transaction-id before sending the data.
9. MSRP success reports are now implemented and tested against servers.
10. Progress report system fixed so progress is now visible on client (all the way to 100%).
11. Message Cancel receiving / Cancel sending now corrected and made to work as rfc4975 requires. (termination from sender and error code from receiver when cancelling).
12. Bug correction related to messages received not belonging to any session, old stack implementation did send error response, but after response was written it did give the buffer to client anyway. Now corrected.
/*
* Copyright (c) 2009-2010 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:
* MSRP Implementation
*
*/
#ifndef MMMSRPCONNECTION_H
#define MMMSRPCONNECTION_H
// INCLUDES
#include <e32base.h>
#include <in_sock.h>
#include "MMSRPConnectionManager.h"
#include "MMSRPConnectionObserver.h"
#include "MMSRPWriterObserver.h"
// FORWARD DECLARATIONS
class MMSRPConnectionObserver;
class MMSRPWriterObserver;
class MMSRPConnectionManager;
// CLASS DECLARATIONS
class MMSRPConnection
{
public:
//move to CMSRPConn
enum TMSRPConnectionState
{
EError = -1,
ENotConnected = 0,
EConnecting,
EListening,
//EListenConnected,
EConnected,
EListenTimedOut,
EConnectTimedOut,
EDisconnecting, //cancel issued on connecting socket
EDisconnected//EConnectCancelling/ed
//EListenConnected (as opposed to connect connected)//validation to be taken care by session
//EListenValidated (received bodiless msg) //per session basis, hence these 2 states not needed
};
//
inline virtual ~MMSRPConnection(){}
/**
* Connect to remote address
*/
virtual TInt ConnectL(MMSRPConnectionObserver& aSubsession) = 0;
/**
* Listen to remote address
* add observer and start listener, if not started
* if new conn object i.e. single observer conn then
* update listen count
*/
virtual TInt ListenL(MMSRPConnectionObserver& aSubsession) = 0;
virtual TInt getConnectionState()=0;
/**
* Cancel the connect request if pending, else disconnect subsession
*/
//virtual void ConnectCancel(MMSRPConnectionObserver& aSubsession) = 0; //state == not connected means error
//connecting : issue cancel connect on socket if only subsession pending
//if connected: disconnect if only subsession pending
//else listening, panic client
/**
* Cancel the listen request if pending, else disconnect subsession
*/
//virtual void ListenCancel(MMSRPConnectionObserver& aSubsession) = 0;
/**
* The particular subsession wishes to cease using the connection/ disconnect
*/
virtual void ReleaseConnection(MMSRPConnectionObserver& aSubsession) = 0;
/**
* Sends the buffer content
* the observer cud be implemented by msg or subsession
* connection observer deemed unnecessary in send call
* @param aMsg message writer observer class
*/
virtual void SendL( MMSRPWriterObserver& aMsg ) = 0;
/**
* Continue sending the current message. This usually is called when
* new chunk of message is to be transmitted after receiving a response
* to chunk
* @param aMsg message writer observer class
*/
virtual void ContinueSendingL( MMSRPWriterObserver& aMsg ) = 0;
/**
* Cancels the sending if given message is currently being sent
* @param aMsg message writer observer class
*/
virtual void CancelSendingL( const MMSRPWriterObserver* aMsg ) = 0;
/**
* use case unknown : connection failure detected, parse error on the connection
* Send failed , goes directly to subsession.
* In that scenario, subession could ask mngr to close connection itself as part of error recovery
*/
/**
* mngr/server decides to close all subsessions on connection
*/
//virtual void CloseConnection() = 0;
/*move to CMSrpConn*/
virtual TBool CheckConnection(TInetAddr& aRemoteAddr, TBool aOnlyListen) = 0;
/**
* connection observer is available with every request
* NewL used to get a reference to connection mgr,
* call delete connection entry in conn mngr on disconnect
*/
//virtual MMSRPConnection* NewL( TInetAddr& aRemoteAddr, MMSRPConnectionManager& aConnMngr) = 0;
/**
* called on listen complete by connection manager
*/
virtual void ConnectionEstablishedL( TInt aNewState, RSocket* aSocket, TInt aStatus ) = 0;
/**
* Cancel the send
*/
//Send called on subsession with message
//Send cancel should be called on message (subsession with message id)
//msg state modified to cancel next fetch of message by writer
//but if the writer is sending same msg currently and send abort is issued then socket will need to be
//shutdown with stopoutput and then restarted
//Things cud get complicated , support not really necessary
//virtual void SendCancel( MMSRPConnectionObserver& aSubsession, MsgPTr, TDesC8& aBuf ) = 0;
};
#endif // MMMSRPCONNECTION_H
// End of file