os/mm/mmplugins/mmfwplugins/src/Plugin/Controller/Video/AviPlayController/srtreader.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 /**
    17  @file
    18  @internalTechnology 
    19 */
    20 
    21 #ifndef SRTREADER_H
    22 #define SRTREADER_H
    23 
    24 #include <e32cmn.h> 
    25 #include <f32file.h>
    26 #include <e32lang.h> 
    27 
    28 #include "subtitlesource.h"
    29 
    30 /** The implementation of SRT subtitle source */ 
    31 NONSHARABLE_CLASS(CSrtReader) : public CBase, public MSubtitleSource
    32 {
    33 public:
    34     /** Allocates and constructs the object */
    35     static CSrtReader* NewL(const TDesC& aFilePath);
    36     
    37     /** Destructor */
    38     ~CSrtReader();
    39 
    40     /** Implementation of MSubtitleSource */
    41     TInt GetBuffer(TDes8& aBuffer);
    42     TInt SetPosition(TInt aPosition);
    43     TLanguage SubtitleLanguageL();
    44     void GetSupportedSubtitleLanguagesL(RArray<TLanguage>& aLanguages);
    45     void SetSubtitleLanguageL(TLanguage aLanguage);
    46 
    47 private:
    48     /** Default constructor */
    49     CSrtReader();
    50     
    51     /** Initialises the srt reader */
    52     void ConstructL(const TDesC& aFilePath);
    53     
    54 private:
    55     /** SRT file */
    56     RFile iSource;
    57     
    58     /** File session */
    59     RFs iFsSession;
    60 };
    61 
    62 #endif //__SRTREADER_H__
    63