os/mm/mmlibs/mmfw/src/ControllerFramework/MMFFormatImplementationInformationBody.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) 2006-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 #ifndef MMFFORMATIMPLEMENTATIONINFORMATIONBODY_H
    17 #define MMFFORMATIMPLEMENTATIONINFORMATIONBODY_H
    18 
    19 #include <e32base.h>
    20 #include <mmf/common/mmfcontrollerpluginresolver.h>
    21 
    22 /**
    23 This is the Body for CMMFFormatImplementationInformation. For descriptions of methods, see 
    24 CMMFFormatImplementationInformation itself.
    25 */
    26 NONSHARABLE_CLASS(CMMFFormatImplementationInformation::CBody) : public CBase
    27 	{
    28 public:
    29 	/**
    30 	Constructs a new format implementation information body object.
    31 
    32 	@return The new object created.
    33 	*/	
    34 	static CBody* NewL();
    35 
    36 	/**
    37 	Constructs a new format implementation information body object.
    38 
    39 	@return The new object created. Note that this will be on the cleanup stack.
    40 	*/	
    41 	static CBody* NewLC();
    42 
    43 	/** 
    44 	Destructor 
    45 	*/
    46 	virtual ~CBody();
    47 
    48 	// public functions forwarded from CMMFFormatImplementationInformation
    49 	const CDesC8Array& SupportedFileExtensions() const;
    50 	const CDesC8Array& SupportedMimeTypes() const;
    51 	const CDesC8Array& SupportedHeaderData() const;
    52 	TBool SupportsFileExtension(const TDesC8& aFileExtension) const;
    53 	TBool SupportsMimeType(const TDesC8& aMimeType) const;
    54 	TBool SupportsHeaderDataL(const TDesC8& aHeaderData) const;
    55 	TBool SupportsCustomInterfaces() const;
    56 	
    57 	/** 
    58 	Adds a file extension to the array of extensions supported by this format. 
    59 	*/
    60 	void AddFileExtensionL(const TDesC8& aData);
    61 
    62 	/**
    63 	Adds a mime type to the array of types supported by this format.
    64 	*/
    65 	void AddMimeTypeL(const TDesC8& aData);
    66 
    67 	/** 
    68 	Adds a chunk of header data to the array of chunks supported by this format.
    69 	*/
    70 	void AddHeaderDataL(const TDesC8& aData);
    71 	
    72 	/** 
    73 	Sets the flag that indicates whether custom interfaces are supported.
    74 	*/
    75 	void SetSupportsCustomInterfaces(const TBool aSupportsCustomInterfaces);
    76 
    77 protected:
    78 
    79 	/** 
    80 	Constructor 
    81 	*/
    82 	CBody();
    83 	
    84 	/** 
    85 	2nd phase constructor 
    86 	*/	
    87 	void ConstructL();
    88 	
    89 private:
    90 	/** 
    91 	The file extensions supported by this format. 
    92 	*/
    93 	CDesC8Array* iFileExtensions;
    94 
    95 	/** 
    96 	The mime types supported by this format. 
    97 	*/
    98 	CDesC8Array* iMimeTypes;
    99 
   100 	/** 
   101 	The header data chunks supported by this format. 
   102 	*/	
   103 	CDesC8Array* iHeaderData;
   104 
   105 	/** 
   106 	Indicates whether this format supports custom interfaces
   107 	*/	
   108 	TBool iSupportsCustomInterfaces;
   109 	};
   110 
   111 #endif