multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpdataobserver.h
branchrcs
changeset 49 64c62431ac08
child 50 1d8943dd8be6
equal deleted inserted replaced
44:fb024d5e35fa 49:64c62431ac08
       
     1 /*
       
     2 * Copyright (c) 2004-2006 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 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Provides a comfort noise generator class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MCCMSRPDATAOBSERVER_H
       
    20 #define MCCMSRPDATAOBSERVER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 /**
       
    25 *  callback function for received msrp packets. 
       
    26 *
       
    27 *  @lib mccmsrpsourcesink.dll
       
    28 */
       
    29 class MMsrpDataObserver
       
    30 {
       
    31 public :
       
    32 
       
    33         /**
       
    34          * A MSRP message has been received from the network.
       
    35          * This function is called when the MSRP message was received from the network
       
    36          * the ownership is transferred
       
    37          * @param aMessage the received message
       
    38          * @param aStatus, KErrNone with complete message, KErrCancel if terminated
       
    39          */
       
    40         virtual void IncomingMessage( HBufC8* aMessageContent, TInt aStatus ) = 0;
       
    41 
       
    42         /**
       
    43          * A MSRP REPORT message has been received from the network
       
    44          * This function is called to indicate to the client that a recipient
       
    45          * wishes to indicate a range of bytes as received. Alternative the
       
    46          * recipient might use REPORT to indicate an error. In case of error the
       
    47          * MSRP stops sending the message. However, it is client's responsibility
       
    48          * how the handle the information
       
    49          * @param aStatus status code from the REPORT message
       
    50          * @param aRangeStart start of byte range received
       
    51          * @param aRangeEnd end of byte range received
       
    52          * @param aTotal Total number of bytes in the message
       
    53          */
       
    54         virtual void IncomingReport( TInt aStatus, TInt aRangeStart,
       
    55             TInt aRangeEnd, TInt aTotal ) = 0;
       
    56 
       
    57         /**
       
    58          * The SendMessage status of the message sending
       
    59          * The possible status code are defined by CMSRPConnection::TMSRPErrorCodes
       
    60          * or system wide error codes
       
    61          * @param aStatus status of the operation
       
    62          * @param aMessageId message identifier of the sent message
       
    63          */
       
    64         virtual void SendResult( TInt aStatus, const TDesC8& aMessageid ) = 0;
       
    65 
       
    66         /**
       
    67          * If listen port request fails this is called
       
    68          * @param aStatus error code of the operation
       
    69          */
       
    70         virtual void ListenPortFailure( TInt aStatus ) = 0;
       
    71 
       
    72 };
       
    73 
       
    74 #endif //MCCMSRPDATAOBSERVER.H