omacp/omacpadapters/EmailAdapter/Inc/CWPEmailSaveSmtpImapItem.h
changeset 0 3ce708148e4d
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Save SMTP/IMAP settings
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CSAVESMTPIMAPITEM_H
       
    21 #define CSAVESMTPIMAPITEM_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "CWPEmailSaveItem.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CWPEmailItem;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  CSaveSmtpImapItem class.
       
    33 *
       
    34 *  @lib WPEmailAdapter.lib
       
    35 *  @since 2.0
       
    36 */
       
    37 class CSaveSmtpImapItem : public CWPEmailSaveItem
       
    38     {
       
    39     public:  // Constructors and destructor
       
    40 
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         * @param aSmtpItem SMTP setting item. Ownership not taken, Panic if NULL
       
    44         * @param aImapItem IMAP setting item. Ownership not taken, Panic if NULL
       
    45         * @return self
       
    46         */
       
    47         static CSaveSmtpImapItem* NewLC(CWPEmailItem* aSmtpItem, CWPEmailItem* aImapItem);
       
    48         
       
    49         /**
       
    50         * Constructor. See params from NewLC
       
    51         */
       
    52         CSaveSmtpImapItem(CWPEmailItem* aSmtpItem, CWPEmailItem* aImapItem);
       
    53         
       
    54         /**
       
    55         * Destructor.
       
    56         */
       
    57         virtual ~CSaveSmtpImapItem();
       
    58 
       
    59     public: // From CWPEmailSaveItem
       
    60         /**
       
    61         * From CWPEmailSaveItem
       
    62         */        
       
    63         void SaveL(CMsvSession* aSession);
       
    64 
       
    65         /**
       
    66         * From CWPEmailSaveItem
       
    67         */        
       
    68         TBool ValidateL();
       
    69 
       
    70         /**
       
    71         * From CWPEmailSaveItem
       
    72         */        
       
    73         const TDesC& SummaryText();
       
    74 
       
    75     private: // New functions
       
    76         /**
       
    77         * Validate smtp data
       
    78         */
       
    79         TBool ValidateSmtpItemL();
       
    80         /**
       
    81         * Validate imap data
       
    82         */
       
    83         TBool ValidateImapItemL();
       
    84         
       
    85     private: // Constructor
       
    86 
       
    87         /**
       
    88         * By default Symbian 2nd phase constructor is private.
       
    89         */
       
    90         void ConstructL();
       
    91 
       
    92     private: //Data
       
    93         /**
       
    94         * ref: SMTP setting item.
       
    95         */
       
    96         CWPEmailItem* iSmtpItem;
       
    97         /**
       
    98         * ref: POP setting item.
       
    99         */
       
   100         CWPEmailItem* iImapItem;
       
   101     };
       
   102 
       
   103 #endif      // CSAVESMTPIMAPITEM_H   
       
   104             
       
   105 // End of File