videofeeds/provisioningrecognizer/inc/IptvProvisioningRecognizer.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2006 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 the License "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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __CIPTVPROVISIONINGRECOGNIZER_H
       
    22 #define __CIPTVPROVISIONINGRECOGNIZER_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <apmrec.h>
       
    26 
       
    27 // DEFINITIONS
       
    28 
       
    29 // Uid of this dll (defined in .mmp file)
       
    30 const TUid KUidMimeIptvProvisioningRecognizer = { 0x10275126 };
       
    31 
       
    32 // Implementation uid for this recognizer
       
    33 const TInt KIptvProvRecImplUIDValue = 0x10281F19;
       
    34 const TUid KUidIptvProvRecImpl = { KIptvProvRecImplUIDValue };
       
    35 
       
    36 // Amount of mime types this recognizer can handle
       
    37 const TInt KIptvSupportedMimeTypes( 2 );
       
    38 
       
    39 // Exported mime types
       
    40 _LIT8( KIptvConfMimetypeSimple, "vnd.nokia.iptv.config+xml" );
       
    41 _LIT8( KIptvConfMimetypeApplication, "application/vnd.nokia.iptv.config+xml" );
       
    42 
       
    43 // Strings to be searched to recognize content
       
    44 _LIT8( KXmlFileDefinitionXml, "?xml" );
       
    45 _LIT8( KIptvNameSpace, "xmlns:nv=\"www.nokia.com/multimedia/video-service\"");
       
    46 
       
    47 /**
       
    48 *	Class to make recognisation for Ipvt provisioning xml file
       
    49 */
       
    50 class CIptvProvisioningRecognizer : public CApaDataRecognizerType
       
    51 	{
       
    52 	public:
       
    53 
       
    54     	/**
       
    55     	*	Default constructor. Calls CApaDataRecognizerType in it's initializer
       
    56     	*	list to complete construction
       
    57     	*/
       
    58     	CIptvProvisioningRecognizer();
       
    59     	
       
    60     	/**
       
    61     	*	Static method to create instance of this recognizer. This method is called
       
    62     	*	by the framework. Method pointer is delivered to the framework by
       
    63     	*	ImplementationTable table returned by ImplementationGroupProxy.
       
    64     	*	@param	None
       
    65     	*	@return	Pointer to newly created instance of the recognizer
       
    66     	*/
       
    67     	static CApaDataRecognizerType* CreateRecognizerL();
       
    68     	
       
    69     	/**
       
    70     	*	Method called by the framework. This method returns the amount of data
       
    71     	*	to be wanted for recognisation.
       
    72     	*	@param	None
       
    73     	*	@return	Preferred buffer size for recognisation
       
    74     	*/
       
    75     	virtual TUint PreferredBufSize();
       
    76     	
       
    77     	/**
       
    78     	*	Method to deliver supported data types by this recognizer.
       
    79     	*	@param	aIndex	Index pointing out which data type of the supported ones
       
    80     	*					is returned
       
    81     	*	@return	Corresponding data type of the requested index
       
    82     	*/
       
    83     	virtual TDataType SupportedDataTypeL( TInt aIndex ) const;
       
    84 
       
    85     private: // From CApaDataRecognizerType
       
    86 
       
    87     	/**
       
    88     	*	Overwritten method to handle recognisation.
       
    89     	*	@param	aName	The name of the data; typically this is a file name
       
    90     	*					containing the data to be recognized.
       
    91     	*	@param	aBuffer	Buffer containing PreferredBufSize() from the beginning
       
    92     	*					of the file to be recognized.
       
    93     	*	@return	None
       
    94     	*/
       
    95     	virtual void DoRecognizeL( const TDesC& aName, const TDesC8& aBuffer );
       
    96 	};
       
    97 	
       
    98 #endif // __CIPTVPROVISIONINGRECOGNIZER_H