emailservices/emailframework/inc/MFSMailBrandManager.h
changeset 72 64e38f08e49c
parent 65 478bc57ad291
child 75 47d84de1c893
equal deleted inserted replaced
65:478bc57ad291 72:64e38f08e49c
     1 /*
       
     2 * Copyright (c) 2007-2008 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 "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: This file defines class MFSMailBrandManager.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MFSMAILBRANDMANAGER_H
       
    20 #define MFSMAILBRANDMANAGER_H
       
    21 
       
    22 // INCLUDES
       
    23 //<cmail>
       
    24 #include "MailBrandManager.hrh"
       
    25 //</cmail>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CGulIcon;
       
    29 class TRgb;
       
    30 class TFSMailMsgId;
       
    31 
       
    32 /**
       
    33  *  Branding manager.
       
    34  *
       
    35  *  Branding manager is used to query different branding elements
       
    36  *  related to certain mail box.
       
    37  *
       
    38  *  @lib FSFWCommonLib
       
    39  *  @since S60 v3.1
       
    40  */
       
    41 class MFSMailBrandManager
       
    42 {
       
    43 
       
    44     public:
       
    45     
       
    46     /**
       
    47      * Destructor.
       
    48      */  
       
    49      virtual ~MFSMailBrandManager() { }
       
    50     
       
    51     /**
       
    52      * Returns a branded graphical element.
       
    53      *
       
    54      * @param aElement Id of the branded element. This identifies which
       
    55      *                 graphic user wishes to retrieve.
       
    56      * @param aMailBoxId mailbox whose branded element is retrieved.
       
    57      *
       
    58      * @return A pointer to a CGulIcon object. The caller of this method is 
       
    59      *         responsible of destroying the object. Returns NULL if the 
       
    60      *         brand doesn't contain the requested branding element.
       
    61      */
       
    62      virtual CGulIcon* GetGraphicL( TFSBrandElement aElement,
       
    63                                     const TFSMailMsgId& aMailboxId ) = 0;
       
    64 
       
    65      /**
       
    66       * Returns a branded graphical element.
       
    67       *
       
    68       * @param aElement Id of the branded element. This identifies which
       
    69       *                 graphic user wishes to retrieve.
       
    70       * @param aBrandId is the domain.
       
    71       *
       
    72       * @return A pointer to a CGulIcon object. The caller of this method is 
       
    73       *         responsible of destroying the object. Returns NULL if the 
       
    74       *         brand doesn't contain the requested branding element.
       
    75       */
       
    76       virtual CGulIcon* GetGraphicL( TFSBrandElement aElement,
       
    77                                      const TDesC& aBrandId ) = 0;
       
    78     
       
    79     /**
       
    80      * Returns a branded text element.
       
    81      *
       
    82      * @param aElement Id of the branded element. This identifies which
       
    83      *                 text user wishes to retrieve.
       
    84      * @param aMailBoxId mailbox whose branded element is retrieved.
       
    85      *
       
    86      * @return A TPtrC object. Returns TPtrC to a null descriptor if the
       
    87      *         brand doesn't contain the requested branding element.
       
    88      */
       
    89      virtual TPtrC GetTextL( TFSBrandElement aElement,
       
    90                             const TFSMailMsgId& aMailboxId ) = 0;
       
    91     
       
    92     /**
       
    93      * Returns a branded text element.
       
    94      * This function is for WhiteLabelBranding, because branded mailbox name is
       
    95      * needed before mailbox creation.
       
    96      * 
       
    97      * @param aElement Id of the branded element. This identifies which
       
    98      *                 text user wishes to retrieve.
       
    99      * @param aMailBoxId mailbox whose branded element is retrieved.
       
   100      *
       
   101      * @return A TPtrC object. Returns TPtrC to a null descriptor if the
       
   102      *         brand doesn't contain the requested branding element.
       
   103      */
       
   104      virtual TPtrC GetTextL( TFSBrandElement aElement, 
       
   105                             const TDesC& aBrandId ) = 0;
       
   106     
       
   107     /**
       
   108      * Returns a branded text element.
       
   109      *
       
   110      * @param aElement The id of the branded element. This identifies which
       
   111      *                 color user wishes to retrieve.
       
   112      * @param aMailBoxId mailbox whose branded element is retrieved.
       
   113      * @param aColor A reference to a TRgb object. The color is returned
       
   114      *               using this reference.
       
   115      *
       
   116      * @return Error code. KErrNotFound if the brand doesn't contain the requested
       
   117      *         branding element.
       
   118      */
       
   119      virtual TInt GetColorL( TFSBrandElement aElement,
       
   120                             const TFSMailMsgId& aMailboxId,
       
   121                             TRgb& aColor ) = 0;
       
   122     
       
   123     /**
       
   124      * This function will change 'mailbox name' as branded name.
       
   125      * If aMailboxId is NULL function goes through all mailboxes and check if mailbox is branded.
       
   126      * If it is, function will change 'mailbox name' as branded name.
       
   127      * This function should be called after mailbox settings has changed.
       
   128      * 
       
   129      * @param aMailboxId Id of the mailbox
       
   130      */
       
   131      virtual void UpdateMailboxNamesL(  const TFSMailMsgId aMailboxId ) = 0;
       
   132 
       
   133     /**
       
   134      * Returns branded graphic element of given type.
       
   135      *
       
   136      * @param aElementId brand element
       
   137      * @param aMailBoxId mailbox whose branded element is retrieved.     
       
   138      * @param aIconIds Icon path and ids
       
   139      *
       
   140      * @return Error code
       
   141      */
       
   142      virtual TInt GetGraphicIdsL( TFSBrandElement aElement,
       
   143                                   const TFSMailMsgId& aMailboxId,
       
   144                                   TDes& aIconIds  ) = 0;
       
   145 
       
   146     /**
       
   147      * Returns branded graphic element of given type.
       
   148      *
       
   149      * @param aElementId brand element
       
   150      * @param aBrandId Domain of email address.     
       
   151      * @param aIconIds Icon path and ids
       
   152      *
       
   153      * @return Error code
       
   154      */
       
   155      virtual TInt GetGraphicIdsL( TFSBrandElement aElement,
       
   156                                   const TDesC& aBrandId,
       
   157                                   TDes& aIconIds  ) = 0;        
       
   158 };
       
   159 
       
   160 
       
   161 #endif	// MFSMAILBRANDMANAGER_H