diff -r 000000000000 -r 72b543305e3a email/mail/EditorSrc/cmsgmaileditorheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/email/mail/EditorSrc/cmsgmaileditorheader.h Thu Dec 17 08:44:11 2009 +0200 @@ -0,0 +1,106 @@ +/* +* Copyright (c) 2006 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: Mail editor header content handler. +* +*/ + +#ifndef C_CMSGMAILEDITORHEADER_H +#define C_CMSGMAILEDITORHEADER_H + +#include // CBase +#include // MMsgAttachmentModelObserver + +class CMsgMailEditorDocument; +class CMsgEditorView; +class TAdditionalHeaderStatus; + +/** + * Mail Editor UI header field handler. + * + * Manipulates content of mail editor header fields. + * + * @lib none + * @since S60 v3.1 + */ +class CMsgMailEditorHeader : public CBase, public MMsgAttachmentModelObserver + { +public: + + /** + * NewL + * Creates mail editor header fields + * @since S60 v3.1 + * @param aDocument reference to editor document. + * @param aView reference to editor view. + * @return self + */ + static CMsgMailEditorHeader* NewL( + CMsgMailEditorDocument& aDocument, + CMsgEditorView& aView ); + + ~CMsgMailEditorHeader(); + + /** + * Update visibility of mail editor address fields. + * + * @since S60 v3.1 + */ + void UpdateHeaderVisibilityL( + RPointerArray& aHeaders ); + + /** + * Update visibility of mail editor Reply-to field. + * + * @since S60 v3.2 + */ + void UpdateReplyToControlL(); + +// from base class MMsgAttachmentModelObserver + void NotifyChanges( + TMsgAttachmentCommand aCommand, + CMsgAttachmentInfo* aAttachmentInfo ); + RFile GetAttachmentFileL( TMsvAttachmentId aId ); + +private: + + CMsgMailEditorHeader( + CMsgMailEditorDocument& aDocument, + CMsgEditorView& aView); + void ConstructL(); + +private: // implementation + + void AddControlL( TInt aControlType ); + CMsgAttachmentControl* AttachmentControl() const; + void CreateHeadersL(); + void DoCreateAttachmentControlL(); + void DoRemoveAttachmentControlL(); + void UpdateAttachmentControlL( + TMsgAttachmentCommand aCommand, + CMsgAttachmentInfo* aAttachmentInfo ); + +private: // data + + /** + * Reference to mail editor document + */ + CMsgMailEditorDocument& iDocument; + + /** + * Reference to mail editor view + */ + CMsgEditorView& iView; + }; + +#endif // C_CMSGMAILEDITORHEADER_H