email/framework/src/T_MsgSharedDataBase.cpp
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // @file 
       
    15 // This file contains the shared data class for the base server which creates
       
    16 // a session object.
       
    17 // 
       
    18 //
       
    19 
       
    20 
       
    21 
       
    22 /*  user includes */
       
    23 #include "T_MsgSharedDataBase.h"
       
    24 
       
    25 
       
    26 /* epoc includes */
       
    27 #include <miutset.h>
       
    28 
       
    29 
       
    30 /**
       
    31   Function : CT_MsgSharedDataBase
       
    32   Description : Constructor	
       
    33   @return : N/A
       
    34 */
       
    35 CT_MsgSharedDataBase::CT_MsgSharedDataBase()
       
    36 :	CBase()
       
    37 ,	iSession(NULL)
       
    38 ,	iRegistry(NULL)
       
    39 ,	iMtm(NULL)
       
    40 	{
       
    41 	}
       
    42 
       
    43 
       
    44 /**
       
    45   Function : ConstructL
       
    46   Description : Creates the object of session, registry,initialises MTM
       
    47   @return : N/A
       
    48   @leave  :	KErrNoMemory	There is no sufficient memory
       
    49 */
       
    50 void CT_MsgSharedDataBase::ConstructL()
       
    51 	{
       
    52 	iSession	= CMsvSession::OpenSyncL(*this);
       
    53 	iRegistry	= CClientMtmRegistry::NewL(*iSession);
       
    54 	iMtm		= NewMtmL();
       
    55 	}
       
    56 
       
    57 
       
    58 /**
       
    59   Function : ~CT_MsgSharedDataBase
       
    60   Description : Destructor
       
    61   @return : N/A
       
    62 */
       
    63 CT_MsgSharedDataBase::~CT_MsgSharedDataBase()
       
    64 	{
       
    65 	delete iMtm;
       
    66 	iMtm=NULL;
       
    67 
       
    68 	delete iRegistry;
       
    69 	iRegistry=NULL;
       
    70 
       
    71 	delete iSession;
       
    72 	iSession = NULL;
       
    73 	}