messagingapp/msgservices/msgserviceapp/src/msgservicewindow.cpp
author hgs
Tue, 31 Aug 2010 18:53:38 +0530
changeset 56 f42d9a78f435
parent 51 3507212d340e
child 62 fdbe8253b596
permissions -rw-r--r--
201033_02

/*
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
 *
 * Contributors:
 *
 * Description: Message services manages all messaging Qt highway services. 
 *
 */

#include "msgservicewindow.h"

#include "msgviewinterface.h"
#include "msgsendinterface.h"
#include "msgshareuiinterface.h"
#include "msgurihandlerinterface.h"

#include "msgstorehandler.h"
#include "msgserviceviewmanager.h"

// LOCALIZATION
#define LOC_BUTTON_DELETE hbTrId("txt_common_button_delete")
#define LOC_BUTTON_CANCEL hbTrId("txt_common_button_cancel")
#define LOC_DELETE_MESSAGE hbTrId("txt_messaging_dialog_delete_message")


// ----------------------------------------------------------------------------
// MsgServiceWindow::MsgServiceWindow
// @see header
// ----------------------------------------------------------------------------
MsgServiceWindow::MsgServiceWindow():HbMainWindow(
        NULL,Hb::WindowFlagTransparent),
mSendInterface(NULL),
mViewInterface(NULL),
mShareUiInterface(NULL),
mStoreHandler(NULL),
mViewManager(NULL)
    {
    // create stote handler
    mStoreHandler = q_check_ptr(new MsgStoreHandler());
    
    // create view manager
    mViewManager = new MsgServiceViewManager(mStoreHandler,this);
    
    // create interfaces 
    mSendInterface = new MsgSendInterface(mViewManager);
    mViewInterface = new MsgViewInterface(mViewManager);
    mUriInterface = new MsgUriHandlerInterface(mViewManager);
    mShareUiInterface = new MsgShareUiInterface(mViewManager);
    }

// ----------------------------------------------------------------------------
// MsgServiceWindow::~MsgServiceWindow
// @see header
// ----------------------------------------------------------------------------
MsgServiceWindow::~MsgServiceWindow()
    {
    if(mShareUiInterface)
        {
        delete mShareUiInterface;
        }
	
	if(mUriInterface)
        {
        delete mUriInterface;
        }
		
    if(mViewInterface)
        {
        delete mViewInterface;
        }
    if(mSendInterface)
        {
        delete mSendInterface;
        }
    if(mViewManager)
        {
        delete mViewManager;
        }

    if(mStoreHandler)
        {
        delete mStoreHandler;
        }
    }