emailservices/emailcommon/inc/CFSMailBoxBase.h
changeset 20 ecc8def7944a
parent 18 578830873419
child 62 a8c646b56683
equal deleted inserted replaced
18:578830873419 20:ecc8def7944a
     1 /*
     1 /*
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    21 
    21 
    22 // <qmail>
    22 // <qmail>
    23 #include <QExplicitlySharedDataPointer>
    23 #include <QExplicitlySharedDataPointer>
    24 #include <e32base.h>
    24 #include <e32base.h>
    25 #include "CFSMailCommon.h"
    25 #include "CFSMailCommon.h"
       
    26 #include "cemailextensionbase.h"
    26 
    27 
    27 class NmMailboxPrivate;
    28 class NmMailboxPrivate;
    28 class NmMailbox;
    29 class NmMailbox;
    29 class CFSMailAddress;
    30 class CFSMailAddress;
    30 class MMRInfoProcessor;
    31 class MMRInfoProcessor;
    35  *
    36  *
    36  *  @lib FSFWCommonLib
    37  *  @lib FSFWCommonLib
    37  *  @since S60 S60 v3.1
    38  *  @since S60 S60 v3.1
    38  */
    39  */
    39 
    40 
    40 NONSHARABLE_CLASS ( CFSMailBoxBase ) : public CBase
    41 NONSHARABLE_CLASS ( CFSMailBoxBase ) : public CExtendableEmail
    41 {
    42 {
    42  public:
    43  public:
    43 
    44   
    44     /**
    45     /**
    45      * Two-phased constructor.
    46      * Two-phased constructor.
    46      *
    47      *
    47      * @param aMailBoxId mailbox id in plugin containing mailbox
    48      * @param aMailBoxId mailbox id in plugin containing mailbox
    48      */
    49      */
    49      IMPORT_C static CFSMailBoxBase* NewL( const TFSMailMsgId aMailBoxId );
    50      IMPORT_C static CFSMailBoxBase* NewL(const TFSMailMsgId aMailBoxId);
    50 
    51   	
    51     /**
    52     /**
    52      * Two-phased constructor.
    53      * Two-phased constructor.
    53      *
    54      *
    54      * @param aMailBoxId mailbox id in plugin containing mailbox
    55      * @param aMailBoxId mailbox id in plugin containing mailbox
    55      */
    56      */
    56      IMPORT_C static CFSMailBoxBase* NewLC( const TFSMailMsgId aMailBoxId );
    57      IMPORT_C static CFSMailBoxBase* NewLC(const TFSMailMsgId aMailBoxId);
    57 
    58 
    58     /**
    59     /**
    59      * Destructor.
    60      * Destructor.
    60      */
    61      */  
    61      IMPORT_C virtual ~CFSMailBoxBase();
    62      IMPORT_C virtual ~CFSMailBoxBase();
    62 
    63   	
    63     /**
    64     /**
    64      * mailbox id accessor
    65      * mailbox id accessor
    65      *
    66      *
    66      * @return mailbox id
    67      * @return mailbox id
    67      */
    68      */
    68      IMPORT_C TFSMailMsgId GetId() const;
    69      IMPORT_C TFSMailMsgId GetId( ) const;
    69 
    70 
    70     /**
    71     /**
    71      * mailbox name accessor
    72      * mailbox name accessor
    72      *
    73      *
    73      * @return mailbox name
    74      * @return mailbox name
    74      */
    75      */
    75      IMPORT_C TDesC& GetName() const;
    76      IMPORT_C TDesC& GetName( ) const;
    76 
    77 
    77     /**
    78     /**
    78      * mailbox name mutator
    79      * mailbox name mutator
    79      *
    80      *
    80      * @param aMailBoxName mailbox name
    81      * @param aMailBoxName mailbox name
    81      */
    82      */
    82      IMPORT_C void SetName( const TDesC& aMailBoxName );
    83      IMPORT_C void SetName( const TDesC& aMailBoxName );
    83 
    84 	 		
    84     /**
    85     /**
    85      * retuns mailbox status accessor
    86      * retuns mailbox status accessor
    86      *
    87      *
    87      * @return mailbox status
    88      * @return mailbox status
    88      */
    89      */
    89      IMPORT_C TFSMailBoxStatus GetStatus() const;
    90      IMPORT_C TFSMailBoxStatus GetStatus( ) const;
    90 
    91 
    91     /**
    92     /**
    92      * mailbox status mutator
    93      * mailbox status mutator
    93      *
    94      *
    94      * @param aStatus mailbox status
    95      * @param aStatus mailbox status
    95      */
    96      */
       
    97      //<cmail>
       
    98      //function definition is empty, we need to remove it if not needed
       
    99      //</cmail>
    96      IMPORT_C void SetStatus( const TFSMailBoxStatus aStatus );
   100      IMPORT_C void SetStatus( const TFSMailBoxStatus aStatus );
    97 
   101 
    98     /*
   102 	/*
    99      * Function to set context of Remote Contact Lookup service for
   103 	 * Function to set context of Remote Contact Lookup service for
   100      * this mailbox for protocol plugins.
   104 	 * this mailbox for protocol plugins.
       
   105 	 *
       
   106 	 * @param aProtocolUid specifies Ecom implementation UID of
       
   107 	 *	      "Remote Contact Lookup Protocol Adaptation API" to use.
       
   108 	 * @param aMailBoxId mailbox id in plugin
       
   109 	 */
       
   110      IMPORT_C void SetRCLInfo(const TUid aProtocolUid, const TUint aMailBoxId);
       
   111  
       
   112 	/*
       
   113      * Function to retrieve Remote Contact Lookup service context for
       
   114      * this mailbox.
   101      *
   115      *
   102      * @param aProtocolUid specifies Ecom implementation UID of
   116      * @param aProtocolUid specifies Ecom implementation UID of
   103      *        "Remote Contact Lookup Protocol Adaptation API" to use.
   117      *        "Remote Contact Lookup Protocol Adaptation API" to use.
   104      * @param aMailBoxId mailbox id in plugin
   118      * @param aMailBoxId mailbox id in plugin
   105      */
   119      */
   106      IMPORT_C void SetRCLInfo( const TUid aProtocolUid, const TUint aMailBoxId );
   120      IMPORT_C void GetRCLInfo(TUid& aProtocolUid, TUint& aAccountUid);
   107 
       
   108      /*
       
   109      * Function to retrieve Remote Contact Lookup service context for
       
   110      * this mailbox.
       
   111      *
       
   112      * @param aProtocolUid specifies Ecom implementation UID of
       
   113      *        "Remote Contact Lookup Protocol Adaptation API" to use.
       
   114      * @param aMailBoxId mailbox id in plugin
       
   115      */
       
   116      IMPORT_C void GetRCLInfo( TUid& aProtocolUid, TUint& aAccountUid );
       
   117 
   121 
   118     /**
   122     /**
   119      * returns settings view id for mailbox
   123      * returns settings view id for mailbox
   120      *
   124      *
   121      * @return settings view id
   125      * @return settings view id
   125     /**
   129     /**
   126      * sets settings view id for mailbox
   130      * sets settings view id for mailbox
   127      *
   131      *
   128      * @param aUid settings view id
   132      * @param aUid settings view id
   129      */
   133      */
   130      IMPORT_C void SetSettingsUid( const TUid aUid );
   134      IMPORT_C void SetSettingsUid(const TUid aUid);
   131 
   135 
   132     /**
   136 	/**
   133      * Returns a meeting request info processor, which is used for replying
   137 	 * Returns a meeting request info processor, which is used for replying
   134      * to meeting request received as MMRInfoObjet
   138 	 * to meeting request received as MMRInfoObjet
   135      *
   139 	 *
   136      * @return meeting info Processor, NULL if not supported by plugin
   140 	 * @return meeting info Processor, NULL if not supported by plugin
   137      *         ownership not transferred
   141 	 *         ownership not transferred
   138      */
   142 	 */ 
   139      IMPORT_C MMRInfoProcessor& MRInfoProcessorL();
   143      IMPORT_C MMRInfoProcessor& MRInfoProcessorL();
   140 
   144 
   141     /**
   145     /**
   142      * method to cheack if MRInfoProcessor is set
   146      * method to cheack if MRInfoProcessor is set
   143      *
   147      *
   144      * @return
   148      * @return
   145      */
   149      */
   146      IMPORT_C TBool IsMRInfoProcessorSet();
   150 	 IMPORT_C TBool IsMRInfoProcessorSet();
   147 
   151 
   148     /**
   152 	/**
   149      * Meeting request info processor mutator
   153 	 * Meeting request info processor mutator
   150      *
   154 	 *
   151      * @param aMrInfoProcessor meeting info Processor, ownership transferred
   155 	 * @param aMrInfoProcessor meeting info Processor, ownership transferred
   152      */
   156 	 */ 
   153      IMPORT_C void SetMRInfoProcessorL( MMRInfoProcessor* aMrInfoProcessor );
   157 	 IMPORT_C void SetMRInfoProcessorL(MMRInfoProcessor* aMrInfoProcessor);
   154 
   158 
   155      /**
   159     /**
   156       * mailbox own address accessor
   160      * mailbox own address accessor
   157       *
   161      *
   158       * @return mailbox own address
   162      * @return mailbox own address
   159       */
   163      */
   160       IMPORT_C CFSMailAddress& OwnMailAddress();
   164      IMPORT_C CFSMailAddress& OwnMailAddress( );
   161     
   165 
   162     /**
   166     /**
   163      * mailbox own address mutator
   167      * mailbox own address mutator
   164      *
   168      *
   165      * @param aOwnMailAddress mailbox own address
   169      * @param aOwnMailAddress mailbox own address
   166      */
   170      */
   167      IMPORT_C void SetOwnMailAddressL( CFSMailAddress* aOwnMailAddress );
   171      IMPORT_C void SetOwnMailAddressL( CFSMailAddress* aOwnMailAddress);
   168     
   172     
   169     /**
   173     /**
   170      * returns nmmailbox constructed with shared data,
   174      * returns nmmailbox constructed with shared data,
   171      * ownership is transferred to caller
   175      * ownership is transferred to caller
   172      */
   176      */
   179     /**
   183     /**
   180      * C++ default constructor.
   184      * C++ default constructor.
   181      */
   185      */
   182      CFSMailBoxBase();
   186      CFSMailBoxBase();
   183 
   187 
   184     /**
   188      /**
   185      * branding id accessor
   189       * branding id accessor
   186      */
   190       */
   187      TDesC& BrandingId();
   191       TDesC& BrandingId();
   188 
   192 
   189 // <qmail> Removed SetMailBoxId </qmail>
   193 // <qmail> Removed SetMailBoxId </qmail>
   190 protected: // data
   194 protected: // data
   191 
   195 
   192 protected: // <cmail>
   196 protected: // <cmail>
   193 
   197 
   194     /**
   198   	/**
   195      * Two-phased constructor
   199      * Two-phased constructor
   196      */
   200      */
   197      void ConstructL( const TFSMailMsgId aMailBoxId );
   201   	 void ConstructL( const TFSMailMsgId aMailBoxId );
   198 
   202   	 
   199 private: // data
   203 private: // data
   200 
   204  	
   201     /**
   205 	/**
   202      * mailbox name
   206      * mailbox name
   203      */
   207      */
   204      HBufC*               iMailBoxName;
   208 	 HBufC*	              iMailBoxName;
   205 
   209 
   206 
   210 	 
   207     /**
   211 	/**
   208      * remote contact lookup info
   212      * remote contact lookup info
   209      */
   213      */
   210      TUid                 iProtocolUid;
   214      TUid                 iProtocolUid;
   211      TUint                iAccountUid;
   215      TUint 	              iAccountUid;
   212 
   216 	
   213     /**
   217 	/**
   214      * settings uid
   218      * settings uid
   215      */
   219      */
   216      TUid                 iSettingsUid;
   220      TUid                 iSettingsUid;
   217 
   221 
   218      /**
   222 	/**
   219      * Meeting request info
   223      * Meeting request info
   220      */
   224      */
   221      MMRInfoProcessor*    iMRInfoProcessor;
   225      MMRInfoProcessor*    iMRInfoProcessor;
   222 
   226 
   223     /**
   227 	/**
   224      * mailbox own address
   228      * mailbox own address
   225      */
   229      */
   226      CFSMailAddress*      iOwnMailAddress;
   230 	 CFSMailAddress*      iOwnMailAddress;
   227 
   231 
   228     /**
   232 	 /**
   229      * branding id
   233 	  * branding id
   230      */
   234 	  */
   231      HBufC*                iBrId;
   235 	 HBufC*                iBrId;
   232 
   236 
   233     /**
   237     /**
   234      * Reference to QT side of the mailbox object.
   238      * Reference to QT side of the mailbox object.
   235      */
   239      */
   236      // <qmail>
   240      // <qmail>
   240     /**
   244     /**
   241      * Copy to mailbox name. 
   245      * Copy to mailbox name. 
   242      * Variable is mutable in order to maintain 
   246      * Variable is mutable in order to maintain 
   243      * binary compatibility in this API
   247      * binary compatibility in this API
   244      */
   248      */
       
   249 // <qmail>
   245      mutable TPtrC16 iTextPtr;
   250      mutable TPtrC16 iTextPtr;
       
   251 // </qmail>
   246 
   252 
   247 // <qmail> Removed iMailBoxId </qmail>
   253 // <qmail> Removed iMailBoxId </qmail>
   248 };
   254 };
   249 
   255 
   250 #endif  // __CFSMAILBOXBASE_H
   256 #endif 	// __CFSMAILBOXBASE_H