Msrp/MsrpClient/inc/MMSRPSessionObserver.h
author shivsood
Sat, 12 Jun 2010 14:30:11 +0530
branchMSRP_FrameWork
changeset 25 505ad3f0ce5c
child 58 cdb720e67852
permissions -rw-r--r--
MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia. MSRP Implementation as per RFC 4975 and RCS specifications that supports 1. Multiple one to one chat data sessions as per RCS/RFC 4975 specifications. 2. Multiple file Sharing sessions as per RCS. 3. Data Chunking requirements as per 4975. 3. MSRP Connection sharing requirements as per RFC 4975
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
     1
/*
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
     2
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
     3
* All rights reserved.
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
     4
* This component and the accompanying materials are made available
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
     6
* which accompanies this distribution, and is available
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html."
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
     8
* Initial Contributors:
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
     9
* Nokia Corporation - initial contribution.
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    10
* Contributors:
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    11
*
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    12
* Description:
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    13
* MSRP Implementation
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    14
*
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    15
*/
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    16
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    17
#ifndef MMSRPSESSIONOBSERVER_H_
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    18
#define MMSRPSESSIONOBSERVER_H_
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    19
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    20
// INCLUDES
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    21
#include "MsrpCommon.h"
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    22
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    23
// FORWARD DECLARATIONS
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    24
class CMSRPMessage;
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    25
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    26
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    27
class MMSRPSessionObserver
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    28
    {
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    29
    public:
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    30
        
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    31
        /**
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    32
         * An MSRP SEND request has been received from the network.
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    33
         * The content of the request is given to the client, along with the 
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    34
         * status of receiving the request. Ownership of the content is transferred.
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    35
         * @param aMessageContent the received message content
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    36
         * @param aStatus KErrNone with complete message, KErrCancel if terminated
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    37
         */
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    38
        virtual void IncomingMessage( HBufC8* aMessageContent, TInt aStatus ) = 0;
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    39
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    40
        /**
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    41
         * An MSRP REPORT request has been received from the network.
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    42
         * This function is called to notify the client that a recipient wishes
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    43
         * to indicate a range of bytes as received, or to indicate an error. 
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    44
         * However, it is the client's responsibility to handle this information.
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    45
         * @param aStatus status code from the REPORT request
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    46
         * @param aRangeStart start of the byte range being reported 
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    47
         * @param aRangeEnd end of the byte range being reported
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    48
         * @param aTotal total number of bytes in the message
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    49
         * NOTE: This callback not issued currently, REPORTs support not present
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    50
         */
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    51
        virtual void IncomingReport( TInt aStatus, TInt aRangeStart,
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    52
            TInt aRangeEnd, TInt aTotal ) = 0;
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    53
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    54
        /**
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    55
         * Result of the send operation initiated by the client
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    56
         * @param aStatus error code as defined in MsrpCommon::TErrorCode
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    57
         * @param aMessageId message identifier of the sent message that
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    58
         * was returned by the SendBuffer call
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    59
         */
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    60
        virtual void SendResult( TInt aStatus, const TDesC8& aMessageid ) = 0;
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    61
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    62
        /**
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    63
         * Indicates a failure in connection establishment
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    64
         * or in case of any error in an established connection
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    65
         * @param aStatus a system wide error code
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    66
         */
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    67
        virtual void ListenPortFailure( TInt aStatus ) = 0;
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    68
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    69
        /**
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    70
         * Result of the connection attempt made by the client. This callback is
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    71
         * issued, both while initiating a connection with ConnectL and while
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    72
         * receiving a connection with ListenL, once the call completes.
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    73
         * Client must wait for this callback before trying to send out any
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    74
         * messages to the remote user.
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    75
         * @param aStatus KErrNone or a system wide error code
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    76
         */
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    77
        virtual void ConnectStatus( TInt aStatus ) = 0;
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    78
        
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    79
        /**
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    80
         * Notifies that the entire file has been sent successfully 
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    81
         */
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    82
        virtual void SendFileNotification(TBool aStatus) = 0;
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    83
        
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    84
        /**
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    85
         * Notifies that the entire file has been received successfully 
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    86
         */
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    87
        virtual void ReceiveFileNotification(TBool status) = 0;
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    88
        
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    89
        /**
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    90
        * File data transfer progress. returns the progress of data transfer
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    91
        * @param aTransferred number of bytes transferred
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    92
        * @param aTotal Total amount of bytes to be transferred
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    93
        */
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    94
        virtual void FileSendProgress( TInt aTransferred, TInt aTotal ) = 0;
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    95
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    96
        /**
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    97
        * File receive progress, number of bytes received from incoming data
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    98
        * @param aReceived number of bytes received
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
    99
        * @param aTotal Total amount of bytes to be received
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
   100
        */
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
   101
        virtual void FileReceiveProgress( TInt aReceived, TInt aTotal ) = 0;
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
   102
        
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
   103
    };
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
   104
505ad3f0ce5c MSRP Chat and File Sharing FrameWork - Initial Contribution from Nokia.
shivsood
parents:
diff changeset
   105
#endif /* MMSRPSESSIONOBSERVER_H_ */