multimediacommscontroller/tsrc/rtpsourcesinkstub/inc/rtpapi_stub.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2004-2005 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:    API (Application Programming Interface) header file
       
    15 *              : for RTP (Real-time Transport Protocol) library.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef __RTPAPI_H
       
    23 #define __RTPAPI_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include "rtpdef.h"
       
    27 #include "SrtpSession.h"
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // MACROS
       
    32 
       
    33 // DATA TYPES
       
    34 
       
    35 // FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 class CRtpManager;
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 /**
       
    43 *  API (Application Programming Interface) class for RTP (Real-time Transport
       
    44 *  Protocol) library.
       
    45 *
       
    46 *  @lib RtpService.dll
       
    47 */
       
    48 class CRtpAPI : public CBase
       
    49     {
       
    50     public:  // Constructors and destructor
       
    51 
       
    52         /**
       
    53         * Two-phased constructor.
       
    54         */
       
    55         IMPORT_C static CRtpAPI* NewL( MRtpErrNotify& aErrNotify );
       
    56 
       
    57         /**
       
    58         * Destructor.
       
    59         */
       
    60         virtual ~CRtpAPI();
       
    61 
       
    62     public: 
       
    63 
       
    64         /**
       
    65         * Open and initialize the CRtpAPI object.
       
    66         * @param aSdesInfo - [input] SDES (Source Description)
       
    67         *   of the local participant (CName, Username, etc.)
       
    68         * @param aRtpPacketDll - [input] Path+file name of RTP packet
       
    69         *   formatting DLL to use; NULL to use standard RTP packet format
       
    70         * @param aRConnPtr - [input] Network connection to use;
       
    71         *   NULL to use default network connection.
       
    72         * @return KErrNone if successful; system wide error code otherwise
       
    73         */
       
    74         IMPORT_C TInt OpenL( const TRtpSdesParams& aSdesInfo,
       
    75                              const TDesC* aRtpPacketDll,
       
    76                              const RSocketServ* aSocketServPtr,
       
    77                              const RConnection* aConnPtr );
       
    78 
       
    79         /**
       
    80         * Open and initialize the CRtpAPI object.
       
    81         * @param aIapId - [input] IAP ID. If -1, no IAP selection dialog
       
    82         *   will pop up. Instead, the default IAP will be used.
       
    83         * @return KErrNone if successful; system wide error code otherwise
       
    84         */
       
    85         IMPORT_C TInt StartConnection( TInt aIapId = -1 );
       
    86 
       
    87         /**
       
    88         * Open and initialize the CRtpAPI object in asynchronous mode
       
    89         * @param aStatus - [output] On completion, will contain a status code:
       
    90         *   KErrNone if successful; system wide error code otherwise.
       
    91         * @param aIapId - [input] IAP ID. If -1, no IAP selection dialog
       
    92         *   will pop up. Instead, the default IAP will be used.
       
    93         * @return KErrNone if successful; system wide error code otherwise
       
    94         */
       
    95         IMPORT_C TInt StartConnection( TRequestStatus& aStatus,
       
    96                                        TInt aIapId = -1 );
       
    97 
       
    98         /**
       
    99         * Cancels asynchoronous start of connection.
       
   100         * Any open requests will be completed with KErrCancel.
       
   101         * @return None
       
   102         */
       
   103         IMPORT_C void CancelStart(); 
       
   104 
       
   105         /**
       
   106         * Close the CRtpAPI object.
       
   107         * @param None
       
   108         * @return None
       
   109         */
       
   110         IMPORT_C void Close();
       
   111 
       
   112         /**
       
   113         * Set SDES (Source Description) information of the local participant.
       
   114         * Participant is defined as an application program and
       
   115         * only one local participant is allowed.
       
   116         * @param aSdesInfo - [input] SDES of the local participant
       
   117         *   (CName, Username, etc.).
       
   118         * @return None
       
   119         */
       
   120         IMPORT_C void SetLocalSdes( const TRtpSdesParams& aSdesInfo );
       
   121 
       
   122         /**
       
   123         * Get the local IP address
       
   124         * @param None
       
   125         * @return local ip address.
       
   126         */
       
   127         IMPORT_C TInetAddr& GetLocalIPAddressL();
       
   128 
       
   129         /**
       
   130         * Create a new RTP Session and return the Session ID as well as the
       
   131         * local port number assigned for RTP. RTP uses an even port number and
       
   132         * RTCP, if enabled, uses the next higher (odd) port number.
       
   133         * @param aSessionParams - [input] Session parameters
       
   134         * @param aPort - [input] Local port number to use for RTP;
       
   135         *                               0 to use default port number
       
   136         *                     - [output] port number assigned for RTP
       
   137         * @param aEnableRtcp - [input] ETrue to enable RTCP; EFalse to disable
       
   138         * @param aRtcpParams - [input] RTCP parameters to use;
       
   139         *    NULL to use default RTCP parameters
       
   140         * @return Identifier (ID) of RTP Session created if successful;
       
   141         *    KNullId otherwise
       
   142         */
       
   143         IMPORT_C TRtpId CreateSessionL(
       
   144                             const TCreateSessionParams& aSessionParams,
       
   145                             TUint& aPort,
       
   146                             TBool aEnableRtcp,
       
   147                             const TRtcpParams* aRtcpParams );
       
   148         /**
       
   149         * Create a new, secure RTP Session and return the Session ID as well as the
       
   150         * local port number assigned for RTP. RTP uses an even port number and
       
   151         * RTCP, if enabled, uses the next higher (odd) port number.
       
   152         * User is expected to create corresponding SRTP session prior to calling this
       
   153         * function. 
       
   154         * @param aSessionParams - [input] Session parameters
       
   155         * @param aPort - [input] Local port number to use for RTP;
       
   156         *                               0 to use default port number
       
   157         *                     - [output] port number assigned for RTP
       
   158         * @param aEnableRtcp - [input] ETrue to enable RTCP; EFalse to disable
       
   159         * @param aRtcpParams - [input] RTCP parameters to use;
       
   160         *    NULL to use default RTCP parameters
       
   161         * @param aSession - [input] SRTP session to be used by this RTP session.
       
   162         * @return Identifier (ID) of RTP Session created if successful;
       
   163         *    KNullId otherwise
       
   164         */
       
   165 
       
   166         IMPORT_C TRtpId CreateSessionL( 
       
   167 	                const TCreateSessionParams& aSessionParams, 
       
   168 	                TUint& aPort, 
       
   169 	                TBool aEnableRtcp, 
       
   170 	                const TRtcpParams* aRtcpParams, 
       
   171 	                CSRTPSession& aSession); 
       
   172                             
       
   173 
       
   174         /**
       
   175         * Start an RTP Session. If enabled, RTCP associated with the given
       
   176         * session is also started.
       
   177         * @param aSessionId - [input] Session ID
       
   178         * @return KErrNone if successful; system wide error code otherwise
       
   179         */
       
   180         IMPORT_C TInt StartSession( TRtpId aSessionId );
       
   181 
       
   182         /**
       
   183         * Close an RTP Session.
       
   184         * @param aSessionId - [input] Session ID
       
   185         * @return None
       
   186         */
       
   187         IMPORT_C void CloseSession( TRtpId aSessionId );
       
   188 
       
   189         /**
       
   190         * Set remote IP address and port number to RTP Session.
       
   191         * Port number for RTP must be an even number and the corresponding
       
   192         * RTCP, if enabled, will be set to use the next higher (odd) port.
       
   193         * @param aSessionId - [input] RTP Session ID
       
   194         * @param aRemoteAddr - [input] Remote IP address & port number for RTP
       
   195         * @return KErrNone if successful; system wide error code otherwise
       
   196         */
       
   197         IMPORT_C TInt SetRemoteAddress( TRtpId aSessionId,
       
   198                                         const TInetAddr& aRemoteAddr );
       
   199 
       
   200         /**
       
   201         * Set remote RTCP IP address and port number to RTP Session accoring to RFC 3605
       
   202         * i.e. this should be used if RTCP port is different than RTP port + 1
       
   203         * @param TRtpId aSessionId - [input] RTP Session ID
       
   204         * @param TInetAddr& aRemoteAddr - [input] Remote IP address & port
       
   205         *                                 number for RTP
       
   206         * @return TInt - KErrNone if successful; KErrNotFound if invalid session id;
       
   207         *				 KErrNotSupported if RTCP disabled; system wide error code otherwise
       
   208         */
       
   209         IMPORT_C TInt SetRemoteRtcpAddress( TRtpId aSessionId, const TInetAddr& aRemoteRtcpAddr );
       
   210         
       
   211         /**
       
   212         * Create a Receive stream for an RTP Session and return the stream
       
   213         * ID which is unique for all RTP Sessions.
       
   214         * @param aSessionId - [input] RTP Session ID
       
   215         * @param aParams - [input] Receive stream parameters
       
   216         * @return Stream ID if successful; KNullId otherwise
       
   217         */
       
   218         IMPORT_C TRtpId CreateReceiveStreamL( TRtpId aSessionId,
       
   219                             const TRcvStreamParams& aParams );
       
   220 
       
   221         /**
       
   222         * Create a Transmit stream for an RTP Session and return the stream
       
   223         * ID which is unique for all RTP Sessions. SSRC value assigned for the
       
   224         * very first Transmit stream will be the same as the default SSRC
       
   225         * value reserved internally by CreateSession function. This function
       
   226         * is normally used to create a transmit stream where SSRC value is
       
   227         * randomly generated.
       
   228         * @param aSessionId - [input] RTP Session ID
       
   229         * @param aParams - [input] Transmit stream parameters
       
   230         * @param aSSRC - [output] SSRC value assigned
       
   231         * @return Stream ID if successful; KNullId otherwise
       
   232         */
       
   233         IMPORT_C TRtpId CreateTransmitStreamL( TRtpId aSessionId,
       
   234                             const TTranStreamParams& aParams,
       
   235                             TRtpSSRC& aSSRC );
       
   236 
       
   237         /**
       
   238         * Create a Transmit stream, with a given SSRC value, for an RTP Session
       
   239         * and return the stream ID which is unique for all RTP Sessions. This
       
   240         * extended function is used for a special case where a specific SSRC
       
   241         * value needs to be associated with the transmit stream being created,
       
   242         * e.g. for retransmission purpose.
       
   243         * @param aSessionId - [input] RTP Session ID
       
   244         * @param aParams - [input] Transmit stream parameters
       
   245         * @param aSsrc - [input] SSRC value to use
       
   246         * @return Stream ID if successful; KNullId otherwise
       
   247         */
       
   248         IMPORT_C TRtpId CreateTransmitStreamExtL( TRtpId aSessionId,
       
   249                             const TTranStreamParams& aParams,
       
   250                             const TRtpSSRC aSSRC );
       
   251 
       
   252         /**
       
   253         * Close a Transmit or Receive stream.
       
   254         * @param TRtpId aStreamId - [input] ID of stream to close
       
   255         * @return None
       
   256         */
       
   257         IMPORT_C void CloseStream( TRtpId aStreamId );
       
   258 
       
   259         /**
       
   260         * Register a callback object for receiving RTP data packets from an RTP
       
   261         * Session. Only one receiver callback object is allowed to be
       
   262         * registered for one Session.
       
   263         * MRtpObserver::RtpPacketReceived function from aRtpObserver object is
       
   264         * called when an RTP data packet is received.
       
   265         * @param aSessionId - [input] RTP Session ID
       
   266         * @param aRtpObserver - [input] Callback object to receive RTP packets
       
   267         * @return KErrNone if successful; system wide error code otherwise
       
   268         */
       
   269         IMPORT_C TInt RegisterRtpObserver( TRtpId aSessionId,
       
   270                                            MRtpObserver& aRtpObserver );
       
   271 
       
   272         /**
       
   273         * Unregister RTP observer callback object associated with an RTP
       
   274         * session.
       
   275         * @param aSessionId - [input] RTP Session ID
       
   276         * @return None
       
   277         */
       
   278         IMPORT_C void UnregisterRtpObserver( TRtpId aSessionId );
       
   279 
       
   280         /**
       
   281         * Sets/resets the observer for the non-RTP data.
       
   282         * Only one receiver callback object is allowed to be
       
   283         * registered for one Session.
       
   284         * MNonRTPDataObserver::NonRTPDataReceived or
       
   285         * MNonRTPDataObserver::NonRTCPDataReceived from 
       
   286         * aNonRTPDataObserver object is
       
   287         * called when a non-RTP data packet is received.
       
   288         * @param aNonRTPDataObserver an observer, 0-pointer resets the observer
       
   289         * @return KErrNotFound if non-existing session-ID provided, system-wide error code otherwise. KErrNone if successfull.
       
   290         */
       
   291         IMPORT_C TInt SetNonRTPDataObserver( TRtpId aSessionId, 
       
   292                                     MNonRTPDataObserver* aNonRTPDataObserver );
       
   293 
       
   294         /**
       
   295         * Send an RTP data packet in a Transmit stream synchronously.
       
   296         * @param aTranStreamId - [input] ID of Transmit stream
       
   297         * @param aHeaderInfo - [input] Header information of RTP data packet
       
   298         * @param aPayloadData - [input] Payload data of RTP data packet
       
   299         * @return KErrNone if successful; system wide error code otherwise
       
   300         */
       
   301         IMPORT_C TInt SendRtpPacket( TRtpId aTranStreamId,
       
   302                                      const TRtpSendHeader& aHeaderInfo,
       
   303                                      const TDesC8& aPayloadData );
       
   304 
       
   305         /**
       
   306         * Send an RTP data packet in a Transmit stream asynchronously.
       
   307         * @param TRtpId aTranStreamId - [input] ID of Transmit stream
       
   308         * @param aHeaderInfo - [input] Header information
       
   309         *                                      of RTP data packet to send
       
   310         * @param aPayloadData - [input] Payload data of RTP data packet to send
       
   311         * @param aStatus - [output] On completion, will contain a status code:
       
   312         *    KErrNone if successful; system wide error code otherwise
       
   313         * @return KErrNone if successful; system wide error code otherwise
       
   314         */
       
   315         IMPORT_C TInt SendRtpPacket( TRtpId aTranStreamId,
       
   316                                      const TRtpSendHeader& aHeaderInfo,
       
   317                                      const TDesC8& aPayloadData,
       
   318                                      TRequestStatus& aStatus );
       
   319 
       
   320         /**
       
   321         * Send an RTP data packet asynchronously, with a given sequence number,
       
   322         * in a Transmit stream mainly for retransmission purpose.
       
   323         * @param aTranStreamId - [input] ID of Transmit stream
       
   324         * @param aSequenceNum - [input] Sequence number to use
       
   325         * @param aHeaderInfo - [input] Header information of RTP data packet
       
   326         * @param aPayloadData - [input] Payload data of RTP data packet to send
       
   327         * @param aStatus - [output] On completion, will contain a status code:
       
   328         *    KErrNone if successful; system wide error code otherwise
       
   329         * @return KErrNone if successful; system wide error code otherwise
       
   330         */
       
   331         IMPORT_C TInt SendRtpPacket( TRtpId aTranStreamId,
       
   332                                      TRtpSequence aSequenceNum,
       
   333                                      const TRtpSendHeader& aHeaderInfo,
       
   334                                      const TDesC8& aPayloadData,
       
   335                                      TRequestStatus& aStatus );
       
   336 
       
   337 
       
   338         /**
       
   339         * Send a non-RTP (control) data packet asynchronously
       
   340         * @param aSessionId - [input] RTP Session ID
       
   341         * @param aUseRTPSocket - [input] use RTP/RTCP socket
       
   342         * @param aData - [input] non-RTP data packet to send
       
   343         * @param aStatus - [output] On completion, will contain a status code:
       
   344         *    KErrNone if successful; system wide error code otherwise
       
   345         * @return KErrNone if successful; system wide error code otherwise
       
   346         */
       
   347         IMPORT_C void SendDataL( TRtpId aSessionId,
       
   348                                 TBool aUseRTPSocket,
       
   349                                 const TDesC8& aData,
       
   350                                 TRequestStatus& aStatus );
       
   351 
       
   352         /**
       
   353         * Cancel an outstanding SendRtpPacket() operation.
       
   354         * @param TRtpId aSessionId - [input] RTP Session ID
       
   355         * @return None
       
   356         */
       
   357         IMPORT_C void CancelSend( TRtpId aSessionId );
       
   358 
       
   359         /**
       
   360         * Register a callback object for receiving RTCP packets associated with
       
   361         * a given RTP Session. Only one observer callback object is allowed to
       
   362         * be registered. One of aRtcpObserver object's callback functions is
       
   363         * called when an RTCP packet of that type is received.
       
   364         * @param aSessionId - [input] RTP Session ID
       
   365         * @param aObserver - [input] Callback object to receive RTCP packets
       
   366         * @return KErrNone if successful; system wide error code otherwise.
       
   367         */
       
   368         IMPORT_C TInt RegisterRtcpObserver( TRtpId aSessionId,
       
   369                                             MRtcpObserver& aRtcpObserver );
       
   370 
       
   371         /**
       
   372         * Unregister RTCP observer callback object associated with an RTP
       
   373         * session.
       
   374         * @param aSessionId - [input] RTP Session ID
       
   375         * @return None
       
   376         */
       
   377         IMPORT_C void UnregisterRtcpObserver( TRtpId aSessionId );
       
   378 
       
   379         /**
       
   380         * Send an RTCP BYE packet for a Transmit stream.
       
   381         * @param aTranStreamId - [input] Transmit stream ID
       
   382         * @param aReason - [input] Reason for leaving
       
   383         * @return KErrNone if successful; system wide error code otherwise
       
   384         */
       
   385         IMPORT_C TInt SendRtcpByePacket( TRtpId aTranStreamId,
       
   386                                          const TDesC8& aReason );
       
   387 
       
   388         /**
       
   389         * Send an RTCP APP packet for a Transmit stream.
       
   390         * @param TRtpId aTranStreamId - [input] Transmit stream ID
       
   391         * @param TRtcpApp aApp - [input] APP packet to send
       
   392         * @return KErrNone if successful; system wide error code otherwise
       
   393         */
       
   394         IMPORT_C TInt SendRtcpAppPacket( TRtpId aTranStreamId,
       
   395                                          const TRtcpApp& aApp );
       
   396 
       
   397         /** 
       
   398         * Send an RTCP RR packet for a Reception stream.
       
   399         * @param TRtpId aRcvStreamId - [input] Reception stream ID
       
   400         * @return TInt - KErrNone if successful; system wide error code otherwise
       
   401         */
       
   402         IMPORT_C TInt SendRtcpRrPacket( TRtpId aRcvStreamId );
       
   403         
       
   404         /** 
       
   405         * Send an RTCP SR packet for a Transmit stream.
       
   406         * @param TRtpId aTranStreamId - [input] Transmit stream ID
       
   407         * @return TInt - KErrNone if successful; system wide error code otherwise
       
   408         */
       
   409         IMPORT_C TInt SendRtcpSrPacket( TRtpId aTranStreamId );
       
   410 
       
   411 		/** 
       
   412         * Suspend RTCP sending on/off, calculations will continue. 
       
   413         * @param TRtpId aSessionId - [input] RTP Session ID
       
   414         * @param TBool aAutoSending - [input] Auto sending flag. 
       
   415         *							  ETrue:  RTCP sending will be scheduled normally
       
   416         *							  EFalse: RTCP sending will be suspended
       
   417         * @return TInt - KErrNone if successful; KErrNotFound if invalid session id;
       
   418         *				 KErrNotSupported if RTCP disabled;  system wide error code otherwise				
       
   419         */
       
   420         IMPORT_C TInt SuspendRtcpSending( TRtpId aSessionId, TBool aAutoSending );
       
   421         
       
   422 		/** 
       
   423         * Gets the status of automatic RTCP sending.
       
   424         * @param TRtpId aSessionId - [input] RTP Session ID
       
   425         * @param TBool aAutoSending - [output] ETrue: RTCP auto sending is on 
       
   426         *				  					   EFalse: RTCP auto sending is off
       
   427  		* @return TInt - KErrNone if successful; KErrNotFound if invalid session id;
       
   428         *				 KErrNotSupported if RTCP disabled;  system wide error code otherwise
       
   429         */
       
   430         IMPORT_C TInt IsRtcpSendingSuspended( TRtpId aSessionId, TBool& aAutoSending );
       
   431 
       
   432         /**
       
   433         * Get the session ID of a stream, which belongs to that session.
       
   434         * @param aStreamId - [input] ID of a stream
       
   435         * @return Identifier (ID) of RTP Session if found; KNullId otherwise
       
   436         */
       
   437         IMPORT_C TRtpId GetSessionId( TRtpId aStreamId );
       
   438 
       
   439         /**
       
   440         * Get address of Socket object used by a given RTP Session
       
   441         * to send/receive RTP data packets.
       
   442         * @param aSessionId - [input] RTP Session ID
       
   443         * @return Address of Socket object used if successful; NULL otherwise
       
   444         */
       
   445         IMPORT_C RSocket* GetRtpSocket( TRtpId aSessionId );
       
   446 
       
   447         /**
       
   448         * Get address of Socket object used by a given RTP Session
       
   449         * to send/receive RTCP control packets.
       
   450         * @param aSessionId - [input] RTP Session ID
       
   451         * @return Address of Socket object used if successful; NULL otherwise
       
   452         */
       
   453         IMPORT_C RSocket* GetRtcpSocket( TRtpId aSessionId );
       
   454 
       
   455         /**
       
   456         * Retrieve statistical information for a stream
       
   457         * based on the reports from RTCP SR & RR packets.
       
   458         * @param aStreamId - [input] ID of stream
       
   459         * @param aStat - [output] Statistical information
       
   460         * @return KErrNone if successful; system wide error code otherwise
       
   461         */
       
   462         IMPORT_C TInt GetStreamStatistics( TRtpId aStreamId,
       
   463                                            TRtpPeerStat& aStat );
       
   464 
       
   465         /**
       
   466         * Get sampling rate setting for a payload type.
       
   467         * @param aPayloadType - [input] Payload type
       
   468         * @return Sampling rate in Hz; 0 if payload type setting not found
       
   469         */
       
   470         IMPORT_C TUint32 GetSamplingRate( TUint8 aPayloadType );
       
   471 
       
   472         /**
       
   473         * Set sampling rate for a payload type.
       
   474         * @param aPayloadType - [input] Payload type
       
   475         * @param aSamplingRate - [input] Sampling rate in Hz
       
   476         * @return KErrNone if successful; system wide error code otherwise
       
   477         */
       
   478         IMPORT_C TInt SetSamplingRate( TUint8 aPayloadType,
       
   479                                        TUint32 aSamplingRate );
       
   480 
       
   481         /**
       
   482         * Set RTCP parameters for a given RTP Session.
       
   483         * This function does nothing if RTCP was not enabled previously.
       
   484         * @param aSessionId - [input] RTP Session ID
       
   485         * @param aRtcpParams - [input]  RTCP parameters to use
       
   486         * @return KErrNone if successful; system wide error code otherwise
       
   487         */
       
   488         IMPORT_C TInt SetRtcpParameters( TRtpId aSessionId,
       
   489                                          const TRtcpParams& aRtcpParams );
       
   490 
       
   491         /**
       
   492         * Synchronous custom command interface for future extensions.
       
   493         * Input/output data and return value are defined by each custom command
       
   494         * @param aFunction - [input] Function ID
       
   495         * @param aInputData1 - [input] Input data #1; NULL if not used
       
   496         * @param aInputData2 - [input] Input data #2; NULL if not used
       
   497         * @param aOutputData - [output] Output data; NULL if not used
       
   498         * @return Defined by the function
       
   499         */
       
   500         IMPORT_C TInt CustomCommandSync( TInt aFunction,
       
   501                                          const TDesC8& aInputData1,
       
   502                                          const TDesC8& aInputData2,
       
   503                                          TDes8& aOutputData );
       
   504 
       
   505         /**
       
   506         * ASynchronous custom command interface for future extensions.
       
   507         * Input/output data and return value are defined by each custom command
       
   508         * @param aFunction - [input] Function ID
       
   509         * @param aInputData1 - [input] Input data #1; NULL if not used
       
   510         * @param aInputData2 - [input] Input data #2; NULL if not used
       
   511         * @param aOutputData - [output] Output data; NULL if not used
       
   512         * @param aStatus - [output] On completion, will contain a status code:
       
   513         *    KErrNone if successful; system wide error code otherwise
       
   514         * @return Defined by the function
       
   515         */
       
   516         IMPORT_C TInt CustomCommandAsync( TInt aFunction,
       
   517                                           const TDesC8& aInputData1,
       
   518                                           const TDesC8& aInputData2,
       
   519                                           TDes8& aOutputData,
       
   520                                           TRequestStatus& aStatus );
       
   521 
       
   522         /**
       
   523         * Version of RtpService.dll
       
   524         * @return Version of current RtpService.dll
       
   525         */
       
   526         IMPORT_C TVersion Version() const;
       
   527 
       
   528 
       
   529     private:
       
   530         /**
       
   531         * C++ default constructor.
       
   532         */
       
   533         CRtpAPI();
       
   534 
       
   535         /**
       
   536         * By default Symbian 2nd phase constructor is private.
       
   537         */
       
   538         void ConstructL( MRtpErrNotify& aErrNotify );
       
   539 
       
   540 
       
   541     private:    // Data
       
   542         // RTP Manager
       
   543         CRtpManager* iManager;
       
   544         
       
   545         TInetAddr iAdressi;
       
   546 
       
   547         // Reserved for future extensions
       
   548         TAny* iReserved1;
       
   549         TAny* iReserved2;
       
   550         TInt iReserved3;
       
   551         TInt iReserved4;
       
   552     private:    
       
   553     #ifdef EUNIT_TESTING
       
   554 	  friend class UT_CRtpAPI;
       
   555 	#endif     	    
       
   556     };
       
   557 
       
   558 #endif //__RTPAPI_H