msg_plat/smil_engine_api/inc/smilplayerinterface.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: smilplayerinterface  declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef SMILPLAYERINTERFACE
       
    21 #define SMILPLAYERINTERFACE
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <gdi.h>
       
    25 
       
    26 #include <smiltime.h>
       
    27 #include <smilanchor.h>
       
    28 
       
    29 #include <smilmediafactoryinterface.h>
       
    30 
       
    31 class CCoeControl;
       
    32 class CSmilPresentation;
       
    33 class MSmilTransitionFactory;
       
    34 
       
    35 /**
       
    36  * Callback interface between SMIL engine and player application.
       
    37  */
       
    38 class MSmilPlayer
       
    39 	{
       
    40 	public:
       
    41 		/**	
       
    42 		* Return the media factory object that is responsible of 
       
    43 		* creating the media renderers
       
    44 		*/
       
    45 		virtual MSmilMediaFactory* GetMediaFactory(const CSmilPresentation* aPres) const = 0;
       
    46 
       
    47 		/**	
       
    48 		* Return the transition factory object that is responsible of 
       
    49 		* creating the transition renderers
       
    50 		*/
       
    51 		virtual MSmilTransitionFactory* GetTransitionFactory(const CSmilPresentation* aPres) const = 0;
       
    52 
       
    53 		/**	
       
    54 		* Evaluate a content control attribute for true or false. 
       
    55 		* Attributes 
       
    56 		*		systemOperatingSystem
       
    57 		*		systemCPU
       
    58 		*		systemScreenSize 
       
    59 		*		systemScreenDepth 
       
    60 		* are handled inside the SMIL engine, the rest are passed to this method.
       
    61 		*/
       
    62 		virtual TBool EvaluateContentControlAttribute(const TDesC& aName, const TDesC& aValue) = 0;
       
    63 
       
    64 		/**	
       
    65 		* Return the dimensions of the drawing surface
       
    66 		*/
       
    67 		virtual TRect GetDimensions(const CSmilPresentation* aPres)	= 0;
       
    68 
       
    69 		/**	
       
    70 		* Return the EIKON GUI control that is used as the view for the given 
       
    71 		* presentation.
       
    72 		*
       
    73 		* SMIL Engine never calls this method. It might be used by 
       
    74 		* implementations of MSmilMediaRenderer interface.
       
    75 		*/
       
    76 		virtual CCoeControl* GetControl(const CSmilPresentation* aPres) = 0;
       
    77 
       
    78 		/**	
       
    79 		* The engine calls this method to initiate redrawing of the given area. 
       
    80 		* Implementation of this method should in turn call Draw method of the 
       
    81 		* given presentation object.
       
    82 		*/
       
    83 		virtual void Redraw(TRect aArea, CSmilPresentation* aPres) = 0;
       
    84 
       
    85 		/**	
       
    86 		* This method is called by the engine as a result of hyperlink activation.
       
    87 		* Player should open the given (relative to the presentation base) url. 
       
    88 		* However, the current presentation MUST NOT be deleted during execution 
       
    89 		* of this method, as this method is invoked by the current presentation,
       
    90 		* 
       
    91 		* aAnchor - contains addition information about the link. can be 0.
       
    92 		*
       
    93 		* source/destination states: 
       
    94 		* EPlay - (continue) play the presentation
       
    95 		* EStop - stop the source presentation or open destination presentation in stopped state
       
    96 		* EPause - pause the source presentation, continue it after, destination finishes
       
    97 		*
       
    98 		* 3GPP profile does not require respecting these states, aAnchor may be ignored
       
    99 		*/
       
   100 		
       
   101 		virtual void OpenDocumentL(const TDesC& aUrl, const CSmilAnchor* aAnchor, const CSmilPresentation* aPres) = 0;
       
   102 
       
   103 		enum TEventType
       
   104 			{
       
   105 			EStarted,
       
   106 			EStopped,
       
   107 			EPaused,
       
   108 			EResumed,
       
   109 			ESeeked,
       
   110 			EStalled,
       
   111 			EMediaNotFound,
       
   112 			EEndReached,
       
   113 			ELastSlideReached
       
   114 			};
       
   115 
       
   116 		/**	
       
   117 		* Invoked when a presentation state changes. aEvent is 
       
   118 		* EStarted - presentation started playing,
       
   119 		* EStopped - presentation was stopped,
       
   120 		* EPaused - presentation was paused
       
   121 		* EResumed - paused presentation was resumed
       
   122 		* ESeeked - presentation was seeked to a new position on timeline
       
   123 		* EMediaNotFound - opening media failed, aText contains the media url
       
   124 		* or
       
   125 		* EEndReached - presentation has reached its end time. whether it is paused or stopped depends
       
   126 		* on EndAction setting.
       
   127 		* one of the negative system wide error codes (from a trapped leave inside engine RunL() method). 
       
   128 		* In this case the playing presentation is stopped automatically and the presentation can not
       
   129 		* be restarted.
       
   130 		*/
       
   131 
       
   132 		virtual void PresentationEvent(TInt aEvent, const CSmilPresentation* aPres, const TDesC& aText = TPtrC()) = 0;
       
   133 
       
   134 
       
   135 	};
       
   136 #include <smiltransitionfactoryinterface.h>
       
   137 
       
   138 #endif