epoc32/include/mmf/common/mmfdurationinfocustomcommands.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 2004-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __MMF_DURATION_INFO_CUSTOM_COMMANDS_H__
    17 #define __MMF_DURATION_INFO_CUSTOM_COMMANDS_H__
    18 
    19 #ifdef SYMBIAN_CAF_V2
    20 
    21 #include <e32base.h>
    22 #include <mmf/common/mmcaf.h>
    23 #include <mmf/common/mmfstandardcustomcommands.h>
    24 
    25 
    26 /**
    27 @publishedAll
    28 @deprecated 9.2- Replaced by KUidInterfaceMMFDurationInfoControl2
    29 */
    30 
    31 const TUid KUidInterfaceMMFDurationInfoControl = {0x102737C8};
    32 
    33 /**
    34 @publishedPartner
    35 @released
    36 */
    37 
    38 const TUid KUidInterfaceMMFDurationInfoControl2 = {0x10273812};
    39 
    40 /**
    41 @internalComponent
    42 */
    43 enum TMMFDurationInfoMessages
    44 	{
    45 	EMMFGetDurationInfo
    46 	};
    47 	
    48 	
    49 /**
    50 @publishedPartner
    51 @released
    52 
    53 The duration state of the controller.
    54 */
    55 enum TMMFDurationInfo
    56 	{
    57 	EMMFDurationInfoValid, 		// Duration is known
    58 	EMMFDurationInfoUnknown,	// Invalid response from controller
    59 	EMMFDurationInfoInfinite,	// Clip is of infinite length
    60 	};
    61 
    62 /**
    63 @publishedAll
    64 @deprecated 9.2 - Replaced by MMMFDurationInfoCustomCommandImplementor2
    65 
    66 Mixin class to be derived from by controller plugins wishing to support the Duration information 
    67 custom commands
    68 */
    69 class MMMFDurationInfoCustomCommandImplementor
    70 	{
    71 public:
    72 
    73 	/**
    74 	Is the duration of the clip known? i.e. is the stream infinite?
    75 	
    76 	@param aDurationInfo
    77 		   Controller duration information
    78 		   
    79 	@return TMMFDurationInfo Duration state.
    80 	*/
    81 	virtual TMMFDurationInfo GetDurationInfo(TMMFDurationInfo& aDurationInfo)=0;
    82 	};
    83 
    84 /**
    85 @publishedAll
    86 @deprecated 9.2 - Replaced by CMMFDurationInfoCustomCommandParser2
    87 */
    88 class CMMFDurationInfoCustomCommandParser : public CMMFCustomCommandParserBase
    89 	{
    90 public:
    91 
    92 	/**
    93 	Creates a new custom command parser capable of processing duration information controller commands.
    94 
    95 	@param  aImplementor
    96 	        A reference to the controller plugin that owns this new object.
    97 
    98 	@return A pointer to the object created.
    99 
   100 	@since  9.1
   101 	*/
   102 	IMPORT_C static CMMFDurationInfoCustomCommandParser* NewL(MMMFDurationInfoCustomCommandImplementor& aImplementor);
   103 
   104 	/**
   105 	Destructor.
   106 
   107 	@since  9.1
   108 	*/
   109 	IMPORT_C ~CMMFDurationInfoCustomCommandParser();
   110 
   111 	/**
   112 	Handles a request from the client. Called by the controller framework.
   113 
   114 	@param  aMessage
   115 	        The message to be handled.
   116 
   117 	@since  9.1
   118 	*/
   119 	void HandleRequest(TMMFMessage& aMessage);
   120 
   121 private:
   122 	/**
   123 	Constructor.
   124 
   125 	@param  aImplementor
   126 	        A reference to the controller plugin that owns this new object.
   127 	@since  9.1
   128 	*/
   129 	CMMFDurationInfoCustomCommandParser(MMMFDurationInfoCustomCommandImplementor& aImplementor);
   130 	
   131 	/**
   132 	Request duration information from the implementor
   133 
   134 	@param  aMessage
   135 	        Message for writing results to the client.
   136 	*/
   137 	TInt GetDurationInfo(TMMFMessage& aMessage);
   138 
   139 private:
   140 
   141 	MMMFDurationInfoCustomCommandImplementor& iImplementor;
   142 	
   143 	};
   144 	
   145 /**
   146 @publishedPartner
   147 @released
   148 
   149 Mixin class to be derived from by controller plugins wishing to support the Duration information 
   150 custom commands
   151 */
   152 class MMMFDurationInfoCustomCommandImplementor2
   153 	{
   154 public:
   155 
   156 	/**
   157 	Is the duration of the clip known? i.e. is the stream infinite?
   158 	
   159 	@param aDurationInfo
   160 		   Controller duration information
   161 		   
   162 	@return KErrNone or System wide error code
   163 	*/
   164 	virtual TInt GetDurationInfo(TMMFDurationInfo& aDurationInfo)=0;
   165 	};
   166 	
   167 /**
   168 @publishedPartner
   169 @released
   170 
   171 Custom command parser capable of processing duration information controller commands
   172 */
   173 class CMMFDurationInfoCustomCommandParser2 : public CMMFCustomCommandParserBase
   174 	{
   175 public:
   176 
   177 	/**
   178 	Creates a new custom command parser capable of processing duration information controller commands.
   179 
   180 	@param  aImplementor
   181 	        A reference to the controller plugin that owns this new object.
   182 
   183 	@return A pointer to the object created.
   184 
   185 	@since  9.2
   186 	*/
   187 	IMPORT_C static CMMFDurationInfoCustomCommandParser2* NewL(MMMFDurationInfoCustomCommandImplementor2& aImplementor);
   188 
   189 	/**
   190 	Destructor.
   191 
   192 	@since  9.2
   193 	*/
   194 	IMPORT_C ~CMMFDurationInfoCustomCommandParser2();
   195 
   196 	/**
   197 	Handles a request from the client. Called by the controller framework.
   198 
   199 	@param  aMessage
   200 	        The message to be handled.
   201 
   202 	@since  9.2
   203 	*/
   204 	void HandleRequest(TMMFMessage& aMessage);
   205 
   206 private:
   207 	/**
   208 	Constructor.
   209 
   210 	@param  aImplementor
   211 	        A reference to the controller plugin that owns this new object.
   212 	@since  9.2
   213 	*/
   214 	CMMFDurationInfoCustomCommandParser2(MMMFDurationInfoCustomCommandImplementor2& aImplementor);
   215 	
   216 	/**
   217 	Request duration information from the implementor
   218 
   219 	@param  aMessage
   220 	        Message for writing results to the client.
   221 	*/
   222 	TInt GetDurationInfo(TMMFMessage& aMessage);
   223 
   224 private:
   225 	MMMFDurationInfoCustomCommandImplementor2& iImplementor;
   226 	};
   227 
   228 #endif // SYMBIAN_CAF_V2
   229 
   230 #endif // __MMF_DURATION_INFO_CUSTOM_COMMANDS_H__