tsrc/musenginestub/inc/musengclipsession.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
    20 #define MUSHENGCLIPSESSION_H
    20 #define MUSHENGCLIPSESSION_H
    21 
    21 
    22 // USER
    22 // USER
    23 #include "musengmceoutsession.h"
    23 #include "musengmceoutsession.h"
    24 
    24 
       
    25 
       
    26 class MMusEngClipSessionObserver;
       
    27 class CMusEngLiveSession;
       
    28 class CMceFileSource;
       
    29 
    25 class CMusEngClipSession : public CMusEngMceOutSession
    30 class CMusEngClipSession : public CMusEngMceOutSession
    26     {
    31     {
    27     
    32 
    28     public:
    33     public:
    29 
    34 
    30         /**
    35         /**
    31         *
    36         *
       
    37         * @since S60 v3.2
    32         */
    38         */
    33         static CMusEngClipSession* NewL( 
    39         IMPORT_C static CMusEngClipSession* NewL(
    34                                 const TRect& aRect );
    40                                 const TDesC& aFileName,
    35                                                   
    41                                 const TRect& aRect,
       
    42                                 MMusEngClipSessionObserver* aSessionObserver,
       
    43                                 TUint aSipProfileId = 0 );
       
    44 
    36         /**
    45         /**
    37         *
    46         *
       
    47         * @since 3.2
    38         */
    48         */
    39         ~CMusEngClipSession();
    49         ~CMusEngClipSession();
       
    50 
       
    51 
       
    52     public: // new API
       
    53 
       
    54         /**
       
    55         * Sets file to be shared during session.
       
    56         * @pre Session must be established
       
    57         * @pre New file cannot be DRM protected
       
    58         * @leave One of the system wide error codes
       
    59         * @param aFileName Name of the file to be shared
       
    60         * @since S60 v3.2
       
    61         */
       
    62         IMPORT_C void ChangeClipL( const TDesC& aFileName );
       
    63 
       
    64         /**
       
    65         *
       
    66         * @since S60 v3.2
       
    67         */
       
    68         IMPORT_C void FastForwardL( TBool aUseFFWD );
       
    69 
       
    70         /**
       
    71         *
       
    72         * @since S60 v3.2
       
    73         */
       
    74         IMPORT_C void FastRewindL( TBool aUseFRWD );
       
    75 
       
    76         /**
       
    77         *
       
    78         * @since S60 v3.2
       
    79         */
       
    80         IMPORT_C TTimeIntervalSeconds PositionL();
       
    81 
       
    82         /**
       
    83         *
       
    84         * @since S60 v3.2
       
    85         */
       
    86         IMPORT_C TTimeIntervalSeconds DurationL();
       
    87 
       
    88         /**
       
    89         *
       
    90         * @since S60 v3.2
       
    91         */
       
    92         IMPORT_C void SetPositionL (const TTimeIntervalSeconds &aPosition);
       
    93 
       
    94 
       
    95     public:
       
    96 
       
    97         /**
       
    98         *
       
    99         * @since S60 v3.2
       
   100         */
       
   101         IMPORT_C void SetSessionObserver(
       
   102                                 MMusEngClipSessionObserver* aSessionObserver );
       
   103 
       
   104 
       
   105     public: // implementation of virtual API from CMusEngMceOutSession
       
   106 
       
   107         /**
       
   108         * Resumes previously paused session.
       
   109         * Continues showing file on display, resumes clip's audio, continues
       
   110         * playing file and enables streaming to network.
       
   111         *
       
   112         * @since S60 v3.2
       
   113         */
       
   114         IMPORT_C void PlayL();
       
   115 
       
   116         /**
       
   117         * Pauses session.
       
   118         * Holds display, mutes clip's audio, pauses file and
       
   119         * disables all streaming to network.
       
   120         *
       
   121         * @since S60 v3.2
       
   122         */
       
   123         IMPORT_C void PauseL();
       
   124 
       
   125 
       
   126     protected: // implementation of virtual helper from CMusEngMceOutSession
       
   127 
       
   128         /**
       
   129         *
       
   130         * @since S60 v3.2
       
   131         */
       
   132         void CompleteSessionStructureL();
    40 
   133 
    41 
   134 
    42     private:
   135     private:
    43 
   136 
    44         /**
   137         /**
    45         *
   138         *
       
   139         * @since S60 v3.2
    46         */
   140         */
    47         CMusEngClipSession( const TRect& aRect );
   141         CMusEngClipSession( MMusEngClipSessionObserver* aSessionObserver,
       
   142                             const TRect& aRect,
       
   143                             TUint aSipProfileId = 0 );
    48 
   144 
    49         /**
   145         /**
    50         * @leave KErrPermissionDenied if file is DRM protected
   146         * @leave KErrPermissionDenied if file is DRM protected
       
   147         * @since S60 v3.2
    51         */
   148         */
    52         void ConstructL();
   149         void ConstructL( const TDesC& aFileName );
    53 
   150 
    54 
   151 
    55         
   152     private: // HELPERS
       
   153 
       
   154         /**
       
   155         *
       
   156         * @since S60 v3.2
       
   157         */
       
   158         TBool IsProtectedFileL( const TDesC& aClipFile );
       
   159 
       
   160         /**
       
   161         * Constructs audio stream structure during session completion and adds
       
   162         * it to session.
       
   163         * @pre iSession != NULL
       
   164         * @pre iFileSource != NULL
       
   165         */
       
   166         void ConstructAudioStructureL();
       
   167 
       
   168     public: // Data
       
   169 
       
   170         CMceFileSource* iFileSource;
       
   171 
    56     };
   172     };
    57 
   173 
    58 #endif
   174 #endif
    59 
   175