vmbx/vmbxengine/inc/vmbxcenrephandler.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     1 /*
       
     2 * Copyright (c) 2009-2010 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:  Access class to central repository
       
    15 *  Interface   : Private, CVmbxCenRepHandler
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef C_VMBXCENREPHANDLER_H
       
    21 #define C_VMBXCENREPHANDLER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 #include <voicemailboxdefs.h>
       
    27 #include "mvmbxcenrephandler.h"
       
    28 
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CRepository;
       
    32 class CVoiceMailboxEntry;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 /**
       
    36 *  Creates connection to central repository and handles data flow from/to it
       
    37 *
       
    38 *  @lib vmbxengine.lib
       
    39 */
       
    40 NONSHARABLE_CLASS( CVmbxCenRepHandler ) : public CBase,
       
    41                                           public MVmbxCenrepHandler
       
    42     {
       
    43 public: // Constructors and destructor
       
    44 
       
    45     /**
       
    46      * Two-phased constructor.
       
    47      */
       
    48     static CVmbxCenRepHandler* NewL( );
       
    49 
       
    50     /**
       
    51      * Destructor.
       
    52      */
       
    53     virtual ~CVmbxCenRepHandler();
       
    54 
       
    55 public: // New functions
       
    56 
       
    57     /**
       
    58      * Get saved mailbox number
       
    59      *
       
    60      * @param aEntry saved vmbx number data
       
    61      * @return Symbian OS error code (KErrNone if successful)
       
    62      */
       
    63     TInt GetVmbxNumber( CVoiceMailboxEntry& aEntry );
       
    64 
       
    65     /**
       
    66      * Saves the mailbox number
       
    67      *
       
    68      * @param aEntry vmbx number data to save
       
    69      * @return Symbian OS error code (KErrNone if successful)
       
    70      */
       
    71     TInt Save( const CVoiceMailboxEntry& aEntry );
       
    72 
       
    73     /**
       
    74      * Fetches active store type
       
    75      *
       
    76      * @return aStoreType Active store in use
       
    77      */
       
    78     TVmbxMemoryLocation StoreType();
       
    79 
       
    80     /**
       
    81      * Returns state of the video support
       
    82      *
       
    83      * @return ETrue if supported
       
    84      */
       
    85     TBool VideoSupported();
       
    86 
       
    87     /**
       
    88      * Returns ETrue if CenRep setting Sim read only
       
    89      *
       
    90      * @return ETrue if CenRep setting Sim read only
       
    91      */
       
    92     TBool IsSimReadOnly();
       
    93 
       
    94      /**
       
    95      * Returns ETrue if number allowed to user change
       
    96      *
       
    97      * @return ETrue if from Sim
       
    98      */
       
    99     TBool IsAllowedUserEdit();
       
   100 
       
   101 private: // New functions
       
   102 
       
   103     /**
       
   104      * C++ default constructor.
       
   105      * @param aStoreHandler Reference to StoreHandler
       
   106      */
       
   107     CVmbxCenRepHandler();
       
   108 
       
   109     /**
       
   110      * By default Symbian 2nd phase constructor is private.
       
   111      */
       
   112     void ConstructL();
       
   113 
       
   114     /**
       
   115      * Resolves Voice CenRep key to be used
       
   116      *
       
   117      * @param in aLine current ALS lne
       
   118      * @return CenRep key
       
   119      */
       
   120     TUint32 VoiceCenRepKey( const TVmbxAlsLineType& aLine );
       
   121 
       
   122     /**
       
   123      * Resolves Video CenRep key to be used
       
   124      *
       
   125      * @param in aLine current ALS lne
       
   126      * @return CenRep key
       
   127      */
       
   128     TUint32 VideoCenRepKey( const TVmbxAlsLineType& aLine );
       
   129 
       
   130    /**
       
   131      * Resolves CenRep key to be used
       
   132      *
       
   133      * @param aEntry entry type
       
   134      * @return CenRep key
       
   135      */
       
   136     TUint32 ResolveKeyByEntry( const CVoiceMailboxEntry& aEntry );
       
   137 
       
   138 private: //data
       
   139 
       
   140     /**
       
   141      * Central repository session
       
   142      * Own.
       
   143      */
       
   144     CRepository* iCRSession;
       
   145     };
       
   146 
       
   147 #endif // C_VMBXCENREPHANDLER_H