email/imum/DomainApi/inc/ImumDaMailboxServicesImpl.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2006 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: ImumDaMailboxServicesImpl.h
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_IMUMDAMAILBOXSERVICESIMPL_H
       
    20 #define C_IMUMDAMAILBOXSERVICESIMPL_H
       
    21 
       
    22 #include <msvstd.h>
       
    23 #include "ImumDaMailboxServices.h"
       
    24 #include "ImumInternalApi.h"
       
    25 
       
    26 NONSHARABLE_CLASS( CImumDaMailboxServicesImpl ):
       
    27     public MImumDaMailboxServices
       
    28     {
       
    29     public:  // Constructors and destructor
       
    30 
       
    31         /**
       
    32          * Create object from CImumDaMailboxServicesImpl
       
    33          *
       
    34          * @since S60 3.2
       
    35          * @param aMailboxApi, Reference to internal api.
       
    36          * @return, Constructed object
       
    37          */
       
    38         static CImumDaMailboxServicesImpl* NewL( CImumInternalApi& aMailboxApi );
       
    39 
       
    40         /**
       
    41          * Creates object from CImumDaMailboxServicesImpl and leaves it to cleanup stack
       
    42          *
       
    43          * @since S60 3.2
       
    44          * @param aMailboxApi, Reference to internal api.
       
    45          * @return, Constructed object
       
    46          */
       
    47         static CImumDaMailboxServicesImpl* NewLC( CImumInternalApi& aMailboxApi );
       
    48 
       
    49         /**
       
    50          * Destructor
       
    51          * @since S60 3.2
       
    52          */
       
    53         virtual ~CImumDaMailboxServicesImpl();
       
    54 
       
    55     protected:  // Constructors
       
    56 
       
    57         /**
       
    58          * Default constructor for CImumDaMailboxServicesImpl
       
    59          *
       
    60          * @since S60 3.2
       
    61          * @param aMailboxApi, Reference to internal api.
       
    62          * @return, Constructed object
       
    63          */
       
    64         CImumDaMailboxServicesImpl( CImumInternalApi& aMailboxApi );
       
    65 
       
    66         /**
       
    67          * Symbian 2-phase constructor
       
    68          * @since S60 3.2
       
    69          */
       
    70         void ConstructL();
       
    71 
       
    72     public:  // From class MImumDaMailboxServices
       
    73 
       
    74         /**
       
    75          * Creates and prepares mailbox settings data object.
       
    76          * *** NOTE: Client is responsible to destroy the object after usage ***
       
    77          *
       
    78          * @since S60 v3.2
       
    79          * @param aProtocol, Any receiving protocol: Imap4 or Pop3.
       
    80          * @return Pointer to mailbox settings dataobject.
       
    81          * @leave EParamNotReceivingProtocol, If protocol receiving one.
       
    82          */
       
    83         CImumDaSettingsData* CreateSettingsDataL( const TUid& aProtocol ) const;
       
    84 
       
    85         /**
       
    86          * Validates the data and creates working mailbox to system.
       
    87          *
       
    88          * @since S60 v3.2
       
    89          * @param aSettingsData, Settings data object containing valid settings.
       
    90          */
       
    91         TMsvId CreateMailboxL( CImumDaSettingsData& aSettingsData ) const;
       
    92 
       
    93         /**
       
    94          * Sets the system's default mailbox (sending).
       
    95          *
       
    96          * @since S60 v3.2
       
    97          * @param aMailboxId, Id of the mailbox.
       
    98          * @leave EEntryNotFound, If the entry for the id can't be found.
       
    99          * @leave EEntryNotMailbox, If the id does not belong to mailbox.
       
   100          */
       
   101         void SetDefaultMailboxL( const TMsvId aMailboxId ) const;
       
   102 
       
   103     private:
       
   104 
       
   105         //Reference to internal Api
       
   106         CImumInternalApi &iMailboxApi;
       
   107         //not owned : shortcut to services
       
   108         MImumInMailboxServices* iServices;
       
   109 };
       
   110 
       
   111 #endif /* C_IMUMDAMAILBOXSERVICESIMPL_H */