meetingrequest/mrgui/inc/resmrstatic.h
branchRCL_3
changeset 12 4ce476e64c59
parent 11 0396474f30f5
child 13 8592a65ad3fb
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
     1 /*
       
     2 * Copyright (c) 2007-2009 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:  Static Tls data storage
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef RESMRSTATIC_H
       
    20 #define RESMRSTATIC_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class TESMRStaticData;
       
    25 class CESMRContactMenuHandler;
       
    26 class CESMRContactManagerHandler;
       
    27 class CFSMailClient;
       
    28 class CFSMailBox;
       
    29 
       
    30 /*
       
    31  * Proxy class to access TLS stored data
       
    32  */
       
    33 class RESMRStatic
       
    34     {
       
    35 public:
       
    36     /**
       
    37      *  C++ constructor
       
    38      */
       
    39     IMPORT_C RESMRStatic();
       
    40 
       
    41     /**
       
    42      * C++ destructor
       
    43      */
       
    44     IMPORT_C ~RESMRStatic();
       
    45 
       
    46 public: // interface
       
    47     /*
       
    48      * Retrieves stored data pointer from Tls, or creates new one
       
    49      * if called first time. Must be called before using this class.
       
    50      */
       
    51     IMPORT_C void ConnectL();
       
    52 
       
    53     /*
       
    54      * Closes this instance of static data handler.
       
    55      */
       
    56     IMPORT_C void Close();
       
    57 
       
    58     /*
       
    59      * Returns global instance of CESMRContactManagerHandler
       
    60      */
       
    61     IMPORT_C CESMRContactManagerHandler& ContactManagerHandlerL();
       
    62 
       
    63     /*
       
    64      * Returns global instance of CESMRContactMenuHandler
       
    65      */
       
    66     IMPORT_C CESMRContactMenuHandler& ContactMenuHandlerL();
       
    67 
       
    68     /*
       
    69      * Returns the current index for tracking  field
       
    70      */
       
    71     IMPORT_C TInt CurrentFieldIndex();
       
    72 
       
    73     /*
       
    74      * Sets the current index for tracking  field
       
    75      */
       
    76     IMPORT_C void SetCurrentFieldIndex(TInt aFieldIndex);
       
    77     
       
    78     IMPORT_C CFSMailBox& MailBoxL( const TDesC& aAddress );
       
    79 
       
    80 private: // Internal definitions
       
    81     /** 
       
    82      * Enumeration for cached data types 
       
    83      */
       
    84     enum TUsedType
       
    85         {
       
    86         EContactManagerHandler = 0x01,
       
    87         EContactMenuHandler = 0x04,
       
    88         EMailBoxHandler = 0x08
       
    89         };
       
    90     
       
    91     CFSMailClient& FSMailClientL( );
       
    92 
       
    93 private: // Data
       
    94     /*
       
    95      * Own: Pointer to Tls stored data pointer
       
    96      */
       
    97     TESMRStaticData* iStaticData;
       
    98 
       
    99     /*
       
   100      * Own: Used pointer types
       
   101      */
       
   102     TInt iUsedTypes;
       
   103     };
       
   104 
       
   105 #endif //RESMRSTATIC_H
       
   106 
       
   107 // EOF
       
   108