msg_plat/smil_engine_api/inc/smilmediainterface.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2003 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: smilmediainterface  declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef SMILMEDIAINTERFACE_H
       
    21 #define SMILMEDIAINTERFACE_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 #include <smilregioninterface.h>
       
    27 #include <smilpresentation.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class MSmilActive;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  Abstract base class for media objects
       
    36 */
       
    37 class MSmilMedia
       
    38     {
       
    39     public:  
       
    40 
       
    41 		virtual CSmilPresentation* Presentation() const = 0;
       
    42 
       
    43 		/**
       
    44 		* Returns the region where this media is supposed to be rendered on. May be NULL.
       
    45 		*/ 
       
    46 		virtual MSmilRegion* GetRegion() const = 0;
       
    47 
       
    48 		/**
       
    49 		* Returns the rectangle (region) where the media is supposed to be rendered on.
       
    50 		*/
       
    51 		virtual TRect GetRectangle() const = 0;
       
    52 
       
    53 		/**
       
    54 		* Invoked by renderer to ask redrawing of area covered by the media. 
       
    55 		* This should be invoked when (visual) media appears, there are changes to it, and 
       
    56 		* when it is removed.
       
    57 		*/
       
    58 		virtual void Redraw() = 0;
       
    59 
       
    60 		/** 
       
    61 		* Invoked by a MSmillMediaRenderer object when there is a change 
       
    62 		* in (known) state of its intrinsic values. For example, duration of 
       
    63 		* video clip is not typically known until it is at least partially 
       
    64 		* decoded. This method should be invoked by the renderer when this 
       
    65 		* information becomes available.
       
    66 		*/
       
    67 		virtual void RendererDurationChangedL() = 0;
       
    68 
       
    69 		/**
       
    70 		* Invoked by a MSmillMediaRenderer object when the associated media 
       
    71 		* ends (end of the file or stream is reached). Renderer should also 
       
    72 		* move to frozen state at this point (that is, to keep showing the last 
       
    73 		* frame). 
       
    74 		*/
       
    75 		virtual void RendererAtEndL() = 0;
       
    76 
       
    77 		/**
       
    78 		 * Media URL
       
    79 		 */
       
    80 		virtual TPtrC Src() const = 0;
       
    81 
       
    82 		/**
       
    83 		 * Alt tag
       
    84 		 */
       
    85 		virtual TPtrC Alt() const = 0;
       
    86 		
       
    87 		/**
       
    88 		 * Type attribute. Should be used to override the media type 
       
    89 		 * checking in the media factory, for example
       
    90 		 * <img src="jee.jpg" type="image/gif"/>
       
    91 		 * should cause factory to try opening the image as gif.
       
    92 		 */
       
    93 		virtual TPtrC Type() const = 0;
       
    94 
       
    95 		/**
       
    96 		 * Invoke the ActivateL() method of iActive when delay aDelay has passed.
       
    97 		 */
       
    98 		virtual void AfterL(MSmilActive* iActive, const TSmilTime& aDelay, TBool aLazy = EFalse) = 0;
       
    99 
       
   100 		/**
       
   101 		 * Cancel a pending request
       
   102 		 */
       
   103 		virtual void CancelActive(MSmilActive* aActive) = 0;
       
   104 
       
   105 		/**
       
   106 		 * Get media parameter, or empty TPtrC if not found
       
   107 		 */
       
   108 		virtual TPtrC GetParam(const TDesC& aName) const = 0;
       
   109 		
       
   110 		/**
       
   111 		 * Returns begin time of media relative to presentation begin time.
       
   112 		 */
       
   113 		virtual TSmilTime MediaBegin() const = 0;
       
   114         
       
   115         /**
       
   116 		 * Returns end time of media relative to presentation begin time.
       
   117 		 */
       
   118 		virtual TSmilTime MediaEnd() const = 0;
       
   119     };
       
   120 
       
   121 #endif      // ?INCLUDE_H   
       
   122             
       
   123 // End of File
       
   124