dvrengine/CommonRecordingEngineClient/inc/RCRService.h
changeset 0 822a42b6c3f1
equal deleted inserted replaced
-1:000000000000 0:822a42b6c3f1
       
     1 /*
       
     2 * Copyright (c) 2007 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 the License "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:    Interface for RC Client's Service class*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef RCRSERVICE_H
       
    21 #define RCRSERVICE_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "RCRServiceBase.h"
       
    25 #include <es_sock.h>
       
    26 
       
    27 // CONSTANTS
       
    28 // None
       
    29 
       
    30 // MACROS
       
    31 // None
       
    32 
       
    33 // DATA TYPES
       
    34 // None
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class RCRClient;
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 /**
       
    42 *  This is the actual client API that passes commands
       
    43 *  to server side. CCRDvrApi and other classes visible
       
    44 *  to client application are merely wrappers to this
       
    45 *  class. If CCRDvrApi has method foo, it will just
       
    46 *  call method foo if this class here and this will in 
       
    47 *  turn say something like return SendReceive( ECRDoFooInServer, args );
       
    48 *  This needs to have implementations of all the engine
       
    49 *  methods of all client classes.
       
    50 *
       
    51 *  @lib CommonRecordingEngineClient.lib
       
    52 *  @since Series 60 3.0
       
    53 */
       
    54 NONSHARABLE_CLASS( RCRService ) : public RCRServiceBase
       
    55     {
       
    56     
       
    57 public: // Constructors and destructor
       
    58     
       
    59     /**
       
    60     * Constructor.
       
    61     */
       
    62     RCRService();
       
    63 
       
    64 public: // New methods
       
    65 
       
    66 	/**
       
    67 	* Tells receiving engine which IAP to use.
       
    68     * @since Series 60 3.0
       
    69 	* @param aIapId is the internet access point id. 
       
    70     * @return none.
       
    71 	*/						  
       
    72 	TInt SetIap( const TSubConnectionUniqueId& aIapId );
       
    73 
       
    74 	/**
       
    75 	* Tells receiving engine to cancel IAP selection.
       
    76     * @since Series 60 3.0
       
    77 	*/						  
       
    78 	TInt CancelSetIap();
       
    79 
       
    80     /**
       
    81     * Prepares live IPTV PTSP stream.
       
    82     * @since Series 60 3.0
       
    83     * @param aSessionChk a session definition checksum.
       
    84     * @param aRtspParams parameter set for rtsp.
       
    85     * @return KErrNone if successful,
       
    86     *         otherwise another of the system-wide  error codes.
       
    87     */
       
    88     TInt PlayRtspUrl( TUint& aSessionChk,
       
    89                       const SCRRtspParams& aRtspParams );
       
    90 
       
    91     /**
       
    92     * Prepares DVB-H live stream.
       
    93     * @since Series 60 3.0
       
    94     * @param aSessionChk a session definition checksum.
       
    95     * @param aLiveParams parameter set for DVB-H.
       
    96     * @return KErrNone if successful,
       
    97     *         otherwise another of the system-wide  error codes.
       
    98     */
       
    99     TInt PlayDvbhStream( TUint& aSessionChk,
       
   100                          const SCRLiveParams& aLiveParams );
       
   101 
       
   102     /**
       
   103     * Changes DVB-H live stream service.
       
   104     * @since Series 60 3.0
       
   105     * @param aSessionChk a session definition checksum.
       
   106     * @param aLiveParams parameter set for DVB-H.
       
   107     * @return KErrNone if successful,
       
   108     *         otherwise another of the system-wide  error codes.
       
   109     */
       
   110     TInt ChangeDvbhService( TUint& aSessionChk,
       
   111                             const SCRLiveParams& aLiveParams );
       
   112 
       
   113     /**
       
   114     * Prepares clip RTP stream from a name.
       
   115     * @since Series 60 3.0
       
   116     * @param aSessionChk a session definition checksum.
       
   117     * @param aRtpFile parameter set for rtsp.
       
   118     * @return KErrNone if successful,
       
   119     *         otherwise another of the system-wide  error codes.
       
   120     */
       
   121     TInt PlayRtpFile( TUint& aSessionChk,
       
   122                       const SCRRtpPlayParams& aRtpFile );
       
   123 
       
   124     /**
       
   125     * Prepares clip RTP stream from a file handle.
       
   126     * @since Series 60 3.0
       
   127     * @param aSessionChk a session definition checksum.
       
   128     * @param aRtpHandle a open file handle for RTP file.
       
   129     * @return KErrNone if successful,
       
   130     *         otherwise another of the system-wide  error codes.
       
   131     */
       
   132     TInt PlayRtpFile( TUint& aSessionChk,
       
   133                       const RFile& aRtpHandle );
       
   134 
       
   135     /**
       
   136     * Starts currently active stream recording.
       
   137     * @since Series 60 3.0
       
   138     * @param aSessionChk a session definition checksum.
       
   139     * @param aRecordParams a parameters for recording.
       
   140     * @return KErrNone if successful,
       
   141     *         otherwise another of the system-wide  error codes.
       
   142     */
       
   143     TInt RecordCurrentStream( const TUint aSessionChk,
       
   144                               const SCRRecordParams& aRecordParams );
       
   145     
       
   146     /**
       
   147     * Starts recording for RTSP live stream.
       
   148     * @since Series 60 3.0
       
   149     * @param aSessionChk a session definition checksum.
       
   150     * @param aRtspUrl is set of parameters required for rtsp.
       
   151     * @param aRecordParams a parameters for recording.
       
   152     * @return KErrNone if successful,
       
   153     *         otherwise another of the system-wide  error codes.
       
   154     */
       
   155     TInt RecordRtspStream( TUint& aSessionChk,
       
   156                            const SCRRtspParams& aRtspUrl,
       
   157                            const SCRRecordParams& aRecordParams );
       
   158     
       
   159     /**
       
   160     * Starts DVB-H recording.
       
   161     * @since Series 60 3.0
       
   162     * @param aSessionChk a session definition checksum.
       
   163     * @param aLiveParams is set of parameters required for DVB-H.
       
   164     * @param aRecordParams a parameters for recording.
       
   165     * @return KErrNone if successful,
       
   166     *         otherwise another of the system-wide  error codes.
       
   167     */
       
   168     TInt RecordDvbhStream( TUint& aSessionChk,
       
   169                            const SCRLiveParams& aLiveParams,
       
   170                            const SCRRecordParams& aRecordParams );
       
   171     
       
   172     /**
       
   173     * Pauses/Resumes recording.
       
   174     * @since Series 60 3.0
       
   175     * @param aSessionChk a session definition checksum.
       
   176     * @param aStart a start or end pausing.
       
   177     * @return KErrNone if successful,
       
   178     *         otherwise another of the system-wide  error codes.
       
   179     */
       
   180     TInt PauseRecordStream( const TUint aSessionChk,
       
   181                             const TBool& aStart );
       
   182 
       
   183     /**
       
   184     * Stops recording.
       
   185     * @since Series 60 3.0
       
   186     * @param aSessionChk a session definition checksum.
       
   187     * @return KErrNone if successful,
       
   188     *         otherwise another of the system-wide  error codes.
       
   189     */
       
   190     TInt StopRecordStream( const TUint aSessionChk );
       
   191 
       
   192     /**
       
   193     * Starts time shift mode.
       
   194     * @since Series 60 3.0
       
   195     * @param aTimeShiftChk a session definition checksum.
       
   196     * @param aSessionChk a session definition of existing session.
       
   197     * @return KErrNone if successful,
       
   198     *         otherwise another of the system-wide  error codes.
       
   199     */
       
   200     TInt StartTimeShift( TUint& aTimeShiftChk,
       
   201                          const TUint aSessionChk );
       
   202 
       
   203     /**
       
   204     * Stops time shift mode.
       
   205     * @since Series 60 3.0
       
   206     * @param aTimeShiftChk a session definition checksum.
       
   207     * @param aCurrentChk a session definition of existing session.
       
   208     * @return KErrNone if successful,
       
   209     *         otherwise another of the system-wide  error codes.
       
   210     */
       
   211     TInt StopTimeShift( const TUint aTimeShiftChk,
       
   212                         const TUint aCurrentChk );
       
   213 
       
   214     /**
       
   215     * Method for ordering "play" for packet source.
       
   216     * @since Series 60 3.0
       
   217     * @param aSessionChk a session definition checksum.
       
   218     * @param aStartPos is start position in seconds.
       
   219     * @param aEndPos is end position in seconds.
       
   220     * @return KErrNone if successful,
       
   221     *         otherwise another of the system-wide  error codes.
       
   222     */
       
   223     TInt PlayCommand( const TUint aSessionChk,
       
   224                       const TReal& aStartPos,
       
   225                       const TReal& aEndPos );
       
   226 
       
   227     /**
       
   228     * Method for ordering "pause" for packet source.
       
   229     * @since Series 60 3.0
       
   230     * @param aSessionChk a session definition checksum.
       
   231     * @return KErrNone if successful,
       
   232     *         otherwise another of the system-wide  error codes.
       
   233     */
       
   234     TInt PauseCommand( const TUint aSessionChk );
       
   235 
       
   236     /**
       
   237     * Method for ordering "stop" for packet source.
       
   238     * @since Series 60 3.0
       
   239     * @param aSessionChk a session definition checksum.
       
   240     * @return KErrNone if successful,
       
   241     *         otherwise another of the system-wide  error codes.
       
   242     */
       
   243     TInt StopCommand( const TUint aSessionChk );
       
   244 
       
   245     /**
       
   246     * Setter for play position of packet source.		 
       
   247     * @since Series 60 3.0
       
   248     * @param aSessionChk a session definition checksum.
       
   249     * @param aPosition a postion of RTP playback.
       
   250     * @param aDuration a duration of RTP clip.
       
   251     * @return KErrNone if successful,
       
   252     *         otherwise another of the system-wide  error codes.
       
   253     */
       
   254     TInt SetPosition( const TUint aSessionChk,
       
   255                       const TInt64 aPosition );
       
   256 
       
   257     /**
       
   258     * Getter for play position of packet source.
       
   259     * @since Series 60 3.0
       
   260     * @param aSessionChk a session definition checksum.
       
   261     * @param aPosition a postion of RTP playback.
       
   262     * @param aDuration a duration of RTP clip.
       
   263     * @return KErrNone if successful,
       
   264     *         otherwise another of the system-wide  error codes.
       
   265     */
       
   266     TInt GetPosition( const TUint aSessionChk,
       
   267                       TInt64& aPosition,
       
   268                       TInt64& aDuration );
       
   269 
       
   270     /**
       
   271     * Method for ordering closing a source and all sinks.
       
   272     * @since Series 60 3.0
       
   273     * @param aSessionChk a session definition checksum.
       
   274     * @return KErrNone if ok, otherwise system-wide error codes.
       
   275     */
       
   276     TInt CloseSession( const TUint aSessionChk );
       
   277 
       
   278     /**
       
   279     * Prepares rtp file playing as a live source.
       
   280     * @since Series 60 3.0
       
   281     * @param aSessionChk a session definition checksum.
       
   282     * @return KErrNone if successful,
       
   283     *         otherwise another of the system-wide  error codes.
       
   284     */
       
   285     TInt PlayNullSource( TUint& aSessionChk );
       
   286 
       
   287     /**
       
   288     * Prepares live IPTV PTSP stream to null sink.
       
   289     * @since Series 60 3.0
       
   290     * @param aSessionChk a session definition checksum.
       
   291     * @param aRtspParams a active live parameters.
       
   292     * @return KErrNone if successful,
       
   293     *         otherwise another of the system-wide  error codes.
       
   294     */
       
   295     TInt PlayRtspUrlToNullSink( TUint& aSessionChk,
       
   296                                 const SCRRtspParams& aRtspParams );
       
   297     };
       
   298 
       
   299 #endif // RCRSERVICE_H
       
   300 
       
   301 // End of File