ipsservices/ipssosplugin/inc/ipsplgimap4plugin.h
changeset 0 8466d47a6819
child 24 d189ee25cf9d
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007 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 CIpsPlgImap4Plugin.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef IPSPLGIMAP4PLUGIN_H
       
    20 #define IPSPLGIMAP4PLUGIN_H
       
    21 
       
    22 #include "ipsplgsosbaseplugin.h"
       
    23     
       
    24 class CIpsPlgImap4Plugin : public CIpsPlgSosBasePlugin
       
    25 {
       
    26 public:
       
    27 
       
    28 	IMPORT_C static CIpsPlgImap4Plugin* NewL();
       
    29     IMPORT_C static CIpsPlgImap4Plugin* NewLC();
       
    30 
       
    31     /**
       
    32     * Destructor.
       
    33     */
       
    34     virtual ~CIpsPlgImap4Plugin();
       
    35     
       
    36 public: // From CFSMailPlugin
       
    37 
       
    38     TBool MailboxHasCapabilityL(
       
    39         TFSMailBoxCapabilities aCapability,
       
    40         TFSMailMsgId aMailBoxId );
       
    41 
       
    42     TInt RefreshNowL( );
       
    43 
       
    44     void RefreshNowL(
       
    45         const TFSMailMsgId& aMailBoxId,
       
    46         MFSMailRequestObserver& aOperationObserver,
       
    47         TInt aRequestId );
       
    48 
       
    49     void ListFoldersL(
       
    50         const TFSMailMsgId& aMailBoxId,
       
    51         const TFSMailMsgId& aFolderId,
       
    52         RPointerArray<CFSMailFolder>& aFolderList );
       
    53 
       
    54     void ListFoldersL(
       
    55         const TFSMailMsgId& aMailBoxId,
       
    56         RPointerArray<CFSMailFolder>& aFolderList );
       
    57 
       
    58     TFSMailMsgId GetStandardFolderIdL(
       
    59         const TFSMailMsgId& aMailBoxId,
       
    60         const TFSFolderType aFolderType );
       
    61 
       
    62     void FetchMessagesL(
       
    63         const TFSMailMsgId& aMailBoxId,
       
    64         const TFSMailMsgId& aFolderId,
       
    65         const RArray<TFSMailMsgId>& aMessageIds,
       
    66         TFSMailDetails aDetails,
       
    67         MFSMailRequestObserver& aObserver,
       
    68         TInt aRequestId );
       
    69 
       
    70     void FetchMessagePartsL(
       
    71         const TFSMailMsgId& aMailBoxId,
       
    72         const TFSMailMsgId& aFolderId,
       
    73         const TFSMailMsgId& aMessageId,
       
    74         const RArray<TFSMailMsgId>& aMessagePartIds,
       
    75         MFSMailRequestObserver& aOperationObserver,
       
    76         const TInt aRequestId,
       
    77         const TUint aPreferredByteCount);
       
    78     
       
    79     
       
    80     void MoveMessagesL(
       
    81         const TFSMailMsgId& aMailBoxId, 
       
    82         const RArray<TFSMailMsgId>& aMessageIds, 
       
    83         const TFSMailMsgId& aSourceFolderId, 
       
    84         const TFSMailMsgId& aDestinationFolderId );
       
    85     
       
    86     TInt MoveMessagesL( 
       
    87         const TFSMailMsgId& aMailBoxId,
       
    88         const RArray<TFSMailMsgId>& aMessageIds, 
       
    89         const TFSMailMsgId& aSourceFolderId,
       
    90         const TFSMailMsgId& aDestinationFolderId,
       
    91         MFSMailRequestObserver& aOperationObserver,
       
    92         TInt aRequestId );
       
    93     
       
    94     void PopulateNewMailL( 
       
    95         const TFSMailMsgId& aMailboxId, 
       
    96         TMsvId aNewId, 
       
    97         TMsvId aParentId );
       
    98     
       
    99 protected:
       
   100 
       
   101     /**
       
   102      *
       
   103      */
       
   104     void HandleOpCompletedL(
       
   105         CIpsPlgSingleOpWatcher& aOpWatcher,
       
   106         TInt aCompletionCode );    
       
   107     
       
   108 private:
       
   109 
       
   110 
       
   111     CIpsPlgImap4Plugin( );
       
   112 
       
   113     void ConstructL( );
       
   114 
       
   115     /**
       
   116      * List subfolders of given id. Only direct subfolders of given folder are returned.
       
   117      *
       
   118      * @param aMailBoxId defines mailbox where parent folder is.
       
   119      * @param aFolderId defines parent folder id, otherwise KFolderIdNull.
       
   120      * @param aFolderList plugin writes results in this array given by user.
       
   121      */
       
   122     void DoListFoldersL(
       
   123         TFSMailMsgId aMailBoxId,
       
   124         TFSMailMsgId aFolderId,
       
   125         RPointerArray<CFSMailFolder>& aFolderList,
       
   126         TBool aOnlyDirect );
       
   127 
       
   128     /**
       
   129      * Adds folders to list.
       
   130      *
       
   131      * @param aId defines parent folder id.
       
   132      * @param aFolders array of folder entry IDs.
       
   133      */
       
   134     void HandleFoldersL(
       
   135         TFSMailMsgId aId,
       
   136         CMsvEntrySelection& aFolders,
       
   137         TBool aOnlyDirect );
       
   138 
       
   139     /**
       
   140      * Checks children recursively.
       
   141      *
       
   142      * @param aId defines parent folder id.
       
   143      * @param aEntry defines parent folder entry.
       
   144      * return List of child folders.
       
   145      */
       
   146     CMsvEntrySelection* GetChildrenL(
       
   147         TMsvId aId,
       
   148         CMsvEntry& aEntry,
       
   149         TBool aOnlyDirect ) const;
       
   150 
       
   151     /**
       
   152      * Checks if folder has subfolder entries.
       
   153      *
       
   154      * @param aId defines parent folder id.
       
   155      * return ETrue if folder has subfolder.
       
   156      */
       
   157     TBool HasChildFoldersL( TMsvId aId ) const; 
       
   158     
       
   159     
       
   160 private: // data
       
   161 
       
   162   };
       
   163 
       
   164 #endif /* IPSPLGIMAP4PLUGIN_H */
       
   165 
       
   166 // End of File