diff -r 000000000000 -r 72b543305e3a msg_plat/messaging_media_resolver_api/inc/MsgTextInfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/msg_plat/messaging_media_resolver_api/inc/MsgTextInfo.h Thu Dec 17 08:44:11 2009 +0200 @@ -0,0 +1,133 @@ +/* +* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Messaging Text Info class. +* +*/ + + + +#ifndef __MSGTEXTINFO_H +#define __MSGTEXTINFO_H + +// INCLUDES + +#include +#include + +#include + +// CONSTANTS + +// MACROS + +// FORWARD DECLARATIONS + +class RFile; +class TDataType; + +// DATA TYPES + +// FUNCTION PROTOTYPES + +// CLASS DECLARATION + +/** +* Messaging Text Info class. +* +* @lib MsgMedia.lib +* @since 3.1 +*/ +NONSHARABLE_CLASS( CMsgTextInfo ) : public CMsgMediaInfo + { + public: // New methods + + /** + * Factory method that creates this object. + * + * @param aFile IN File handle to create info class from. + * @param aMimeType IN Mime type of the file. + * @param aFs IN Reference to a file server session + * @return pointer to instance + */ + IMPORT_C static CMsgTextInfo* NewL( + RFile& aFile, + TDataType& aMimeType, + RFs& aFs ); + + /** + * Destructor + */ + virtual ~CMsgTextInfo(); + + /** + * Get character set + * + * @return charset + */ + inline TUint CharacterSet() const; + + /** + * Set character set + * This can be used to disable automatic character set recognition. + * + * @param aCharSet IN Character set CharConv id + */ + inline void SetCharacterSet( TUint aCharSet ); + + protected: + + /** + * From CActive + */ + void DoCancel(); + + /** + * From CActive + */ + void RunL(); + + protected: + + /** + * Constructor. + * + * @param aMimeType IN Mime type of the file. + * @param aFs IN Reference to a file server session + */ + CMsgTextInfo( TDataType& aMimeType, RFs& aFs ); + + /** + * 2nd phase constructor. + * + * @param aFile IN File handle to create info class from. + */ + void ConstructL( RFile& aFile ); + + /** + * Initialize members for empty instance. + */ + void ConstructEmpty(); + + protected: // data + + RFs& iFs; + TUint iCharSet; + TBool iCharSetRecognized; + + }; + +#include + +#endif // __MSGTEXTINFO_H