ipsservices/ipssosaoplugin/inc/IpsSosAOEMNResolver.h
changeset 0 8466d47a6819
child 24 d189ee25cf9d
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 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: 
       
    15 *     Contains mailbox specified always online logic
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef IPSSOSAOEMNRESOLVER_H_
       
    21 #define IPSSOSAOEMNRESOLVER_H_
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 class CIpsSosAOMBoxLogic;
       
    27 
       
    28 /**
       
    29 *  This class handles OMA Email Notification messages.
       
    30 *
       
    31 */
       
    32 class CIpsSosAOEMNResolver : public CBase
       
    33     {
       
    34     public: 
       
    35 
       
    36         /**
       
    37         * Creates object from CIpsSosAOEMNResolver 
       
    38         * and leaves it to cleanup stack
       
    39         * @return, Constructed object
       
    40         */
       
    41         static CIpsSosAOEMNResolver* NewLC();
       
    42 
       
    43         /**
       
    44         * Creates object from CIpsSosAOEMNResolver
       
    45         * @return, Constructed object
       
    46         */
       
    47         static CIpsSosAOEMNResolver* NewL();
       
    48 
       
    49         /**
       
    50         * 
       
    51         */
       
    52         virtual ~CIpsSosAOEMNResolver();
       
    53 
       
    54     public: 
       
    55     
       
    56         /**
       
    57         * @param aMailboxURI Received mailbox URI and timestamp
       
    58         * @param aMailboxLogics Array of mailbox logic instances
       
    59         * @return index of correct mailbox or KErrNotFound
       
    60         */
       
    61         TInt FindEMNMailbox( const TDesC& aMailboxURI, 
       
    62                 const RPointerArray<CIpsSosAOMBoxLogic>& aMailboxLogics );
       
    63             
       
    64         /**
       
    65         * Dispatches TEMNElement struct
       
    66         * @param aParameters Received mailbox URI and timestamp
       
    67         * @param aElement Dispatched mailbox URI and timestamp
       
    68         * @return KErrNone, if dispatching is ok
       
    69         */
       
    70         TInt ParameterDispatchTEMNElement( 
       
    71             const TDesC8& aParameters,
       
    72             TEMNElement& aElement ) const;
       
    73 
       
    74     private:
       
    75 
       
    76         /**
       
    77         * 
       
    78         */
       
    79         CIpsSosAOEMNResolver();
       
    80 
       
    81         /**
       
    82         *
       
    83         */
       
    84         void ConstructL();
       
    85 
       
    86     private: 
       
    87         
       
    88         /**
       
    89         * Checks whether the given username and server is found from given URI
       
    90         * @param aURI, mailbox URI
       
    91         * @param aUsername
       
    92         * @param aServer
       
    93         * @return TBool, if aUsername and aServer is found from aURI
       
    94         */
       
    95         TBool HandleEmnImapUserURI(
       
    96             const TDesC& aURI,
       
    97             const TDesC8& aUsername,
       
    98             const TDesC& aServer ) const;
       
    99 
       
   100         /**
       
   101         * Checks whether the given username and server is found from given URI
       
   102         * @param aURI, mailbox URI
       
   103         * @param aUsername
       
   104         * @param aServer
       
   105         * @return TBool, if aUsername and aServer is found from aURI
       
   106         */
       
   107         TBool HandleEmnPopUserURI(
       
   108             const TDesC& aURI,
       
   109             const TDesC8& aUsername,
       
   110             const TDesC& aServer ) const;
       
   111 
       
   112         /**
       
   113         * Checks whether the given username and server is found from given URI
       
   114         * @param aURI, mailbox URI
       
   115         * @param aUsername
       
   116         * @param aServer
       
   117         * @return TBool, if aUsername and aServer is found from aURI
       
   118         */
       
   119         TBool HandleEmnPopNoAuthURI( 
       
   120             const TDesC& aURI,
       
   121             const TDesC8& aUsername,
       
   122             const TDesC& aServer ) const;
       
   123             
       
   124     };
       
   125 
       
   126 #endif /*IPSSOSAOEMNRESOLVER_H_*/